Nombre

ST_IsCollection — Devuelve True si la Geometría es una colección vacía, polígono vacio, punto vacío etc.

Sinopsis

boolean ST_IsCollection(geometry g);

Descripción

Devuelve TRUE si la geometría del argumento es:

  • GEOMETRYCOLLECTION

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

  • COMPOUNDCURVE

[Nota]

Esta función analiza el tipo de geometría. Esto significa que devolverá TRUE en colecciones que estén vacías o que contengan un único elemento.

This function supports 3d and will not drop the z-index.

This method supports Circular Strings and Curves.

Ejemplos

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

Ver también

ST_NumGeometries