Forces a geometry into 3D by adding Z coordinates.
Syntax
geometry ST_Force3D(geometry geomA);Parameters
| Parameter | Description |
|---|---|
geomA | The geometry object to convert. |
Description
ST_Force3Dis an alias forST_Force_3DZ.If the input geometry does not have Z coordinates, the Z coordinates of the output are set to 0.
Supports circular strings, curves, polyhedral surfaces, and 3D geometries.
Examples
SELECT ST_AsEWKT(ST_Force3D(ST_GeomFromEWKT('POINT(1 2)')));Output:
st_asewkt
--------------
POINT(1 2 0)
(1 row)该文章对您有帮助吗?