IConversionNotation Interface

Provides access to functions that convert to and from various geographic string notations.

Description

IConversionNotation contains methods for converting both projected and geographic (lat/lon) coordinates to and from various string notations. The notations include United States National Grid (USNG), Universal Transverse Mercator (UTM), GEOREF, and GARS. It's also possible to use decimal degrees, degrees decimal minutes, and degrees minutes seconds.

Members

Name Description
Method CreateMGRS Returns the MGRS/USNG description of a point.
Method GetDDFromCoords Returns the decimal degrees description of a point.
Method GetDDMFromCoords Returns the degrees decimal minutes description of a point.
Method GetDMSFromCoords Returns the degrees/minutes/seconds description of a point.
Method GetGARSFromCoords Returns the GARS description of a point.
Method GetGeoRefFromCoords Returns the GeoRef description of a point.
Method GetUSNGFromCoords Returns the USNG description of a point.
Method GetUTMFromCoords Returns the UTM description of a point.
Method PutCoordsFromDD Creates the coordinates of a point from the decimal degrees description.
Method PutCoordsFromDDM Creates the coordinates of a point from the degrees decimal minutes description.
Method PutCoordsFromDMS Creates the coordinates of a point from the degrees/minutes/seconds description.
Method PutCoordsFromGARS Creates the coordinates of a point from the GARS description.
Method PutCoordsFromGeoRef Creates the coordinates of a point from the GeoRef description.
Method PutCoordsFromMGRS Creates the coordinates of a point from the MGRS/USNG description.
Method PutCoordsFromUSNG Creates the coordinates of a point from the USNG description.
Method PutCoordsFromUTM Creates the coordinates of a point from the UTM description.

IConversionNotation.GetDDFromCoords Method

Returns the decimal degrees description of a point.

Public Function GetDDFromCoords ( _
    ByVal precision As Integer _
) As String
public string GetDDFromCoords (
    int precision
);

Description

The GetDDFromCoords method returns a formatted string from a Point that has either geographic or projected coordinates. The Point must have a spatial reference that has a defined coordinate system. The returned values are in decimal degrees and have direction (hemisphere) information. The precision parameter controls the number of decimal places used in the output values. The sample output below has a precision of 6.

longitude = -100.0 latitude = 40.0 Output = "40.000000N 100.000000W"

IConversionNotation.GetDDMFromCoords Method

Returns the degrees decimal minutes description of a point.

Public Function GetDDMFromCoords ( _
    ByVal precision As Integer _
) As String
public string GetDDMFromCoords (
    int precision
);

Description

The GetDDMFromCoords method returns a formatted string from a Point that has either geographic or projected coordinates. The Point must have a spatial reference that has a defined coordinate system. The returned values are in degrees and decimal minutes and have direction (hemisphere) information. The precision parameter controls the number of decimal places used in the output decimal minute values. The sample output below has a precision of 4.

longitude = -100.0 latitude = 40.0 output = "40 00.0000N 100 00.0000W"

IConversionNotation.GetDMSFromCoords Method

Returns the degrees/minutes/seconds description of a point.

Public Function GetDMSFromCoords ( _
    ByVal precision As Integer _
) As String
public string GetDMSFromCoords (
    int precision
);

Description

The GetDMSFromCoords method returns a formatted string from a Point that has either geographic or projected coordinates. The Point must have a spatial reference that has a defined coordinate system. The returned values are in degrees minutes and decimal seconds and have direction (hemisphere) information. The precision parameter controls the number of decimal places used in the output second values. The sample below has a precision of 4.

longitude = -100.0 latitude = 40.0 Output = "40 00 00.0000N 100 00 00.0000W"

IConversionNotation.GetGARSFromCoords Method

Returns the GARS description of a point.

Public Function GetGARSFromCoords ( _
) As String
public string GetGARSFromCoords (
);

Description

