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!

anyinteract

InfoDocFeb 20 2021 — edited Feb 20 2021

I have 2 spatial tables. One has lines. The other has polygons.

I selected a single line (left map) and a single polygon (right map) below :
image.pngnotice the line is not inside the polygon. In fact it does not even touch the polygon.

This query 1 returns correct/expected results (which reflects the fact that there is NO interaction between the line and the poly above)
select
line_table.pavement_key as the_line
,poly_table.UNIT as the_polygon
,SDO_GEOM.RELATE(line_table.shape,'DETERMINE', poly_table.shape, 0.5) rr
from DW_RAH_DISSOLVE_PAVE_SECTS_DIM line_table
left join DW_GIS_INDOT_UNITS_DIM poly_table on
sdo_anyinteract( poly_table.shape, line_table.shape )='TRUE'
WHERE line_table.pavement_key=50300;

however,
this query 2 incorrectly indicates that the line is inside the poygon :
select
line_table.pavement_key as the_line
,poly_table.UNIT as the_polygon
,SDO_GEOM.RELATE(line_table.shape,'DETERMINE', poly_table.shape, 0.5) rr
from DW_RAH_DISSOLVE_PAVE_SECTS_DIM line_table
left join DW_GIS_INDOT_UNITS_DIM poly_table on
sdo_anyinteract( line_table.shape , poly_table.shape )='TRUE'
WHERE line_table.pavement_key=50300;
image.png
The first row should (and does) interact with another polygon "Columbus" , but the 2nd row should NOT (which is the poly on the right-map above) which is "Brownstown". In other words, the line is actually in the Columbus area/polygon, the line is NOT in Brownstown area/polygon.

The only reason I could think why I get the bad results on query 2, is if it considers the polygon as a rectangle.
is that possible?

This post has been answered by Ying Hu-Oracle on Feb 22 2021
Jump to Answer
Comments
Post Details
Added on Feb 20 2021
2 comments
145 views