GeoPosition
✖
GeoPosition
represents a geodetic position with height h relative to the reference ellipsoid.
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 allclose allBasic Examples (4)Summary of the most common use cases
A geodetic position in the default reference frame:

https://wolfram.com/xid/0i1qfqi9u-5p7ist


https://wolfram.com/xid/0i1qfqi9u-p0i8xr

The current position of the International Space Station, including height and time information:

https://wolfram.com/xid/0i1qfqi9u-nyqnqs

A position that explicitly refers to the ITRF00 reference frame:

https://wolfram.com/xid/0i1qfqi9u-v78odq

Convert this position to NAD 83 (CORS96) coordinates:

https://wolfram.com/xid/0i1qfqi9u-swrv04

Convert to Cartesian geocentric coordinates:

https://wolfram.com/xid/0i1qfqi9u-xxses3

Convert back to geodetic coordinates:

https://wolfram.com/xid/0i1qfqi9u-qt9zqs


https://wolfram.com/xid/0i1qfqi9u-gmcvb3

Scope (17)Survey of the scope of standard use cases
Position Specification (9)
A geo position identified by values of latitude and longitude, respectively, both in degrees:

https://wolfram.com/xid/0i1qfqi9u-pvcl8s


https://wolfram.com/xid/0i1qfqi9u-j11bmk

Specify time as well, in seconds since 1900:

https://wolfram.com/xid/0i1qfqi9u-cmijcm

Give an average location for a geographical entity:

https://wolfram.com/xid/0i1qfqi9u-celc3r


https://wolfram.com/xid/0i1qfqi9u-2kfsc0

Angles given as Quantity objects are converted into numeric angles, in degrees:

https://wolfram.com/xid/0i1qfqi9u-7f53yz

Heights and dates are also canonicalized to meters and seconds, respectively:

https://wolfram.com/xid/0i1qfqi9u-ekn443


https://wolfram.com/xid/0i1qfqi9u-gpai0x

Write GeoPosition objects in DMS string form:

https://wolfram.com/xid/0i1qfqi9u-oqr6bh

A GeoPosition object with no height information is assumed to have zero geodetic height:

https://wolfram.com/xid/0i1qfqi9u-sl3r

A GeoPosition object with no time information is assumed to have the current date:

https://wolfram.com/xid/0i1qfqi9u-bqumw

Extract Exif location information from an image:

https://wolfram.com/xid/0i1qfqi9u-ydivdh

A geo position that specifies its datum:

https://wolfram.com/xid/0i1qfqi9u-bmvlpi

Transform to a different datum:

https://wolfram.com/xid/0i1qfqi9u-byqnwj

Transform to the original datum:

https://wolfram.com/xid/0i1qfqi9u-lgn7vw

Height is modified in a change of datum, but not time:

https://wolfram.com/xid/0i1qfqi9u-gbuj2s


https://wolfram.com/xid/0i1qfqi9u-i4jiuw


https://wolfram.com/xid/0i1qfqi9u-dvtfj4


https://wolfram.com/xid/0i1qfqi9u-4yqklk

These are the current locations of the magnetic poles, as determined by GeomagneticModelData:

https://wolfram.com/xid/0i1qfqi9u-g480yf


https://wolfram.com/xid/0i1qfqi9u-7tkfbe

Geo Position Arrays (4)
To speed up computations, use an array of points as the first argument:

https://wolfram.com/xid/0i1qfqi9u-bvjxvw
All points are transformed at once:

https://wolfram.com/xid/0i1qfqi9u-4vh4r2

Here each point is transformed individually:

https://wolfram.com/xid/0i1qfqi9u-qqevqr

Results coincide up to numerical error:

https://wolfram.com/xid/0i1qfqi9u-dnvow7

Changes of datum are also faster using an array of points as the first argument:

https://wolfram.com/xid/0i1qfqi9u-u8dd2x

https://wolfram.com/xid/0i1qfqi9u-5sjy6d


https://wolfram.com/xid/0i1qfqi9u-tsdwjl


https://wolfram.com/xid/0i1qfqi9u-9py0i5

GeoPosition can contain nested lists of points, as long as all points have the same length and depth:

https://wolfram.com/xid/0i1qfqi9u-cpue12

Manipulations will preserve the nesting structure:

https://wolfram.com/xid/0i1qfqi9u-x4c7kc


https://wolfram.com/xid/0i1qfqi9u-evtblh

However, this is not allowed, because the first point has a height specification, but not the second:

https://wolfram.com/xid/0i1qfqi9u-ov63cs


This is not allowed because the second point is deeper than the first:

https://wolfram.com/xid/0i1qfqi9u-oai87j


Convert a list of geo positions into a single geo position array:

https://wolfram.com/xid/0i1qfqi9u-0oxvle


