Skip to content

ST_IsCollection

Returns true if the geometry or geography type of the input is a collection type.

Usage

boolean ST_IsCollection(geom: geometry)
boolean ST_IsCollection(geog: geography)

Arguments

  • geog (geography): Input geography
  • 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_GeomFromWKT('MULTIPOINT ((0 0), (1 1))'));
┌────────────────────────────────────────────────────────────────────┐
│ st_iscollection(st_geomfromwkt(Utf8("MULTIPOINT ((0 0), (1 1))"))) │
│                               boolean                              │
╞════════════════════════════════════════════════════════════════════╡
│ true                                                               │
└────────────────────────────────────────────────────────────────────┘
SELECT ST_IsCollection(ST_GeogFromWKT('MULTIPOINT ((0 0), (1 1))'));
┌────────────────────────────────────────────────────────────────────┐
│ st_iscollection(st_geogfromwkt(Utf8("MULTIPOINT ((0 0), (1 1))"))) │
│                               boolean                              │
╞════════════════════════════════════════════════════════════════════╡
│ true                                                               │
└────────────────────────────────────────────────────────────────────┘