toUtm static method
- required ArcGISPoint point,
- required UtmConversionMode utmConversionMode,
- required bool addSpaces,
Returns a formatted coordinate in Universal Transverse Mercator (UTM) notation representing the given point's location.
Example output for a point in the southern hemisphere: utm_conversion_mode
add_spaces | Example output -------------------------------------------- |
---|---|
UtmConversionMode.latitudeBandIndicators | false |
UtmConversionMode.latitudeBandIndicators | true |
UtmConversionMode.northSouthIndicators | false |
UtmConversionMode.northSouthIndicators | true |
The point must have a spatial reference. Returns null on error.
Parameters:
point
— The coordinate to be represented in UTM notation.utmConversionMode
— The latitude notation scheme to use in the returned UTM notation string, either a latitudinal band, or a hemisphere designator.addSpaces
— If false, the generated string contains no spaces. If true, a space separates the UTM zone and latitude designator, and each numerical easting and northing value.
Return Value: A UTM notation string representing the position of the given point.
Implementation
static String toUtm({
required ArcGISPoint point,
required UtmConversionMode utmConversionMode,
required bool addSpaces,
}) {
_initializeArcGISEnvironmentIfNeeded();
final stringHandle = _withThrowingErrorHandler((errorHandler) {
return runtimecore.RT_CoordinateFormatter_toUTM(
point._handle,
utmConversionMode.coreValue,
addSpaces,
errorHandler,
);
});
return stringHandle.toDartString();
}