This topic describes the ST_Force3D function. This function forcefully converts a geometry object into a 3D object.
Syntax
geometry ST_Force3D(geometry geomA);
Parameters
Parameter | Description |
---|---|
geomA | The geometry object or that you want to specify. |
Description
- The ST_Force3D function is an alias for the ST_Force_3DZ function.
- If the geometry object does not contain z coordinates, the values of z coordinates of the output are specified as 0.
- This function supports circular strings, curves, polyhedral surfaces, and 3D objects.
Examples
SELECT ST_AsEWKT(ST_Force3D(ST_GeomFromEWKT('POINT(1 2)')));
st_asewkt
--------------
POINT(1 2 0)
(1 row)