On Thu, Aug 14, 2008 at 5:14 PM, Lucena, Ivan <[EMAIL PROTECTED]> wrote: >> Your earlier question related to whether it was possible to establish >> what EPSG coordinate system an ESRI .prj file is. There is no practical >> way to do this with OGRSpatialReference. > > So, one would need to write a C/C++ code to go through the csv tables (using > the CPL_CSV.h type and functions) trying to match the names/values in order > to recover the codes, keeping track of the relationships between Datum, > Reference system and Projection system. Not a easy task and also process time > consuming, I believe.
Ivan, This approach can work to some degree, but it is not clear that the names for datums from an ESRI WKT will match the name we fetch from the EPSG tables (for instance). > But one end-user practical solution would be to use org2org to export to > another format which the driver does explicitly shows the EPSG code. Would > that be possible? Does other OGR driver shows authority code? Generally this won't work well because GDAL/OGR can't easily figure out the EPSG codes to write to formats like GeoTIFF that would normally include the EPSG codes. I will note there is an AutoIdentifyEPSG() method on the OGRSpatialReference which makes a preliminary effort to add EPSG authority codes to definitions. I believe now it just recognises a few well known coordinate systems like NAD27, WGS84, etc. So not very useful. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, [EMAIL PROTECTED] light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent _______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev