[Mapserver-users] SLD questions - How to filter
Yewondwossen Assefa
assefa@dmsolutions.ca
Thu, 26 Feb 2004 11:08:00 -0500
Hi There,
I have added a link in Mapserver wiki to a documentation related to
the SLD support in Mapserver :
http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?SLDMapServer.
Note that this document will in the near feature be used to produce an
offical howto.
There are examples in this documentation that should answer your
questions. If you still have some specific issues, please let me know.
Best Regrads,
Stefan Schwarzer wrote:
> Dear list, dear Assefa,
>
> I am trying to understand the functioning of the Styled Layer Descriptor
> and am testing the 4.1 development version.
>
> My "problem" (i.e. challenge) is the following: I would like to indicate
> a country name within a WMS query, e.g. something like:
>
> http://remote_server/cgi-bin/mapserv_41.exe?map=PATH/wms.map
> &WMTVER=1.0.0
> &REQUEST=map
> &TRANSPARENT=TRUE
> &SRS=EPSG:4326
> &BBOX=50,0,170,40
> &WIDTH=300
> &HEIGHT=150
> &FORMAT=PNG
> &layers=boundaries
>
> * **&selectedCountry=China
>
> *in order to receive something like the attached map (highlighting the
> selected country).
>
> As far as I understand I have to setup a SLD file... (I am not at all
> sure about the correct use of the parameters!)
> <?xml version="1.0" encoding="UTF-8"?>
> <StyledLayerDescriptor version="1.0.0">
> <NamedLayer>
> <Name>boundaries</Name>
> <UserStyle>
> <Filter>
> <PropertyIsEqualTo>
> <PropertyName>[CNTRY_NAME]</PropertyName>
> <Literal>Thailand</Literal>
> </PropertyIsEqualTo>
> </Filter>
> </UserStyle>
> </NamedLayer>
> </StyledLayerDescriptor>
>
> and attach it to the URL...
> &SLD=PATH/sld.xml
>
> My .map file (resp. the layer) is looking like this:
> LAYER
> NAME boundaries
> TYPE POLYGON
> STATUS ON
> DATA boundaries
> CLASSITEM CNTRY_NAME
> LABELITEM CNTRY_NAME
> CLASS
> #EXPRESSION ('[CNTRY_NAME]' eq 'China')
> NAME 'boundaries'
> #OUTLINECOLOR 0 0 0
> TEMPLATE 'dummy'
> LABEL
> FONT arial-bold
> TYPE truetype
> ANTIALIAS true
> SIZE 12
> COLOR 248 255 43
> OUTLINECOLOR 0 0 0
> END
> END
> END
>
> But in the moment it doesn't work. Can anybody give me some hints or
> indicate the location of some examples?
>
> Thanks a lot,
>
> Stefan
>
>
>
>
>
> _______________________________________
>
> *Stefan Schwarzer
> * Consultant on GEO
>
> UNEP/DEWA/GRID-Geneva
> Chemin des Anemones 11
> CH - 1219 Chatelaine
> Switzerland
>
> Tel: (+41) 22.917.83.49
> Fax: (+41) 22.917.80.29
>
> Email: stefan.schwarzer@grid.unep.ch
> Internet: http://geodata.grid.unep.ch/
> _______________________________________
>
--
----------------------------------------------------------------
Assefa Yewondwossen
Software Analyst
Email: assefa@dmsolutions.ca
http://www.dmsolutions.ca/
Phone: (613) 565-5056 (ext 14)
Fax: (613) 565-0925
----------------------------------------------------------------
_______________________________________________
Mapserver-users mailing list
Mapserver-users@lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users