//************************************************************************************************* //! Creates given an EPSG spec in the form "EPSG:<datum_code>". //************************************************************************************************* const ossimDatum* ossimEpsgDatumFactory::create(ossim_uint32 gcs_code) const { // Find the datum code in the map in order to determine the corresponding OSSIM/Geotrans alpha // code. Then use the datum factory to create the datum. ossimString alphaCode = findAlphaCode(gcs_code); if (!alphaCode.empty()) return ossimDatumFactory::instance()->create(alphaCode); return 0; }
//************************************************************************************************* //! Creates given an EPSG spec in the form "EPSG:<datum_code>". //************************************************************************************************* const ossimDatum* ossimEpsgDatumFactory::create(ossim_uint32 datum_code) const { // Geographic coordinate system codes (4XXX) are sometimes used in place of their corresponding // datum code (6XXX). Check for this possibility and transpose the code if so: if ((datum_code >= 4135) && (datum_code <= 4807)) datum_code += 2000; // Find the datum code in the map in order to determine the corresponding OSSIM/Geotrans alpha // code. Then use the datum factory to create the datum. ossimString alphaCode = findAlphaCode(datum_code); if (!alphaCode.empty()) return ossimDatumFactory::instance()->create(alphaCode); return 0; }