ArcGIS Runtime SDK for WPF - Library Reference
MapPointToGeoref Method
See Also 
ESRI.ArcGIS.Client.Geometry Namespace > CoordinateConversion Class : MapPointToGeoref Method

point
A MapPoint representing the location to be converted.
numberOfDigits
A System.Int32 indicating the precision of each half of the numeric portion of the returned coordinate. Must not be 0. A value of 1 or 2 will return a coordinate to 1 minute precision (e.g. MKPG1214). A value of 3 represents 0.1 minutes (e.g. MKPG120140). A value of 4 represents 0.01 minutes (e.g. MKPG12001400).
roundToNearestWholeNumber
true if the GEOREF coordinate should be rounded to produce a lower precision coordinate notation; otherwise false to truncate the coordinate notation.
Converts a MapPoint geometry to a coordinate notation string in the World Geographic Reference system (GEOREF) format.

Syntax

Visual Basic (Declaration) 
Public Shared Function MapPointToGeoref( _
   ByVal point As MapPoint, _
   ByVal numberOfDigits As Integer, _
   ByVal roundToNearestWholeNumber As Boolean _
) As String
C# 
public static string MapPointToGeoref( 
   MapPoint point,
   int numberOfDigits,
   bool roundToNearestWholeNumber
)

Remarks

The GEOREF coordinate MKPG1214 comprises:

  • The 15 degree quadrangle e.g. MK
  • The 1 degree quadrangle e.g. PG
  • The 1 minute longitude latitude e.g. 1214.
  • Each additional pair of digits represents a tenfold increase in the precision e.g. 6 digits = 0.01 minutes, 8 digits = 0.01 minutes.

Parameters

point
A MapPoint representing the location to be converted.
numberOfDigits
A System.Int32 indicating the precision of each half of the numeric portion of the returned coordinate. Must not be 0. A value of 1 or 2 will return a coordinate to 1 minute precision (e.g. MKPG1214). A value of 3 represents 0.1 minutes (e.g. MKPG120140). A value of 4 represents 0.01 minutes (e.g. MKPG12001400).
roundToNearestWholeNumber
true if the GEOREF coordinate should be rounded to produce a lower precision coordinate notation; otherwise false to truncate the coordinate notation.

Return Value

A System.String in the requested coordinate notation format representing the location defined by the MapPoint.

Exceptions

ExceptionDescription
System.ArgumentExceptionThe numerOfDigits parameter must be greater than or equal to 1.

Requirements

Target Platforms: Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family, Windows 7, Windows 8

See Also

© ESRI, Inc. All Rights Reserved.