wgs84-intersect-util v1.0.4
Geographic intersect utilities using WGS84 datum
Installation
$ npm install wgs84-intersect-utilMethods
intersectPolygons(searchWithin, polygons)Intersect a list of GeoJSON polygons with a given GeoJSON polygon
searchWithin: object, GeoJSON polygon
polygons: array, GeoJSON polygons
Returns
array, a list of polygons that intersect
searchWithin
intersectLineBBox(line, bbox)Intersect a GeoJSON line with a bounding box
line: object, GeoJSON LineString
bbox: array, an array of bounding box coordinates in the form: xLow, yLow, xHigh, yHigh
Returns
array, a list of GeoJSON points that represent intersection points on
bbox
intersectLines(searchWithin, lines)Intersect a list of GeoJSON LineStrings with a given GeoJSON polygon
searchWithin: object, GeoJSON polygon
lines: array, GeoJSON LineStrings
Returns
array, a list of LineStrings that intersect
searchWithin
Running Tests
Install the development dependencies:
$ npm installThen run the tests:
$ npm testCode Coverage
Install the development dependencies:
$ npm installThen run coverage
$ npm run coverageView coverage reports
$ firefox coverage/lcov-report/index.htmlBrowser Bundle
$ npm run build