ST_IsEmpty

更新时间: 2026-04-12 04:09:42

Checks whether a spatial object is empty.

Syntax

boolean ST_IsEmpty(meshgeom geom);
boolean ST_IsEmpty(sfmesh sfmeshObject);

Parameters

ParameterTypeDescription
geommeshgeomThe meshgeom object to check.
sfmeshObjectsfmeshThe sfmesh object to check.

Return value

Returns t (true) if the object is empty, or f (false) if the object is not empty.

Examples

Check a meshgeom object that contains geometry data:

SELECT ST_IsEmpty('MESHGEOM(PATCH(INDEXSURFACE(VERTEX(0 0 2,0 10 3,10 10 1,10 0 1), INDEX((0,1,2),(1,2,3)))))'::meshgeom);

Result:

 f

Check an empty meshgeom object:

SELECT ST_IsEmpty('MESHGEOM EMPTY'::meshgeom);

Result:

 t
上一篇: ST_NumPatches 下一篇: ST_NPoints
阿里云首页 云原生数据库 PolarDB 相关技术圈