3.0.0-canary.7879bf6c • Published 10 years ago
turf-buffer v3.0.0-canary.7879bf6c
turf-buffer
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]);
//=resultReturns FeatureCollection.<Polygon>,FeatureCollection.<MultiPolygon>,Polygon,MultiPolygon, buffered features
Installation
Requires nodejs.
$ npm install turf-bufferTests
$ npm test3.0.12
9 years ago
3.0.10
9 years ago
3.0.7-canary.ae89c8b3
9 years ago
3.0.7
9 years ago
3.0.5-canary.4f73aa1a
9 years ago
3.0.5
10 years ago
3.0.1
10 years ago
3.0.0-canary.7879bf6c
10 years ago
3.0.0-canary.2f5f7167
10 years ago
1.1.0
10 years ago
1.0.4
11 years ago
1.0.3
11 years ago
1.0.2
11 years ago
1.0.1
11 years ago
1.0.0
11 years ago
0.1.0
11 years ago
0.0.2
12 years ago
0.0.1
12 years ago
