1.1.1 • Published 9 years ago

turf-size v1.1.1

Weekly downloads
1,424
License
MIT
Repository
github
Last release
9 years ago

turf-size

build status

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

parametertypedescription
bboxArray.a bounding box
factornumberthe 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
1.1.1

9 years ago

1.1.0

9 years ago

1.0.0

9 years ago

0.1.3

10 years ago

0.2.0

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago