Equivalence usually has a very specific meaning when it comes to geometry:
- Same topology type
- Same number of vertices
- Same vertex values
You are not looking for an "equal" geometry, but something quite a bit more elastic. The answer could be to use SDE.ST_DIFFERENCE to "subtract" one geometry from the other, and test that for being non-empty.
Assuming two tables:
table1:
A|POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))
B|POLYGON ((0 10, 10 10, 10 0, 0 0, 0 10))
C|POLYGON ((10 10, 10 0, 0 0, 0 10, 10 10))
table2:
A|POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))
B|POLYGON ((0 10, 5 10, 10 10, 10 5, 10 0, 5 0, 0 0, 0 5, 0 10))
C|POLYGON ((0 0, 5 10, 10 0, 0 0))
SQL> select sde.st_isempty(sde.st_difference(a.shape,b.shape))
2 from table1 a, table2 b
3 where a.tid = b.tid;
SDE.ST_ISEMPTY(SDE.ST_DIFFERENCE(A.SHAPE,B.SHAPE))
--------------------------------------------------
1
1
0
Curiously, the Oracle implementation of ST_Equals produces that "forgiving" model
SQL> select sde.st_equals(a.shape,b.shape)
2 from table1 a, table2 b
3 where a.tid = b.tid;
SDE.ST_EQUALS(A.SHAPE,B.SHAPE)
------------------------------
1
1
0
- V