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 |
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 |
|
System.ArgumentException |
|
Applies to
Platforms and versions
Target | Versions |
---|---|
.NET Standard 2.0 | 100.3 - 200.6 |
.NET | 100.13 - 200.6 |
.NET Windows | 100.13 - 200.6 |
.NET Android | 200.0 - 200.6 |
.NET iOS | 200.0 - 200.6 |
.NET Framework | 100.1 - 200.6 |
Xamarin.Android | 100.1 - 100.15 |
Xamarin.iOS | 100.1 - 100.15 |
UWP | 100.1 - 200.6 |
Relevant samples
Format coordinates: Format coordinates in a variety of common notations.