0.2.1 • Published 8 years ago

covarea v0.2.1

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

covarea

Calculate the coverage of a rectangular area by circles on a 2D map

It basically uses either a single circle, if bounding box is smaller than the max radius, or a honeycomb distribution to optimize the coverage of a larger area.

Usage

Run npm i -S covarea

Then

const cover = require('coverea');

const boundingBox = {
  southWest: { lat: 0, lon: 0 },
  northEast: { lat: 10, lon: 10 }
}; // in decimal format

const maxRadius = 300000; // in meters

const coverage = cover(boundingBox, maxRadius);

/*
coverage.length : 8

coverage[0] : {
  center: { lat: 1.34747, lon: 0 },
  radius: 300000
}
*/

Thanks

Thanks to :

0.2.1

8 years ago

0.2.0

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago