Security News
NVD Backlog Tops 20,000 CVEs Awaiting Analysis as NIST Prepares System Updates
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
turf-difference
Advanced tools
Turf difference module
turf.difference(poly1, poly2)
Finds the difference between two Polygon|polygons by clipping the second polygon from the first.
parameter | type | description |
---|---|---|
poly1 | Feature.<Polygon> | input Polygon feaure |
poly2 | Feature.<Polygon> | Polygon feature to difference from poly1 |
var poly1 = {
"type": "Feature",
"properties": {
"fill": "#0f0"
},
"geometry": {
"type": "Polygon",
"coordinates": [[
[-46.738586, -23.596711],
[-46.738586, -23.458207],
[-46.560058, -23.458207],
[-46.560058, -23.596711],
[-46.738586, -23.596711]
]]
}
};
var poly2 = {
"type": "Feature",
"properties": {
"fill": "#00f"
},
"geometry": {
"type": "Polygon",
"coordinates": [[
[-46.650009, -23.631314],
[-46.650009, -23.5237],
[-46.509246, -23.5237],
[-46.509246, -23.631314],
[-46.650009, -23.631314]
]]
}
};
var differenced = turf.difference(poly1, poly2);
differenced.properties.fill = '#f00';
var polygons = {
"type": "FeatureCollection",
"features": [poly1, poly2]
};
//=polygons
//=differenced
Returns Feature.<Polygon>
, a Polygon feature showing the area of poly1
excluding the area of poly2
Requires nodejs.
$ npm install turf-difference
$ npm test
FAQs
[Turf](http://turfjs.org/) difference module
The npm package turf-difference receives a total of 10,867 weekly downloads. As such, turf-difference popularity was classified as popular.
We found that turf-difference demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.