WRAPPER_API bool GetValidDatumShifts(const CoordSys &src, const CoordSys &dest, const DatumShiftPreferencesEx &oPrefs, DatumShiftInfoSetCollection &setOfShifts) const
Description
The GetValidDatumShifts method finds all valid DatumShifts from the specified source CoordSys to the specified destination CoordSys that conform to the settings passed in the DatumShiftPreferencesEx argument. Information regarding these DatumShifts is then saved in the DatumShiftInfoSetCollection passed as the final argument. The method returns a boolean value indicating the success of the operation.
See also the EstablishDatumShift method for selecting DatumShifts.
Example
void DataSource_GetValidDatumShifts(GEOCALCPBW_NAMESPACE::DataSource & data)
{
GEOCALCPBW_NAMESPACE::CoordSys * source = data.GetGeodeticCoordSys(_towchar("BMG").c_str(), _towchar("WGS84_coordinate_system").c_str());
GEOCALCPBW_NAMESPACE::CoordSys * target = data.GetProjectedCoordSys(_towchar("BMG").c_str(), _towchar("AK9-27").c_str());
GEOCALCPBW_NAMESPACE::DatumShiftPreferencesEx shiftPrefs;
int bitFlagz = GEOCALCPBW_NAMESPACE::DatumShiftPreferencesEx::BitFlag::BursaWolfe_flag |
GEOCALCPBW_NAMESPACE::DatumShiftPreferencesEx::BitFlag::Molodensky_flag;
shiftPrefs.set_BitFlags((GEOCALCPBW_NAMESPACE::DatumShiftPreferencesEx::BitFlag)bitFlagz);
GEOCALCPBW_NAMESPACE::DatumShiftInfoSetCollection shiftSets;
if(! data.GetValidDatumShifts(*source, *target, shiftPrefs, shiftSets))
{
AfxMessageBox("GetValidDatumShifts failed");
}
}
Comments
0 comments
Please sign in to leave a comment.