Spatial Query With SDO_ANYINTERACT Returns Wrong Result (Doc ID 1675500.1)

Last updated on MAY 23, 2014

Applies to:

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

Symptoms

A point-in-polygon query fails to return the correct records when SDO_ANYINTERACT is used.

If SDO_CONTAINS is used , it provides the right result set.

The geometry has been validated successfully.

Using SDO_RELATE with the 'DETERMINE' keyword returns CONTAINS.

 

SQL> select COUNT(*)
 2  FROM TEST_POLYGON POLY, TEST_POINT PT
 3  where sdo_contains(POLY.geom, PT.geom)='TRUE';

 COUNT(*)
----------
        1

SQL>
SQL> select COUNT(*)
 2  FROM TEST_POLYGON POLY, TEST_POINT PT
 3  where sdo_anyinteract(POLY.geom, PT.geom)='TRUE';

 COUNT(*)
----------
        0

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