Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#3975 closed defect (invalid)

WFS GetFeature problem with order of coordinate systems in metadata

Reported by: crispin Owned by: mapserverbugs
Priority: normal Milestone:
Component: WFS Server Version: 6.0
Severity: normal Keywords:
Cc:

Description (last modified by dmorissette)

MS v6.01 from http://www.gisinternals.com/sdk/ My WFS GetFeature request was unexpectedly returning no features. The cause (revealed by setting DEBUG 5) was that the submitted BBOX was being changed to values that find no features. The data is in MS SQL 2008, in coord sys 4326. Here is example WFS request:

http://www.anglingdiary.org.uk/esdmMapServer6/ms/apps/mapserv.exe?map=D:\Websites\mojoPortal_SFCC\esdmMapServer\map\SFCC.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=SFCCWatersLine&SRS=4326&BBOX=-5.2,56.3,-5.5,56.6

This should return a ton of features. But DEBUG output revealed this:

[Sun Jul 31 11:23:42 2011].658000 msOGRFileWhichShapes: Setting spatial filter to -7.557295 49.767308 -7.557291 49.767311
[Sun Jul 31 11:23:42 2011].660000 msOGRFileNextShape: Returning MS_DONE (no more shapes)

So for some reason it was incorrectly transforming the BBOX. I have found the cause (after much experimenting!). Originally I had this WEB metadata:

WEB
    IMAGEPATH "D:\Websites\blah\tmp"
    IMAGEURL "../tmp/"
    METADATA
      "wfs_srs"	"EPSG:27700 EPSG:4326"
      etc etc

and the WFS request returned no features. I changed the wfs_srs to this:

      "wfs_srs"	"EPSG:4326 EPSG:27700"

and it started working. Interestingly, requests in &SRS=27700 always worked. For info, I also have this in the MAP:

PROJECTION
    "init=epsg:4326"
END

and the same in each LAYER. If I took this section out of the layer, then it would also start working (without correcting the WEB metadata), but it responded with the wrong SRS in the GML. Hope this is enough information!

Change History (2)

comment:1 by dmorissette, 13 years ago

Resolution: invalid
Status: newclosed

There is no evidence of a bug in the information provided: this looks like a mapfile configuration problem. Contrary to WMS, WFS 1.0.0 does not support a SRS request parameter, it always works with the SRS advertized for each feature type (so you should not expect SRS=EPSG:4326 or SRS=EPSG:27700 in the URL to make any difference). It is also important that you set the PROJECTION object at the map level and in each layer to the right values.

I suggest you have another read at: http://mapserver.org/ogc/wfs_server.html#rules-for-handling-srs-in-mapserver-wfs

Closing as invalid.

comment:2 by dmorissette, 13 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.