Javascript implementation of simple algorithm to determine which points reside within a given closed polygon. Based on the PNPOLY algorithm.
A PointsInPolygonFinder interface is exposed on the global window object.
At present this has only one method: find(polygon, points).
- 'points' can either be a 1d array with x,y or lng,lat coordinates, or it can be a 2d array representing a list of points to test.
- 'polygon' can either be a GeoJSON Polygon geometry, or a 2d array of the form that would be found in the coordinates property of a GeoJSON polygon. The method returns a 2d array representing a list of the matched points.
- Support GeoJSON multipolygons.
- Support GeoJSON point geometries
- ES6 support
- Support more modular injection methods - ie something better than just adding it to window.
- More unit tests