Socket
Socket
Sign inDemoInstall

turf

Package Overview
Dependencies
Maintainers
1
Versions
122
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

turf - npm Package Compare versions

Comparing version 0.0.99 to 0.0.101

18

lib/buffer.js

@@ -13,3 +13,3 @@ //http://stackoverflow.com/questions/839899/how-do-i-calculate-a-point-on-a-circles-circumference

module.exports = function(feature, radius, units, union, done){
module.exports = function(feature, radius, units, done){
switch(units){

@@ -42,6 +42,16 @@ case 'miles':

buffered = parser.write(buffered)
buffered = t.featurecollection([t.polygon(buffered.coordinates)])
done(null, buffered)
if(buffered.type === 'MultiPolygon'){
buffered = {
type: 'Feature',
geometry: buffered,
properties: {}
}
buffered = t.featurecollection([buffered])
done(null, buffered)
}
else{
buffered = t.featurecollection([t.polygon(buffered.coordinates)])
done(null, buffered)
}
}
{
"name": "turf",
"version": "0.0.99",
"version": "0.0.101",
"description": "a node.js library for performing geospatial operations with geojson",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -7,3 +7,3 @@ var t = require('../index'),

t.load('../test/testIn/Point1.geojson', function(err, pt){
t.buffer(pt, 10, 'miles', false, function(err, buffered){
t.buffer(pt, 10, 'miles', function(err, buffered){
//fs.writeFileSync('./testOut/buffered.geojson',JSON.stringify(buffered))

@@ -17,3 +17,3 @@ if(err) throw err

t.load('../test/testIn/bezierIn.geojson', function(err, pt){
t.buffer(pt, 10, 'miles', false, function(err, buffered){
t.buffer(pt, 10, 'miles', function(err, buffered){
//fs.writeFileSync('./testOut/bufferedLine.geojson',JSON.stringify(buffered))

@@ -27,3 +27,3 @@ if(err) throw err

t.load('../test/testIn/bufferPolygonIn.geojson', function(err, pt){
t.buffer(pt, 10, 'miles', false, function(err, buffered){
t.buffer(pt, 10, 'miles', function(err, buffered){
//fs.writeFileSync('./testOut/bufferedPolygon.geojson',JSON.stringify(buffered))

@@ -37,3 +37,3 @@ if(err) throw err

t.load('../test/testIn/Point1.geojson', function(err, pt){
t.buffer(pt, 10, 'miles', false, function(err, buffered){
t.buffer(pt, 10, 'miles', function(err, buffered){
//fs.writeFileSync('./testOut/buffered.geojson',JSON.stringify(buffered))

@@ -47,3 +47,3 @@ if(err) throw err

t.load('../test/testIn/elevation1.geojson', function(err, pts){
t.buffer(pts, 10, 'miles', true, function(err, buffered){
t.buffer(pts, 10, 'miles', function(err, buffered){
fs.writeFileSync('./testOut/bufferedPoints.geojson',JSON.stringify(buffered))

@@ -50,0 +50,0 @@ if(err) throw err

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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