[Gdal-dev] OGR2OGR GML coordinate reversal

Frank Warmerdam warmerdam at pobox.com
Tue May 22 17:01:20 EDT 2007


Jesse Cleary wrote:
> Hi folks
> 
> I'm trying to convert a GML file (3.1 I think) to a shapefile using 
> ogr2ogr (GDAL 1.3.2.0).  The conversion works and the attributes 
> translate nicely, but the destination file's point coordinates are 
> reversed from the source file.  The source GML file uses the following 
> nomenclature:
> 
>                <gml:Point>
>                    <gml:pos>lat lon</gml:pos>
>                </gml:Point>
> 
> OGR seems to expect the order to be lon then lat.  Is there any way to 
> tell ogr2ogr how to reverse the expected order of coordinates inside 
> these tags?  Or maybe my source file doesn't meet the GML spec and 
> should be changed to lon then lat?  Thanks...

Jesse,

Unfortunately, there is no easy way to fix this problem.  There are
legitimate ways of declaring coordinate order in GML but OGR ignores them.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org




More information about the Gdal-dev mailing list