Given the many polygons and a number of points, find which polygons are points located

This is a question similar to the one here, but I believe that it would be useful if I could rework it in more general terms.

I have a set of polygons, these polygons can touch each other, overlap and can take any shape. My question, given the list of points, is how to develop an efficient algorithm that finds which polygons are points located?

One of the interesting restrictions on the location of points is that all points are located at the edges of polygons, if that helps.

I understand that r-trees can help , but given that I am making a series of points, is there a more efficient algorithm instead of computing one point for each point?

+5
source share
3 answers

The key search term here is the location of the point. Under this name, there are many algorithms in the literature on computational geometry for various cases, from special to general. For example, this link lists various software packages, including my own. (Now a bit outdated list.)

(, , ). - , . , . . . , .

+3

, ( - ) , O (n).

, () , "" ""? , , O (n), .

, - , O (n) , , , .

, , Klee, .

+1

, O (n), .

, O (n log n), O (n).

, , , / . , . O (n) , O (m) .

The R-tree will help in both cases, but only if you have a few points for testing. Otherwise, building an R-tree would be more expensive than searching through a list of triangles.

+1
source

All Articles