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

points
A IEnumerable of MapPoint representing the locations to be converted. Each MapPoint must have the same SpatialReference.
numberOfDigits
A System.Int32 between 1 and 5 indicating the precision of the numerical portion of the returned USNG coordinate string.
roundToNearestWholeNumber
true if the MGRS coordinate should be rounded to produce a lower precision coordinate notation; otherwise false to truncate the coordinate notation.
addSpaces
true if spaces should be added to the returned USNG coordinate notation; otherwise false.
Converts a collection of MapPoint geometries to a collection of coordinate notation strings in the United States National Grid (USNG) format.

Syntax

Visual Basic (Declaration) 
Public Shared Function MapPointsToUsng( _
   ByVal points As IEnumerable(Of MapPoint), _
   ByVal numberOfDigits As Integer, _
   ByVal roundToNearestWholeNumber As Boolean, _
   ByVal addSpaces As Boolean _
) As IList(Of String)
C# 
public static IList<string> MapPointsToUsng( 
   IEnumerable<MapPoint> points,
   int numberOfDigits,
   bool roundToNearestWholeNumber,
   bool addSpaces
)

Parameters

points
A IEnumerable of MapPoint representing the locations to be converted. Each MapPoint must have the same SpatialReference.
numberOfDigits
A System.Int32 between 1 and 5 indicating the precision of the numerical portion of the returned USNG coordinate string.
roundToNearestWholeNumber
true if the MGRS coordinate should be rounded to produce a lower precision coordinate notation; otherwise false to truncate the coordinate notation.
addSpaces
true if spaces should be added to the returned USNG coordinate notation; otherwise false.

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.