Gets the latitude 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 GetLatitude()
Visual Basic (Declaration)
Public Function GetLatitude As Double

Return Value

The latitude of the Point in decimal degrees.

Remarks

If the Point has a geographic coordinate system, the Latitude property is the same as the Y property.

If the Point has a projected coordinate system, the Latitude property is the Y 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.

Latitude is the angular distance of the location of a point on the earth's surface, measured north or south from the equator. The equator has a latitude of 0 degrees. Lines of latitude may also referred to as parallels. Countries with higher latitudes are nearer the poles, and countries with lower latitudes are nearer the equator.

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