I've exported shapefiles and SLDs from ArcGIS to deploy them on GeoServer. The client was using field names longer than 10 symbols so they got truncated. The field upon which the symbology is mainly built turned from SubTypeCode
to SUBTYPECOD
. I fixed the .sld
s, so my rules became:
<Rule>
<Name><![CDATA[Cable Duct]]></Name>
<Title><![CDATA[Cable Duct]]></Title>
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>SUBTYPECOD</ogc:PropertyName>
<ogc:Literal>941</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<LineSymbolizer>
<Stroke>
<CssParameter name="stroke" >#00ab1a</CssParameter>
<CssParameter name="stroke-width" >1</CssParameter>
<CssParameter name="stroke-opacity" >1</CssParameter>
</Stroke>
</LineSymbolizer>
</Rule>
On the other hand, my data view says:
But it simply does not apply, I can clearly see that it's falling back to the default symbolizer that is in the end of the .sld
. Has anyone ever had something like this?
<NamedLayer>
<Name><![CDATA[HAL_OilGas_Line]]></Name>
<UserStyle>
<FeatureTypeStyle>
<Rule>
<Name><![CDATA[Cable Duct]]></Name>
<Title><![CDATA[Cable Duct]]></Title>
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>SUBTYPECOD</ogc:PropertyName>
<ogc:Literal>941</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<LineSymbolizer>
<Stroke>
<CssParameter name="stroke" >#00ab1a</CssParameter>
<CssParameter name="stroke-width" >1</CssParameter>
<CssParameter name="stroke-opacity" >1</CssParameter>
</Stroke>
</LineSymbolizer>
</Rule>
<Rule>
<Name><![CDATA[Cable Tray]]></Name>
<Title><![CDATA[Cable Tray]]></Title>
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>SUBTYPECOD</ogc:PropertyName>
<ogc:Literal>935</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<LineSymbolizer>
<Stroke>
<CssParameter name="stroke" >#960062</CssParameter>
<CssParameter name="stroke-width" >1</CssParameter>
<CssParameter name="stroke-opacity" >1</CssParameter>
</Stroke>
</LineSymbolizer>
</Rule>
<Rule>
<Name><![CDATA[Mapping Limit Extent]]></Name>
<Title><![CDATA[Mapping Limit Extent]]></Title>
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>SUBTYPECOD</ogc:PropertyName>
<ogc:Literal>920</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<LineSymbolizer>
<Stroke>
<CssParameter name="stroke" >#9e6c00</CssParameter>
<CssParameter name="stroke-width" >1</CssParameter>
<CssParameter name="stroke-opacity" >1</CssParameter>
</Stroke>
</LineSymbolizer>
</Rule>
<Rule>
<Name><![CDATA[Pipe Bridge Line]]></Name>
<Title><![CDATA[Pipe Bridge Line]]></Title>
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>SUBTYPECOD</ogc:PropertyName>
<ogc:Literal>926</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<LineSymbolizer>
<Stroke>
<CssParameter name="stroke" >#0049b0</CssParameter>
<CssParameter name="stroke-width" >1</CssParameter>
<CssParameter name="stroke-opacity" >1</CssParameter>
</Stroke>
</LineSymbolizer>
</Rule>
<Rule>
<Name><![CDATA[Pipeline]]></Name>
<Title><![CDATA[Pipeline]]></Title>
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>SUBTYPECOD</ogc:PropertyName>
<ogc:Literal>909</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<LineSymbolizer>
<Stroke>
<CssParameter name="stroke" >#00528c</CssParameter>
<CssParameter name="stroke-width" >1</CssParameter>
<CssParameter name="stroke-opacity" >1</CssParameter>
</Stroke>
</LineSymbolizer>
</Rule>
<Rule>
<Name><![CDATA[Piping]]></Name>
<Title><![CDATA[Piping]]></Title>
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>SUBTYPECOD</ogc:PropertyName>
<ogc:Literal>1049</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<LineSymbolizer>
<Stroke>
<CssParameter name="stroke" >#003780</CssParameter>
<CssParameter name="stroke-width" >1</CssParameter>
<CssParameter name="stroke-opacity" >1</CssParameter>
</Stroke>
</LineSymbolizer>
</Rule>
<Rule>
<Name><![CDATA[<all other values>]]></Name>
<Title><![CDATA[<all other values>]]></Title>
<LineSymbolizer>
<Stroke>
<CssParameter name="stroke" >#3ca300</CssParameter>
<CssParameter name="stroke-width" >1</CssParameter>
<CssParameter name="stroke-opacity" >1</CssParameter>
</Stroke>
</LineSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>