Skip to content

ST_IsCollection

Returns TRUE if the geometry type of the input is a geometry collection type.

Usage

boolean ST_IsCollection(geom: geometry)

Arguments

  • geom (geometry): Input geometry

Description

Returns TRUE if the geometry type of the input is a geometry collection type. Collection types are the following:

  • GEOMETRYCOLLECTION
  • MULTIPOINT
  • MULTIPOLYGON
  • MULTILINESTRING

Examples

SELECT ST_IsCollection(ST_GeomFromText('MULTIPOINT(0 0, 6 6)'));
┌────────────────────────────────────────────────────────────────┐
│ st_iscollection(st_geomfromtext(Utf8("MULTIPOINT(0 0, 6 6)"))) │
│                             boolean                            │
╞════════════════════════════════════════════════════════════════╡
│ true                                                           │
└────────────────────────────────────────────────────────────────┘
SELECT ST_IsCollection(ST_GeomFromText('POINT(5 5)'));
┌──────────────────────────────────────────────────────┐
│ st_iscollection(st_geomfromtext(Utf8("POINT(5 5)"))) │
│                        boolean                       │
╞══════════════════════════════════════════════════════╡
│ false                                                │
└──────────────────────────────────────────────────────┘