TraceOnGeodesic Method

WRAPPER_API void TraceOnGeodesic(CoordPointCollection& trace, const GeodeticPoint& start, const GeodeticPoint& end, double spacing) const;

WRAPPER_API void TraceOnGeodesic(CoordPointCollection& trace, const GeodeticPoint& start, const GeodeticPoint& end, int numPoints, bool isRhumb) const;

Description

Populates a coordinate point collection with regularly-spaced geodetic points tracing a geodesic line between two points.

 

Example

void Ellipsoid_TraceOnGeodesic()

{

GeodeticPoint *start;

GeodeticPoint *end;

Ellipsoid *el;

CoordPointCollection *trace = new CoordPointCollection();

double spacing = 1000 //in meters

el = m_DataSource->GetEllipsoid(BMG_T("BMG"),BMG_T("WGS84"));

start = m_DataSource->GetGeodeticPoint(BMG_T("BMG"),BMG_T("GEODETIC_POINT_DEGREES"));

end = m_DataSource->GetGeodeticPoint(BMG_T("BMG"),BMG_T("GEODETIC_POINT_DEGREES"));

start->set_InUnits(42,-69);

end->set_InUnits(45,-69);

trace->set_PointStyle(*m_DataSource->GetGeodeticPoint(BMG_T("BMG"),BMG_T("GEODETIC_POINT_DEGREES"));

el->TraceOnGeodesic(*trace,*start,*end,spacing);

 

Disposal::Dispose(start);

Disposal::Dispose(end);

Disposal::Dispose(el);

Disposal::Dispose(trace);

 

}