pelias / polygon-lookup

Fast point-in-polygon intersection for large numbers of polygons.
72 stars 17 forks source link

vs which-polygon? #5

Closed tmcw closed 8 years ago

tmcw commented 8 years ago

Is this architecturally different or does it have a different goal than which-polygon?

riordan commented 8 years ago

There’s more than one way to do a point-in-polygon lookup, but you’re right, there’s not much of a difference between the two. They both do point-in-polygon lookups using an r-tree (we also use @mourner’s rbush) and raycasting. There’s some extra code around determining if the point’s in a donut hole of a multipolygon (which I assume which-polygon does as well). As far as I know, which-polygon didn’t exist back when we started the project.

Something something long lost twins separated at birth

mourner commented 8 years ago

Yeah, I wasn't aware of this module when I wrote which-polygon, which I needed for a quick task. Sorry for duplicating the effort here.

riordan commented 8 years ago

Nothing to apologize for!

Also thank you for rbush!