ST_IsEmpty takes a geometry column and returns a boolean column. The output returns True
if the geometry is empty;
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_empty.
This function implements the OpenGIS Simple Features Implementation Specification for SQL 1.2.1
Examples
from geoanalytics_fabric.sql import functions as ST
data = [
("POINT (-2533858.73 8107527.81)",),
("POINT EMPTY", )
]
df = spark.createDataFrame(data, ["wkt"])\
.select(ST.geom_from_text("wkt", srid=54008).alias("geometry"))
df.select(ST.is_empty("geometry").alias("is_empty")).show()
Result
+--------+
|is_empty|
+--------+
| false|
| true|
+--------+
Version table
Release | Notes |
---|---|
1.0.0-beta | Python, SQL, and Scala functions introduced |