ST_Equals

Equals

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

FunctionSyntax
Pythonequals(geometry1, geometry2)
SQLST_Equals(geometry1, geometry2)
Scalaequals(geometry1, geometry2)

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

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

Examples

PythonPythonSQLScala
Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
from geoanalytics_fabric.sql import functions as ST, Point

data = [
    (Point(5,2), Point(5,2)),
    (Point(5,2), Point(20,20))
]

df = spark.createDataFrame(data, ["point1", "point2"])

df.select(ST.equals("point1", "point2").alias("equals")).show()
Result
Use dark colors for code blocksCopy
1
2
3
4
5
6
+------+
|equals|
+------+
|  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.