Name

ST_OrderingEquals — Tests if two Geometries are equal, and the coordinates are in the same order.

Synopsis

boolean ST_OrderingEquals(bytea Geometry, bytea Geometry);

Alias

OrderingEquals

Description

Tests if two Geometries are equal, and the coordinates are in the same order.

[Note]

GeometryCollections are supported

Coordinate Dimensions
2D3DM
Spatial Standards Support
OGC SFS for SQL. 1.1 (1999)OGC SFS for SQL. 1.1.0 (2005)OGC SFS for SQL. 1.2.0 (2006)SQL-MM Part 3
---5.1.43

Examples

SELECT ST_Equals(a,b) as equalsAB, ST_OrderingEquals(a,b) as OequalsAB,ST_OrderingEquals(a,a) as OequalsAA
from (SELECT ST_GeomFromText('LINESTRING (0 0, 10 10, 10 5, 15 10)') as a, 
             ST_GeomFromText('LINESTRING (15 10, 10 5, 10 10, 5 5, 0 0)') as b) as foo;
 equalsab | oequalsab | oequalsaa
----------+-----------+-----------
 t        | f         | t

SELECT ST_Equals(ga,gb),ST_OrderingEquals(ga,gb) 
from (SELECT ST_GeomFromText('LINESTRING (0 0 8, 10 10 2)') as ga, 
             ST_GeomFromText('LINESTRING (10 10 4, 0 0 2)') as gb) as foo;
 st_equals | st_orderingequals
-----------+-------------------
 t         | f

Related functions

ST_Equals