开发者社区> 镜像站> NPM> turf-size
turf-size
turf size module
Last updated 6 years ago by morganherlocker .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install turf-size 
SYNC missed versions from official npm registry.

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.<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 = turf.featurecollection([
  turf.bboxPolygon(bbox),
  turf.bboxPolygon(resized)]);

//=features

Installation

Requires nodejs.

$ npm install turf-size

Tests

$ npm test

Current Tags

  • 1.1.1                                ...           latest (6 years ago)

7 Versions

  • 1.1.1                                ...           6 years ago
  • 1.1.0                                ...           6 years ago
  • 1.0.0                                ...           6 years ago
  • 0.1.3                                ...           6 years ago
  • 0.2.0                                ...           7 years ago
  • 0.1.2                                ...           7 years ago
  • 0.1.1                                ...           7 years ago
Downloads
Today 0
This Week 7
This Month 7
Last Day 0
Last Week 0
Last Month 5
Dependencies (0)
None
Dev Dependencies (4)
Dependents (2)