[gdal-dev] Re: EPSG value

Jukka Rahkonen jukka.rahkonen at mmmtike.fi
Fri Nov 5 10:05:18 EDT 2010


ahmet temiz <ahmettemiz88 <at> gmail.com> writes:
 
> hello
> 
> how can I get  EPSG value of a shp file with OGR ( or gdal) ?

Ogrinfo will tell something if the shapefile bundle includes .prj file or then
you can just open the .prj file with text editor and see how it looks like.  It
does not contain EPSG code directly but you can compare the ESRI Well Known Text
strings with the ones from http://spatialreference.org/
 
If the shapefile did not come with the .prj file the best thing to do is to ask
from where you received the data. If it is not possible then you will need to
guess. Open the shapefile with some GIS program and compare it with some other
dataset with a known projection. Reproject the reference data to other
projections with ogr2ogr if needed and try again. When vectors match you have
found it.

-Jukka Rahkonen-






More information about the gdal-dev mailing list