turf-buffer
Advanced tools
Comparing version 1.0.3 to 1.0.4
14
index.js
@@ -6,4 +6,2 @@ // http://stackoverflow.com/questions/839899/how-do-i-calculate-a-point-on-a-circles-circumference | ||
var featurecollection = require('turf-featurecollection'); | ||
var polygon = require('turf-polygon'); | ||
var combine = require('turf-combine'); | ||
var jsts = require('jsts'); | ||
@@ -34,9 +32,4 @@ var normalize = require('geojson-normalize'); | ||
* var buffered = turf.buffer(pt, 500, unit); | ||
* var result = turf.featurecollection([buffered, pt]); | ||
* | ||
* var resultFeatures = buffered.features.concat(pt); | ||
* var result = { | ||
* "type": "FeatureCollection", | ||
* "features": resultFeatures | ||
* }; | ||
* | ||
* //=result | ||
@@ -46,3 +39,2 @@ */ | ||
module.exports = function(feature, radius, units) { | ||
var buffered; | ||
@@ -67,3 +59,3 @@ switch (units) { | ||
var fc = normalize(feature); | ||
var buffered = normalize(featurecollection(fc.features.map(function(f){ | ||
var buffered = normalize(featurecollection(fc.features.map(function(f) { | ||
return bufferOp(f, radius); | ||
@@ -88,2 +80,2 @@ }))); | ||
}; | ||
}; | ||
}; |
{ | ||
"name": "turf-buffer", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"dependencies": { | ||
@@ -5,0 +5,0 @@ "geojson-normalize": { |
{ | ||
"name": "turf-buffer", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "turf buffer module", | ||
@@ -31,3 +31,3 @@ "main": "index.js", | ||
"benchmark": "^1.0.0", | ||
"dox": "^0.6.1", | ||
"dox": "^0.7.0", | ||
"doxme": "^1.8.2", | ||
@@ -34,0 +34,0 @@ "glob": "^5.0.3", |
@@ -15,7 +15,7 @@ # turf-buffer | ||
| 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' | | ||
| 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' | | ||
@@ -37,15 +37,7 @@ | ||
var buffered = turf.buffer(pt, 500, unit); | ||
var result = turf.featurecollection([buffered, pt]); | ||
var resultFeatures = buffered.features.concat(pt); | ||
var result = { | ||
"type": "FeatureCollection", | ||
"features": resultFeatures | ||
}; | ||
//=result | ||
``` | ||
**Returns** `FeatureCollection.<Polygon>,FeatureCollection.<MultiPolygon>,Polygon,MultiPolygon`, buffered features | ||
## Installation | ||
@@ -65,2 +57,1 @@ | ||
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
71411
176
55