ST_IsEmpty

更新时间:
复制 MD 格式

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