Gets the longitude of the Point in decimal degrees.

Namespace:  ESRI.ArcGISExplorer.Geometry

Assembly:  ESRI.ArcGISExplorer (in ESRI.ArcGISExplorer.dll) Version: 2.0.0.1500 (2.0.0.1500)

Syntax

C#
public double GetLongitude()
Visual Basic (Declaration)
Public Function GetLongitude As Double

Return Value

The latitude of the Point in decimal degrees.

Remarks

If the Point has a geographic coordinate system, the Longitude property is the same as the X property.

If the Point has a projected coordinate system, the Longitude property is the X property of the Point after being projected to the underlying BaseGeographicCoordinateSystem.

There may often be confusion over translating latitude and longitude to X and Y properties, as coordinates are most commonly quoted as (latitude, longitude), but in the opposite way as (X, Y). You can use this method to help avoid such confusion.

Longitude is the angular distance of the location of a point on the earth's surface, measured east or west relative to an arbitrarily defined starting line. Lines of longitude are sometimes known as meridians, and the line of zero degrees longitude from where other positions are measured is known as the prime meridian. A commonly used prime meridian is the Greenwich Meridian, passing through Greenwich, UK. All lines of longitude are great circles that intersect the equator and pass through the North and South Poles. Lines of longitude are not equidistant at different latitudes; one degree of longitude is

Examples

The code below demonstrates using the GetLatitude and GetLongitude methods of a Point - this helps aid code clarity when expressing coordinate information in the format {latitude, longitude} instead of using the Y and X properties in that order. Using these methods also avoids the need to reproject the Point if its CoordinateSystem is not geographic. The code assumes that there is a preexisting Point object called pt, and reports the coordinates to the Debug window in the format "Latitude: 0.000#, Longitude: 0.000#".
CopyC#
string info = String.Format("Latitude: {0}, Longitude: {1}", pt.GetLatitude().ToString("0.000#"), pt.GetLongitude().ToString("0.000#"));
System.Diagnostics.Debug.WriteLine(info);
CopyVB.NET
Dim info As String = String.Format("Latitude: {0}, Longitude: {1}", pt.GetLatitude().ToString("0.000#"), pt.GetLongitude().ToString("0.000#"))
System.Diagnostics.Debug.WriteLine(info)

See Also