noahjkpalmer
noahjkpalmer

Reputation: 11

Polygonal Search

I have read several of the posts concerning Polygonal Search, but they are all about fixing or updating the programs. I am just wondering how it works. If there is a way I can get something like pseudo code of it or an explanation of how a shape captures the data points.

To further specify my goal, I am trying to make a constant square that will be held over a map (such as google maps), but the map can move around behind the square, however, the square will continue to report whatever cities lie within its bounds. [I will eventually proceed to building it, I just need some guidance]

Thank you.

Upvotes: 0

Views: 32

Answers (1)

Maksym Kozlenko
Maksym Kozlenko

Reputation: 10363

There is an open-source library which has a function to check if two shapes overlap. You can check source code:

http://turfjs.org/static/docs/module-turf_inside.html

If you look for theory behind it check Hyperplane separation theorem

Upvotes: 1

Related Questions