[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


Hello,
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 

"COORD_REF_SYS_CODE","COORD_REF_SYS_NAME","UOM_CODE","SOURCE_GEOGCRS_CODE","COORD_OP_CODE","COORD_OP_METHOD_CODE","SHOW_CRS","DEPRECATED","PARAMETER_CODE_1","PARAMETER_VALUE_1","PARAMETER_UOM_1","PARAMETER_CODE_2","PARAMETER_VALUE_2","PARAMETER_UOM_2","PARAMETER_CODE_3","PARAMETER_VALUE_3","PARAMETER_UOM_3","PARAMETER_CODE_4","PARAMETER_VALUE_4","PARAMETER_UOM_4","PARAMETER_CODE_5","PARAMETER_VALUE_5","PARAMETER_UOM_5","PARAMETER_CODE_6","PARAMETER_VALUE_6","PARAMETER_UOM_6","PARAMETER_CODE_7","PARAMETER_VALUE_7","PARAMETER_UOM_7"

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,
etc. 

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
SWEDEN
Tel: +46-31-775 57 37
Mob: +46-703-60 34 07 
mikael.rittri at carmenta.com
www.carmenta.com



More information about the FWTools mailing list