typedef std::list<DatumShiftInfoSet> DatumShiftInfoSetCollection
A DatumShiftInfoSetCollection is a collection of DatumShiftInfoSet objects. It is a list object, which is a member of the Standard C++ Library.
void DatumShiftInfoSetCollection(GeoCalcPBW::DataSource & data)
{
GeoCalcPBW::CoordSys * source = data.GetGeodeticCoordSys(_towchar("BMG").c_str(), _towchar("WGS84_coordinate_system").c_str());
GeoCalcPBW::CoordSys * target = data.GetProjectedCoordSys(_towchar("BMG").c_str(), _towchar("AK9-27").c_str());
GeoCalcPBW::DatumShiftPreferencesEx shiftPrefs;
int bitFlagz = GeoCalcPBW::DatumShiftPreferencesEx::BitFlag::BursaWolfe_flag |
GeoCalcPBW::DatumShiftPreferencesEx::BitFlag::Molodensky_flag;
shiftPrefs.set_BitFlags((GeoCalcPBW::DatumShiftPreferencesEx::BitFlag)bitFlagz);
GeoCalcPBW::DatumShiftInfoSetCollection shiftSets;
if(! data.GetValidDatumShifts(*source, *target, shiftPrefs, shiftSets))
{
AfxMessageBox("GetValidDatumShifts failed");
}
CString description = "Possible DatumShifts from ";
description += _tochar(source->get_Name()).c_str();
description += " to ";
description += _tochar(target->get_Name()).c_str();
description += ":\n";
GeoCalcPBW::DatumShiftInfoSetCollection::iterator dsiSet;
for(dsiSet = shiftSets.begin(); dsiSet != shiftSets.end(); dsiSet++)
{
description += "DatumShifts: ";
GeoCalcPBW::DatumShiftInfoSet::iterator dsi;
for(dsi = (*dsiSet).begin(); dsi != (*dsiSet).end(); dsi++)
{
description += dsi->get_Name();
if(dsi->get_ReverseUsage())
{
description += "(reverse)";
}
description += ", ";
}
description.Delete(description.GetLength() - 2, 2);
description += "\n";
}
AfxMessageBox(description);
delete source;
delete target;
}