https://wolfram.com/xid/0i1qfqi9u-c5hqrb

Convert back to a list of geo positions:

https://wolfram.com/xid/0i1qfqi9u-nf5f4m

Coordinate Extraction (4)
Extract date information using DateValue:

https://wolfram.com/xid/0i1qfqi9u-retrsk


https://wolfram.com/xid/0i1qfqi9u-ugkjnl


https://wolfram.com/xid/0i1qfqi9u-mj13y7

Numeric time in GeoPosition is interpreted as GMT time. Convert to local time:

https://wolfram.com/xid/0i1qfqi9u-d3jttl

Extract the year as an integer number:

https://wolfram.com/xid/0i1qfqi9u-z16a19

Extract the coordinates from a GeoPosition object:

https://wolfram.com/xid/0i1qfqi9u-xeo7km


https://wolfram.com/xid/0i1qfqi9u-y6rbuk

Extract latitude, longitude or both, as Quantity angles:

https://wolfram.com/xid/0i1qfqi9u-6aswbl


https://wolfram.com/xid/0i1qfqi9u-6jpiby


https://wolfram.com/xid/0i1qfqi9u-lwd94i

Use properties to extract information from a GeoPosition object:

https://wolfram.com/xid/0i1qfqi9u-01t9q0


https://wolfram.com/xid/0i1qfqi9u-gzjluk


https://wolfram.com/xid/0i1qfqi9u-fhr1o5

Use properties to extract information from a GeoPosition array:

https://wolfram.com/xid/0i1qfqi9u-ijqmvd


https://wolfram.com/xid/0i1qfqi9u-e8rwmh

It is a matrix of points, so it has point depth 2:

https://wolfram.com/xid/0i1qfqi9u-c1gqr4

Each point has dimension 2, namely latitude and longitude:

https://wolfram.com/xid/0i1qfqi9u-rtsot6

RandomGeoPosition returns a GeoPosition object containing a packed array with type Real:

https://wolfram.com/xid/0i1qfqi9u-52ud3o

Any other property will return an array of values corresponding to the points of the array:

https://wolfram.com/xid/0i1qfqi9u-y32x7k


https://wolfram.com/xid/0i1qfqi9u-hwcd68

Generalizations & Extensions (3)Generalized and extended use cases
Use positions on a sphere of 100 kilometers of radius:

https://wolfram.com/xid/0i1qfqi9u-iqdud0


https://wolfram.com/xid/0i1qfqi9u-6smc6m

The vector components are given in meters:

https://wolfram.com/xid/0i1qfqi9u-g255kw

Transform back to a GeoPosition object on the sphere:

https://wolfram.com/xid/0i1qfqi9u-rytrx1

Use positions on an ellipsoid of given semiaxes:

https://wolfram.com/xid/0i1qfqi9u-tlm72h


https://wolfram.com/xid/0i1qfqi9u-cxl9jp

Transform back to a GeoPosition object on the ellipsoid:

https://wolfram.com/xid/0i1qfqi9u-7jul9r

A position on a geo reference model other than the Earth:

https://wolfram.com/xid/0i1qfqi9u-9qrq5h

Distance from the Tycho Brahe crater to the South Pole of Mars:

https://wolfram.com/xid/0i1qfqi9u-4o316j

Computations are performed with an ellipsoid of these semiaxis lengths:

https://wolfram.com/xid/0i1qfqi9u-rv8h1k

Applications (3)Sample problems that can be solved with this function
GeoPosition is the main object in the Wolfram Language denoting point-like locations on the Earth:

https://wolfram.com/xid/0i1qfqi9u-uzs61g


https://wolfram.com/xid/0i1qfqi9u-up0x97

Compute distance between two points:

https://wolfram.com/xid/0i1qfqi9u-qa2764

Compute the initial bearing of a geodesic from p to q:

https://wolfram.com/xid/0i1qfqi9u-qcm4ew

Draw the geodesic between them and respective geo circles:

https://wolfram.com/xid/0i1qfqi9u-cut1e3

Check that the end of the geodesic starting at p is actually the point q:

https://wolfram.com/xid/0i1qfqi9u-uixhc6

Geographical locations returned by EntityValue are given as GeoPosition objects:

https://wolfram.com/xid/0i1qfqi9u-o5e5la

They can also include height and time information:

https://wolfram.com/xid/0i1qfqi9u-5stdzg

Geographical polygons have their coordinates inside a GeoPosition head:

https://wolfram.com/xid/0i1qfqi9u-c459z0

Draw the polygon or its boundary:

https://wolfram.com/xid/0i1qfqi9u-wa5muw

Properties & Relations (7)Properties of the function, and connections to other functions
Convert a geodetic location to a three-dimensional Cartesian vector with respect to the reference frame of the datum, assuming geodetic height 0:

