Skip to content
This repository has been archived by the owner on Dec 4, 2024. It is now read-only.
/ turf-point-grid Public archive

Takes a bounding box and a cell depth and outputs a feature collection of points in a grid.

License

Notifications You must be signed in to change notification settings

Turfjs/turf-point-grid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Takes a bounding box and a cell depth and outputs a feature collection of points in a grid.

Resources

License

Stars

Watchers

Forks

Packages

No packages published