Show / Hide Table of Contents

Method ToGeoRef

ToGeoRef(MapPoint, Int32)

Returns a formatted coordinate string in World Geographic Reference System (GEOREF) notation representing the given MapPoint's location.

Declaration
public static string ToGeoRef(MapPoint point, int precision)
Parameters
Type Name Description
MapPoint point

The location to be represented in GEOREF notation. It must have a SpatialReference set.

System.Int32 precision

The precision with which to represent the coordinate. Value is expected to be between 0 to 9 (inclusive), and will be clamped if necessary.

Returns
Type Description
System.String

A GEOREF notation string representing the position of the given point.

Remarks

The precision parameter controls the number of digits used to represent the fractional part of the coordinate's latitude and longitude, expressed in minutes. For example:

precision parameter value Example output Angular precision Approximate precision
(at the equator, to 1 significant figure)
0 MKML5056 1min 2km
1 MKML5056 1min 2km
2 MKML5056 1min 2km
3 MKML502566 0.1min 200m
4 MKML50285665 0.01min 20m
5 MKML5028256652 0.001min 2m

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
In This Article
Back to top Copyright © 2022 Esri.