开发者社区> 镜像站> NPM> turf-buffer
turf-buffer

turf buffer module

Turf packages are now namespaced: please use @turf/buffer instead
Last updated 4 years ago by tmcw .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install turf-buffer 
SYNC missed versions from official npm registry.

turf-buffer

build status

turf buffer module

turf.buffer(feature, distance, unit)

Calculates a buffer for input features for a given radius. Units supported are miles, kilometers, and degrees.

Parameters

parameter type description
feature Feature,FeatureCollection input to be buffered
distance Number distance to draw the buffer
unit String 'miles', 'feet', 'kilometers', 'meters', or 'degrees'

Example

var pt = {
  "type": "Feature",
  "properties": {},
  "geometry": {
    "type": "Point",
    "coordinates": [-90.548630, 14.616599]
  }
};
var unit = 'miles';

var buffered = turf.buffer(pt, 500, unit);
var result = turf.featurecollection([buffered, pt]);

//=result

Returns FeatureCollection.<Polygon>,FeatureCollection.<MultiPolygon>,Polygon,MultiPolygon, buffered features

Installation

Requires nodejs.

$ npm install turf-buffer

Tests

$ npm test

Current Tags

  • 3.0.7-canary.ae89c8b3                                ...           canary (4 years ago)
  • 3.0.12                                ...           latest (4 years ago)

18 Versions

  • 3.0.12 [deprecated]           ...           4 years ago
  • 3.0.10 [deprecated]           ...           4 years ago
  • 3.0.7-canary.ae89c8b3                                ...           4 years ago
  • 3.0.7 [deprecated]           ...           4 years ago
  • 3.0.5-canary.4f73aa1a                                ...           4 years ago
  • 3.0.5 [deprecated]           ...           5 years ago
  • 3.0.1 [deprecated]           ...           5 years ago
  • 3.0.0-canary.7879bf6c                                ...           5 years ago
  • 3.0.0-canary.2f5f7167                                ...           5 years ago
  • 1.1.0 [deprecated]           ...           5 years ago
  • 1.0.4 [deprecated]           ...           6 years ago
  • 1.0.3 [deprecated]           ...           6 years ago
  • 1.0.2 [deprecated]           ...           6 years ago
  • 1.0.1 [deprecated]           ...           6 years ago
  • 1.0.0 [deprecated]           ...           6 years ago
  • 0.1.0 [deprecated]           ...           6 years ago
  • 0.0.2 [deprecated]           ...           7 years ago
  • 0.0.1 [deprecated]           ...           7 years ago
Downloads
Today 1
This Week 147
This Month 114
Last Day 40
Last Week 197
Last Month 824
Dependencies (4)
Dev Dependencies (6)