Converts any geometry to a 4D geometry (XYZM). If the input geometry is missing a Z or M coordinate, the missing value defaults to 0.
Syntax
geometry ST_Force4D(geometry geomA);Parameters
| Parameter | Description |
|---|---|
geomA | The input geometry. |
Description
If the input geometry has no Z or M coordinate, the missing coordinate is set to 0.
This function supports 3D objects and does not delete z coordinates.
Supports circular strings and curves.
Examples
3D geometry: Z is preserved, M coordinate is added
SELECT ST_AsEWKT(ST_Force4D(ST_GeomFromEWKT('POINT(1 2 3)'))); st_asewkt
----------------
POINT(1 2 3 0)
(1 row)该文章对您有帮助吗?