Click or drag to resize

GM_UtilityCalcDistance Method

Calculates the great-circle distance in meters between two points. The points can either be specified as lat/lon values or in the current projection.

Namespace:  GlobalMapper
Assembly:  GlobalMapperWrapperNET (in GlobalMapperWrapperNET.dll) Version: 19.1.0.0 (19.1.0.0)
Syntax
C#
public static GM_Error_t32 CalcDistance(
	double aFromX,
	double aFromY,
	double aToX,
	double aToY,
	bool aLatLon,
	out double aDist
)

Parameters

aFromX
Type: SystemDouble
IN: start X/longitude coordinate
aFromY
Type: SystemDouble
IN: start Y/latitude coordinate
aToX
Type: SystemDouble
IN: stop X/longitude coordinate
aToY
Type: SystemDouble
IN: stop Y/latitude coordinate
aLatLon
Type: SystemBoolean
IN: TRUE - coordinates are lat/lon, FALSE - coordinates are in the current projection?
aDist
Type: SystemDouble
OUT: distance in meters between the points

Return Value

Type: GM_Error_t32
A GM Error Code
See Also