Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

SDO_WITHIN_DISTANCE

cptkirkhMay 15 2012 — edited May 17 2012
Is there a way to use the SDO_WITHIN_DISTANCE spatial operator and get it to use the spatial index. I read where it says here under section 4.2.1.3 that you can't do a spatial join.
http://docs.oracle.com/cd/B13789_01/appdev.101/b10826/sdo_index_query.htm#i1005386

Then it gives an example on how to perform

CREATE TABLE cosine_bufs UNRECOVERABLE AS
SELECT SDO_BUFFER (A.SHAPE, B.DIMINFO, 1.35)
FROM COSINE A, USER_SDO_GEOM_METADATA B
WHERE TABLE_NAME='COSINES' AND COLUMN_NAME='SHAPE';

then you can run this query..
SELECT a.gid, b.gid FROM parks a, cosine_bufs b, TABLE(SDO_JOIN('PARKS', 'SHAPE', 'COSINE_BUFS', 'SHAPE', 'mask=ANYINTERACT')) c WHERE c.rowid1 = a.rowid AND c.rowid2 = b.rowid;

But from reading this it seems it will not return all items based upon a certain distance. is that correct? Is there a better way to get this information that utilizes the spatial join? I am trying to find all people within a certain distance which is hte best operator to use? Thanks
This post has been answered by Paul Dziemiela on May 15 2012
Jump to Answer

Comments

Processing
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jun 14 2012
Added on May 15 2012
5 comments
576 views