distanceGeodetic static method
- required ArcGISPoint point1,
- required ArcGISPoint point2,
- LinearUnit? distanceUnit,
- AngularUnit? azimuthUnit,
- required GeodeticCurveType curveType,
Calculates the geodetic distance between two given points and calculates the azimuth at both points for the geodetic curve that connects the points.
Parameters:
point1
— A point object.point2
— Another point object.distanceUnit
— The linear unit of measure for the returned results. Assumes meters if no unit is given.azimuthUnit
— The angular unit of measure for the returned results. Assumes degrees if no unit is given.curveType
— The type of curve to calculate.
Return Value: A structure containing the distance and the azimuth at both points for the geodetic curve that connects them.
Implementation
static GeodeticDistanceResult distanceGeodetic({
required ArcGISPoint point1,
required ArcGISPoint point2,
LinearUnit? distanceUnit,
AngularUnit? azimuthUnit,
required GeodeticCurveType curveType,
}) {
_initializeArcGISEnvironmentIfNeeded();
final objectHandle = _withThrowingErrorHandler((errorHandler) {
return runtimecore.RT_GeometryEngine_distanceGeodetic(
point1._handle,
point2._handle,
distanceUnit?._handle ?? ffi.nullptr,
azimuthUnit?._handle ?? ffi.nullptr,
curveType.coreValue,
errorHandler,
);
});
return GeodeticDistanceResult._fromHandle(
objectHandle,
)!;
}