ST_IsCollection()¶
TL;DR¶
Use ST_IsCollection() to test whether a geometry is a collection type.
Returns whether a geometry is a collection type.
Syntax¶
ST_IsCollection(geom)
Arguments¶
Argument |
Description |
|---|---|
|
A |
Return Value¶
Returns BOOL.
Usage Notes¶
Examples¶
DROP DATABASE IF EXISTS geo_iscollection_demo;
CREATE DATABASE geo_iscollection_demo;
USE geo_iscollection_demo;
SELECT ST_IsCollection(ST_GeomFromText('MULTIPOINT(1 1,2 2)')) AS is_collection;
DROP DATABASE geo_iscollection_demo;