[gdal-dev] OGR, WFS and axis

aborruso aborruso at gmail.com
Tue Aug 13 03:39:08 PDT 2019


Hi Jukka,
thank you.


jratike80 wrote
> 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.

I will write an email to Regione Sicilia.

Another workaround is to set version:

ogr2ogr -skipfailures -f CSV /vsistdout/ 
wfs:"http://map.sitr.regione.sicilia.it/orbs/services/geositi/catalogo_geositi/MapServer/WFSServer?version=1.0.0"
-lco GEOMETRY=AS_XY -oo INVERT_AXIS_ORDER_IF_LAT_LONG="YES" | head | cut -d
"," -f1,2

And the output is

X,Y
407652.2197,4159848.6057
351648.1382,4136669.4918
368602.1861,4182103.6455
333347.9184,4154094.0909
329366.679,4222851.1989
460470.4647,4271030.7208
416859.4389,4161643.0469
458291.9136,4270544.3923
324524.3777,4213272.6393

Best regards



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


More information about the gdal-dev mailing list