turf-hex
turf hex module
Last updated 6 years ago by morganherlocker .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install turf-hex 
SYNC missed versions from official npm registry.

turf-hex

build status

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.<number> bounding box in [minX, minY, maxX, maxY] order
size Number size of cells in degrees

Example

var bbox = [7.2669410, 43.695307, 7.2862529, 43.706476];
var size = 0.001;

var hexgrid = turf.hex(bbox, size);

//=hexgrid

Installation

Requires nodejs.

$ npm install turf-hex

Tests

$ npm test

Current Tags

  • 1.0.2                                ...           latest (6 years ago)

5 Versions

  • 1.0.2                                ...           6 years ago
  • 1.0.1                                ...           6 years ago
  • 1.0.0                                ...           6 years ago
  • 0.1.1                                ...           6 years ago
  • 0.1.0                                ...           6 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (8)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |