ST_IsEmpty
Determines if a spatial object represents the empty set. An empty object has no dimension.
Behavior Type
Syntax
ST_IsEmpty( g )
Arguments
g |
Spatial object, type GEOMETRY or GEOGRAPHY |
Returns
BOOLEAN
Supported Data Types
Data Type | GEOMETRY | GEOGRAPHY (Perfect Sphere) | GEOGRAPHY (WGS84) |
Point | Yes | Yes | Yes |
Multipoint | Yes | Yes | Yes |
Linestring | Yes | Yes | Yes |
Multilinestring | Yes | Yes | Yes |
Polygon | Yes | Yes | Yes |
Multipolygon |
Yes |
Yes | Yes |
GeometryCollection | Yes | No | No |
Example
The following example shows how to use ST_IsEmpty.
An empty polygon:
=> SELECT ST_IsEmpty(ST_GeomFromText('GeometryCollection EMPTY')); ST_IsEmpty ------------ t (1 row)