turf-size

1.1.1 • Public • Published

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

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

Package Sidebar

Install

npm i turf-size

Weekly Downloads

29

Version

1.1.1

License

MIT

Last publish

Collaborators

  • tcql
  • morganherlocker
  • mourner
  • jvrousseau
  • jseppi
  • cspanring
  • cwmma
  • lyzidiamond
  • tmcw