Mapserver and WFS with TYPENAME and FILTER

Bart van den Eijnden bartvde at XS4ALL.NL
Tue Feb 28 05:12:50 EST 2006


The WFS spec defines that you need to repeat your filter for all typenames:

A filter specification describes a set of features to operate upon. The
filter is defined as specified in the Filter Encoding Specification [3].
If the FILTER parameter is used, one filter must be specified for each
feature type listed in the TYPENAME parameter. Individual filters encoded
in the FILTER parameter are enclosed in parentheses “(“ and “)”.

Best regards,
Bart

> Hi there
>
> I am doing some WFS with Mapserver, and i have a question.
>
> When i list all the features in eg 2 layers (TYPENAME=layer_1,layer_2)
> Mapserver returns all features in the respective 2 layers that i have
> defined in TYPENAME
>
> http://vfp1.vestforsk.no/cgi-bin/mapserv.exe?map=E:\Inetpub\sites\vfp1.vestforsk.no\mapengine\mapfile_wfs.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=getfeature&TYPENAME=layer_1,layer_2
>
>
> But if I add a FILTER to the request e.g. a BOUNDING BOX, mapserver only
> returns the features from the first layer in TYPENAME.
>
> http://vfp1.vestforsk.no/cgi-bin/mapserv.exe?map=E:\Inetpub\sites\vfp1.vestforsk.no\mapengine\mapfile_wfs.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=getfeature&TYPENAME=layer_1,layer_2&FILTER=<Filter><BBOX><PropertyName>Geometry</PropertyName><gml:Box%20srsName='EPSG:32633'><gml:coordinates>76170,6813686%2077228,6814744</gml:coordinates></gml:Box></BBOX></Filter>
>
>
> My question is:
> Are there limitations on the use of FILTER and TYPENAME? Is it only
> possible to use FILTER withe one layer at the time? (The above example
> works fine, but it only returns features for 1 layer).
>
> Regards Sture
>



More information about the mapserver-dev mailing list