Wrong Results When Using SDO_NN_DISTANCE Spatial Queries

(Doc ID 2340458.1)

Last updated on DECEMBER 19, 2017

Applies to:

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

Symptoms

The SDO_NN_DISTANCE() construct is designed to return the distance used by the SDO_NN operator.

When an SDO_NN query is executed on 3D data with a 3D index, SDO_NN_DISTANCE() returns the correct answer.

When the same query is executed on 3D data with a *2D* index, SDO_NN_DISTANCE() returns incorrect answers.

Comparing to the use of SDO_GEOM.SDO_DISTANCE():

1) Using a 2D index

- using SDO_GEOM.SDO_DISTANCE(): the distances are correctly computed.

- using SDO_NN_DISTANCE(): the distances are incorrect:

2) Using a 3D index

The distances are correctly computed in both cases:

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