Sdo_Relate And Sdo_Anyinteract Fail To Return Geometries In 12.1

(Doc ID 1939462.1)

Last updated on JULY 27, 2016

Applies to:

Oracle Spatial and Graph - Version 12.1.0.2 and later
Information in this document applies to any platform.

Symptoms

When doing a query on data using sdo_anyinteract the query fails to return geometries in 12c:

SQL> with ts as (select SEARCH_GEOMETRY from TEST_GEOM )
select SDO_GEOM.RELATE(ts.search_geometry, 'determine', fg.geometry, 0.00005) relationship
 from feat_geom2 fg,ts
where  sdo_anyinteract(fg.geometry,ts.search_geometry)= 'TRUE';
2    3    4
no rows selected

SQL> with ts as (select SEARCH_GEOMETRY from TEST_GEOM )
2  select /*+index( fg IDX$feat_geom2$GEOm) */ SDO_GEOM.RELATE(ts.search_geometry, 'determine', fg.geometry, 0.00005) relationship
3     from feat_geom2 fg,ts
4    where  SDO_RELATE(fg.geometry,ts.search_geometry,'mask=ANYINTERACT')= 'TRUE'
5  /

no rows selected

But in 11.2.0.4/11.2.0.3 these queries are working fine:

 SQL> with ts as (select SEARCH_GEOMETRY from TEST_GEOM )
 2  select SDO_GEOM.RELATE(ts.search_geometry, 'determine', fg.geometry, 0.00005) relationship
 3     from feat_geom2 fg,ts
 4   where  sdo_anyinteract(fg.geometry,ts.search_geometry)= 'TRUE';

RELATIONSHIP
--------------------------------------------------------------------------------
CONTAINS
CONTAINS

SQL> with ts as (select SEARCH_GEOMETRY from TEST_GEOM )
 2  select /*+index( fg IDX$feat_geom2$GEOm) */ SDO_GEOM.RELATE(ts.search_geometry, 'determine', fg.geometry, 0.00005) relationship
  from feat_geom2 fg,ts
 3    4    where  SDO_RELATE(fg.geometry,ts.search_geometry,'mask=ANYINTERACT')= 'TRUE';

RELATIONSHIP
--------------------------------------------------------------------------------
CONTAINS
CONTAINS

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