ST_ISEMPTY()
All functions > GEOSPATIAL > ST_ISEMPTY()
Returns TRUE if a geometry or geography is empty.
Signatures
Is empty
Returns: TRUE if empty
ST_ISEMPTY(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:
- An empty geometry has no vertices
- Returns NULL if the input is NULL
Examples
FeatureQL
SELECT
f1 := ST_ISEMPTY(ST_GEOMPOINT(1.0, 2.0)), -- Non empty point
f2 := ST_ISEMPTY(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION EMPTY')) -- Empty geometry collection
;Result
| f1 BOOLEAN | f2 BOOLEAN |
|---|---|
| false | true |
On this page