Le mercredi 07 mai 2014 12:30:04, Jukka Rahkonen a écrit : > 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
In the case of shapefiles, yes, since the .prj file does not contain an EPSG code, and GML SRS can only be written as EPSG code. For datasources where the SRS include the EPSG code, the -a option should not be necessary. > > 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- > > _______________________________________________ > gdal-dev mailing list > gdal-dev@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/gdal-dev -- Geospatial professional services http://even.rouault.free.fr/services.html _______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev