0.0.6 • Published 8 years ago

geojson.lib.routeboxer v0.0.6

Weekly downloads
4
License
Apache-2.0
Repository
github
Last release
8 years ago

geojson.lib.routeboxer

NPM version NPM downloads NPM license flattr

coverage David David

The RouteBoxer class generates an Array of GeoJSON.Polygon Objects that are guaranteed to cover every point within a specified distance of a path. The primary use case for this class is to support implementing Search along a route against a Spatial db that supports bounding box queries.

This library builds uppon following project:

Usage

Install

npm install geojson.lib.routeboxer --save

Example

var RouteBoxer = require('geojson.lib.routeboxer'),
    boxer = new RouteBoxer(),
    boxes;


// geojson: can be a GeoJSON.MultiPoint,
//          a GeoJSON.LineString or an Array of GeoJSON.Positions
// range:   is the distance to the line in km
boxes = boxer.box(geojson, range);

Test

While waiting for real tests, you can play around with the simple.js file. A test route is provided and it will open the browser to visualise the whole processing: grid, route, intersecting cells, route boxes

node test/simple.js
0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

9 years ago

0.0.1

10 years ago