Nombre

ST_Force3D — Forzar las geometrías en modo XYZ. Este es un alias para ST_Force3DZ.

Sinopsis

geometry ST_Force3D(geometry geomA, float Zvalue = 0.0);

Descripción

Forces the geometries into XYZ mode. This is an alias for ST_Force3DZ. If a geometry has no Z component, then a Zvalue Z coordinate is tacked on.

Mejora: 2.0.0 se introdujo soporte de superficies poliédricas.

Cambiado: 2.1.0. Hasta la 2.0.x esto se llamaba ST_Force_3D.

Changed: 3.1.0. Added support for supplying a non-zero Z value.

This function supports Polyhedral surfaces.

This method supports Circular Strings and Curves.

This function supports 3d and will not drop the z-index.

Ejemplos

Nothing happens to an already 3D geometry.

Code
SELECT ST_Force3D('CIRCULARSTRING(1 1 2,2 3 2,4 5 2,6 7 2,5 6 2)');
Output
CIRCULARSTRING(1 1 2,2 3 2,4 5 2,6 7 2,5 6 2)
Figure
Geometry figure for visual-st-force-3d-01
Code
SELECT ST_Force3D('POLYGON((0 0,0 5,5 0,0 0),(1 1,3 1,1 3,1 1))');
Output
POLYGON((0 0 0,0 5 0,5 0 0,0 0 0),(1 1 0,3 1 0,1 3 0,1 1 0))
Figure
Geometry figure for visual-st-force-3d-02