@turf/standard-deviational-ellipse 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 +15 -14
- package/dist/es/index.js +0 -0
- package/dist/js/index.js +0 -0
- package/index.d.ts +3 -3
- package/package.json +11 -11
package/README.md
CHANGED
|
@@ -16,22 +16,23 @@ in ArcGIS and the [QGIS Standard Deviational Ellipse Plugin][3]
|
|
|
16
16
|
**Bibliography**
|
|
17
17
|
|
|
18
18
|
• Robert S. Yuill, “The Standard Deviational Ellipse; An Updated Tool for
|
|
19
|
-
Spatial Description,”
|
|
20
|
-
doi:[10.2307/490885][4].
|
|
19
|
+
Spatial Description,” *Geografiska Annaler* 53, no. 1 (1971): 28–39,
|
|
20
|
+
doi:{@link [https://doi.org/10.2307/490885|10.2307/490885}][4].
|
|
21
21
|
|
|
22
22
|
• Paul Hanly Furfey, “A Note on Lefever’s “Standard Deviational Ellipse,”
|
|
23
|
-
|
|
24
|
-
doi:[10.1086/214336][5].
|
|
23
|
+
*American Journal of Sociology* 33, no. 1 (1927): 94—98,
|
|
24
|
+
doi:{@link [https://doi.org/10.1086/214336|10.1086/214336}][5].
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
### Parameters
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
- `options.weight` **[string][9]?** the property name used to weight the center
|
|
31
|
-
- `options.steps` **[number][10]** number of steps for the polygon (optional, default `64`)
|
|
32
|
-
- `options.properties` **[Object][8]** properties to pass to the resulting ellipse (optional, default `{}`)
|
|
28
|
+
* `points` **[FeatureCollection][6]<[Point][7]>** GeoJSON points
|
|
29
|
+
* `options` **[Object][8]** Optional parameters (optional, default `{}`)
|
|
33
30
|
|
|
34
|
-
**
|
|
31
|
+
* `options.weight` **[string][9]?** the property name used to weight the center
|
|
32
|
+
* `options.steps` **[number][10]** number of steps for the polygon (optional, default `64`)
|
|
33
|
+
* `options.properties` **[Object][8]** properties to pass to the resulting ellipse (optional, default `{}`)
|
|
34
|
+
|
|
35
|
+
### Examples
|
|
35
36
|
|
|
36
37
|
```javascript
|
|
37
38
|
var bbox = [-74, 40.72, -73.98, 40.74];
|
|
@@ -42,7 +43,7 @@ var sdEllipse = turf.standardDeviationalEllipse(points);
|
|
|
42
43
|
var addToMap = [points, sdEllipse];
|
|
43
44
|
```
|
|
44
45
|
|
|
45
|
-
Returns **[Feature][11]
|
|
46
|
+
Returns **[Feature][11]<[Polygon][12]>** an elliptical Polygon that includes approximately 1 SD of the dataset within it.
|
|
46
47
|
|
|
47
48
|
[1]: https://tools.ietf.org/html/rfc7946#section-3.3
|
|
48
49
|
|
|
@@ -50,9 +51,9 @@ Returns **[Feature][11]<[Polygon][12]>** an elliptical Polygon that includes
|
|
|
50
51
|
|
|
51
52
|
[3]: http://arken.nmbu.no/~havatv/gis/qgisplugins/SDEllipse/
|
|
52
53
|
|
|
53
|
-
[4]: https://doi.org/10.2307/490885
|
|
54
|
+
[4]: https://doi.org/10.2307/490885|10.2307/490885}
|
|
54
55
|
|
|
55
|
-
[5]: https://doi.org/10.1086/214336
|
|
56
|
+
[5]: https://doi.org/10.1086/214336|10.1086/214336}
|
|
56
57
|
|
|
57
58
|
[6]: https://tools.ietf.org/html/rfc7946#section-3.3
|
|
58
59
|
|
package/dist/es/index.js
CHANGED
|
File without changes
|
package/dist/js/index.js
CHANGED
|
File without changes
|
package/index.d.ts
CHANGED
|
@@ -3,9 +3,9 @@ import {
|
|
|
3
3
|
Feature,
|
|
4
4
|
Position,
|
|
5
5
|
Polygon,
|
|
6
|
-
|
|
6
|
+
GeoJsonProperties,
|
|
7
7
|
Point,
|
|
8
|
-
} from "
|
|
8
|
+
} from "geojson";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* http://turfjs.org/docs/#standarddeviational-ellipse
|
|
@@ -30,7 +30,7 @@ export interface StandardDeviationalEllipse extends Feature<Polygon> {
|
|
|
30
30
|
export default function (
|
|
31
31
|
points: FeatureCollection<Point>,
|
|
32
32
|
options?: {
|
|
33
|
-
properties?:
|
|
33
|
+
properties?: GeoJsonProperties;
|
|
34
34
|
weight?: string;
|
|
35
35
|
steps?: number;
|
|
36
36
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@turf/standard-deviational-ellipse",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0-alpha.0",
|
|
4
4
|
"description": "turf standard-deviational-ellipse module",
|
|
5
5
|
"author": "Turf Authors",
|
|
6
6
|
"contributors": [
|
|
@@ -46,11 +46,11 @@
|
|
|
46
46
|
"docs": "node ../../scripts/generate-readmes",
|
|
47
47
|
"test": "npm-run-all test:*",
|
|
48
48
|
"test:tape": "node -r esm test.js",
|
|
49
|
-
"test:types": "tsc --esModuleInterop --noEmit types.ts"
|
|
49
|
+
"test:types": "tsc --esModuleInterop --noEmit --strict types.ts"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@turf/random": "^
|
|
53
|
-
"@turf/truncate": "^
|
|
52
|
+
"@turf/random": "^7.0.0-alpha.0",
|
|
53
|
+
"@turf/truncate": "^7.0.0-alpha.0",
|
|
54
54
|
"benchmark": "*",
|
|
55
55
|
"load-json-file": "*",
|
|
56
56
|
"npm-run-all": "*",
|
|
@@ -59,12 +59,12 @@
|
|
|
59
59
|
"write-json-file": "*"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@turf/center-mean": "^
|
|
63
|
-
"@turf/ellipse": "^
|
|
64
|
-
"@turf/helpers": "^
|
|
65
|
-
"@turf/invariant": "^
|
|
66
|
-
"@turf/meta": "^
|
|
67
|
-
"@turf/points-within-polygon": "^
|
|
62
|
+
"@turf/center-mean": "^7.0.0-alpha.0",
|
|
63
|
+
"@turf/ellipse": "^7.0.0-alpha.0",
|
|
64
|
+
"@turf/helpers": "^7.0.0-alpha.0",
|
|
65
|
+
"@turf/invariant": "^7.0.0-alpha.0",
|
|
66
|
+
"@turf/meta": "^7.0.0-alpha.0",
|
|
67
|
+
"@turf/points-within-polygon": "^7.0.0-alpha.0"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "0edc4c491b999e5ace770a61e1cf549f7c004189"
|
|
70
70
|
}
|