@turf/interpolate 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 +11 -10
- package/dist/es/index.js +0 -0
- package/dist/js/index.js +0 -0
- package/index.d.ts +2 -1
- package/package.json +15 -15
package/README.md
CHANGED
|
@@ -6,17 +6,18 @@
|
|
|
6
6
|
|
|
7
7
|
Takes a set of points and estimates their 'property' values on a grid using the [Inverse Distance Weighting (IDW) method][1].
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
### Parameters
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
- `options.gridType` **[string][6]** defines the output format based on a Grid Type (options: 'square' | 'point' | 'hex' | 'triangle') (optional, default `'square'`)
|
|
15
|
-
- `options.property` **[string][6]** the property name in `points` from which z-values will be pulled, zValue fallbacks to 3rd coordinate if no property exists. (optional, default `'elevation'`)
|
|
16
|
-
- `options.units` **[string][6]** used in calculating cellSize, can be degrees, radians, miles, or kilometers (optional, default `'kilometers'`)
|
|
17
|
-
- `options.weight` **[number][4]** exponent regulating the distance-decay weighting (optional, default `1`)
|
|
11
|
+
* `points` **[FeatureCollection][2]<[Point][3]>** with known value
|
|
12
|
+
* `cellSize` **[number][4]** the distance across each grid point
|
|
13
|
+
* `options` **[Object][5]** Optional parameters (optional, default `{}`)
|
|
18
14
|
|
|
19
|
-
**
|
|
15
|
+
* `options.gridType` **[string][6]** defines the output format based on a Grid Type (options: 'square' | 'point' | 'hex' | 'triangle') (optional, default `'square'`)
|
|
16
|
+
* `options.property` **[string][6]** the property name in `points` from which z-values will be pulled, zValue fallbacks to 3rd coordinate if no property exists. (optional, default `'elevation'`)
|
|
17
|
+
* `options.units` **[string][6]** used in calculating cellSize, can be degrees, radians, miles, or kilometers (optional, default `'kilometers'`)
|
|
18
|
+
* `options.weight` **[number][4]** exponent regulating the distance-decay weighting (optional, default `1`)
|
|
19
|
+
|
|
20
|
+
### Examples
|
|
20
21
|
|
|
21
22
|
```javascript
|
|
22
23
|
var points = turf.randomPoint(30, {bbox: [50, 30, 70, 50]});
|
|
@@ -32,7 +33,7 @@ var grid = turf.interpolate(points, 100, options);
|
|
|
32
33
|
var addToMap = [grid];
|
|
33
34
|
```
|
|
34
35
|
|
|
35
|
-
Returns **[FeatureCollection][2]
|
|
36
|
+
Returns **[FeatureCollection][2]<([Point][3] | [Polygon][7])>** grid of points or polygons with interpolated 'property'
|
|
36
37
|
|
|
37
38
|
[1]: https://en.wikipedia.org/wiki/Inverse_distance_weighting
|
|
38
39
|
|
package/dist/es/index.js
CHANGED
|
File without changes
|
package/dist/js/index.js
CHANGED
|
File without changes
|
package/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@turf/interpolate",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0-alpha.0",
|
|
4
4
|
"description": "turf interpolate module",
|
|
5
5
|
"author": "Turf Authors",
|
|
6
6
|
"contributors": [
|
|
@@ -45,10 +45,10 @@
|
|
|
45
45
|
"docs": "node ../../scripts/generate-readmes",
|
|
46
46
|
"test": "npm-run-all test:*",
|
|
47
47
|
"test:tape": "node -r esm test.js",
|
|
48
|
-
"test:types": "tsc --esModuleInterop --noEmit types.ts"
|
|
48
|
+
"test:types": "tsc --esModuleInterop --noEmit --strict types.ts"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@turf/truncate": "^
|
|
51
|
+
"@turf/truncate": "^7.0.0-alpha.0",
|
|
52
52
|
"benchmark": "*",
|
|
53
53
|
"chromatism": "*",
|
|
54
54
|
"load-json-file": "*",
|
|
@@ -58,17 +58,17 @@
|
|
|
58
58
|
"write-json-file": "*"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@turf/bbox": "^
|
|
62
|
-
"@turf/centroid": "^
|
|
63
|
-
"@turf/clone": "^
|
|
64
|
-
"@turf/distance": "^
|
|
65
|
-
"@turf/helpers": "^
|
|
66
|
-
"@turf/hex-grid": "^
|
|
67
|
-
"@turf/invariant": "^
|
|
68
|
-
"@turf/meta": "^
|
|
69
|
-
"@turf/point-grid": "^
|
|
70
|
-
"@turf/square-grid": "^
|
|
71
|
-
"@turf/triangle-grid": "^
|
|
61
|
+
"@turf/bbox": "^7.0.0-alpha.0",
|
|
62
|
+
"@turf/centroid": "^7.0.0-alpha.0",
|
|
63
|
+
"@turf/clone": "^7.0.0-alpha.0",
|
|
64
|
+
"@turf/distance": "^7.0.0-alpha.0",
|
|
65
|
+
"@turf/helpers": "^7.0.0-alpha.0",
|
|
66
|
+
"@turf/hex-grid": "^7.0.0-alpha.0",
|
|
67
|
+
"@turf/invariant": "^7.0.0-alpha.0",
|
|
68
|
+
"@turf/meta": "^7.0.0-alpha.0",
|
|
69
|
+
"@turf/point-grid": "^7.0.0-alpha.0",
|
|
70
|
+
"@turf/square-grid": "^7.0.0-alpha.0",
|
|
71
|
+
"@turf/triangle-grid": "^7.0.0-alpha.0"
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "0edc4c491b999e5ace770a61e1cf549f7c004189"
|
|
74
74
|
}
|