ST_IsClosed — Restituisce TRUE se il punto iniziale e quello finale di LINESTRING coincidono. Per le superfici poliedriche indica una superficie chiusa (volumetrica).
boolean ST_IsClosed(geometry g);
Restituisce TRUE se il punto iniziale e quello finale di LINESTRING coincidono. Per le superfici poliedriche indicase la superficie è un'area (aperta) o un volume (chiusa).
Questo metodo implementa le OGC Simple Features Implementation Specification for SQL 1.1.
Questo metodo implementa la specifica SQL/MM. SQL-MM 3: 7.1.5, 9.3.3
|
|
|
SQL-MM defines the result of |
Questa funzione supporta il 3d e non distrugge gli z-index.
Questo metodo supporta le Curve e le Circular String.
Miglioramento: nella versione 2.0.0 è stato introdotto il supporto per le superfici poliedriche.
Questa funzione supporta le Polyhedral Surface.
SELECT ST_IsClosed('LINESTRING(0 0,1 1)'::geometry);
f
SELECT ST_IsClosed('LINESTRING(0 0,0 1,1 1,0 0)'::geometry);
t
SELECT ST_IsClosed('MULTILINESTRING((0 0,0 1,1 1,0 0),(0 0,1 1))'::geometry);
f
SELECT ST_IsClosed('POINT(0 0)'::geometry);
t
SELECT ST_IsClosed('MULTIPOINT((0 0),(1 1))'::geometry);
t
This example uses a cube.
SELECT ST_IsClosed('POLYHEDRALSURFACE( ((0 0 0,0 0 1,0 1 1,0 1 0,0 0 0)),
((0 0 0,0 1 0,1 1 0,1 0 0,0 0 0)),((0 0 0,1 0 0,1 0 1,0 0 1,0 0 0)),
((1 1 0,1 1 1,1 0 1,1 0 0,1 1 0)),
((0 1 0,0 1 1,1 1 1,1 1 0,0 1 0)),((0 0 1,1 0 1,1 1 1,0 1 1,0 0 1)) )');
t
This example uses the same cube with one side missing.
SELECT ST_IsClosed('POLYHEDRALSURFACE( ((0 0 0,0 0 1,0 1 1,0 1 0,0 0 0)),
((0 0 0,0 1 0,1 1 0,1 0 0,0 0 0)),((0 0 0,1 0 0,1 0 1,0 0 1,0 0 0)),
((1 1 0,1 1 1,1 0 1,1 0 0,1 1 0)),
((0 1 0,0 1 1,1 1 1,1 1 0,0 1 0)) )');
f