Returns the USNG description of a point.
[Visual Basic .NET] Public Function GetUSNGFromCoords ( _ ByVal numDigits As Integer, _ ByVal numericRounding As Boolean, _ ByVal addSpaces As Boolean _ ) As String
[C#] public string GetUSNGFromCoords ( int numDigits, bool numericRounding, bool addSpaces );
[C++]
HRESULT GetUSNGFromCoords(
long numDigits,
VARIANT_BOOL numericRounding,
VARIANT_BOOL addSpaces,
BSTR* USNGString
);
[C++]Parameters
numDigits numDigits is a parameter of type long numericRounding numericRounding is a parameter of type VARIANT_BOOL addSpaces addSpaces is a parameter of type VARIANT_BOOL USNGString [out, retval] USNGString is a parameter of type BSTR
Product Availability
Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.
Description
The GetUSNGFromCoords method returns a USNG string. The United States National Grid (USNG) is a simplified version of the Military Grid Reference System (MGRS) and is an alphanumeric way to represent a location. The Point must have a spatial reference that includes a coordinate system. It does not have to a be a geographic coordinate system. The precision parameter controls the length of the string. The sample USNG string below has a precision of 5 which means it is to the closest meter. The geographic coordinates are using the WGS 1984 geographic coordinate system. The first two numbers in the string are the UTM zone number.
latitude = 40.0
longitude = -100.0
USNG = 14TMK1463928236