Nome

ST_IsEmpty — Tests if a geometry is empty.

Sinossi

boolean ST_IsEmpty(geometry geomA);

Descrizione

Restituisce TRUE se la Geometry è una geometria vuota. Se è TRUE, allora questa Geometry rappresenta una geometria vuota (una collezione, un poligono, un punto, ecc.)

[Nota]

SQL-MM definisce il risultato di ST_IsEmpty(NULL) come 0, mentre PostGIS restituisce NULL.

Questo metodo implementa le OGC Simple Features Implementation Specification for SQL 1.1. s2.1.1.1

Questo metodo implementa la specifica SQL/MM. SQL-MM 3: 5.1.7

Questo metodo supporta le Curve e le Circular String.

Changed: 2.0.0 In prior versions of PostGIS ST_GeomFromText('GEOMETRYCOLLECTION(EMPTY)') was allowed. This is now illegal in PostGIS 2.0.0 to better conform with SQL/MM standards

Esempi

Code
SELECT ST_IsEmpty('GEOMETRYCOLLECTION EMPTY'::geometry);
Output
t
Code
SELECT ST_IsEmpty('POLYGON EMPTY'::geometry);
Output
t
Code
SELECT ST_IsEmpty('POLYGON((1 2,3 4,5 6,1 2))'::geometry);
Output
f
Figure
Geometry figure for visual-st-isempty-03
Code
SELECT ST_IsEmpty('POLYGON((1 2,3 4,5 6,1 2))'::geometry) = false;
Output
t
(1 row)
Figure
Geometry figure for visual-st-isempty-04
Code
SELECT ST_IsEmpty('CIRCULARSTRING EMPTY'::geometry);
Output
t