ST_IsEmpty

Determines if a spatial object represents the empty set.

Determines if a spatial object represents the empty set. An empty object has no dimension.

Behavior type

Immutable

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

Examples

The following example shows how to use ST_IsEmpty.

An empty polygon:

=> SELECT ST_IsEmpty(ST_GeomFromText('GeometryCollection EMPTY'));
 ST_IsEmpty
------------
 t
(1 row)