[gdal-dev] orginfo and prj files
mateusz at loskot.net
Thu Aug 14 11:09:58 EDT 2008
Lucena, Ivan wrote:
> Hi there,
> Correct if I am wrong.
> If there is a .PRJ file associated with a .SHP, ogrinfo will just print
> out the content of the .PRJ. Ex.:
1) import it expecting it might be in ESRI WKT format
2) print it
> D:\Data\ESRIDATA\USA> ogrinfo -so states.shp states
> INFO: Open of `states.shp'
> using driver `ESRI Shapefile' successful.
> Layer name: states
> Geometry: Polygon
> Feature Count: 51
> Extent: (-178.217598, 18.924782) - (-66.969271, 71.406235)
> Layer SRS WKT:
> It will not going to run "OGRImportFromESRI()" to get EPSG Authority
> codes. Isn't it right?
For Shapefile format specifically, it does run through morphing
procedure by calling OGRSpatialReference::importFromESRI
The doc may be imprecise perhaps, but IMO it suggests that:
"If a .prj files in old Arc/Info style or new ESRI OGC WKT style is
present, it will be read and used to associate a projection with features."
Mateusz Loskot, http://mateusz.loskot.net
Charter Member of OSGeo, http://osgeo.org
More information about the gdal-dev