@turf/clusters-kmeans 7.1.0-alpha.7 → 7.1.0-alpha.70
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 +8 -10
- package/package.json +10 -9
package/README.md
CHANGED
|
@@ -9,11 +9,11 @@ It uses the [k-means algorithm][2]
|
|
|
9
9
|
|
|
10
10
|
### Parameters
|
|
11
11
|
|
|
12
|
-
* `points` **[FeatureCollection][3]<[Point][
|
|
13
|
-
* `options` **[Object][
|
|
12
|
+
* `points` **[FeatureCollection][3]<[Point][1]>** to be clustered
|
|
13
|
+
* `options` **[Object][4]** Optional parameters (optional, default `{}`)
|
|
14
14
|
|
|
15
|
-
* `options.numberOfClusters` **[number][
|
|
16
|
-
* `options.mutate` **[boolean][
|
|
15
|
+
* `options.numberOfClusters` **[number][5]** numberOfClusters that will be generated (optional, default `Math.sqrt(numberOfPoints/2)`)
|
|
16
|
+
* `options.mutate` **[boolean][6]** allows GeoJSON input to be mutated (significant performance increase if true) (optional, default `false`)
|
|
17
17
|
|
|
18
18
|
### Examples
|
|
19
19
|
|
|
@@ -27,7 +27,7 @@ var clustered = turf.clustersKmeans(points, options);
|
|
|
27
27
|
var addToMap = [clustered];
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
-
Returns **[FeatureCollection][3]<[Point][
|
|
30
|
+
Returns **[FeatureCollection][3]<[Point][1]>** Clustered Points with an additional two properties associated to each Feature:* {number} cluster - the associated clusterId
|
|
31
31
|
* {\[number, number]} centroid - Centroid of the cluster \[Longitude, Latitude]
|
|
32
32
|
|
|
33
33
|
[1]: https://tools.ietf.org/html/rfc7946#section-3.1.2
|
|
@@ -36,13 +36,11 @@ Returns **[FeatureCollection][3]<[Point][4]>** Clustered Points with an addition
|
|
|
36
36
|
|
|
37
37
|
[3]: https://tools.ietf.org/html/rfc7946#section-3.3
|
|
38
38
|
|
|
39
|
-
[4]: https://
|
|
39
|
+
[4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
|
|
40
40
|
|
|
41
|
-
[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/
|
|
41
|
+
[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
|
|
42
42
|
|
|
43
|
-
[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/
|
|
44
|
-
|
|
45
|
-
[7]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
|
|
43
|
+
[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
|
|
46
44
|
|
|
47
45
|
<!-- This file is automatically generated. Please don't edit it directly. If you find an error, edit the source file of the module in question (likely index.js or index.ts), and re-run "yarn docs" from the root of the turf project. -->
|
|
48
46
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@turf/clusters-kmeans",
|
|
3
|
-
"version": "7.1.0-alpha.
|
|
3
|
+
"version": "7.1.0-alpha.70+948cdafaf",
|
|
4
4
|
"description": "turf clusters-kmeans module",
|
|
5
5
|
"author": "Turf Authors",
|
|
6
6
|
"contributors": [
|
|
@@ -59,9 +59,9 @@
|
|
|
59
59
|
"test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
|
-
"@turf/centroid": "^7.1.0-alpha.
|
|
63
|
-
"@turf/clusters": "^7.1.0-alpha.
|
|
64
|
-
"@turf/random": "^7.1.0-alpha.
|
|
62
|
+
"@turf/centroid": "^7.1.0-alpha.70+948cdafaf",
|
|
63
|
+
"@turf/clusters": "^7.1.0-alpha.70+948cdafaf",
|
|
64
|
+
"@turf/random": "^7.1.0-alpha.70+948cdafaf",
|
|
65
65
|
"@types/benchmark": "^2.1.5",
|
|
66
66
|
"@types/skmeans": "^0.11.7",
|
|
67
67
|
"@types/tape": "^4.2.32",
|
|
@@ -77,12 +77,13 @@
|
|
|
77
77
|
"write-json-file": "^5.0.0"
|
|
78
78
|
},
|
|
79
79
|
"dependencies": {
|
|
80
|
-
"@turf/clone": "^7.1.0-alpha.
|
|
81
|
-
"@turf/helpers": "^7.1.0-alpha.
|
|
82
|
-
"@turf/invariant": "^7.1.0-alpha.
|
|
83
|
-
"@turf/meta": "^7.1.0-alpha.
|
|
80
|
+
"@turf/clone": "^7.1.0-alpha.70+948cdafaf",
|
|
81
|
+
"@turf/helpers": "^7.1.0-alpha.70+948cdafaf",
|
|
82
|
+
"@turf/invariant": "^7.1.0-alpha.70+948cdafaf",
|
|
83
|
+
"@turf/meta": "^7.1.0-alpha.70+948cdafaf",
|
|
84
|
+
"@types/geojson": "^7946.0.10",
|
|
84
85
|
"skmeans": "0.9.7",
|
|
85
86
|
"tslib": "^2.6.2"
|
|
86
87
|
},
|
|
87
|
-
"gitHead": "
|
|
88
|
+
"gitHead": "948cdafaf70606d2e27fcc79973fa48ee1182067"
|
|
88
89
|
}
|