Longitude
Details
- Longitude[pos] returns a Quantity angle in degree.
- Longitudes are taken to be positive to the east.
- The position pos in Longitude[pos] can be a GeoPosition, GeoGridPosition, or other position object. It can also be a geo Entity object.
- Longitude[] is equivalent to Longitude[$GeoLocation].
- If no datum is given, Longitude assumes positions to refer to the International Terrestrial Reference Frame 2000.
Examples
open all close allBasic Examples (5)
Extract the longitude from a geodetic position:
Longitude[GeoPosition[{40.11, -88.24}]]Compute the longitude of a position given in projected coordinates:
Longitude[GeoGridPosition[{-0.126, -0.046}, "Gnomonic"]]Longitude[Entity["City", {"Madrid", "Madrid", "Spain"}]]Compute the longitude of a geodetic position, transforming to the "NAD83CORS96" datum:
Longitude[GeoPosition[{0.1, -90}], "NAD83CORS96"]Compute the longitude of a geo entity class:
Longitude[EntityClass["Building", "AcropolisAthens"]]Scope (10)
Longitude[]This is equivalent to the following:
Longitude[$GeoLocation]Extract the longitude of a GeoPosition object:
Longitude[GeoPosition[{-12.34, 56.78}]]Compute the longitude of any type of geo location:
GeoPositionXYZ[Here]Longitude[%]GeoGridPosition[Here, "Albers"]Longitude[%]Get the longitude of a geo entity:
Longitude[Entity["Building", "EiffelTower::5h9w8"]]This is equivalent to the following:
Entity["Building", "EiffelTower::5h9w8"]["Position"]Longitude[%]Extract the longitudes of the locations in a GeoPosition array:
GeoPosition[{{17.32, -58.61}, {-34.12, 125.32}, {50, 0}}]Longitude[%]Get the longitudes of the elements of a geo entity class:
Longitude[EntityClass["Building", "AcropolisAthens"]]That is equivalent to the following:
EntityClass["Building", "AcropolisAthens"]["Position"]Longitude[%]Extract the longitude of a geo location in a given datum:
Longitude[GeoPosition[{70, 0}], "NAD83CORS96"]Longitude automatically threads over lists of locations:
Longitude[{Here, Entity["City", {"NewYork", "NewYork", "UnitedStates"}], GeoPositionENU[{0, 0, 0}, GeoPosition[{50, 0}]]}]Extract Exif location information from an image:
Longitude[[image]]Longitude["NullIsland"]These are the current longitudes of the magnetic poles, as determined by GeomagneticModelData:
Longitude["NorthGeomagneticPole"]Longitude["NorthModelDipPole"]Properties & Relations (2)
Take a GeoPosition object:
pos = HereLongitude returns the longitude of that location as a Quantity object:
Longitude[pos]The "Longitude" property of GeoPosition objects returns a numeric result in degrees:
pos["Longitude"]The presence of elevation or temporal data does not affect the value of longitude:
Longitude[GeoPosition[{50, -30}]]Longitude[GeoPosition[{50, -30, 1000, Now}]]See Also
Latitude LatitudeLongitude GeoPosition GeodesyData DMSString DMSList SiderealTime
Interpreter Types: GeoCoordinates
Related Guides
Text
Wolfram Research (2008), Longitude, Wolfram Language function, https://reference.wolfram.com/language/ref/Longitude.html (updated 2020).
CMS
Wolfram Language. 2008. "Longitude." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2020. https://reference.wolfram.com/language/ref/Longitude.html.
APA
Wolfram Language. (2008). Longitude. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Longitude.html
BibTeX
@misc{reference.wolfram_2026_longitude, author="Wolfram Research", title="{Longitude}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/Longitude.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_longitude, organization={Wolfram Research}, title={Longitude}, year={2020}, url={https://reference.wolfram.com/language/ref/Longitude.html}, note=[Accessed: 13-June-2026]}