This document is archived and information here might be outdated.  Recommended version.


IConversionNotation.GetDMSFromCoords Method (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (Geometry)  

IConversionNotation.GetDMSFromCoords Method

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

[Visual Basic .NET]
Public Function GetDMSFromCoords ( _
    ByVal precision As Integer _
) As String
[C#]
public string GetDMSFromCoords (
    int precision
);
[C++]
HRESULT GetDMSFromCoords(
  long precision,
  BSTR* DMSString
);
[C++]

Parameters precision precision is a parameter of type long DMSString [out, retval] DMSString is a parameter of type BSTR

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

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"

See Also

IConversionNotation Interface