[mapserver-users] Using applySLD and generateSLD with Mapscript Python

Guillaume Sueur no-reply at neogeo-online.net
Tue Dec 6 11:57:33 EST 2011


Actually, this only happens for POSTGIS layers and not for SHAPEFILE 
layers, and only with MapServer 6. I have filled a ticket.

Best

Guillaume

Le 06/12/11 10:54, Guillaume Sueur a écrit :
> Hi list,
>
> I'm playing with mapscript python and SLD files, and having some kinds
> of troubles.
> It seems that applySLD doesn't build an EXPRESSION tag for the CLASS it
> refers too.
> Starting from a mapfile with CLASS and EXPRESSION set, the SLD body
> generated is correct :
> <Rule>
> <Name>VELOV</Name>
> <ogc:Filter><ogc:PropertyIsGreaterThanOrEqualTo><ogc:PropertyName>nbbornettes</ogc:PropertyName><ogc:Literal>20</ogc:Literal></ogc:PropertyIsGreaterThanOrEqualTo></ogc:Filter>
>
> <PointSymbolizer>
> <Graphic>
> <Mark>
> <WellKnownName>square</WellKnownName>
> <Fill>
> <CssParameter name="fill">#993300</CssParameter>
> </Fill>
> </Mark>
> <Size>8</Size>
> </Graphic>
> </PointSymbolizer>
> </Rule>
>
> but applying this same SLD file to the mapfile via mapscript gives only
> a FILTER set:
> FILTER ("nbbornettes">= 20)
> ...
> CLASS
> NAME "VELOV"
> STYLE
> ANGLE 0
> COLOR 153 51 0
> OFFSET 0 0
> SIZE 8
> SYMBOL "sld_mark_symbol_square_filled"
> END # STYLE
> END # CLASS
>
> The matching between SLd Filters and Classes has been lost. It means
> that you can't build any SLD file with more than one class/filter and
> see them drawn on the map.
> I 'm using mapscript 6.0.1
>
> Thanks for any clue
>
> Best regards
>
> Guillaume
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>


More information about the mapserver-users mailing list