Show / Hide Table of Contents

Method ToUtm

ToUtm(MapPoint, UtmConversionMode, Boolean)

Returns a formatted coordinate string in Universal Transverse Mercator (UTM) notation representing the given MapPoint's location.

Declaration
public static string ToUtm(MapPoint point, UtmConversionMode utmConversionMode, bool addSpaces)
Parameters
Type Name Description
MapPoint point

The coordinate to be represented in UTM notation. It must have a SpatialReference set.

UtmConversionMode utmConversionMode

The UtmConversionMode to use in the returned UTM notation string: either a latitudinal band or a hemisphere designator.

System.Boolean addSpaces

If false, the generated string contains no spaces. If true, a space separates the UTM zone and latitude designator, and each numerical easting/northing value.

Returns
Type Description
System.String

A UTM notation string representing the position of the given MapPoint.

Remarks

Example output for a point in the southern hemisphere:

utmConversionMode
parameter value
addSpaces
parameter value
Example output
LatitudeBandIndicators false 30U4898846199881
LatitudeBandIndicators true 30U 489884 6199881
NorthSouthIndicators false 30N4898846199881
NorthSouthIndicators true 30N 489884 6199881

Exceptions
Type Condition
System.ArgumentNullException

point is null.

System.ArgumentException

point does not have a spatial reference.

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.