Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

turf-buffer

Package Overview
Dependencies
Maintainers
8
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

turf-buffer - npm Package Compare versions

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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc