DEPRECATED - replaced with @turf/point-grid
Takes a bounding box and a cell depth and returns a set of Point|points in a grid.
parameter | type | description |
---|---|---|
extent |
Array.<number> | extent in [minX, minY, maxX, maxY] order |
cellWidth |
Number | the distance across each cell |
units |
String | used in calculating cellWidth ('miles' or 'kilometers') |
var extent = [-70.823364, -33.553984, -70.473175, -33.302986];
var cellWidth = 3;
var units = 'miles';
var grid = turf.pointGrid(extent, cellWidth, units);
//=grid
Returns FeatureCollection.<Point>
, grid of points
Requires nodejs.
$ npm install turf-point-grid
$ npm test