ST_IsEmpty

更新时间:
复制 MD 格式

Returns true if a geometry object is empty, or false if it contains at least one point. Supported geometry types include GeometryCollection, polygon, and point, as well as circular strings and curves.

Syntax

boolean ST_IsEmpty(geometry geomA)

Parameters

ParameterDescription
geomAThe geometry object to evaluate.

Examples

Empty GeometryCollection — returns true:

SELECT ST_IsEmpty('GEOMETRYCOLLECTION EMPTY'::geometry);
 st_isempty
------------
 t
(1 row)

Empty polygon — returns true:

SELECT ST_IsEmpty('POLYGON EMPTY'::geometry);
 st_isempty
------------
 t
(1 row)