8000 GitHub - turf-junkyard/turf-size
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

turf-junkyard/turf-size

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

turf-size

build status

turf size module

turf.size(bbox, factor)

Takes a bounding box and returns a new bounding box with a size expanded or contracted by a factor of X.

Parameters

parameter type description
bbox Array.<number> 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 = {
  "type": "FeatureCollection",
  "features": [
    turf.bboxPolygon(bbox),
    turf.bboxPolygon(resized)
  ]
};

//=features

Returns Array.<number>, the resized bbox

Installation

Requires nodejs.

$ npm install turf-size

Tests

$ npm test

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  
0