ST_IsEmpty

更新时间:
复制 MD 格式

Returns true if the input geometry is an empty geometry, such as a GeometryCollection, polygon, or point.

Syntax

boolean ST_IsEmpty(geometry geomA);

Parameters

ParameterDescription
geomAThe geometry to test.

Usage notes

ST_IsEmpty supports circular strings and curves.

Examples

Test an empty GeometryCollection:

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

Test an empty polygon:

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