ST_IsClosed takes a linestring column and returns a boolean column. The function returns True
if the start
and end point of a given linestring are coincident; otherwise, it returns False
.
Function | Syntax |
---|---|
Python | is |
SQL | ST |
Python | is |
For more details, go to the GeoAnalytics for Microsoft Fabric API reference for is_closed.
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],[4,2]]]), ),
(Linestring([[[5,5],[7,6],[6,6],[5,5]]]), )
]
df = spark.createDataFrame(data, ["linestring"])
df.select(ST.is_closed("linestring").alias("is_closed")).show()
Result
+---------+
|is_closed|
+---------+
| false|
| true|
+---------+
Version table
Release | Notes |
---|---|
1.0.0-beta | Python, SQL, and Scala functions introduced |