turf-union
Advanced tools
Comparing version 1.0.2 to 3.0.0-canary.2f5f7167
28
index.js
@@ -11,3 +11,3 @@ // look here for help http://svn.osgeo.org/grass/grass/branches/releasebranch_6_4/vector/v.overlay/main.c | ||
* | ||
* @module turf/union | ||
* @name union | ||
* @category transformation | ||
@@ -61,15 +61,15 @@ * @param {Feature<Polygon>} poly1 input polygon | ||
*/ | ||
module.exports = function(poly1, poly2){ | ||
var reader = new jsts.io.GeoJSONReader(); | ||
var a = reader.read(JSON.stringify(poly1.geometry)); | ||
var b = reader.read(JSON.stringify(poly2.geometry)); | ||
var union = a.union(b); | ||
var parser = new jsts.io.GeoJSONParser(); | ||
module.exports = function (poly1, poly2) { | ||
var reader = new jsts.io.GeoJSONReader(); | ||
var a = reader.read(JSON.stringify(poly1.geometry)); | ||
var b = reader.read(JSON.stringify(poly2.geometry)); | ||
var union = a.union(b); | ||
var writer = new jsts.io.GeoJSONWriter(); | ||
union = parser.write(union); | ||
return { | ||
type: 'Feature', | ||
geometry: union, | ||
properties: poly1.properties | ||
}; | ||
} | ||
union = writer.write(union); | ||
return { | ||
type: 'Feature', | ||
geometry: union, | ||
properties: poly1.properties | ||
}; | ||
}; |
{ | ||
"name": "turf-union", | ||
"version": "1.0.2", | ||
"version": "3.0.0-canary.2f5f7167", | ||
"description": "find the union of geographic features", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "tape test/*.js", | ||
"doc": "dox -r < index.js | doxme --readme > README.md" | ||
"test": "tape test/*.js" | ||
}, | ||
@@ -27,9 +26,7 @@ "repository": { | ||
"glob": "~4.3.5", | ||
"tape": "~3.5.0", | ||
"dox": "^0.6.1", | ||
"doxme": "^1.4.3" | ||
"tape": "~3.5.0" | ||
}, | ||
"dependencies": { | ||
"jsts": "~0.15.0" | ||
"jsts": "1.1.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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
NPM Shrinkwrap
Supply chain riskPackage contains a shrinkwrap file. This may allow the package to bypass normal install procedures.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
3
0
0
1
4717
5
84
1
+ Addedjsts@1.1.1(transitive)
- Removedjavascript.util@0.12.12(transitive)
- Removedjsts@0.15.0(transitive)
Updatedjsts@1.1.1