WRAPPER_API void set_IntermediateIssuer(const wchar_t *value)
The set_IntermediateIssuer method sets the issuer that is used to identify the HorizontalDatum that is used as an intermediate datum in the DatumShift.
void DatumShiftPreferences_setIntermediateIssuer(GeoCalcPBW::DataSource & data)
{
GeoCalcPBW::GeodeticCoordSys * source = data.GetGeodeticCoordSys(_towchar("BMG").c_str(), _towchar("NAD83_coordinate_system").c_str());
GeoCalcPBW::ProjectedCoordSys * target = data.GetProjectedCoordSys(_towchar("BMG").c_str(), _towchar("IA-27W").c_str());
GeoCalcPBW::CoordTransform ct(*source, *target);
GeoCalcPBW::DatumShiftPreferences shiftPrefs;
int opt = GeoCalcPBW::DatumShiftPreferences::ProcFlags::Direct |
GeoCalcPBW::DatumShiftPreferences::ProcFlags::ViaIntermediary;
shiftPrefs.set_Options(opt);
shiftPrefs.set_Method(GeoCalcPBW::DatumShift::ClassType::Molodensky);
shiftPrefs.set_AreaCode(L"STANDARD_ENVELOPE");
shiftPrefs.set_AreaIssuer(L"BMG");
shiftPrefs.set_IntermediateCode(L"WGS84");
shiftPrefs.set_IntermediateIssuer(L"BMG");
if(! data.EstablishDatumShift(ct, shiftPrefs))
{
AfxMessageBox("EstablishDatumShift failed");
}
GeoCalcPBW::CoordPoint * sourcePt = ct.get_SourceCoordSys().get_PointStyle().CloneCoordPoint();
GeoCalcPBW::CoordPoint * targetPt = ct.get_TargetCoordSys().get_PointStyle().CloneCoordPoint();
sourcePt->set_InUnits(-14.27, 45.76);
if(! ct.ConvertAhead(*sourcePt, *targetPt))
{
AfxMessageBox("ConvertAhead failed");
}
delete source;
delete target;
delete sourcePt;
delete targetPt;
}