[gdal-dev] SIRGAS 2000 EPSG

Even Rouault even.rouault at mines-paris.org
Thu Apr 29 16:41:58 EDT 2010


The doc of AutoIdentifyEPSG() tells :
 * This method inspects a WKT definition, and adds EPSG authority nodes
 * where an aspect of the coordinate system can be easily and safely 
 * corresponded with an EPSG identifier.  In practice, this method will 
 * evolve over time.  In theory it can add authority nodes for any object
 * (ie. spheroid, datum, GEOGCS, units, and PROJCS) that could have an 
 * authority node.  Mostly this is useful to inserting appropriate 
 * PROJCS codes for common formulations (like UTM n WGS84). 

In practice, the current state of the code is that it can only recognize 
geographic or UTM coordinate systems on WGS72, WGS84, NAD27 or NAD83 datums. 
This could be extended to recognized other coordinate systems, but this would 
become rather arbitrary to decide which ones are elligible and which ones are 

Le Thursday 29 April 2010 22:01:05 Maurício de Paulo, vous avez écrit :
> Hi list,
> I was recently trying to use OGRSpatialReference::GetAuthorityCode from the
> python API and I've found that it worked on WGS 84 UTM but not on SIRGAS
> 2000 UTM.
> Sirgas: http://spatialreference.org/ref/epsg/31974
> WGS: http://spatialreference.org/ref/epsg/32720
> I've taken the .prj description from both sites and used as the wkt. Ok,
> I've found that the wkt is different when compared to the prj file on the
> epsg site. Still, when recognizing a shapefile what I find is the .prj
> file. Using the code bellow OSR returns the wgs 84's EPSG fine but doesn't
> return SIRGAS'.
> Anyone know why?
> import osr
> wgssr=osr.SpatialReference()
> wgssr.ImportFromWkt("""PROJCS["WGS_1984_UTM_Zone_20S",GEOGCS["GCS_WGS_1984"
>alse_northing",10000000],UNIT["Meter",1]]""") wgssr.AutoIdentifyEPSG()
> print wgssr.GetAuthorityCode(None)
> sirgassr=osr.SpatialReference()
> sirgassr.ImportFromWkt("""PROJCS["SIRGAS 2000 / UTM zone
> 2000",DATUM["D_SIRGAS_2000",SPHEROID["GRS_1980",6378137,298.257222101]],PRI
>AMETER["false_northing",0],UNIT["Meter",1]]""") sirgassr.AutoIdentifyEPSG()
> print sirgassr.GetAuthorityCode(None)

More information about the gdal-dev mailing list