The GetGARSFromCoords method returns an alphanumeric string from a Point that has either geographic or projected coordinates. The Point must have a spatial reference that has a defined coordinate system. The Global Area Reference System (GARS) is used for military referencing. More information is at http://earth-info.nga.mil/GandG/coordsys/grids/gars.html

longitude = -100.0
latitude = 40.0
GARS = 161LW37

IConversionNotation.GetGeoRefFromCoords Method

Returns the GeoRef description of a point.

Public Function GetGeoRefFromCoords ( _
    ByVal numDigits As Integer, _
    ByVal numericRounding As Boolean _
) As String
public string GetGeoRefFromCoords (
    int numDigits,
    bool numericRounding
);

Description

The GetGeoRefFromCoords method returns an alphanumeric string from a Point that has either geographic or projected coordinates. The Point must have a spatial reference that has a defined coordinate system. The World Geographic Reference System (GEOREF) is used for military referencing. More information is at http://earth-info.nga.mil/GandG/coordsys/grids/referencesys.html.

longitude = -100.0
latitude = 40.0
Georef = FJFL000000 (precision is 3 which determines a location to 0.1 minute)

IConversionNotation.GetUSNGFromCoords Method

Returns the USNG description of a point.

Public Function GetUSNGFromCoords ( _
    ByVal numDigits As Integer, _
    ByVal numericRounding As Boolean, _
    ByVal addSpaces As Boolean _
) As String
public string GetUSNGFromCoords (
    int numDigits,
    bool numericRounding,
    bool addSpaces
);

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

IConversionNotation.GetUTMFromCoords Method

Returns the UTM description of a point.

Public Function GetUTMFromCoords ( _
    ByVal utmOptions As esriUTMConversionOptionsEnum _
) As String
public string GetUTMFromCoords (
    esriUTMConversionOptionsEnum utmOptions
);

IConversionNotation.PutCoordsFromDD Method

Creates the coordinates of a point from the decimal degrees description.

Public Sub PutCoordsFromDD ( _
    ByVal DDString As String _
)
public void PutCoordsFromDD (
    string DDString
);

IConversionNotation.PutCoordsFromDDM Method

Creates the coordinates of a point from the degrees decimal minutes description.

Public Sub PutCoordsFromDDM ( _
    ByVal DDMString As String _
)
public void PutCoordsFromDDM (
    string DDMString
);

IConversionNotation.PutCoordsFromDMS Method

Creates the coordinates of a point from the degrees/minutes/seconds description.

Public Sub PutCoordsFromDMS ( _
    ByVal DMSString As String _
)
public void PutCoordsFromDMS (
    string DMSString
);

IConversionNotation.PutCoordsFromGARS Method

Creates the coordinates of a point from the GARS description.

Public Sub PutCoordsFromGARS ( _
    ByVal mode As esriGARSModeEnum, _
    ByVal GARSString As String _
)
public void PutCoordsFromGARS (
    esriGARSModeEnum mode,
    string GARSString
);

IConversionNotation.PutCoordsFromGeoRef Method

Creates the coordinates of a point from the GeoRef description.

Public Sub PutCoordsFromGeoRef ( _
    ByVal GeoRefString As String _
)
public void PutCoordsFromGeoRef (
    string GeoRefString
);

IConversionNotation.PutCoordsFromUSNG Method

Creates the coordinates of a point from the USNG description.

Public Sub PutCoordsFromUSNG ( _
    ByVal USNGString As String _
)
public void PutCoordsFromUSNG (
    string USNGString
);

IConversionNotation.PutCoordsFromUTM Method

Creates the coordinates of a point from the UTM description.

Public Sub PutCoordsFromUTM ( _
    ByVal utmOptions As esriUTMConversionOptionsEnum, _
    ByVal UTMString As String _
)
public void PutCoordsFromUTM (
    esriUTMConversionOptionsEnum utmOptions,
    string UTMString
);

Inherited Interfaces

Interfaces Description
IConversionMGRS Provides access to members that allow the use of MGRS.

Classes that implement IConversionNotation

Classes Description
Point A two dimensional point, optionally with measure, height, and ID attributes.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.