[gdal-dev] WFS 1.1 and axis orientation - wrong coordinates
interpretation
Jachym Cepicky
jachym.cepicky at gmail.com
Thu Feb 9 14:00:03 EST 2012
Hi,
I think, OGR (and therefore MapServer too), is not taking care about
axis orientation of incomming data, acting as WFS 1.1 client. Result is
flipped data and I do not know, how the software recognizes, that axes
order is different (apperently, it does not).
We have setuped generic WFS 1.1 server with MapServer (6.0.1). Data are
published in WGS84.
With very simple request, you get the data and the axis order is Y,X
(lat, lon) (imho correct)
http://gis.bnhelp.cz/ows/crwfs?service=wfs&version=1.1.0&request=getfeature&typename=okresy
Now, when try to get this data with OGR and convert them to e.g. Shapefile
ogr2ogr okresy.shp
"WFS:http://gis.bnhelp.cz/ows/crwfs?service=wfs&version=1.1.0&request=getfeature&typename=okresy"
Resulting shapefile has inverted coordinates (wrong)
Same applies, when I defined WFS layer using MapFile and tryed to render
the image. NOTE: Probably patch [1] is needed. Data are downloaded
corectly by the client (MapServer) from the server (MapServer or
anything else), but they are not rendered, because they are not
recognized as "inverted axis" data.
LAYER
CONNECTION "http://gis.bnhelp.cz/ows/crwfs?"
CONNECTIONTYPE WFS
DATA "okresy"
METADATA
"wfs_extent" "12.0972 48.5542 18.8583 51.0558"
"wfs_request_method" "GET"
"wms_extent" "12.0972 48.5542 18.8583 51.0558"
"wfs_title" "Okresy CR"
"wfs_typename" "okresy"
"gml_include_items" "all"
"wfs_version" "1.1.0"
"wms_title" "Okresy CR"
END # METADATA
NAME "okresy"
PROJECTION
"init=epsg:4326"
END # PROJECTION
STATUS OFF
TEMPLATE "foo"
TILEITEM "location"
TYPE POLYGON
UNITS METERS
CLASS
STYLE
ANGLE 0
COLOR 238 153 0
OFFSET 0 0
POLAROFFSET 0 0
OUTLINECOLOR 134 81 0
SIZE 5
WIDTH 5
END # STYLE
END # CLASS
END # LAYER
NOTE: WFS 1.0.0 just works.
So, do I consider this right as bug in OGR WFS 1.1 client implementation?
Thanks
Jachym
[1] http://trac.osgeo.org/mapserver/ticket/4118
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
Url : http://lists.osgeo.org/pipermail/gdal-dev/attachments/20120209/a0375ca7/signature.bin
More information about the gdal-dev
mailing list