Sdo_Join Wrong Result After 9398469 Relationship Touch Instead Of Overlapbdyintersect (Doc ID 1118974.1)

Last updated on FEBRUARY 08, 2017

Applies to:

Oracle Spatial - Version: 10.2.0.4 and later   [Release: 10.2 and later ]
Information in this document applies to any platform.

Symptoms

After applying patch 9398469 Executing query:

select poly.id, state.id
from table(sdo_join
('STATE','GEOMETRY','POLY','GEOMETRY',
'mask=OVERLAPBDYDISJOINT+OVERLAPBDYINTERSECT+INSIDE+COVEREDBY+CONTAINS+COVERS
+EQUAL')) jn
,POLY
,STATE
WHERE STATE.rowid = jn.rowid1
AND POLY.rowid = jn.rowid2;

not getting any rows when one row was expected

The cause of the problem is that the relationship between the two geometries
is now TOUCH instead of OVERLAPBDYINTERSECT


The output before the patch was correct:

/* 10.2.0.4.0 no patches, 11.1.0.7.0, 11.2.0.1.0 output:

*********** This is the correct output ***********


select poly.id, state.id
from table(sdo_join
('STATE','GEOMETRY','POLY','GEOMETRY',
'mask=OVERLAPBDYDISJOINT+OVERLAPBDYINTERSECT+INSIDE+COVEREDBY+CONTAINS+COVERS
+EQUAL')) jn
,POLY
,STATE
WHERE STATE.rowid = jn.rowid1
AND POLY.rowid = jn.rowid2;

ID     ID
------ ------
1049        1



col id format 99999
col relationship format a30
SELECT s.id,
SDO_GEOM.RELATE(s.geometry, 'determine', p.geometry, 0.5) relationship
FROM state s, poly p;

ID     RELATIONSHIP
------ ------------------------------
1      OVERLAPBDYINTERSECT
  

The output after the patch is incorrect:

/* 10.2.0.4.0 with patch 9398469

*********** This is the incorrect output ***********



select poly.id, state.id
from table(sdo_join
('STATE','GEOMETRY','POLY','GEOMETRY',
'mask=OVERLAPBDYDISJOINT+OVERLAPBDYINTERSECT+INSIDE+COVEREDBY+CONTAINS+COVERS
+EQUAL')) jn
,POLY
,STATE
WHERE STATE.rowid = jn.rowid1
AND POLY.rowid = jn.rowid2;


-- no rows selected


col id format 99999
col relationship format a30
SELECT s.id,
SDO_GEOM.RELATE(s.geometry, 'determine', p.geometry, 0.5) relationship
FROM state s, poly p;

ID     RELATIONSHIP
------ ------------------------------
1      TOUCH

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms