Skip to content
This repository has been archived by the owner on Dec 4, 2024. It is now read-only.

Latest commit

 

History

History
52 lines (29 loc) · 1.23 KB

README.md

File metadata and controls

52 lines (29 loc) · 1.23 KB

DEPRECATED - replaced with @turf/point-grid

turf-point-grid

build status

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

Takes a bounding box and a cell depth and returns a set of Point|points in a grid.

Parameters

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')

Example

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

Installation

Requires nodejs.

$ npm install turf-point-grid

Tests

$ npm test