How to detect if a 2-D shape contains another shape with R-tree?
Domanda
I have a program where a 2D shape is represented by an R-trees. I want to be able to efficiently detect whether a shape is completely contained within another shape. Is this possible with R-tree?
Soluzione
R-trees work on bounding boxes. So for polygon-inside-polygon tests, it can serve as an efficient filtering step, but not answer the exact query. It produces candidates, and skips sure misses efficiently.
Altri suggerimenti
if the shape is a child element, it means it is contained under parent element. if you have a problem with detecting a polygon inside another polygon, you can check this link.
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow