Hi geoserver-community,

creating a style in CSS-Format translates the style to sld-XML.

The documentation states:
The SLD Name for a rule is autogenerated based on the filters from the
CSS rules that combined to form it, for aid in troubleshooting.

Instead of this, there is no sld name property added to the rule ( no
<sld:Rule><sld:Name>1</sld:Name> (...))
Because of this, getLegendGraphic cant be limited to specific rules.

Is this a bug or a configuration problem? I'm using Geoserver Version
2.11.0 GeoTools Version 17.0 (rev cf34347a4544cac900c09f2e5de4c5fb138c8637)


/* @title Borders */
* {
    stroke: black;
}

/* @title Parcels */
[category='parcel'] {
    fill: blue;
}

<?xml version="1.0" encoding="UTF-8"?><sld:StyledLayerDescriptor
xmlns="http://www.opengis.net/sld";
xmlns:sld="http://www.opengis.net/sld";
xmlns:gml="http://www.opengis.net/gml";
xmlns:ogc="http://www.opengis.net/ogc"; version="1.0.0">
  <sld:NamedLayer>
    <sld:Name>Default Styler</sld:Name>
    <sld:UserStyle>
      <sld:Name>Default Styler</sld:Name>
      <sld:FeatureTypeStyle>
        <sld:Rule>
          <sld:Title>Borders, Parcels</sld:Title>
          <ogc:Filter>
            <ogc:PropertyIsEqualTo>
              <ogc:PropertyName>category</ogc:PropertyName>
              <ogc:Literal>parcel</ogc:Literal>
            </ogc:PropertyIsEqualTo>
          </ogc:Filter>
          <sld:PolygonSymbolizer>
            <sld:Fill>
              <sld:CssParameter name="fill">#0000ff</sld:CssParameter>
            </sld:Fill>
            <sld:Stroke/>
          </sld:PolygonSymbolizer>
        </sld:Rule>
        <sld:Rule>
          <sld:Title>Borders</sld:Title>
          <ogc:Filter>
            <ogc:PropertyIsNotEqualTo>
              <ogc:PropertyName>category</ogc:PropertyName>
              <ogc:Literal>parcel</ogc:Literal>
            </ogc:PropertyIsNotEqualTo>
          </ogc:Filter>
          <sld:LineSymbolizer>
            <sld:Stroke/>
          </sld:LineSymbolizer>
        </sld:Rule>
        <sld:VendorOption name="ruleEvaluation">first</sld:VendorOption>
      </sld:FeatureTypeStyle>
    </sld:UserStyle>
  </sld:NamedLayer>
</sld:StyledLayerDescriptor>

Thanks in advance

Stefan

-- 
=========================================
Dipl.Ing. Stefan Overkamp
tel: 02052 / 800 9847
GISWORKS GbR, Gröndelle 3, 42555 Velbert
www.gisworks.info

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to