turf-size
v1.1.1
Published
turf size module
Downloads
352
Readme
turf-size
turf size module
turf.size(bbox, factor)
Takes a bbox and returns a new bbox with a size expanded or contracted by a factor of X.
Parameters
| parameter | type | description |
| --------- | -------------- | ------------------------------------------- |
| bbox
| Array. | a bounding box |
| factor
| number | the ratio of the new bbox to the input bbox |
Example
var bbox = [0, 0, 10, 10]
var resized = turf.size(bbox, 2);
var features = turf.featurecollection([
turf.bboxPolygon(bbox),
turf.bboxPolygon(resized)]);
//=features
Installation
Requires nodejs.
$ npm install turf-size
Tests
$ npm test