Tests if an ST_Geometry value is identical to another ST_Geometry value. The two geometries must contain the
same hierarchy of objects with the exact same points in the same order to be considered equal under ST_OrderingEquals.
The ST_OrderingEquals method differs from ST_Equals in that it considers the orientation of
curves. Two curves can contain exactly the same points but in opposite orders. These two curves
are considered equal with ST_Equals but unequal with ST_OrderingEquals.
Additionally, ST_OrderingEquals requires that each point in both geometries
is exactly equal, not just equal within the tolerance-distance specified
by the spatial reference system.
The ST_OrderingEquals method defines the semantics used for comparison predicates (= and <>),
IN list predicates, DISTINCT, and GROUP BY. If you wish to compare if two spatial values
are spatially equal (contain the same set of points in set),
you can use the ST_Equals method.
The SQL/MM standard defines ST_OrderingEquals to return a relative ordering, with 0 returned
if two geometries are spatially equal (according to ST_Equals) and 1 if they are not equal.
The SQL Anywhere implementation follows industry practice and differs from SQL/MM in that it
returns a boolean with 1 indicating the geometries are equal and 0 indicating they are different.
Further, the ST_OrderingEquals implementation differs from SQL/MM because it tests that values
are identical (same hierarchy of objects in the same order) instead of spatially equal (same set of points in space).