Spatial (MOSC)

MOSC Banner

best way to performance an spatial join

edited Apr 16, 2013 4:05AM in Spatial (MOSC) 6 commentsAnswered
What is the best way to performance an spatial join with two tables. Of course these two tables has spatial indexes to their sdo_geometry columnsI manage two situations:
A) with specific features.
Compare all features of the one layer to all features to the other layer.

A.- For the first situation I think the best way is ussing the sdo_relate command. Here is an example:
SELECT COUNT(*) FROM
(select /*+ ordered */ Q1.gid , Q2.gid , SDO_GEOM.SDO_AREA(  SDO_GEOM.SDO_INTERSECTION(q1.geometry,q2.geometry,0.5) , 0.5 ) as area from
(select gid,geometry from TABLE_1 ) Q1 ,
(select gid,geometry from TABLE_2) Q2

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center