[FWTools] How do I get the COORD_OP_CODE from an OGRSpatialReference?

Mikael Rittri Mikael.Rittri at carmenta.com
Thu Jun 26 11:08:19 EDT 2008

I am trying to extract the COORD_OP_CODE from an OGRSpatialReference object, 
but I don't know how.  Maybe it is not possible?  

The COORD_OP_CODE is a unique code for each instance of a map projection. 
To take an arbitrary example, "Estonian Coordinate System of 1992", the information in $GDAL_DATA/pcs.csv is 


3300,Estonian Coordinate System of 1992,9001,4133,19938,9802,1,0,8821,57.310319415,9110,8822,24,9110,8823,59.2,9110,8824,58,9110,8826,500000,9001,8827,6375000,9001,,,

Reading the first few entries, we have 

3300:  unique code for the coord. ref. system;
"Estonian Coordinate System of 1992": the name of the coord. ref. system;
9001:  unique code for unit of measure, meters in this case;
4133:  unique code for the corresponding geographic (long/lat) coord. ref. system;
19938: unique code for the particular instance of Lambert_Conformal_Conic_2SP;
9802:  unique code for the projection class, namely the class of Lambert_Conformal_Conic_2SP projections,

So, the information I want to extract from my OGRSpatialReference is the code 19938,
but I cannot find it there - by calling ogrRefSys.GetAuthorityCode("PROJCS|PROJECTION") -
although the number exists in the pcs.csv.  

When I look at http://www.spatialreference.org/ref/epsg/3300/prettywkt/, 
I found that the code 19938 is missing there, too.  

So, is it true that such codes are not part of WKT, and therefore not part of a OGRSpatialReference?
Or else, what am I doing wrong?  

Best regards,
Mikael Rittri
Carmenta AB
Box 11354
SE-404 28 Göteborg
Visitors: Sankt Eriksgatan 5
Tel: +46-31-775 57 37
Mob: +46-703-60 34 07 
mikael.rittri at carmenta.com

More information about the FWTools mailing list