get_Parameters Method

WRAPPER_API ParameterCollection &get_Parameters()

WRAPPER_API const ParameterCollection &get_Parameters() const

 

Description

The get_Parameters method returns the ParameterCollection that is used to customize this DatumShift.  For a description of the parameters needed by each type of DatumShift, click on the link in the description column on the ClassType Enumeration page.

 

Example

void DatumShift_getParameters(GeoCalcPBW::DataSource & data)

{

GeoCalcPBW::DatumShift ds(GeoCalcPBW::DatumShift::ClassType::BursaWolfe);

GeoCalcPBW::HorizontalDatum * source = data.GetHorizontalDatum(L"BMG", L"CH1903");

GeoCalcPBW::HorizontalDatum * target = data.GetHorizontalDatum(L"BMG", L"WGS84");

GeoCalcPBW::Envelope * envelope = data.GetEnvelope(L"BMG", L"CH1903_coordinate_system_envelope");

ds.set_SourceDatum(*source);

ds.set_TargetDatum(*target);

ds.set_Envelope(*envelope);

 

if(ds.get_Parameters().Exists(L"dx"))

{

GeoCalcPBW::LinearValue lv;

lv.set_InMeters(660.077);

ds.get_Parameters().set_LinearItem(L"dx", lv);

}

if(ds.get_Parameters().Exists(L"dy"))

{

GeoCalcPBW::LinearValue lv;

lv.set_InMeters(13.551);

ds.get_Parameters().set_LinearItem(L"dy", lv);

}

if(ds.get_Parameters().Exists(L"dz"))

{

GeoCalcPBW::LinearValue lv;

lv.set_InMeters(369.344);

ds.get_Parameters().set_LinearItem(L"dz", lv);

}

GeoCalcPBW::AngularUnit * au = data.GetAngularUnit(L"BMG", L"ARCSECONDS");

GeoCalcPBW::AngularValue av;

av.set_Units(*au);

if(ds.get_Parameters().Exists(L"rx"))

{

av.set_InUnits(-0.804816);

ds.get_Parameters().set_AngularItem(L"rx", av);

}

if(ds.get_Parameters().Exists(L"ry"))

{

av.set_InUnits(-0.577692);

ds.get_Parameters().set_AngularItem(L"ry", av);

}

if(ds.get_Parameters().Exists(L"rz"))

{

av.set_InUnits(-0.952236);

ds.get_Parameters().set_AngularItem(L"rz", av);

}

if(ds.get_Parameters().Exists(L"k"))

{

ds.get_Parameters().set_FloatItem(L"k", 5.66);

}

 

GeoCalcPBW::GeodeticPoint * sourcePt = data.GetGeodeticPoint(L"BMG", L"GEODETIC_POINT_DEGREES");

GeoCalcPBW::GeodeticPoint * targetPt = data.GetGeodeticPoint(L"BMG", L"GEODETIC_POINT_DEGREES");

sourcePt->set_InUnits(0, 0);

if(! ds.ShiftForward(*sourcePt, *targetPt))

{

AfxMessageBox("ShiftForward failed");

}

 

delete source;

delete target;

delete envelope;

delete au;

delete sourcePt;

delete targetPt;

}