Convert geocentric coordinates to WGS 84 geodesic coordinates

Supported in: Batch, Streaming

Converts geocentric cartesian coordinates to geodesic polar coordinates. Altitude is defined as height-above-ellipsoid. If any coordinates are null, the output will be null.

Expression categories: Geospatial

Declared arguments

  • X coordinate - X coordinate in the source coordinate system.
    Expression<Numeric>
  • Y coordinate - Y coordinate in the source coordinate system.
    Expression<Numeric>
  • Z coordinate - Z coordinate in the source coordinate system.
    Expression<Numeric>

Output type: GeoPoint with altitude

Examples

Example 1: Base case

Argument values:

  • X coordinate: x_coordinate
  • Y coordinate: y_coordinate
  • Z coordinate: z_coordinate
x_coordinatey_coordinatez_coordinateOutput
0.06378137.00.0{
 altitude -> 0.0,
 geoPoint -> {
 latitude -> 0.0,
 longitude -> 90.0,
},
}
0.0-6378137.00.0{
 altitude -> 0.0,
 geoPoint -> {
 latitude -> 0.0,
 longitude -> -90.0,
},
}
-6378137.00.00.0{
 altitude -> 0.0,
 geoPoint -> {
 latitude -> 0.0,
 longitude -> 180.0,
},
}
-6378137.0-0.00.0{
 altitude -> 0.0,
 geoPoint -> {
 latitude -> 0.0,
 longitude -> -180.0,
},
}
0.00.06356752.314245179{
 altitude -> 0.0,
 geoPoint -> {
 latitude -> 90.0,
 longitude -> 0.0,
},
}
0.00.0-6356752.314245179{
 altitude -> 0.0,
 geoPoint -> {
 latitude -> -90.0,
 longitude -> 0.0,
},
}

Example 2: Null case

Argument values:

  • X coordinate: x_coordinate
  • Y coordinate: y_coordinate
  • Z coordinate: z_coordinate
x_coordinatey_coordinatez_coordinateOutput
null0.00.0null
0.0null0.0null
0.00.0nullnull

Example 3: Edge case

Argument values:

  • X coordinate: x_coordinate
  • Y coordinate: y_coordinate
  • Z coordinate: z_coordinate
x_coordinatey_coordinatez_coordinateOutput
1.0E-70.06356752.314245179{
 altitude -> 0.0,
 geoPoint -> {
 latitude -> 89.9999999999991,
 longitude -> 0.0,
},
}
1.0E-70.0-6356752.314245179{
 altitude -> 0.0,
 geoPoint -> {
 latitude -> -89.9999999999991,
 longitude -> 0.0,
},
}
-6378137.0-1.0E-70.0{
 altitude -> 0.0,
 geoPoint -> {
 latitude -> 0.0,
 longitude -> -179.9999999999991,
},
}
-6378137.01.0E-70.0{
 altitude -> 0.0,
 geoPoint -> {
 latitude -> 0.0,
 longitude -> 179.9999999999991,
},
}