Projects a meshgeom object from Earth-centered Earth-fixed (ECEF) coordinates to east-north-up (ENU) coordinates relative to a specified reference point.
| Input type | ECEF Cartesian coordinates (meshgeom) |
|---|---|
| Output type | ENU local Cartesian coordinates (meshgeom) |
Syntax
meshgeom ST_ECEFToENU(meshgeom geom, geometry center);Parameters
| Parameter | Type | Description |
|---|---|---|
geom | meshgeom | The meshgeom object to transform. |
center | geometry | The reference point (origin) of the ENU coordinate system. Must be a Point3D value in EPSG:4326 format: longitude, latitude, and altitude in meters. Example: 'SRID=4326;POINT(0 0 0)'. |
How it works
ENU is a local Cartesian coordinate system anchored to a point on the Earth's surface. Its three axes point east, north, and up (normal to the ellipsoid surface) relative to the reference point specified by center. The function returns coordinates that express the position of each point in geom relative to that origin.
The center value must use the Point3D format supported by EPSG:4326, expressed as SRID=4326;POINT(<longitude> <latitude> <altitude_m>). For example, 'SRID=4326;POINT(0 0 0)' specifies a reference point whose latitude, longitude, and altitude are all 0, and represents point POINT(0 0).
Example
SELECT ST_AsText(ST_ECEFToENU('MESHGEOM(PATCH(POINT(6378137 0 0)))', 'SRID=4326;POINT(0 0 100)'));Output:
MESHGEOM(PATCH(POINT Z (0 0 -100)))