ST_IsRing takes a linestring column and returns a boolean column. The output column returns True if the
input linestring is closed and simple; otherwise, it returns False.
| Function | Syntax |
|---|---|
| Python | is |
| SQL | ST |
| Scala | is |
For more details, go to the GeoAnalytics for Microsoft Fabric API reference for is_ring.
This function implements the OpenGIS Simple Features Implementation Specification for SQL 1.2.1.
Examples
from geoanalytics_fabric.sql import functions as ST, Linestring
data = [
(Linestring([[[5,5],[7,6],[6,6],[6,8]]]), ),
(Linestring([[[5,5],[7,6],[6,6],[5,5]]]), ),
(Linestring([[[5,5],[7,6],[6,6],[6,6],[5,5]]]), )
]
df = spark.createDataFrame(data, ["linestring"])
df.select(ST.is_ring(geometry="linestring").alias("is_ring")).show()Result
+-------+
|is_ring|
+-------+
| false|
| true|
| false|
+-------+Version table
| Release | Notes |
|---|---|
1.0.0-beta | Python, SQL, and Scala functions introduced |