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

points
A IEnumerable of MapPoint representing the locations to be converted. Each MapPoint must share the same SpatialReference.
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 collection of MapPoint geometries to a collection of coordinate notation strings in the World Geographic Reference system (GEOREF) format.

Syntax

Visual Basic (Declaration) 
Public Shared Function MapPointsToGeoref( _
   ByVal points As IEnumerable(Of MapPoint), _
   ByVal numberOfDigits As Integer, _
   ByVal roundToNearestWholeNumber As Boolean _
) As IList(Of String)
C# 
public static IList<string> MapPointsToGeoref( 
   IEnumerable<MapPoint> points,
   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

points
A IEnumerable of MapPoint representing the locations to be converted. Each MapPoint must share the same SpatialReference.
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 IList of System.String of coordinate notations representing the locations defined by the MapPoints.

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.