Skip to content
🎉 Apache Sedona 1.8.1 is now available! Check out the new features and improvements.

ST_OrderingEquals

Introduction: Returns true if the geometries are equal and the coordinates are in the same order

Format: ST_OrderingEquals(A: geometry, B: geometry)

SQL example 1:

SELECT ST_OrderingEquals(ST_GeomFromWKT('POLYGON((2 0, 0 2, -2 0, 2 0))'), ST_GeomFromWKT('POLYGON((2 0, 0 2, -2 0, 2 0))'))

Output: true

SQL example 2:

SELECT ST_OrderingEquals(ST_GeomFromWKT('POLYGON((2 0, 0 2, -2 0, 2 0))'), ST_GeomFromWKT('POLYGON((0 2, -2 0, 2 0, 0 2))'))

Output: false