ST_ISCOLLECTION()
All functions > GEOSPATIAL > ST_ISCOLLECTION()
Returns TRUE if the geometry or geography is a Multi* or GeometryCollection.
Signatures
Is collection
Returns: TRUE if the sub kind is MultiPoint, MultiLineString, MultiPolygon, or GeometryCollection
ST_ISCOLLECTION(geo: T) → BOOLEAN sql
| Parameter | Type | Required | Description |
|---|---|---|---|
geo | T | Yes | Geometry or geography value |
With:
T: Custom types: GEOM_POINT | GEOM_LINESTRING | GEOM_POLYGON | GEOM_MULTIPOINT | GEOM_MULTILINESTRING | GEOM_MULTIPOLYGON | GEOM_MULTIANY | GEOG_POINT | GEOG_LINESTRING | GEOG_POLYGON | GEOG_MULTIPOINT | GEOG_MULTILINESTRING | GEOG_MULTIPOLYGON | GEOG_MULTIANY
Signature notes:
- Transpiled as a ST_GEOMETRYTYPE IN (...) comparison; labels vary by engine
- Returns FALSE for singular sub kinds (Point, LineString, Polygon)
- Returns NULL if the input is NULL
Examples
FeatureQL
SELECT
f1 := ST_ISCOLLECTION(ST_GEOMFROMTEXT('MULTIPOINT ((0 0), (1 1))')), -- MultiPoint is a collection
f2 := ST_ISCOLLECTION(ST_GEOMPOINT(1.0, 2.0)) -- Point is not a collection
;Result
| f1 BOOLEAN | f2 BOOLEAN |
|---|---|
| true | false |
On this page