ST_Intersects

Intersects
Intersect examples by geometry type. Geometry 1 images with a red border intersect and return true.

ST_Intersects takes two geometry columns and returns a boolean column. The function returns True if the first geometry and the second geometry spatially intersect; otherwise, it returns False.

FunctionSyntax
Pythonintersects(geometry1, geometry2)
SQLST_Intersects(geometry1, geometry2)
Scalaintersects(geometry1, geometry2)

For more details, go to the GeoAnalytics for Microsoft Fabric API reference for intersects.

This function implements the OpenGIS Simple Features Implementation Specification for SQL 1.2.1.

Examples

PythonPythonSQLScala
1
2
3
4
5
6
7
8
9
10
11

from geoanalytics_fabric.sql import functions as ST, Linestring, Polygon

data = [
    (Polygon([[[0,0],[10,10],[20,0]]]), Linestring([[[5,2],[20,20]]])),
    (Polygon([[[0,0],[10,10],[20,0]]]), Linestring([[[30,40],[32,43]]])),
]

df = spark.createDataFrame(data, ["polygon", "linestring"])

df.select(ST.intersects("polygon", "linestring").alias("intersects")).show()
Result
1
2
3
4
5
6
+----------+
|intersects|
+----------+
|      true|
|     false|
+----------+

Version table

ReleaseNotes

1.0.0-beta

Python, SQL, and Scala functions introduced

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close