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.
Tillgänglighet: 2.0.0
Denna funktion stöder 3d och kommer inte att tappa z-index.
Denna metod implementerar OGC:s implementeringsspecifikation för enkla funktioner för SQL 1.1.
Denna metod implementerar SQL/MM-specifikationen. SQL-MM ISO/IEC 13249-3: 8.5
Denna funktion stöder polyedriska ytor.
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)