Show / Hide Table of Contents

Method FromUtm

FromUtm(String, SpatialReference, UtmConversionMode)

Parses a coordinate in the Universal Transverse Mercator (UTM) notation and returns a MapPoint representing that location.

Declaration
public static MapPoint FromUtm(string coordinates, SpatialReference spatialReference, UtmConversionMode utmConversionMode)
Parameters
Type Name Description
System.String coordinates

The UTM notation string for the coordinate.

SpatialReference spatialReference

An optional SpatialReference that defines the datum and ellipsoid referenced by the UTM coordinate. May be null, in which case Wgs84 is used.

UtmConversionMode utmConversionMode

The latitude notation scheme used by the given UTM coordinate: either a latitudinal band or a hemisphere designator.

Returns
Type Description
MapPoint

A MapPoint with the location from the UTM string in the spatial reference provided.

Remarks

The provided spatialReference parameter must have an ellipsoid and datum matching those used by the source of the UTM string. If no SpatialReference is provided, it is assumed that the UTM string is referenced to Wgs84. The UTM string can contain leading and trailing whitespace; whitespace between the zone and latitude designator; and between the numerical eastings and northings.

UTM notation examples
30U 489885 6199877
30U4898856199877
30N 489885 6199877 (using N/S indicator)
489885.32,6199877.36,30U (this form supports sub-meter precision)

Exceptions
Type Condition
System.ArgumentNullException

coordinates is null.

ArcGISRuntimeException

Given coordinates could not be parsed or converted.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.3 - 200.7
.NET100.13 - 200.7
.NET Windows100.13 - 200.7
.NET Android200.0 - 200.7
.NET iOS200.0 - 200.7
.NET Framework100.1 - 200.7
Xamarin.Android100.1 - 100.15
Xamarin.iOS100.1 - 100.15
UWP100.1 - 200.7
Relevant samples
Format coordinates: Format coordinates in a variety of common notations.
In This Article
Back to top Copyright © 2022 Esri.