https://wolfram.com/xid/0i1qfqi9u-p75s2n


https://wolfram.com/xid/0i1qfqi9u-sa45c7

Convert back to a GeoPosition specification, now with some small residual value of height:

https://wolfram.com/xid/0i1qfqi9u-naiq4s

Convert geodetic coordinates to Cartesian coordinates for an ellipsoid of these semiaxis lengths:

https://wolfram.com/xid/0i1qfqi9u-p1pgsf
Take a point p of geodetic latitude 60°, zero longitude, and geodetic height 0.15:

https://wolfram.com/xid/0i1qfqi9u-65i8gf

Convert it to Cartesian coordinates:

https://wolfram.com/xid/0i1qfqi9u-yb2rsp

Convert back to geodetic coordinates:

https://wolfram.com/xid/0i1qfqi9u-pfdmco

Take a point q of the same latitude and longitude, but zero height:

https://wolfram.com/xid/0i1qfqi9u-lnl2xm


https://wolfram.com/xid/0i1qfqi9u-fwynro

Represent the relation between the coordinates on a vertical cut of the ellipsoid:

https://wolfram.com/xid/0i1qfqi9u-eth6vy


The blue line is perpendicular to the tangent at q and forms an angle of 60° with the axis:

https://wolfram.com/xid/0i1qfqi9u-s72uyv

The geodetic height of p along the geodetic vertical is the distance between p and q:

https://wolfram.com/xid/0i1qfqi9u-bidvuv

Project a geodetic location using various geo projections, using their default parameters:

https://wolfram.com/xid/0i1qfqi9u-hg2ld1


https://wolfram.com/xid/0i1qfqi9u-5643o9


https://wolfram.com/xid/0i1qfqi9u-dag4rk


https://wolfram.com/xid/0i1qfqi9u-le4rln

Convert back to a GeoPosition specification:

https://wolfram.com/xid/0i1qfqi9u-0cpu8w

The antipode of a GeoPosition object is another GeoPosition object:

https://wolfram.com/xid/0i1qfqi9u-6ynmxd


https://wolfram.com/xid/0i1qfqi9u-4xdi41

GeoPosition[{}] represents an empty array of geo positions:

https://wolfram.com/xid/0i1qfqi9u-cknput


https://wolfram.com/xid/0i1qfqi9u-dusfbi

GeoPosition[] is invalid syntax:

https://wolfram.com/xid/0i1qfqi9u-3vl8r8


GeoPosition inside Graphics primitives marks coordinates as being in {lat,lon} notation:

https://wolfram.com/xid/0i1qfqi9u-1tvy0b

https://wolfram.com/xid/0i1qfqi9u-6gx6l3

Graphics primitives containing GeoPosition coordinates are formed by straight segments in the projected map:

https://wolfram.com/xid/0i1qfqi9u-2hcth4

https://wolfram.com/xid/0i1qfqi9u-jy3g3o

Possible Issues (2)Common pitfalls and unexpected behavior
Degree is considered as any other numeric expression:

https://wolfram.com/xid/0i1qfqi9u-k7m76q

Use Quantity to denote that angles are given in radians:

https://wolfram.com/xid/0i1qfqi9u-tyn3e2

From Version 10 of the Wolfram Language, numeric time is interpreted as seconds since 1900, not as years:

https://wolfram.com/xid/0i1qfqi9u-4jyjdg


Neat Examples (1)Surprising or curious use cases
Take a list of images with Exif location information:

https://wolfram.com/xid/0i1qfqi9u-9px7k9
Extract their respective positions:

https://wolfram.com/xid/0i1qfqi9u-5a4yru
Draw the points on a map, using tooltips to show the respective images:

https://wolfram.com/xid/0i1qfqi9u-gbpn8i

Wolfram Research (2008), GeoPosition, Wolfram Language function, https://reference.wolfram.com/language/ref/GeoPosition.html (updated 2019).
Text
Wolfram Research (2008), GeoPosition, Wolfram Language function, https://reference.wolfram.com/language/ref/GeoPosition.html (updated 2019).
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.
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
Wolfram Language. (2008). GeoPosition. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/GeoPosition.html
BibTeX
@misc{reference.wolfram_2025_geoposition, author="Wolfram Research", title="{GeoPosition}", year="2019", howpublished="\url{https://reference.wolfram.com/language/ref/GeoPosition.html}", note=[Accessed: 26-March-2025
]}
BibLaTeX
@online{reference.wolfram_2025_geoposition, organization={Wolfram Research}, title={GeoPosition}, year={2019}, url={https://reference.wolfram.com/language/ref/GeoPosition.html}, note=[Accessed: 26-March-2025
]}