Hi list, <br clear="all">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.<br>Sirgas: <a href="http://spatialreference.org/ref/epsg/31974">http://spatialreference.org/ref/epsg/31974</a><br>
WGS: <a href="http://spatialreference.org/ref/epsg/32720">http://spatialreference.org/ref/epsg/32720</a><br>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.<br>
Using the code bellow OSR returns the wgs 84's EPSG fine but doesn't return SIRGAS'.<br>Anyone know why?<br><br>import osr<br>wgssr=osr.SpatialReference()<br>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]]""")<br>
wgssr.AutoIdentifyEPSG()<br>print wgssr.GetAuthorityCode(None)<br><br>sirgassr=osr.SpatialReference()<br>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]]""")<br>
sirgassr.AutoIdentifyEPSG()<br>print sirgassr.GetAuthorityCode(None)<br><br>-- <br>Maurício de Paulo<br>