This topic describes the ST_OrderingEquals function. This function checks whether two geometry objects are equal and their coordinates are in the same order. If the two geometry objects are equal and their coordinates are in the same order, this function returns True. Otherwise, this function returns False.

Syntax

boolean  ST_OrderingEquals(geometry  a , geometry  b);

Parameters

Parameter Description
a The first geometry object that you want to specify.
b The second geometry object that you want to specify.

Examples

The following example shows the difference between the ST_OrderingEquals function and the ST_Equals function:
SELECT ST_Equals(g1,g2),ST_OrderingEquals(g1,g2) FROM (SELECT 'LINESTRING(0 1,2 3)'::geometry as g1,'LINESTRING(2 3,0 1)'::geometry as g2) as test;
 st_equals | st_orderingequals
-----------+-------------------
 t         | f
(1 row)