turf-erase
Advanced tools
Comparing version 0.0.0 to 0.1.0
15
index.js
@@ -6,4 +6,3 @@ // look here for help http://svn.osgeo.org/grass/grass/branches/releasebranch_6_4/vector/v.overlay/main.c | ||
var jsts = require('jsts'), | ||
_ = require('lodash') | ||
var jsts = require('jsts') | ||
@@ -21,14 +20,10 @@ module.exports = function(poly1, poly2, done){ | ||
var newPoly = _.cloneDeep(poly1); | ||
newPoly.geometry = erased | ||
poly1.geometry = erased | ||
done = done || function () {}; | ||
done(null, newPoly) | ||
return newPoly; | ||
return poly1; | ||
} | ||
function correctRings(poly){ | ||
_.each(poly.geometry.coordinates, function(ring){ | ||
var isWrapped =_.isEqual(ring[0], ring.slice(-1)[0]) | ||
poly.geometry.coordinates.forEach(function(ring){ | ||
var isWrapped = (ring[0][0] === ring.slice(-1)[0][0] && ring[0][1] === ring.slice(-1)[0][1]) | ||
if(!isWrapped){ | ||
@@ -35,0 +30,0 @@ ring.push(ring[0]) |
{ | ||
"name": "turf-erase", | ||
"version": "0.0.0", | ||
"version": "0.1.0", | ||
"description": "erase features", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
24722
15
269
1