[mapserver-users] MapServer 7.0 WFS post request using ogc filter

Lime, Steve D (MNIT) Steve.Lime at state.mn.us
Fri Aug 19 11:55:20 PDT 2016


What does "not work" mean? Is there an error message or are you seeing an incorrect result set? What does the layer definition look like?

Steve

-----Original Message-----
From: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of TMa Teng
Sent: Thursday, August 18, 2016 8:51 AM
To: mapserver-users at lists.osgeo.org
Subject: Re: [mapserver-users] MapServer 7.0 WFS post request using ogc filter

Hi Jeff,

The filter encoding does not work on the new instance which runs Mapserver 7.0 but the same request runs correctly when I use Mapserver 6.0.4 with duplicated mapfile and filter.

My test filter request is as below:

http://gisappsproawvc2:8080/cgi-bin/mapserv.exe?map=/ms4w/apps/SanbornImage/SanbornImage_wfs.map&&REQUEST=GetFeature&SERVICE=WFS&VERSION=1.0.0&TYPENAME=SanbornGeoref&MAXFEATURES=200& &Filter=<Filter><BBOX><PropertyName>shape</PropertyName><Box srsName='EPSG:4326'><coordinates>-73.2239,33.4879 -71.8578,34.8471</coordinates></Box></BBOX></Filter>

I am not sure why it is not working when I switch to newer version. That being said, there could be some part I missed when I install/configure Mapserver. I am using MS4W 3.1.4, data source is in SQL Server spatial.
Please advise how could I troubleshoot this.

Thanks,

-----Original Message-----
From: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Jeff McKenna
Sent: Wednesday, August 17, 2016 4:45 PM
To: mapserver-users at lists.osgeo.org
Subject: Re: [mapserver-users] MapServer 7.0 WFS post request using ogc filter

Could you try to duplicate your filter request, manually?  Here is an example from the MapServer WFS Filter Encoding howto:

http://demo.mapserver.org/cgi-bin/wfs?&VERSION=1.0.0&SERVICE=WFS&REQUEST=GetFeature&TYPENAME=cities&Filter=<Filter><BBOX><PropertyName>Name>NAME</PropertyName><Box
srsName='EPSG:4326'><coordinates>135.2239,34.4879
135.8578,34.8471</coordinates></Box></BBOX></Filter>

Does a manually-created filter request work for you?  (it just takes a little time to write the full request through the url, but it is very useful for testing)

More working filters can be found in the howto: 
http://mapserver.org/ogc/filter_encoding.html

-jeff


--
Jeff McKenna
MapServer Consulting and Training Services http://www.gatewaygeomatics.com/



On 2016-08-17 2:31 PM, TMa Teng wrote:
> Yes, I am able to use GET method to get the features when use the WFS.
>
> Get request example:
> http://gisappsdev:8080/cgi-bin/mapserv.exe?map=/ms4w/apps/SanbornImage/SanbornImage_wfs.map&REQUEST=GetFeature&SERVICE=WFS&VERSION=1.0.0&TYPENAME=SanbornGeoref&MAXFEATURES=20&bbox=-72.93411254882812,41.30730211327143,-72.93099045753479,41.30866411858396
>
> It returns features as expected.
>
> The problem is when I try to get features using POST method on the same WFS (see raw in fiddler below):


_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
_______________________________________________
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