Nome

ST_Force2D — Force the geometries into a "2-dimensional mode".

Sinossi

geometry ST_Force2D(geometry geomA);

Descrizione

Forces the geometries into a "2-dimensional mode" so that all output representations will only have the X and Y coordinates. This is useful for force OGC-compliant output (since OGC only specifies 2-D geometries).

Miglioramento: nella versione 2.0.0 è stato introdotto il supporto per le superfici poliedriche.

Changed: 2.1.0. Up to 2.0.x this was called ST_Force_2D.

Questo metodo supporta le Curve e le Circular String.

Questa funzione supporta le Polyhedral Surface.

Questa funzione supporta il 3d e non distrugge gli z-index.

Esempi

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

Si veda anche

ST_Force3D