[gdal-dev] OGR, WFS and axis

jratike80 jukka.rahkonen at maanmittauslaitos.fi
Tue Aug 13 03:14:13 PDT 2019


Hi,

Direct request 
http://map.sitr.regione.sicilia.it/orbs/services/geositi/catalogo_geositi/MapServer/WFSServer?service=wfs&request=GetFeature&TypeNames=geositi_catalogo_geositi:Geositi&Count=1

returns

<gml:Point gml:id="Geositi.1.pn.0" srsName="urn:ogc:def:crs:EPSG::25833">
<gml:pos>4159848.605699999 407652.2197000002</gml:pos>
</gml:Point>

It seems that the service returns data as Northing-Easting even the CRS is
officially Easting-Northing
https://www.epsg-registry.org/export.htm?wkt=urn:ogc:def:crs:EPSG::25833

Perhaps someone has been thinking that in WFS 1.1 and above the coordinates
must be flipped always? I consider that the service of Regione Sicilia is
misconfigured and SQL with SwapCoordinates feels like an excellent
workaround.

-Jukka Rahkonen-


aborruso wrote
> Hi all,
> I have this WFS source
> http://map.sitr.regione.sicilia.it/orbs/services/geositi/catalogo_geositi/MapServer/WFSServer?service=wfs&request=GetCapabilities
> 
> If I run
> 
> ogr2ogr -skipfailures -f CSV /vsistdout/ 
> wfs:"http://map.sitr.regione.sicilia.it/orbs/services/geositi/catalogo_geositi/MapServer/WFSServer"
> -lco GEOMETRY=AS_XY | head | cut -d "," -f1,2 
> 
> I have
> 
> X,Y
> 4159848.6057,407652.2197
> 4136669.4918,351648.1382
> 4182103.6455,368602.1861
> 4154094.0909,333347.9184
> 4222851.1989,329366.679
> 4271030.7208,460470.4647
> 4161643.0469,416859.4389
> 4270544.3923,458291.9136
> 4213272.6393,324524.3777
> 
> The axes are inverted and it's the same if I us
> INVERT_AXIS_ORDER_IF_LAT_LONG parameter.
> 
> Is there a way to read it properly, without using some SQL like "SELECT
> SwapCoordinates(geometry)".
> 
> Thank you





--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html


More information about the gdal-dev mailing list