[mapserver-users] Filtering GetFeatureInfo requests

Huizer, G.J. G.Huizer at gw.rotterdam.nl
Wed May 26 07:24:00 PDT 2010


Thanks Bart for your quick reply. I guess we'll try WFS!

Regards,

Geert


-----Oorspronkelijk bericht-----
Van: Bart van den Eijnden (OSGIS) [mailto:bartvde at osgis.nl] 
Verzonden: woensdag 26 mei 2010 15:54
Aan: Huizer, G.J. 
CC: mapserver-users at lists.osgeo.org
Onderwerp: Re: [mapserver-users] Filtering GetFeatureInfo requests


Not possible using WMS GetFeatureInfo, the SLD parameter will be
ignored, it's not part of the GetFeatureInfo request at all.

Alternatively, you can create a WFS GetFeature request with the same
filter as in the SLD.

Best regards,
Bart

> Hi list,
>
> At the moment I am trying to figure out how to include a filter 
> statement in a GetFeatureInfo request. I already tested this using a 
> SLD-filter which works fine with a GetMap request. However, when 
> combining this with a GetFeatureInfo request, I get all the features 
> at that point. There is no filter being applied.
>
> I'm puzzled.
>
> First of all this is the SLD filter I am using:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <StyledLayerDescriptor version="1.0.0">
>   xmlns="http://www.opengis.net/sld"
>   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.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd">
>
>   <NamedLayer>
>     <Name>sdo_ldw_ccw_vlk</Name>
>     <UserStyle>
>       <Title>nvt</Title>
>       <Abstract>nvt</Abstract>
>       <FeatureTypeStyle>
>         <Rule>
>           <ogc:Filter>
>             <ogc:PropertyIsLike wildcard='*' singleChar='.'
escape='!'>
>               <ogc:PropertyName>LOC_ZK</PropertyName>
>               <ogc:Literal>*WERELD*</Literal>
>             </ogc:PropertyIsLike>
>           </ogc:Filter>
>         </Rule>
>       </FeatureTypeStyle>
>     </UserStyle>
>   </NamedLayer>
> </StyledLayerDescriptor>
>
>
> I use this GetMap request (works fine):
>
> http://<server>/cgi-bin/mapserv.exe?map=<path>\ldw_bsb_sdo.map&LAYERS=
> sd
>
o_ldw_ccw_vlk&STYLES=&VERSION=1.1.1&REQUEST=GetMap&SRS=EPSG:28992&BBOX=9
>
1000,435250,94000,438250&WIDTH=750&HEIGHT=750&FORMAT=image/png&TRANSPARE
>
NT=FALSE&BGCOLOR=0xFFFFFF&SERVICE=WMS&SLD=http://<server>/db_vla_str.xml
>
>
> I use this GetFeatureInfo request (sadly doesn't work):
>
> http://<server>/cgi-bin/mapserv.exe?map=<path>\ldw_bsb_sdo.map&LAYERS=
> sd
>
o_ldw_ccw_vlk&STYLES=&VERSION=1.1.1&REQUEST=GetFeatureInfo&SRS=EPSG:2899
>
2&BBOX=91000,435250,94000,438250&WIDTH=750&HEIGHT=750&QUERY_LAYERS=sdo_l
>
dw_ccw_vlk&X=325&Y=662&SERVICE=WMS&FEATURE_COUNT=25&INFO_FORMAT=applicat
> ion/vnd.ogc.gml&SLD=http://<server>/db_vla_str.xml
>
> I have tested this on Mapserver 5.2.1 and 5.6.3 without success.
>
> Has anyone got an idea how to solve this? Any help would be much 
> appreciated! Thanks in advance.
>
> Geert
>
>
>
> _______________________________________________
> 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