GeoPositionXYZ[{x,y,z}]
represents a position in a Cartesian geocentric coordinate system.
GeoPositionXYZ[{x,y,z},datum]
represents a point referred to the specified datum.
GeoPositionXYZ[{{x1,y1,z1},{x2,y2,z2},…},datum]
represents an array of points in a Cartesian geocentric coordinate system.
GeoPositionXYZ[entity]
returns the Cartesian geocentric position of the given geographical entity.
GeoPositionXYZ
GeoPositionXYZ[{x,y,z}]
represents a position in a Cartesian geocentric coordinate system.
GeoPositionXYZ[{x,y,z},datum]
represents a point referred to the specified datum.
GeoPositionXYZ[{{x1,y1,z1},{x2,y2,z2},…},datum]
represents an array of points in a Cartesian geocentric coordinate system.
GeoPositionXYZ[entity]
returns the Cartesian geocentric position of the given geographical entity.
Details
- GeoPositionXYZ uses an Earth-centered, Earth-fixed Cartesian coordinate system.
- In GeoPositionXYZ[{x,y,z}], coordinate numeric values x,y,z are assumed to be in meters.
- GeoPositionXYZ[{x,y,z,t}] includes a time t measured in seconds since the beginning of January 1, 1900 in the GMT time zone.
- A GeoPositionXYZ object with no explicit time assumes the current date.
- GeoPositionXYZ[{x,y,z}] 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[].
- GeoPositionXYZ[GeoPositionXYZ[{x,y,z},datum1],datum2] converts between datums.
- GeoPositionXYZ[pos,datum] converts from any geographic position type. The following geographic position types can be given: GeoPosition, GeoPositionXYZ, GeoPositionENU, GeoGridPosition.
- GeoPositionXYZ[pos] converts from any type of geographic position, keeping the same datum of pos.
- For extended entities, GeoPositionXYZ[entity] uses when possible the position of the geographic center of the entity.
- GeoPositionXYZ[…][prop] gives the specified property of a Cartesian geo position.
- Possible properties include:
-
"AbsoluteTime" date as number of seconds since Jan 1, 1900, 00:00 GMT "Count" number of positions in the GeoPositionXYZ object "Data" first argument of the GeoPositionXYZ object "DateList" date list {y,m,d,h,m,s} in GMT time "DateObject" full date object "Datum" datum of the GeoPositionYXZ object "Depth" point depth: 0 for a single position, 1 for a list of them, … "Dimension" number of coordinates for each position "PackingType" Integer or Real if data is packed; None otherwise "X" numeric coordinate x in meters "Y" numeric coordinate y in meters "Z" numeric coordinate z in meters "XYZ" numeric {x,y,z} triple in meters "XY" numeric {x,y} pair in meters "XZ" numeric {x,z} pair in meters "YZ" numeric {y,z} pair in meters
Examples
open all close allBasic Examples (4)
Geodetic point defined by its Earth-centered Cartesian coordinates in meters:
GeoPositionXYZ[{148217.79, -4.88253*^6, 4.0877119*^6}]Convert to its {lat,lon,height} form:
GeoPosition[%]Cartesian coordinates of a geographic location:
GeoPositionXYZ[Entity["City", {"Paris", "IleDeFrance", "France"}]]Current Cartesian coordinates and time for the International Space Station:
SatelliteData[Entity["Satellite", "25544"], "Position"]//GeoPositionXYZConvert Earth-centered coordinates from the default "ITRF00" datum to the "NAD83CORS96" datum:
GeoPositionXYZ[GeoPositionXYZ[{0, 0, 0}], "NAD83CORS96"]Convert back to the "ITRF00" datum, with numerical errors smaller than a micrometer:
GeoPositionXYZ[%, "ITRF00"]Scope (12)
Position Specification (6)
A geo location specified by x, y, z values in meters with respect to the Earth's center:
GeoPositionXYZ[{130000., -5000000., 4000000.}]Convert into a lat-lon specification, also including height in meters:
GeoPosition[%]Include time information in seconds since 1900:
GeoPositionXYZ[{130000., -5000000., 4000000., DateObject[]}]Project onto a flat map using the Mercator projection. The time information is preserved:
GeoGridPosition[%, "Mercator"]Locate a geographical entity with respect to the Earth's center:
GeoPositionXYZ[Entity["City", {"Tokyo", "Tokyo", "Japan"}]]Give coordinates as Quantity objects in any units of length:
GeoPositionXYZ[Quantity[{130., -5000., 4000.}, "Kilometers"]]GeoPositionXYZ[Quantity[{80., -3100., 2500.}, "Miles"]]Convert from other geo location types to GeoPositionXYZ:
GeoPositionXYZ[GeoPosition[{0., 0.}]]GeoPositionXYZ[GeoGridPosition[{10., -20.}, "Mercator"]]GeoPositionXYZ[GeoPositionENU[{1000., 2310., -10.}, GeoPosition[{10., 23.}]]]Convert a position from a datum to another:
GeoPositionXYZ[GeoPositionXYZ[{130000., -5000000., 4000000.}, "ITRF90"], "WGS72"]Convert back to the original datum:
GeoPositionXYZ[%, "ITRF90"]Geo Position Arrays (4)
To speed up computations, use an array of positions in the first argument:
triples = RandomReal[6371000, {10000, 3}];All points are transformed at once:
AbsoluteTiming[r1 = GeoPosition[GeoPositionXYZ[triples]];]Here each point is transformed individually:
AbsoluteTiming[r2 = GeoPosition /@ GeoPositionXYZ /@ triples;]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:
triples = RandomReal[6371000, {10000, 3}];AbsoluteTiming[r1 = GeoPositionXYZ[GeoPositionXYZ[triples, "WGS72"], "ITRF90"];]AbsoluteTiming[r2 = GeoPositionXYZ[GeoPositionXYZ[#, "WGS72"], "ITRF90"]& /@ triples;]First[r1] - (First /@ r2)//Abs//MaxGeoPositionXYZ can contain nested lists of points, as long as all points have the same length and depth:
GeoPositionXYZ[{{{1., 2., 3.}, {4., 5., 6.}}, {{7., 8., 9.}}}]Manipulations will preserve the nesting structure:
GeoGridPosition[%, "Mercator"]GeoPositionXYZ[%]However, this is not allowed, because the first point has a time specification, but not the second:
GeoPositionXYZ[{{1, 2, 3, 0}, {4, 5, 6}}]This is not allowed because the second point is deeper than the first:
GeoPositionXYZ[{{1, 2, 3}, {{4, 5, 6}}}]Convert a list of geo positions into a single geo position array:
{GeoPositionXYZ[{0, 0, 0}], GeoPositionXYZ[{150000., -5000000., 4000000.}], GeoPositionXYZ[{5000000., -300000., 4000000.}]}GeoPositionXYZ[%]Convert back to a list of geo positions:
Thread[%]Coordinate Extraction (2)
Use properties to extract information from a GeoPositionXYZ object:
p = GeoPositionXYZ[Here]p["Properties"]AssociationMap[p, %]//Normal//ColumnUse properties to extract information from a GeoPositionXYZ array:
p = GeoPositionXYZ[RandomGeoPosition["World", {10, 20}]]p["Count"]It is a matrix of points, so it has point depth 2:
p["Depth"]Each point has dimension 3, namely the x,y,z coordinates:
p["Dimension"]The array of coordinates is packed 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"]//DimensionsGeneralizations & 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"]]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"]GeoPositionXYZ[%]Computations are performed with an ellipsoid of these semiaxis lengths:
PlanetData[Entity["Planet", "Mars"], {"EquatorialRadius", "PolarRadius"}]Applications (2)
A hundred random points on the surface of the Earth:
points = RandomGeoPosition["World", 100]GeoGraphics[Point[points]]ListPointPlot3D[GeoPositionXYZ[points]["XYZ"], BoxRatios -> 1]Take an icosahedron as a GraphicsComplex object:
Show[Graphics3D[gc = N@PolyhedronData["Icosahedron", "GraphicsComplex"]], Boxed -> False]Express its 12 vertices as a GeoPositionXYZ array on a sphere of appropriate radius:
xyz = GeoPositionXYZ[gc[[1]], Norm[gc[[1, 1]]]]Convert to a list of {lat,lon} pairs in degrees:
latlon = QuantityMagnitude[LatitudeLongitude[xyz], "AngularDegrees"]Construct a GeoPath object that contains the geodesic perimeters of the 20 faces of the icosahedron:
geopaths = GeoPath[Extract[latlon, List /@ gc[[2, 1]]]];Draw the geodesics on a map of the Earth in the "Equirectangular" projection:
GeoGraphics[geopaths, GeoProjection -> "Equirectangular"]GeoGraphics[geopaths, GeoProjection -> "LambertAzimuthal"]Properties & Relations (6)
Three-dimensional position of the origin of latitude and longitude:
GeoPositionXYZ[GeoPosition[{0, 0}]]Three-dimensional position of the North and South Poles:
GeoPositionXYZ[GeoPosition[{90, 0}]]GeoPositionXYZ[GeoPosition[{-90, 0}]]Convert geodetic coordinates to Cartesian coordinates for an ellipsoid of these semiaxes 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]GeoPositionXYZ[{}] represents an empty array of geo positions:
GeoPositionXYZ[{}]%["Count"]GeoPositionXYZ[] is invalid syntax:
GeoPositionXYZ[]GeoPositionXYZ gives Earth's centered position. GeoPositionENU specifies the center to use:
GeoPositionXYZ[Entity["City", {"NewYork", "NewYork", "UnitedStates"}]]New York is more than eight kilometers below the tangent plane at Washington:
GeoPositionENU[Entity["City", {"NewYork", "NewYork", "UnitedStates"}], Entity["City", {"Washington", "DistrictOfColumbia", "UnitedStates"}]]GeoPositionXYZ coincides with GeoPositionENU for this center:
b = GeodesyData["ITRF00", "SemiminorAxis"]center = GeoPosition[{90, -90, -b}]loc = GeoPosition[{-30, 140}];GeoPositionXYZ[loc]GeoPositionENU[loc, center]The coordinates of the antipode of a GeoPositionXYZ location have opposite sign:
GeoAntipode[GeoPositionXYZ[{1.34*^6, -4.66*^6, 4.13*^6}]]Tech Notes
Related Guides
-
▪
- Geodesy
Text
Wolfram Research (2008), GeoPositionXYZ, Wolfram Language function, https://reference.wolfram.com/language/ref/GeoPositionXYZ.html (updated 2019).
CMS
Wolfram Language. 2008. "GeoPositionXYZ." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2019. https://reference.wolfram.com/language/ref/GeoPositionXYZ.html.
APA
Wolfram Language. (2008). GeoPositionXYZ. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/GeoPositionXYZ.html
BibTeX
@misc{reference.wolfram_2026_geopositionxyz, author="Wolfram Research", title="{GeoPositionXYZ}", year="2019", howpublished="\url{https://reference.wolfram.com/language/ref/GeoPositionXYZ.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_geopositionxyz, organization={Wolfram Research}, title={GeoPositionXYZ}, year={2019}, url={https://reference.wolfram.com/language/ref/GeoPositionXYZ.html}, note=[Accessed: 13-June-2026]}