wavded / ogre

ogr2ogr geojson-focused web client
http://ogre.adc4gis.com
MIT License
266 stars 79 forks source link

Option to switch x/y coordinates #28

Closed sindre closed 10 years ago

sindre commented 10 years ago

Have a strange Problem with a GeoRSS File in EPSG:31256 coordinates, which are converted to EPSG:4326 in der wrong order. So the output GeoJSON coordinates are wrong. When I insert only the coordinates from the GeoRSS Tag they are converted correct. An extra option to siwtch x/y coordinates could be a solution?

wavded commented 10 years ago

As far as I can tell there is no underlying way to correct that problem, it seems you'd have to add a process to switch the coordinates to be correct before passing to ogre.

http://www.gdal.org/drv_georss.html

sindre commented 10 years ago

Would be a great Option to implement. A common Problem - see http://trac.osgeo.org/gdal/wiki/FAQVector#HowdoIflipcoordinateswhentheyarenotintheexpectedorder

wavded commented 10 years ago

Good find, that doesn't seem to bad to implement. The majority of the changes will need to be made in the underlying ogr2ogr module, I started a case for it.

johnjohndoe commented 10 years ago

@sindre :+1:

wavded commented 10 years ago

turns out this is already supported in Ogre, just use the strings provided in that article for the source and destination srs:

Source SRS: +proj=latlong +datum=WGS84 +axis=neu +wktext

Target SRS: +proj=latlong +datum=WGS84 +axis=enu +wktext