[mapserver-users] WFS axis order in Mapserver 7.0
Even Rouault
even.rouault at spatialys.com
Fri Oct 30 09:28:28 PDT 2015
Le vendredi 30 octobre 2015 17:10:41, Rahkonen Jukka (MML) a écrit :
> Hi,
>
> I am testing with the latest MS4W:
> MapServer version 7.0.0 (MS4W 3.1.0)
>
> I put test data and mapfile to
> http://latuviitta.org/downloads/MS_axis_test.zip Map file may have some
> dirt from the original one that I simplified but I did test that it shows
> the issue for me with request:
> http://localhost:8060/cgi-bin/mapserv.exe?map=c:/ms4w/apps/axis_test.map&s
> ervice=WFS&version=2.0.0&request=getfeature&typename=states_shp
>
> Part of the response:
> <gml:posList srsDimension="2">-88.071564 37.510990 -88.087883 37.476273
> -88.311707 37.442852
>
> Same lon-lat order comes with WFS 1.1.0 and of course with WFS 1.0.0.
>
> If it works for you then perhaps the issue is in MS4W.
It didn't work for me either. I had a hard time figuring out what's wrong and
what's wrong is the following line:
"ows_srs" "CRS:84 EPSG:4326 EPSG:32634 EPSG:3857 EPSG:2923"
and more particularly the CRS:84 at the beginning. It confuses mapserver to
think the order is lon/lat. If you remove it, everything's fine again. This
might be a bug, or nut, as I recall there's a quite complex explanation
somewhere in the doc describing the precedence between MAP projection, LAYER
projection, ows_srs at MAP level, wfs_srs at LAYER level...
(I finally found
https://github.com/mapserver/msautotest/blob/master/wxs/wfs_200_allgeoms.map
which is a test with EPSG:4326 data and requests without explicit srsName and
the results are correct :
https://github.com/mapserver/msautotest/blob/master/wxs/expected/wfs_200_allgeoms_getfeature.xml
)
>
> -Jukka Rahkonen-
>
> Even Rouault wrote:
>
> Le vendredi 30 octobre 2015 16:15:29, Rahkonen Jukka (MML) a écrit :
> > Hi,
> >
> > I am getting EPSG:4326 data with wrong axis order from Mapserver 7.0
> > and WFS 1.1.0 and 2.0.0 with my demo data. However, I believe that
> > there are automatic tests which must be passed before new Mapserver
> > releases are published. Where could I find data, mapfiles, and tests
> > so I could compare them with my own tests?
>
> https://github.com/mapserver/msautotest/tree/master/wxs
>
> For example
> https://github.com/mapserver/msautotest/blob/master/wxs/wfs_200.map
> has
>
> # srsName
> # Next 3 requests should be equivalent in result # RUN_PARMS:
> wfs_200_getfeature_srsname.xml [MAPSERV]
> QUERY_STRING="map=[MAPFILE]&SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&T
> YPENAMES=province&SRSNAME=EPSG:4269" > [RESULT_DEVERSION] # RUN_PARMS:
> wfs_200_getfeature_urn_srsname.xml [MAPSERV]
> QUERY_STRING="map=[MAPFILE]&SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&T
> YPENAMES=province&SRSNAME=urn:ogc:def:crs:EPSG::4269" > [RESULT_DEVERSION]
> # RUN_PARMS: wfs_200_post_getfeature_srsname.xml [MAPSERV] [POST]<?xml
> version="1.0" ?><GetFeature service="WFS" version="2.0.0"
> xmlns="http://www.opengis.net/wfs/2.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://www.opengis.net/wfs/2.0
> http://schemas.opengis.net/wfs/2.0/wfs.xsd"><Query srsName="EPSG:4269"
> typeNames="province"></Query></GetFeature>[/POST] > [RESULT_DEVERSION] #
>
> And if you look at :
>
> https://github.com/mapserver/msautotest/blob/master/wxs/expected/wfs_200_ge
> tfeature_srsname.xml
>
> the axis order seems ok (somewhere in Canada I believe)
>
> This is with EPSG:4269 but should work similarly for EPSG:4326
>
> > -Jukka Rahkonen-
>
> --
> Spatialys - Geospatial professional services http://www.spatialys.com
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
--
Spatialys - Geospatial professional services
http://www.spatialys.com
More information about the MapServer-users
mailing list