GM_Utility .CalcDistance 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: 18.0.0.0 (18.0.0.0)

Syntax
C#
Copy
public static GM_Error_t32 CalcDistance(
    double aFromX,
    double aFromY,
    double aToX,
    double aToY,
    bool aLatLon,
    out double aDist
)

Parameters

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

Return Value

Type:  GM_Error_t32
A GM Error Code
See Also