get_Dimensions Method

WRAPPER_API short get_Dimensions() const

 

Description

The get_Dimensions method returns the number of coordinate values that define the location of this point.  The value returned by this method will either be 2 or 3.

For a CartesianPoint, a Dimensions value of 2 indicates that only the X and Y properties are used to express the position of the point, whereas a Dimensions value of 3 indicates that X, Y, and Z are used.

For a GeodeticPoint, a Dimensions value of 2 indicates that only the Latitude and Longitude properties are used to express the position of the point, whereas a Dimensions value of 3 indicates that Latitude, Longitude, and Height are used.

For a ProjectedPoint, a Dimensions value of 2 indicates that only the North and East properties are used to express the position of the point, whereas a Dimensions value of 3 indicates that North, East, and Height are used.

 

Example

void CoordPoint_getDimensions(GeoCalcPBW::CoordPoint * pt)

{

if(pt->get_Dimensions() == 2 && pt->get_Class() == GeoCalcPBW::CoordPoint::ClassType::Geodetic)

{

double lat = 0;

double lon = 0;

double height = 0;

if(! pt->get_InUnits(lon, lat, height))

{

MessageBox(0, "get_InUnits failed", "", 0);

}

}

}