-
See Also
- GeoPositionENU
- GeoPositionXYZ
- GeoGridPosition
- GeoDistance
- GeoDestination
- Latitude
- Longitude
- GeoAntipode
- FindGeoLocation
- $GeoLocation
- GeodesyData
- GeoVector
- GeoGraphics
- GeoPath
- GeoCircle
- GeoDisk
- LocalTime
-
- Entity Types
- GeographicRegion
-
- Interpreter Types
- GeoCoordinates
-
- Formats
- USGSDEM
- SDTSDEM
- GeoTIFF
- Related Guides
- Tech Notes
-
-
See Also
- GeoPositionENU
- GeoPositionXYZ
- GeoGridPosition
- GeoDistance
- GeoDestination
- Latitude
- Longitude
- GeoAntipode
- FindGeoLocation
- $GeoLocation
- GeodesyData
- GeoVector
- GeoGraphics
- GeoPath
- GeoCircle
- GeoDisk
- LocalTime
-
- Entity Types
- GeographicRegion
-
- Interpreter Types
- GeoCoordinates
-
- Formats
- USGSDEM
- SDTSDEM
- GeoTIFF
- Related Guides
- Tech Notes
-
See Also
GeoPosition[{lat,lon}]
represents a geodetic position with latitude lat and longitude lon.
GeoPosition[{lat,lon,h}]
represents a geodetic position with height h relative to the reference ellipsoid.
GeoPosition[{lat,lon,h},datum]
represents a geodetic position referring to the specified datum.
GeoPosition[{{lat1,lon1},{lat2,lon2},…},datum]
represents an array of geodetic positions.
GeoPosition[entity]
returns the geodetic position of the specified geographical entity.
GeoPosition
GeoPosition[{lat,lon}]
represents a geodetic position with latitude lat and longitude lon.
GeoPosition[{lat,lon,h}]
represents a geodetic position with height h relative to the reference ellipsoid.
GeoPosition[{lat,lon,h},datum]
represents a geodetic position referring to the specified datum.
GeoPosition[{{lat1,lon1},{lat2,lon2},…},datum]
represents an array of geodetic positions.
GeoPosition[entity]
returns the geodetic position of the specified geographical entity.
Details
- Latitude and longitude values in GeoPosition[{lat,lon}] can be given as decimal degrees, DMS strings, or Quantity angles.
- Height h in GeoPosition[{lat,lon,h}] can be given as a numeric object in meters or as a Quantity length.
- Height h in GeoPosition[{lat,lon,h}] is geodetic height, measured with respect to the reference ellipsoid.
- GeoPosition[{lat,lon,h,t}] includes a time t that can be given as a numeric object or as a DateObject specification. A numeric t represents GMT time measured in seconds since the beginning of January 1, 1900.
- Valid latitude angles range from
to 90 degrees. Longitude angles, traditionally between
and 180 degrees, are unrestricted and interpreted modulo 360 degrees. - A GeoPosition object with no explicit height assumes height zero with respect to the reference ellipsoid. A GeoPosition object with no explicit time assumes the current date.
- GeoPosition[{lat,lon}] assumes the default datum "ITRF00".
- Standard datums can be specified by name. Typical named datums include:
-
"ITRF00" International Terrestrial Reference Frame 2000 "NAD27" North American Datum of 1927 "NAD83CORS96" North American Datum of 1983 (CORS96) - The complete list of named datums and reference ellipsoids is given by GeodesyData[].
- GeoPosition[GeoPosition[{lat,lon},datum1],datum2] converts between datums.
- GeoPosition[pos,datum] converts from any type of geographic position. The following coordinate types can be given: GeoPosition, GeoPositionXYZ, GeoPositionENU, GeoGridPosition.
- GeoPosition[pos] converts from any type of geographic position, keeping the same datum of pos.
- GeoPosition can represent a geodetic position on a body other than Earth using GeoPosition[coords,body], where body is an Entity object of domains "Planet", "MinorPlanet", or "PlanetaryMoon".
- For an image with Exif location information, GeoPosition[image] returns that information as a GeoPosition object.
- For extended entities, GeoPosition[entity] uses when possible the position of the geographic center of the entity.
- GeoPosition[…][prop] gives the specified property of a geo position.
- Possible properties include:
-
"AbsoluteTime" date as number of seconds since Jan 1, 1900, 00:00 GMT "Count" number of positions in the GeoPosition object "Data" first argument of the GeoPosition object "DateList" date list {y,m,d,h,m,s} in GMT time "DateObject" full date object "Datum" datum of the GeoPosition object "Depth" point depth: 0 for a single position, 1 for a list of them, … "Dimension" number of coordinates for each position "Elevation" numeric elevation in meters, with respect to the ellipsoid "Latitude" numeric latitude in degrees "LatitudeLongitude" numeric {lat,lon} pair in degrees "Longitude" numeric longitude in degrees "LongitudeLatitude" numeric {lon,lat} pair in degrees "PackingType" Integer or Real if data is packed; None otherwise
Examples
open all close allBasic Examples (4)
A geodetic position in the default reference frame:
GeoPosition[{37, -109}]GeoPosition[Entity["City", {"NewYork", "NewYork", "UnitedStates"}]]The current position of the International Space Station, including height and time information:
SatelliteData[Entity["Satellite", "25544"], "Position"]A position that explicitly refers to the ITRF00 reference frame:
GeoPosition[{40.112981, -88.261227, 192.868}, "ITRF00"]Convert this position to NAD 83 (CORS96) coordinates:
GeoPosition[ %, "NAD83CORS96"]GeoPosition[%, "ITRF00"]Scope (20)
Position Specification (9)
A geo position identified by values of latitude and longitude, respectively, both in degrees:
GeoPosition[{40.11, -88.24}]GeoPosition[{40.11, -88.24, 244.32}]Specify time as well, in seconds since 1900:
GeoPosition[{40.11, -88.24, 244.32, 3.6*^9}]Give an average location for a geographical entity:
city = Entity["City", {"London", "GreaterLondon", "UnitedKingdom"}]GeoPosition[city]Angles given as Quantity objects are converted into numeric angles, in degrees:
GeoPosition[{Quantity[40.11, "AngularDegrees"], Quantity[-2., "Radians"]}]Heights and dates are also canonicalized to meters and seconds, respectively:
GeoPosition[{Quantity[20, "AngularDegrees"], Quantity[-10, "AngularDegrees"], Quantity[1, "Kilometers"], DateObject[]}]GeoPosition[{"40°6'36.''", "28°14'24.''W"}]Write GeoPosition objects in DMS string form:
DMSString[GeoPosition[{40.11, -28.24}]]A GeoPosition object with no height information is assumed to have zero geodetic height:
GeoPositionXYZ[GeoPosition[{40, 30}]] === GeoPositionXYZ[GeoPosition[{40, 30, 0}]]A GeoPosition object with no time information is assumed to have the current date:
{DateValue[GeoPosition[{40, 30}]], DateObject[]}Extract Exif location information from an image:
GeoPosition[[image]]A geo position that specifies its datum:
GeoPosition[{40.11, -88.24}, "WGS72"]Transform to a different datum:
GeoPosition[%, "ITRF90"]Transform to the original datum:
GeoPosition[%, "WGS72"]Height is modified in a change of datum, but not time:
GeoPosition[{40.11, -88.24, 244.32, 3.6*^9}, "WGS72"]GeoPosition[%, "ITRF90"]GeoPosition["NorthPole"]GeoPosition["NullIsland"]These are the current locations of the magnetic poles, as determined by GeomagneticModelData:
GeoPosition["NorthGeomagneticPole"]GeoPosition["NorthModelDipPole"]Geo Position Arrays (4)
To speed up computations, use an array of points as the first argument:
pairs = RandomReal[{-90, 90}, {10000, 2}];All points are transformed at once:
AbsoluteTiming[r1 = GeoGridPosition[GeoPosition[pairs], "Albers"];]Here each point is transformed individually:
AbsoluteTiming[r2 = GeoGridPosition[GeoPosition[#], "Albers"]& /@ pairs;]Results coincide up to numerical error:
First[r1] - (First /@ r2)//Abs//MaxChanges of datum are also faster using an array of points as the first argument:
pairs = RandomReal[{-90, 90}, {10000, 2}];AbsoluteTiming[r1 = GeoPosition[GeoPosition[pairs, "WGS72"], "ITRF90"];]AbsoluteTiming[r2 = GeoPosition[GeoPosition[#, "WGS72"], "ITRF90"]& /@ pairs;]First[r1] - (First /@ r2)//Abs//MaxGeoPosition can contain nested lists of points, as long as all points have the same length and depth:
GeoPosition[{{{1., 2., 3.}, {4., 5., 6.}}, {{7., 8., 9.}}}]Manipulations will preserve the nesting structure:
GeoGridPosition[%, "Mercator"]GeoPosition[%]However, this is not allowed, because the first point has a height specification, but not the second:
GeoPosition[{{1, 2, 3}, {4, 5}}]This is not allowed because the second point is deeper than the first:
GeoPosition[{{1, 2}, {{3, 4}}}]Convert a list of geo positions into a single geo position array:
{GeoPosition[{0, 0}], GeoPosition[{40.3, -20.}], GeoPosition[{90, 90}]}GeoPosition[%]Convert back to a list of geo positions:
Thread[%]Coordinate Extraction (4)
Extract date information using DateValue:
DateString[]p = GeoPosition[{-40.3, 178.1, 0., %}]DateValue[p]Numeric time in GeoPosition is interpreted as GMT time. Convert to local time:
TimeZoneConvert[%, $TimeZone]Extract the year as an integer number:
DateValue[p, "Year", Integer]Extract the coordinates from a GeoPosition object:
p = GeoPosition[{40.21, -85.53, 125.2}]First[p]Extract latitude, longitude or both, as Quantity angles:
Latitude[p]Longitude[p]LatitudeLongitude[p]Use properties to extract information from a GeoPosition object:
p = Herep["Properties"]AssociationMap[p, %]//Normal//ColumnUse properties to extract information from a GeoPosition array:
p = RandomGeoPosition["World", {10, 20}]p["Count"]It is a matrix of points, so it has point depth 2:
p["Depth"]Each point has dimension 2, namely latitude and longitude:
p["Dimension"]RandomGeoPosition returns a GeoPosition object containing a packed array with type Real:
p["PackingType"]Any other property will return an array of values corresponding to the points of the array:
p["AbsoluteTime"]//Dimensionsp["DateList"]//DimensionsDatum Transformations (3)
A position that explicitly refers to the ITRF00 reference frame:
GeoPosition[{40.112981, -88.261227, 192.868}, "ITRF00"]Convert this position to NAD 83 (CORS96) coordinates:
GeoPosition[ %, "NAD83CORS96"]Convert to Cartesian geocentric coordinates:
GeoPositionXYZ[%]Convert back to geodetic coordinates:
GeoPosition[%]GeoPosition[%, "ITRF00"]Perform a datum transformation from the default "ITRF00" to the British datum "OGB7" of 1936:
p = GeoPosition[{27.7, -170.4}]q = GeoPosition[p, "OGB7"]To estimate the implied spatial change, compute geo distance ignoring the datum information:
GeoDistance[LatitudeLongitude[p], LatitudeLongitude[q]]UnitConvert[%]The change is smaller for locations in the UK:
p = RandomGeoPosition[Entity["Country", "UnitedKingdom"]]q = GeoPosition[p, "OGB7"]GeoDistance[LatitudeLongitude[p], LatitudeLongitude[q]]UnitConvert[%]Convert a geo position array of locations from the American "NAD27" datum to the European "EURM":
GeoPosition[{{43.4, -104.27}, {38.51, -100.24}, {42.47, -100.9}}, "NAD27"]GeoPosition[%, "EURM"]Extract the new coordinate values:
%["LatitudeLongitude"]Generalizations & Extensions (3)
Use positions on a sphere of 100 kilometers of radius:
GeoPosition[{32., -73.4}, Quantity[100, "Kilometers"]]GeoPositionXYZ[%]The vector components are given in meters:
Norm[%["XYZ"]]Transform back to a GeoPosition object on the sphere:
GeoPosition[%%]Use positions on an ellipsoid of given semiaxes:
GeoPosition[{-29.4, 32.7}, {Quantity[1, "Kilometers"], Quantity[900, "Meters"]}]GeoPositionXYZ[%]Transform back to a GeoPosition object on the ellipsoid:
GeoPosition[%]A position on a geo reference model other than the Earth:
SolarSystemFeatureData[Entity["SolarSystemFeature", "TychoBraheMars"], "Position"]Distance from the Tycho Brahe crater to the South Pole of Mars:
GeoDistance[%, GeoPosition[{-90, 0}, Entity["Planet", "Mars"]]]Computations are performed with an ellipsoid of these semiaxis lengths:
PlanetData[Entity["Planet", "Mars"], {"EquatorialRadius", "PolarRadius"}]Applications (3)
GeoPosition is the main object in the Wolfram Language denoting point-like locations on the Earth:
p = $GeoLocationq = GeoPosition[{51.5, -0.12}]Compute distance between two points:
d = GeoDistance[p, q]Compute the initial bearing of a geodesic from p to q:
α = GeoDirection[p, q]Draw the geodesic between them and respective geo circles:
GeoGraphics[{GeoPath[{p, q}], GeoCircle[p, d / 4], GeoCircle[q, d / 4]}]Check that the end of the geodesic starting at p is actually the point q:
GeoDestination[p, GeoDisplacement[{d, α}]]Geographical locations returned by EntityValue are given as GeoPosition objects:
EntityValue[Entity["Building", "TourEiffel"], "Position"]They can also include height and time information:
SatelliteData[Entity["Satellite", "25544"], "Position"]Geographical polygons have their coordinates inside a GeoPosition head:
polygon = EntityValue[Entity["Country", "Peru"], "Polygon"]Draw the polygon or its boundary:
{GeoGraphics[polygon], GeoGraphics[GeoBoundary[polygon]]}Properties & Relations (7)
Convert a geodetic location to a three-dimensional Cartesian vector with respect to the reference frame of the datum, assuming geodetic height 0:
p = $GeoLocationGeoPositionXYZ[p]Convert back to a GeoPosition specification, now with some small residual value of height:
GeoPosition[%]Convert geodetic coordinates to Cartesian coordinates for an ellipsoid of these semiaxis lengths:
a = 1.;
b = 0.5;Take a point p of geodetic latitude 60°, zero longitude, and geodetic height 0.15:
p = GeoPosition[{60., 0., 0.15}, {a, b}]Convert it to Cartesian coordinates:
pxyz = GeoPositionXYZ[p]Convert back to geodetic coordinates:
GeoPosition[pxyz]Take a point q of the same latitude and longitude, but zero height:
q = GeoPosition[{60., 0., 0.}, {a, b}]qxyz = GeoPositionXYZ[q]Represent the relation between the coordinates on a vertical cut of the ellipsoid:
pxz = {pxyz["X"], pxyz["Z"]}
qxz = {qxyz["X"], qxyz["Z"]}The blue line is perpendicular to the tangent at q and forms an angle of 60° with the
axis:
Graphics[{Circle[{0, 0}, {a, b}], PointSize[Medium], Red, Point[pxz], Line[{{0, 0}, pxz}], Blue, Point[qxz], Line[{pxz, pxz - 0.75{Cos[60Degree], Sin[60Degree]}}]}, Axes -> True]The geodetic height of p along the geodetic vertical is the distance between p and q:
Norm[pxz - qxz]Project a geodetic location using various geo projections, using their default parameters:
p = $GeoLocationGeoGridPosition[p, "Mercator"]GeoGridPosition[p, "Albers"]GeoGridPosition[p, "WinkelTripel"]Convert back to a GeoPosition specification:
GeoPosition /@ {%, %%, %%%}The antipode of a GeoPosition object is another GeoPosition object:
HereGeoAntipode[%]GeoPosition[{}] represents an empty array of geo positions:
GeoPosition[{}]%["Count"]GeoPosition[] is invalid syntax:
GeoPosition[]GeoPosition inside Graphics primitives marks coordinates as being in {lat,lon} notation:
coords = {{0, 0}, {0, 60}, {10, 60}, {10, 0}, {0, 0}};GeoGraphics[{Red, Polygon[GeoPosition[coords]], Green, Polygon[coords]}, GeoRange -> {{-10, 70}, {-10, 70}}, Frame -> True, GeoProjection -> "Equirectangular"]Graphics primitives containing GeoPosition coordinates are formed by straight segments in the projected map:
coords = {{0, 0}, {0, 60}, {10, 60}, {10, 0}, {0, 0}};GeoGraphics[{Opacity[0.5], Red, Line[GeoPosition[coords]], Blue, GeoPath[coords]}, Frame -> True, GeoProjection -> "Bonne"]Possible Issues (2)
Degree is considered as any other numeric expression:
GeoPosition[{30.Degree, 3.Pi}]Use Quantity to denote that angles are given in radians:
GeoPosition[{Quantity[30.Degree, "Radians"], Quantity[3.Pi, "Radians"]}]From Version 10 of the Wolfram Language, numeric time is interpreted as seconds since 1900, not as years:
GeoPosition[{40.11, 30.23, 0., 2014.3}]Neat Examples (1)
Take a list of images with Exif location information:
images = {[image], [image], [image], [image], [image], [image], [image]};Extract their respective positions:
positions = GeoPosition /@ images;Draw the points on a map, using tooltips to show the respective images:
GeoGraphics[{Darker[Green], GeoPath[positions], Darker[Brown], PointSize[Medium], Tooltip[Point[#1], #2]&@@@Transpose[{positions, images}]}]See Also
GeoPositionENU GeoPositionXYZ GeoGridPosition GeoDistance GeoDestination Latitude Longitude GeoAntipode FindGeoLocation $GeoLocation GeodesyData GeoVector GeoGraphics GeoPath GeoCircle GeoDisk LocalTime
Entity Types: GeographicRegion
Interpreter Types: GeoCoordinates
Formats: USGSDEM SDTSDEM GeoTIFF
Function Repository: ElevateGeoPosition
Tech Notes
Text
Wolfram Research (2008), GeoPosition, Wolfram Language function, https://reference.wolfram.com/language/ref/GeoPosition.html (updated 2019).
CMS
Wolfram Language. 2008. "GeoPosition." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2019. https://reference.wolfram.com/language/ref/GeoPosition.html.
APA
Wolfram Language. (2008). GeoPosition. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/GeoPosition.html
BibTeX
@misc{reference.wolfram_2026_geoposition, author="Wolfram Research", title="{GeoPosition}", year="2019", howpublished="\url{https://reference.wolfram.com/language/ref/GeoPosition.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_geoposition, organization={Wolfram Research}, title={GeoPosition}, year={2019}, url={https://reference.wolfram.com/language/ref/GeoPosition.html}, note=[Accessed: 13-June-2026]}