Skip to content

turf-junkyard/turf-square-grid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

turf-square-grid

build status

turf.square-grid(extent, cellWidth, units)

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

Parameters

parameter type description
extent Array. extent in [minX, minY, maxX, maxY] order
cellWidth Number width of each cell
units String units to use for cellWidth

Example

var extent = [-77.3876953125,38.71980474264239,-76.9482421875,39.027718840211605];
var cellWidth = 10;
var units = 'miles';

var squareGrid = turf.squareGrid(extent, cellWidth, units);

//=squareGrid

Installation

Requires nodejs.

$ npm install turf-square-grid

Tests

$ npm test

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published