@turf/dissolve
Advanced tools
Comparing version 4.5.2 to 4.6.0
40
index.js
@@ -16,37 +16,7 @@ var turfUnion = require('@turf/union'); | ||
* @example | ||
* var features = { | ||
* "type": "FeatureCollection", | ||
* "features": [ | ||
* { | ||
* "type": "Feature", | ||
* "properties": { | ||
* "combine": "yes" | ||
* }, | ||
* "geometry": { | ||
* "type": "Polygon", | ||
* "coordinates": [[[0, 0], [0, 1], [1, 1], [1, 0], [0, 0]]] | ||
* } | ||
* }, | ||
* { | ||
* "type": "Feature", | ||
* "properties": { | ||
* "combine": "yes" | ||
* }, | ||
* "geometry": { | ||
* "type": "Polygon", | ||
* "coordinates": [[[0, -1], [0, 0], [1, 0], [1, -1], [0,-1]]] | ||
* } | ||
* }, | ||
* { | ||
* "type": "Feature", | ||
* "properties": { | ||
* "combine": "no" | ||
* }, | ||
* "geometry": { | ||
* "type": "Polygon", | ||
* "coordinates": [[[1,-1],[1, 0], [2, 0], [2, -1], [1, -1]]] | ||
* } | ||
* } | ||
* ] | ||
* } | ||
* var features = turf.featureCollection([ | ||
* turf.polygon([[[0, 0], [0, 1], [1, 1], [1, 0], [0, 0]]], {"combine": "yes"}), | ||
* turf.polygon([[[0, -1], [0, 0], [1, 0], [1, -1], [0,-1]]], {"combine": "yes"}), | ||
* turf.polygon([[[1,-1],[1, 0], [2, 0], [2, -1], [1, -1]]], {"combine": "no"}), | ||
* ]); | ||
* | ||
@@ -53,0 +23,0 @@ * var dissolved = turf.dissolve(features, 'combine'); |
{ | ||
"name": "@turf/dissolve", | ||
"version": "4.5.2", | ||
"version": "4.6.0", | ||
"description": "turf dissolve module", | ||
@@ -38,4 +38,4 @@ "main": "index.js", | ||
"dependencies": { | ||
"@turf/bbox": "^4.5.2", | ||
"@turf/union": "^4.5.2", | ||
"@turf/bbox": "^4.6.0", | ||
"@turf/union": "^4.6.0", | ||
"geojson-utils": "^1.1.0", | ||
@@ -42,0 +42,0 @@ "get-closest": "^0.0.4", |
@@ -15,37 +15,7 @@ # @turf/dissolve | ||
```javascript | ||
var features = { | ||
"type": "FeatureCollection", | ||
"features": [ | ||
{ | ||
"type": "Feature", | ||
"properties": { | ||
"combine": "yes" | ||
}, | ||
"geometry": { | ||
"type": "Polygon", | ||
"coordinates": [[[0, 0], [0, 1], [1, 1], [1, 0], [0, 0]]] | ||
} | ||
}, | ||
{ | ||
"type": "Feature", | ||
"properties": { | ||
"combine": "yes" | ||
}, | ||
"geometry": { | ||
"type": "Polygon", | ||
"coordinates": [[[0, -1], [0, 0], [1, 0], [1, -1], [0,-1]]] | ||
} | ||
}, | ||
{ | ||
"type": "Feature", | ||
"properties": { | ||
"combine": "no" | ||
}, | ||
"geometry": { | ||
"type": "Polygon", | ||
"coordinates": [[[1,-1],[1, 0], [2, 0], [2, -1], [1, -1]]] | ||
} | ||
} | ||
] | ||
} | ||
var features = turf.featureCollection([ | ||
turf.polygon([[[0, 0], [0, 1], [1, 1], [1, 0], [0, 0]]], {"combine": "yes"}), | ||
turf.polygon([[[0, -1], [0, 0], [1, 0], [1, -1], [0,-1]]], {"combine": "yes"}), | ||
turf.polygon([[[1,-1],[1, 0], [2, 0], [2, -1], [1, -1]]], {"combine": "no"}), | ||
]); | ||
@@ -52,0 +22,0 @@ var dissolved = turf.dissolve(features, 'combine'); |
9491
126
53
Updated@turf/bbox@^4.6.0
Updated@turf/union@^4.6.0