@turf/dissolve 6.5.0 → 7.0.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -7,67 +7,40 @@
7
7
  Dissolves a FeatureCollection of [polygon][1] features, filtered by an optional property name:value.
8
8
  Note that [mulitpolygon][2] features within the collection are not supported
9
9
 
10
- **Parameters**
10
+ ### Parameters
11
11
 
12
- - `featureCollection` **[FeatureCollection][3]<[Polygon][4]>** input feature collection to be dissolved
13
- - `options` **[Object][5]** Optional parameters (optional, default `{}`)
14
- - `options.propertyName` **[string][6]?** features with equals 'propertyName' in `properties` will be merged
12
+ * `featureCollection` **[FeatureCollection][3]<[Polygon][4]>** input feature collection to be dissolved
13
+ * `options` **[Object][5]** Optional parameters (optional, default `{}`)
15
14
 
16
- **Examples**
15
+ * `options.propertyName` **[string][6]?** features with the same `propertyName` value will be dissolved.
16
+
17
+ ### Examples
17
18
 
18
19
  ```javascript
19
20
  var features = turf.featureCollection([
20
- turf.polygon(
21
- [
22
- [
23
- [0, 0],
24
- [0, 1],
25
- [1, 1],
26
- [1, 0],
27
- [0, 0],
28
- ],
29
- ],
30
- { combine: "yes" }
31
- ),
32
- turf.polygon(
33
- [
34
- [
35
- [0, -1],
36
- [0, 0],
37
- [1, 0],
38
- [1, -1],
39
- [0, -1],
40
- ],
41
- ],
42
- { combine: "yes" }
43
- ),
44
- turf.polygon(
45
- [
46
- [
47
- [1, -1],
48
- [1, 0],
49
- [2, 0],
50
- [2, -1],
51
- [1, -1],
52
- ],
53
- ],
54
- { combine: "no" }
55
- ),
21
+ turf.polygon([[[0, 0], [0, 1], [1, 1], [1, 0], [0, 0]]], {combine: 'yes'}),
22
+ turf.polygon([[[0, -1], [0, 0], [1, 0], [1, -1], [0,-1]]], {combine: 'yes'}),
23
+ turf.polygon([[[1,-1],[1, 0], [2, 0], [2, -1], [1, -1]]], {combine: 'no'}),
56
24
  ]);
57
25
 
58
- var dissolved = turf.dissolve(features, { propertyName: "combine" });
26
+ var dissolved = turf.dissolve(features, {propertyName: 'combine'});
59
27
 
60
28
  //addToMap
61
- var addToMap = [features, dissolved];
29
+ var addToMap = [features, dissolved]
62
30
  ```
63
31
 
64
- Returns **[FeatureCollection][3]&lt;[Polygon][4]>** a FeatureCollection containing the dissolved polygons
32
+ Returns **[FeatureCollection][3]<[Polygon][4]>** a FeatureCollection containing the dissolved polygons
65
33
 
66
34
  [1]: polygon
35
+
67
36
  [2]: mulitpolygon
37
+
68
38
  [3]: https://tools.ietf.org/html/rfc7946#section-3.3
39
+
69
40
  [4]: https://tools.ietf.org/html/rfc7946#section-3.1.6
41
+
70
42
  [5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
43
+
71
44
  [6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
72
45
 
73
46
  <!-- This file is automatically generated. Please don't edit it directly:
package/dist/es/index.js CHANGED
File without changes
package/dist/js/index.js CHANGED
File without changes
package/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { FeatureCollection, Polygon } from "@turf/helpers";
1
+ import { FeatureCollection, Polygon } from "geojson";
2
2
 
3
3
  /**
4
4
  * http://turfjs.org/docs.html#dissolve
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@turf/dissolve",
3
- "version": "6.5.0",
3
+ "version": "7.0.0-alpha.0",
4
4
  "description": "turf dissolve module",
5
5
  "author": "Turf Authors",
6
6
  "license": "MIT",
@@ -54,10 +54,11 @@
54
54
  "write-json-file": "*"
55
55
  },
56
56
  "dependencies": {
57
- "@turf/helpers": "^6.5.0",
58
- "@turf/invariant": "^6.5.0",
59
- "@turf/meta": "^6.5.0",
57
+ "@turf/flatten": "^7.0.0-alpha.0",
58
+ "@turf/helpers": "^7.0.0-alpha.0",
59
+ "@turf/invariant": "^7.0.0-alpha.0",
60
+ "@turf/meta": "^7.0.0-alpha.0",
60
61
  "polygon-clipping": "^0.15.3"
61
62
  },
62
- "gitHead": "5375941072b90d489389db22b43bfe809d5e451e"
63
+ "gitHead": "0edc4c491b999e5ace770a61e1cf549f7c004189"
63
64
  }