Nome

ST_IsCollection — Restituisce TRUE se la geometria è una geometrycollection, un poligono o un punto vuoto, ecc.

Sinossi

boolean ST_IsCollection(geometry g);

Descrizione

Restituisce TRUE se il tipo di geometria è uno tra:

  • GEOMETRYCOLLECTION

  • MULTI{POINT,POLYGON,LINESTRING,CURVE,SURFACE}

  • COMPOUNDCURVE

[Nota]

Questa funzione analizza il tipo di geometria. Significa che restituirà TRUE sulle collezioni che sono vuote o contengono un singolo elemento.

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

Questo metodo supporta le Curve e le Circular String.

Esempi

Code
SELECT ST_IsCollection('LINESTRING(0 0,1 1)'::geometry);
Output
f
Figure
Geometry figure for visual-st-iscollection-01
Code
SELECT ST_IsCollection('MULTIPOINT EMPTY'::geometry);
Output
t
Code
SELECT ST_IsCollection('MULTIPOINT((0 0))'::geometry);
Output
t
Code
SELECT ST_IsCollection('MULTIPOINT((0 0),(42 42))'::geometry);
Output
t
Code
SELECT ST_IsCollection('GEOMETRYCOLLECTION(POINT(0 0))'::geometry);
Output
t

Si veda anche

ST_NumGeometries