WFS filter query

N Zhou zhou_naijun at HOTMAIL.COM
Tue Mar 15 08:37:10 PST 2005


Hi Bart,

Thank you for your email.

The only difference between your example and mine is "PropertyName" under
the <ogc:BBOX>. I think "PropertyName" is optional to specify returned
elements. Does "<PropertyName>MS_GEOMETRY</PropertyName>" mean that spatial
BBOX query should use the column "MS_GEOMETRY"? I use .shp files.

Should I change my map file (or mapserver, which works for non Filter
requests) to support the Filter and/or BBOX query? When I use the URL
request:
http://localhost/cgi-bin/mapserv_44.exe?map=mymapfile&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=myType&FILTER=<Filter><Within><gml:Box><gml><coordinates>0,0
600000,600000</gml:coordinates></gml:Box></Within></Filter>

the mapserver told me this:
msWFSGetFeature(): WFS server error. Invalid or Unsupported FILTER in
GetFeature

Thank you!

N. Zhou

>From: Bart van den Eijnden <bartvde at XS4ALL.NL>
>Reply-To: bartvde at XS4ALL.NL
>To: MAPSERVER-USERS at LISTS.UMN.EDU
>Subject: Re: [UMN_MAPSERVER-USERS] WFS filter query
>Date: Tue, 15 Mar 2005 16:33:28 +0100
>
>Hi,
>
>this works for me:
>
><GetFeature service="WFS" version="1.0.0"
>   maxFeatures="20"
>   xmlns="http://www.opengis.net/wfs"
>   xmlns:gml="http://www.opengis.net/gml"
>   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://schemas.opengis.net/wfs/1.0.0 WFS-basic.xsd">
>   <Query typeName="gemeentes">
>     <ogc:Filter>
>       <ogc:BBOX>
>         <PropertyName>MS_GEOMETRY</PropertyName>
>         <gml:Box><gml:coordinates>121000,469000
>140000,470000</gml:coordinates></gml:Box>
>       </ogc:BBOX>
>     </ogc:Filter>
>   </Query>
></GetFeature>
>
>Best regards,
>Bart
>
> > Hi,
> >
> > I have a problem of using WFS filter to get data within a bounding box.
>My
> > WFS post request is:
> >
> > <?xml version=\"1.0\" ?>
> > <wfs:GetFeature service="WFS" version="1.0.0" outputFormat="GML2"
> >             xmlns:wfs="http://www.opengis.net/wfs"
> >             xmlns:ogc="http://www.opengis.net/ogc"
> >             xmlns:gml="http://www.opengis.net/gml"
> >             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >             xsi:schemaLocation="http://www.opengis.net/wfs"
> >             http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd">
> >   <wfs:Query typeName="mytype">
> >      <ogc:Filter>
> >         <ogc:BBOX>
> >            <gml:Box>
> >               <gml:coordinates>0,0 505234,5448023</gml:coordinates>
> >            </gml:Box>
> >        </ogc:BBOX>
> >      </ogc:Filter>
> >   </wfs:Query>
> > </wfs:GetFeature>
> >
> > But the mapserver would stop with an error of "Premature end of script
> > headers: mapserv_44.exe"
> > Could anyone tell me why? I know there is a WFS bug of filtering some
> > elements rather than getting all elements.
> >
> > Thank you very much!
> >
> > N. Zhou
> >



More information about the MapServer-users mailing list