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