You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/turf-interpolate/README.md
+5-2Lines changed: 5 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,7 @@ Takes a set of points and estimates their 'property' values on a grid using the
16
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
17
*`options.units`**[string][6]** used in calculating cellSize, can be degrees, radians, miles, or kilometers (optional, default `'kilometers'`)
18
18
*`options.weight`**[number][4]** exponent regulating the distance-decay weighting (optional, default `1`)
19
+
*`options.bbox`**[BBox][7]** Bounding Box Array \[west, south, east, north] associated with the FeatureCollection. (optional, default `bbox(points)`)
19
20
20
21
### Examples
21
22
@@ -33,7 +34,7 @@ var grid = turf.interpolate(points, 100, options);
33
34
var addToMap = [grid];
34
35
```
35
36
36
-
Returns **[FeatureCollection][2]<([Point][3] | [Polygon][7])>** grid of points or polygons with interpolated 'property'
37
+
Returns **[FeatureCollection][2]<([Point][3] | [Polygon][8])>** grid of points or polygons with interpolated 'property'
<!-- 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. -->
@@ -21,6 +21,7 @@ import { collectionOf } from "@turf/invariant";
21
21
* @param {string} [options.property='elevation'] the property name in `points` from which z-values will be pulled, zValue fallbacks to 3rd coordinate if no property exists.
22
22
* @param {string} [options.units='kilometers'] used in calculating cellSize, can be degrees, radians, miles, or kilometers
23
23
* @param {number} [options.weight=1] exponent regulating the distance-decay weighting
24
+
* @param {BBox} [options.bbox=bbox(points)] Bounding Box Array [west, south, east, north] associated with the FeatureCollection.
24
25
* @returns {FeatureCollection<Point|Polygon>} grid of points or polygons with interpolated 'property'
25
26
* @example
26
27
* var points = turf.randomPoint(30, {bbox: [50, 30, 70, 50]});
@@ -42,6 +43,7 @@ function interpolate(points, cellSize, options) {
42
43
vargridType=options.gridType;
43
44
varproperty=options.property;
44
45
varweight=options.weight;
46
+
varbox=options.bbox;
45
47
46
48
// validation
47
49
if(!points)thrownewError("points is required");
@@ -55,7 +57,8 @@ function interpolate(points, cellSize, options) {
0 commit comments