3.0.12 • Published 8 years ago

turf-point-grid v3.0.12

Weekly downloads
11,352
License
MIT
Repository
github
Last release
8 years ago

turf-point-grid

build status

turf.point-grid(extent, depth)

Takes a bounding box and a cell depth and returns a FeatureCollection of Point features in a grid.

Parameters

parametertypedescription
extentArray.extent in minX, minY, maxX, maxY order
depthNumberhow many cells to output

Example

var extent = [-70.823364, -33.553984, -70.473175, -33.302986];
var depth = 10;

var grid = turf.pointGrid(extent, depth);

//=grid

Returns FeatureCollection, grid as FeatureCollection with Point features

Installation

Requires nodejs.

$ npm install turf-point-grid

Tests

$ npm test