turf-hex
turf hex module
turf.hex(bbox, size)
Takes a bounding box and a cell size in degrees and returns a FeatureCollection of flat-topped hexagons (Polygon features) aligned in an "odd-q" vertical grid as described in Hexagonal Grids
Parameters
parameter | type | description |
---|---|---|
bbox |
Array. | bounding box in [minX, minY, maxX, maxY] order |
size |
Number | size of cells in degrees |
Example
var bbox = 72669410 43695307 72862529 43706476;var size = 0001; var hexgrid = turf; //=hexgrid
Installation
Requires nodejs.
$ npm install turf-hex
Tests
$ npm test