Nom

ST_NumPatches — Returns the number of faces in a PolyhedralSurface or TIN.

Synopsis

integer ST_NumPatches(geometry g1);

Description

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

Cette fonction prend en charge la 3D et ne supprime pas l'indice z.

Cette méthode implémente la spécification OGC Simple Features Implementation Specification for SQL 1.1.

Cette méthode implémente la spécification SQL/MM. SQL-MM ISO/IEC 13249-3 : 8.5

Cette fonction prend en charge les surfaces Polyhedral.

Exemples

Code
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)) )');
Export de raster
st_numpatches
---------------
             6
(1 row)