@turf/nearest-neighbor-analysis 7.0.0-alpha.0 → 7.0.0-alpha.1
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/dist/es/index.js +1 -1
- package/dist/js/index.d.ts +3 -3
- package/package.json +16 -15
package/dist/es/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import centroid from "@turf/centroid";
|
|
|
5
5
|
import distance from "@turf/distance";
|
|
6
6
|
import nearestPoint from "@turf/nearest-point";
|
|
7
7
|
import { featureEach } from "@turf/meta";
|
|
8
|
-
import { convertArea, featureCollection } from "@turf/helpers";
|
|
8
|
+
import { convertArea, featureCollection, } from "@turf/helpers";
|
|
9
9
|
/**
|
|
10
10
|
* Nearest Neighbor Analysis calculates an index based the average distances
|
|
11
11
|
* between points in the dataset, thereby providing inference as to whether the
|
package/dist/js/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FeatureCollection, Feature, Polygon, GeoJsonProperties } from "geojson";
|
|
2
|
-
import { Units } from "@turf/helpers";
|
|
2
|
+
import { Units, AreaUnits } from "@turf/helpers";
|
|
3
3
|
export interface NearestNeighborStatistics {
|
|
4
|
-
units: Units;
|
|
4
|
+
units: Units & AreaUnits;
|
|
5
5
|
arealUnits: string;
|
|
6
6
|
observedMeanDistance: number;
|
|
7
7
|
expectedMeanDistance: number;
|
|
@@ -67,7 +67,7 @@ export interface NearestNeighborStudyArea extends Feature<Polygon> {
|
|
|
67
67
|
*/
|
|
68
68
|
declare function nearestNeighborAnalysis(dataset: FeatureCollection<any>, options?: {
|
|
69
69
|
studyArea?: Feature<Polygon>;
|
|
70
|
-
units?: Units;
|
|
70
|
+
units?: Units & AreaUnits;
|
|
71
71
|
properties?: GeoJsonProperties;
|
|
72
72
|
}): NearestNeighborStudyArea;
|
|
73
73
|
export default nearestNeighborAnalysis;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@turf/nearest-neighbor-analysis",
|
|
3
|
-
"version": "7.0.0-alpha.
|
|
3
|
+
"version": "7.0.0-alpha.1",
|
|
4
4
|
"description": "turf nearest-neighbor-analysis module",
|
|
5
5
|
"author": "Turf Authors",
|
|
6
6
|
"contributors": [
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"exports": {
|
|
29
29
|
"./package.json": "./package.json",
|
|
30
30
|
".": {
|
|
31
|
+
"types": "./dist/js/index.d.ts",
|
|
31
32
|
"import": "./dist/es/index.js",
|
|
32
33
|
"require": "./dist/js/index.js"
|
|
33
34
|
}
|
|
@@ -38,36 +39,36 @@
|
|
|
38
39
|
"dist"
|
|
39
40
|
],
|
|
40
41
|
"scripts": {
|
|
41
|
-
"bench": "
|
|
42
|
+
"bench": "tsx bench.js",
|
|
42
43
|
"build": "npm-run-all build:*",
|
|
43
44
|
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
|
|
44
45
|
"build:js": "tsc",
|
|
45
|
-
"docs": "
|
|
46
|
+
"docs": "tsx ../../scripts/generate-readmes",
|
|
46
47
|
"test": "npm-run-all test:*",
|
|
47
|
-
"test:tape": "
|
|
48
|
+
"test:tape": "tsx test.js"
|
|
48
49
|
},
|
|
49
50
|
"devDependencies": {
|
|
50
|
-
"@turf/truncate": "^7.0.0-alpha.
|
|
51
|
+
"@turf/truncate": "^7.0.0-alpha.1",
|
|
51
52
|
"@types/tape": "*",
|
|
52
53
|
"benchmark": "*",
|
|
53
54
|
"load-json-file": "*",
|
|
54
55
|
"npm-run-all": "*",
|
|
55
56
|
"tape": "*",
|
|
56
|
-
"ts-node": "*",
|
|
57
57
|
"tslint": "*",
|
|
58
|
+
"tsx": "*",
|
|
58
59
|
"typescript": "*",
|
|
59
60
|
"write-json-file": "*"
|
|
60
61
|
},
|
|
61
62
|
"dependencies": {
|
|
62
|
-
"@turf/area": "^7.0.0-alpha.
|
|
63
|
-
"@turf/bbox": "^7.0.0-alpha.
|
|
64
|
-
"@turf/bbox-polygon": "^7.0.0-alpha.
|
|
65
|
-
"@turf/centroid": "^7.0.0-alpha.
|
|
66
|
-
"@turf/distance": "^7.0.0-alpha.
|
|
67
|
-
"@turf/helpers": "^7.0.0-alpha.
|
|
68
|
-
"@turf/meta": "^7.0.0-alpha.
|
|
69
|
-
"@turf/nearest-point": "^7.0.0-alpha.
|
|
63
|
+
"@turf/area": "^7.0.0-alpha.1",
|
|
64
|
+
"@turf/bbox": "^7.0.0-alpha.1",
|
|
65
|
+
"@turf/bbox-polygon": "^7.0.0-alpha.1",
|
|
66
|
+
"@turf/centroid": "^7.0.0-alpha.1",
|
|
67
|
+
"@turf/distance": "^7.0.0-alpha.1",
|
|
68
|
+
"@turf/helpers": "^7.0.0-alpha.1",
|
|
69
|
+
"@turf/meta": "^7.0.0-alpha.1",
|
|
70
|
+
"@turf/nearest-point": "^7.0.0-alpha.1",
|
|
70
71
|
"tslib": "^2.3.0"
|
|
71
72
|
},
|
|
72
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "cf7a0c507b017ca066acffd0ce23bda5b393fb5a"
|
|
73
74
|
}
|