in reply to Speeding up point-in-polygon
Then it could make sense to extend and simplify the screening algorithm idea.
The cartesian data makes it much easier to use squares. I'd reduce each polygon to a 'outer' square (min_x, max_x, min_y, max_y). Databases are good at searching, so the list of potential points is just a sql query away.
The next step is "punching a hole" into the polygon. This could find points that are surely inside. Iteratively extending an 'inner' box from the center of the outer box would work if the center is inside the polygon.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Speeding up point-in-polygon
by punkish (Priest) on Jul 24, 2006 at 00:44 UTC | |
by explorer (Chaplain) on Jul 24, 2006 at 10:39 UTC |