[gdal-dev] SIRGAS 2000 EPSG

Maurício de Paulo mauricio.dev at gmail.com
Thu Apr 29 16:01:05 EDT 2010


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",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],UNIT["Meter",1]]""")
wgssr.AutoIdentifyEPSG()
print wgssr.GetAuthorityCode(None)

sirgassr=osr.SpatialReference()
sirgassr.ImportFromWkt("""PROJCS["SIRGAS 2000 / UTM zone 20N",GEOGCS["SIRGAS
2000",DATUM["D_SIRGAS_2000",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-63],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]]""")
sirgassr.AutoIdentifyEPSG()
print sirgassr.GetAuthorityCode(None)

-- 
Maurício de Paulo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20100429/a073cd38/attachment.html


More information about the gdal-dev mailing list