ST_EnvIntersects takes two geometry columns and returns a boolean column. The function returns True
if the envelopes
of two geometries intersect; otherwise, it returns False
.
Function | Syntax |
---|---|
Python | env |
SQL | ST |
Scala | env |
For more details, go to the GeoAnalytics for Microsoft Fabric API reference for env_intersects.
Examples
from geoanalytics_fabric.sql import functions as ST, Linestring, Polygon
data = [
(Polygon([[[0,0],[10,10],[20,0]]]), Linestring([[[19,5],[20,20]]])),
(Polygon([[[0,0],[10,10],[20,0]]]), Linestring([[[30,40],[32,43]]])),
]
df = spark.createDataFrame(data, ["polygon", "linestring"])
df.select(ST.env_intersects("polygon", "linestring").alias("env_intersects")).show()
Result
+--------------+
|env_intersects|
+--------------+
| true|
| false|
+--------------+
Version table
Release | Notes |
---|---|
1.0.0-beta | Python, SQL, and Scala functions introduced |