mapbox / leaflet-pip

point in polygon intersections for leaflet
https://mapbox.github.io/leaflet-pip/
BSD 2-Clause "Simplified" License
199 stars 46 forks source link

Limit to one polygon per point #1

Closed jeroen closed 11 years ago

jeroen commented 11 years ago

Is it possible to speed up the algorithm by adding an option to assume that each point is only contained in one polygon? Hence return once a match has been found.

I need to classify a large number of points, so speed is an issue for me.

tmcw commented 11 years ago

Added an accept-first option (default false). It's certainly possible to write other kinds of optimizations - rasterization, web workers, and whatever, but I'm not planning on them in this project.

jeroen commented 11 years ago

Thanks :)