[mapserver-users] Problems with sld´s polgonsymbolizer interpretation

Thilo Wehrmann thilo.wehrmann at dlr.de
Tue Jan 13 09:05:35 PST 2009


    hello together,
sorry for possible double submission. Currently we work at the dynamic
generation of wms service layers for our project data. For styling
issues we use slds stored in exist database. The access to the sld works
straight but we figure out some problems with line/polygonsymbolizer
interpretation of the returned slds. For the raster data everything
works fine but for all vector data the fill colours won´t be used
(standard grey is used instead. Mapserver 5.2.1 uses the sld because
changes of the font settings are recognized and correctly rendered.

Output of Style request:
<StyledLayerDescriptor version="1.0.0"
xmlns="http://www.opengis.net/sld"
xmlns:gml="http://www.opengis.net/gml"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengeospatial.net/sld/1.0.0/StyledLayerDescriptor.xsd">

<NamedLayer>
<Name>vaf67858756a74379b99f4573d785a76e</Name>
<UserStyle>
<FeatureTypeStyle>
<Rule>
<Name>Vietnam country boundary</Name>
<MaxScaleDenominator>5000000.000000</MaxScaleDenominator>
<PolygonSymbolizer>
<Fill>
<CssParameter name="fill">#009b9b</CssParameter>
<CssParameter name="fill-opacity">1.00</CssParameter>
</Fill>
<Stroke>
<CssParameter name="stroke">#730000</CssParameter>
<CssParameter name="stroke-width">15</CssParameter>
</Stroke>
</PolygonSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>

corresponding SLD part:
        <sld:NamedLayer xmlns="http://www.opengis.net/sld">
                <sld:Name>vaf67858756a74379b99f4573d785a76e</sld:Name>
                <sld:UserStyle>
                        <sld:Name>Style1</sld:Name>
                        <sld:Title>Default Styler</sld:Title>
                        <sld:Abstract/>
                        <sld:FeatureTypeStyle>
                                <sld:Name>name</sld:Name>
                                <sld:Title>title</sld:Title>
                                <sld:Abstract>abstract</sld:Abstract>
                               
<sld:FeatureTypeName>DCW_0000_country_vietnam_poly</sld:FeatureTypeName>
                               
<sld:SemanticTypeIdentifier>generic:geometry</sld:SemanticTypeIdentifier>
                                <sld:Rule>
                                       
<sld:Name>DCW_0000_country_vietnam_poly</sld:Name>
                                       
<sld:Title>DCW_0000_country_vietnam_poly</sld:Title>
                                        <sld:PolygonSymbolizer>
                                                <sld:Fill>
                                                       
<sld:CssParameter name="fill">
                                                               
<ogc:Literal>#009b9b</ogc:Literal>
                                                        </sld:CssParameter>
                                                       
<sld:CssParameter name="fill-opacity">
                                                               
<ogc:Literal>1</ogc:Literal>
                                                        </sld:CssParameter>
                                                </sld:Fill>
                                                <sld:Stroke>
                                                       
<sld:CssParameter name="stroke">
                                                               
<ogc:Literal>#730000</ogc:Literal>
                                                        </sld:CssParameter>
                                                       
<sld:CssParameter name="stroke-linecap">
                                                               
<ogc:Literal>miter</ogc:Literal>
                                                        </sld:CssParameter>
                                                       
<sld:CssParameter name="stroke-linejoin">
                                                               
<ogc:Literal>butt</ogc:Literal>
                                                        </sld:CssParameter>
                                                       
<sld:CssParameter name="stroke-opacity">
                                                               
<ogc:Literal>1</ogc:Literal>
                                                        </sld:CssParameter>
                                                       
<sld:CssParameter name="stroke-width">
                                                               
<ogc:Literal>15</ogc:Literal>
                                                        </sld:CssParameter>
                                                </sld:Stroke>
                                        </sld:PolygonSymbolizer>
                                </sld:Rule>
                        </sld:FeatureTypeStyle>
                </sld:UserStyle>
        </sld:NamedLayer>

The compiled map file after sld interpretation says nothing about these
settings and standard colours are used for painting. I read that there
were some problems in earlier versions of mapserver concerning stroke
colours...

Does anybody know about this problem or knows a workaround? mapserver is
quite an impressive piece of software.

Thank you and best regards,
 Thilo Wehrmann



More information about the MapServer-users mailing list