ST_IsRing¶
Returns true if a linestring is ST_IsClosed and ST_IsSimple.
Usage¶
boolean ST_IsRing(geom: geometry)
Arguments¶
- geom (geometry): Input geometry
Description¶
Returns true if the linestring is both closed (ST_IsClosed) and
simple (ST_IsSimple). In other words, the input forms a ring with no
self-intersections.
Examples¶
SELECT ST_IsRing(
ST_GeomFromText('LINESTRING(0 0, 0 1, 1 1, 1 0, 0 0)')
);
┌─────────────────────────────────────────────────────────────────────────┐
│ st_isring(st_geomfromtext(Utf8("LINESTRING(0 0, 0 1, 1 1, 1 0, 0 0)"))) │
│ boolean │
╞═════════════════════════════════════════════════════════════════════════╡
│ true │
└─────────────────────────────────────────────────────────────────────────┘