SDO_ANYINTERACT Returns Wrong Results When Creating Index With Geodetic False (Doc ID 1371052.1)

Last updated on FEBRUARY 08, 2017

Applies to:

Oracle Spatial - Version: 10.2.0.3 to 11.2.0.3 - Release: 10.2 to 11.2
Information in this document applies to any platform.

Symptoms


The query when using 'geodetic=false' (creating the index) returns the geometries outside the query window


create index cities2_spx on cities2(location)
INDEXTYPE IS MDSYS.SPATIAL_INDEX
parameters ('geodetic=false');

select city
from cities2
where sdo_anyinteract(location, mdsys.sdo_geometry(2003,
8307, NULL, sdo_elem_info_array(1,1003,3),
sdo_ordinate_array(161,-66,-161,75)))='TRUE';

-- 195 rows selected

When creating the index WITHOUT 'geodetic=false' we get correct results

drop index cities2_spx;

create index cities2_spx on cities2(location)
INDEXTYPE IS MDSYS.SPATIAL_INDEX;

select city
from cities2
where sdo_anyinteract(location, mdsys.sdo_geometry(2003,
8307, NULL, sdo_elem_info_array(1,1003,3),
sdo_ordinate_array(161,-66,-161,75)))='TRUE';

-- no rows selected

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