[gdal-dev] ogr2ogr coordinate system encoding

Jukka Rahkonen jukka.rahkonen at mmmtike.fi
Wed May 7 03:30:04 PDT 2014


mccorb <mccorb <at> cox.net> writes:

> 
> I have shape files that I am wanting to convert to a GML equivalent file. I
> understand how to use the shape file .PRJ files and EPSG info to translate
> coordinate systems and all that is working well. 
> 
> However, once converted the coordinates are correct but there is nothing in
> the file (that I can see) to tell if the coordinates in the GML file are in
> lat/lon, utm, or some albers equal area projection etc.
> 
> Is there any way to coerce ogr2ogr to encode the coordinate system info into
> the resultant GML file that matches the coordinates that are there?
> 
> thanks

Hi,

It seems that srsName in not written automatically but you must set it in
the org2ogr command

ogr2ogr -a_srs EPSG:3067 -f GML test.gml test.shp

Then you will have
<ogr:geometryProperty><gml:Polygon srsName="EPSG:3067">...

Read also about long SRS if you want to use the urn format with GML 3

-Jukka Rahkonen-



More information about the gdal-dev mailing list