GetFeature-request with a query expression

Kralidis,Tom [Burlington] Tom.Kralidis at EC.GC.CA
Thu Apr 26 08:33:13 EDT 2007


> is it possible to include into the GetFeature-request a query 
> expression (for instance [ID]=5) so that only the objects, 
> which match the defined criteria, are returned in the response?
> I would like to get all filed values of some feature not 
> having to scroll through the thousands of features, which I 
> am not interested in.
> 

MapServer's WFS Server includes support for Filter Encoding.  So, a
filter expression for id=5 would look like:

http://www.example.org/wfs?service=WFS&version=1.0.0&request=GetFeature&
typename=foo&filter=<Filter><PropertyIsEqualTo><PropertyName>ID</Propert
yName><Literal>5<Literal></PropertyIsEqualTo></Filter>

See the Filter HOWTO
(http://mapserver.gis.umn.edu/docs/howto/filterencoding) and MapServer
OGC Web Services Workshop (http://ms-ogc-workshop.maptools.org/) for
more info.

Hope this helps.

..Tom



More information about the mapserver-users mailing list