Wrong Results When Using SDO_NN_DISTANCE Spatial Queries
Last updated on DECEMBER 19, 2017
Applies to:Oracle Spatial and Graph - Version 18.104.22.168 and later
Information in this document applies to any platform.
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:
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