ST_NumPatches — Returns the number of faces in a PolyhedralSurface or TIN.
integer ST_NumPatches(geometry g1);
Returns the number of faces in a PolyhedralSurface or TIN. Returns NULL for other geometries. Unlike ST_NumGeometries, this function counts individual faces.
Disponibilità: 2.0.0
Questa funzione supporta il 3d e non distrugge gli z-index.
Questo metodo implementa le OGC Simple Features Implementation Specification for SQL 1.1.
Questo metodo implementa la specifica SQL/MM. SQL-MM ISO/IEC 13249-3: 8.5
Questa funzione supporta le Polyhedral Surface.
SELECT ST_NumPatches('POLYHEDRALSURFACE( ((0 0 0,0 0 1,0 1 1,0 1 0,0 0 0)),
((0 0 0,0 1 0,1 1 0,1 0 0,0 0 0)),((0 0 0,1 0 0,1 0 1,0 0 1,0 0 0)),
((1 1 0,1 1 1,1 0 1,1 0 0,1 1 0)),
((0 1 0,0 1 1,1 1 1,1 1 0,0 1 0)),((0 0 1,1 0 1,1 1 1,0 1 1,0 0 1)) )');
st_numpatches
---------------
6
(1 row)