WRAPPER_API virtual void *CopyInnerPtr() const
This function is used for cross Library development. It returns a copy of a pointer to a CoordTransform that can passed to a "CreateFromPtr" function in another Blue Marble Geographics geodetic processing library. If you are using the GeoTransform raster image library, or the GeoTranslate vector processing library, it is possible to copy the same GeoCalc CoordTransform and avoid recreating it for each library.
GeoCalcPBW::CoordTransform ct;
GeoCalcPBW::GeodeticCoordSys * source = data.GetGeodeticCoordSys(_towchar("BMG").c_str(), _towchar("WGS84_coordinate_system").c_str());
GeoCalcPBW::ProjectedCoordSys * target = data.GetProjectedCoordSys(_towchar("BMG").c_str(), _towchar("IA-27W").c_str());
ct.set_SourceCoordSys(*source);
ct.set_TargetCoordSys(*target);
GeoCalcPBW::DatumShiftPreferences shiftPrefs;
int opt = GeoCalcPBW::DatumShiftPreferences::ProcFlags::Direct |
GeoCalcPBW::DatumShiftPreferences::ProcFlags::ViaIntermediary |
GeoCalcPBW::DatumShiftPreferences::ProcFlags::IgnoreArea |
GeoCalcPBW::DatumShiftPreferences::ProcFlags::IgnoreMethod;
shiftPrefs.set_Options(opt);
data.EstablishDatumShift(ct, shiftPrefs))
GeoCalcPBW::CoordTransform ctCopy;
ctCopy->CreateFormPtr(ct->CopyInnerPtr())
delete source;
delete target;
GeoCalcPBW::GeoBase* pbwBase = new GeoCalcPBW::GeoBase();
GeoCalcPBW::DataSource* pbwDS = new
GeoCalcPBW::DataSource();
pbwDS->LoadFile("c:\\bmg\\geocalcpbw\\data\\geocalc.xml");
BCoordSysRepository::Instance()->SetDSInstancePtr(pbwDS->GetDSInstancePtr());