@turf/isolines 6.5.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.
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Takes a {@link Point} grid and returns a correspondent matrix {Array<Array<number>>}
3
+ * of the 'property' values
4
+ *
5
+ * @name gridToMatrix
6
+ * @param {FeatureCollection<Point>} grid of points
7
+ * @param {Object} [options={}] Optional parameters
8
+ * @param {string} [options.zProperty='elevation'] the property name in `points` from which z-values will be pulled
9
+ * @param {boolean} [options.flip=false] returns the matrix upside-down
10
+ * @param {boolean} [options.flags=false] flags, adding a `matrixPosition` array field ([row, column]) to its properties,
11
+ * the grid points with coordinates on the matrix
12
+ * @returns {Array<Array<number>>} matrix of property values
13
+ * @example
14
+ * var extent = [-70.823364, -33.553984, -70.473175, -33.302986];
15
+ * var cellSize = 3;
16
+ * var grid = turf.pointGrid(extent, cellSize);
17
+ * // add a random property to each point between 0 and 60
18
+ * for (var i = 0; i < grid.features.length; i++) {
19
+ * grid.features[i].properties.elevation = (Math.random() * 60);
20
+ * }
21
+ * gridToMatrix(grid);
22
+ * //= [
23
+ * [ 1, 13, 10, 9, 10, 13, 18],
24
+ * [34, 8, 5, 4, 5, 8, 13],
25
+ * [10, 5, 2, 1, 2, 5, 4],
26
+ * [ 0, 4, 56, 19, 1, 4, 9],
27
+ * [10, 5, 2, 1, 2, 5, 10],
28
+ * [57, 8, 5, 4, 5, 0, 57],
29
+ * [ 3, 13, 10, 9, 5, 13, 18],
30
+ * [18, 13, 10, 9, 78, 13, 18]
31
+ * ]
32
+ */
33
+ export default function gridToMatrix(grid: any, options?: {
34
+ zProperty?: string;
35
+ flip?: boolean;
36
+ flags?: boolean;
37
+ } | undefined): number[][];
@@ -0,0 +1,104 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const invariant_1 = require("@turf/invariant");
4
+ const meta_1 = require("@turf/meta");
5
+ const helpers_1 = require("@turf/helpers");
6
+ /**
7
+ * Takes a {@link Point} grid and returns a correspondent matrix {Array<Array<number>>}
8
+ * of the 'property' values
9
+ *
10
+ * @name gridToMatrix
11
+ * @param {FeatureCollection<Point>} grid of points
12
+ * @param {Object} [options={}] Optional parameters
13
+ * @param {string} [options.zProperty='elevation'] the property name in `points` from which z-values will be pulled
14
+ * @param {boolean} [options.flip=false] returns the matrix upside-down
15
+ * @param {boolean} [options.flags=false] flags, adding a `matrixPosition` array field ([row, column]) to its properties,
16
+ * the grid points with coordinates on the matrix
17
+ * @returns {Array<Array<number>>} matrix of property values
18
+ * @example
19
+ * var extent = [-70.823364, -33.553984, -70.473175, -33.302986];
20
+ * var cellSize = 3;
21
+ * var grid = turf.pointGrid(extent, cellSize);
22
+ * // add a random property to each point between 0 and 60
23
+ * for (var i = 0; i < grid.features.length; i++) {
24
+ * grid.features[i].properties.elevation = (Math.random() * 60);
25
+ * }
26
+ * gridToMatrix(grid);
27
+ * //= [
28
+ * [ 1, 13, 10, 9, 10, 13, 18],
29
+ * [34, 8, 5, 4, 5, 8, 13],
30
+ * [10, 5, 2, 1, 2, 5, 4],
31
+ * [ 0, 4, 56, 19, 1, 4, 9],
32
+ * [10, 5, 2, 1, 2, 5, 10],
33
+ * [57, 8, 5, 4, 5, 0, 57],
34
+ * [ 3, 13, 10, 9, 5, 13, 18],
35
+ * [18, 13, 10, 9, 78, 13, 18]
36
+ * ]
37
+ */
38
+ function gridToMatrix(grid, options) {
39
+ // Optional parameters
40
+ options = options || {};
41
+ if (!helpers_1.isObject(options))
42
+ throw new Error("options is invalid");
43
+ var zProperty = options.zProperty || "elevation";
44
+ var flip = options.flip;
45
+ var flags = options.flags;
46
+ // validation
47
+ invariant_1.collectionOf(grid, "Point", "input must contain Points");
48
+ var pointsMatrix = sortPointsByLatLng(grid, flip);
49
+ var matrix = [];
50
+ // create property matrix from sorted points
51
+ // looping order matters here
52
+ for (var r = 0; r < pointsMatrix.length; r++) {
53
+ var pointRow = pointsMatrix[r];
54
+ var row = [];
55
+ for (var c = 0; c < pointRow.length; c++) {
56
+ var point = pointRow[c];
57
+ // Check if zProperty exist
58
+ if (point.properties[zProperty])
59
+ row.push(point.properties[zProperty]);
60
+ else
61
+ row.push(0);
62
+ // add flags
63
+ if (flags === true)
64
+ point.properties.matrixPosition = [r, c];
65
+ }
66
+ matrix.push(row);
67
+ }
68
+ return matrix;
69
+ }
70
+ exports.default = gridToMatrix;
71
+ /**
72
+ * Sorts points by latitude and longitude, creating a 2-dimensional array of points
73
+ *
74
+ * @private
75
+ * @param {FeatureCollection<Point>} points GeoJSON Point features
76
+ * @param {boolean} [flip=false] returns the matrix upside-down
77
+ * @returns {Array<Array<Point>>} points ordered by latitude and longitude
78
+ */
79
+ function sortPointsByLatLng(points, flip) {
80
+ var pointsByLatitude = {};
81
+ // divide points by rows with the same latitude
82
+ meta_1.featureEach(points, function (point) {
83
+ var lat = invariant_1.getCoords(point)[1];
84
+ if (!pointsByLatitude[lat])
85
+ pointsByLatitude[lat] = [];
86
+ pointsByLatitude[lat].push(point);
87
+ });
88
+ // sort points (with the same latitude) by longitude
89
+ var orderedRowsByLatitude = Object.keys(pointsByLatitude).map(function (lat) {
90
+ var row = pointsByLatitude[lat];
91
+ var rowOrderedByLongitude = row.sort(function (a, b) {
92
+ return invariant_1.getCoords(a)[0] - invariant_1.getCoords(b)[0];
93
+ });
94
+ return rowOrderedByLongitude;
95
+ });
96
+ // sort rows (of points with the same latitude) by latitude
97
+ var pointMatrix = orderedRowsByLatitude.sort(function (a, b) {
98
+ if (flip)
99
+ return invariant_1.getCoords(a[0])[1] - invariant_1.getCoords(b[0])[1];
100
+ else
101
+ return invariant_1.getCoords(b[0])[1] - invariant_1.getCoords(a[0])[1];
102
+ });
103
+ return pointMatrix;
104
+ }
@@ -0,0 +1 @@
1
+ export default function isoContours(data: any, threshold: any, options: any): any[];
@@ -0,0 +1,388 @@
1
+ "use strict";
2
+ /**
3
+ * @license GNU Affero General Public License.
4
+ * Copyright (c) 2015, 2015 Ronny Lorenz <ronny@tbi.univie.ac.at>
5
+ * v. 1.2.0
6
+ * https://github.com/RaumZeit/MarchingSquares.js
7
+ *
8
+ * MarchingSquaresJS is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU Affero General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * MarchingSquaresJS is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ * GNU Affero General Public License for more details.
17
+ *
18
+ * As additional permission under GNU Affero General Public License version 3
19
+ * section 7, third-party projects (personal or commercial) may distribute,
20
+ * include, or link against UNMODIFIED VERSIONS of MarchingSquaresJS without the
21
+ * requirement that said third-party project for that reason alone becomes
22
+ * subject to any requirement of the GNU Affero General Public License version 3.
23
+ * Any modifications to MarchingSquaresJS, however, must be shared with the public
24
+ * and made available.
25
+ *
26
+ * In summary this:
27
+ * - allows you to use MarchingSquaresJS at no cost
28
+ * - allows you to use MarchingSquaresJS for both personal and commercial purposes
29
+ * - allows you to distribute UNMODIFIED VERSIONS of MarchingSquaresJS under any
30
+ * license as long as this license notice is included
31
+ * - enables you to keep the source code of your program that uses MarchingSquaresJS
32
+ * undisclosed
33
+ * - forces you to share any modifications you have made to MarchingSquaresJS,
34
+ * e.g. bug-fixes
35
+ *
36
+ * You should have received a copy of the GNU Affero General Public License
37
+ * along with MarchingSquaresJS. If not, see <http://www.gnu.org/licenses/>.
38
+ */
39
+ Object.defineProperty(exports, "__esModule", { value: true });
40
+ /**
41
+ * Compute the isocontour(s) of a scalar 2D field given
42
+ * a certain threshold by applying the Marching Squares
43
+ * Algorithm. The function returns a list of path coordinates
44
+ */
45
+ var defaultSettings = {
46
+ successCallback: null,
47
+ verbose: false,
48
+ };
49
+ var settings = {};
50
+ function isoContours(data, threshold, options) {
51
+ /* process options */
52
+ options = options ? options : {};
53
+ var optionKeys = Object.keys(defaultSettings);
54
+ for (var i = 0; i < optionKeys.length; i++) {
55
+ var key = optionKeys[i];
56
+ var val = options[key];
57
+ val =
58
+ typeof val !== "undefined" && val !== null ? val : defaultSettings[key];
59
+ settings[key] = val;
60
+ }
61
+ if (settings.verbose)
62
+ console.log("MarchingSquaresJS-isoContours: computing isocontour for " + threshold);
63
+ var ret = contourGrid2Paths(computeContourGrid(data, threshold));
64
+ if (typeof settings.successCallback === "function")
65
+ settings.successCallback(ret);
66
+ return ret;
67
+ }
68
+ exports.default = isoContours;
69
+ /*
70
+ Thats all for the public interface, below follows the actual
71
+ implementation
72
+ */
73
+ /*
74
+ ################################
75
+ Isocontour implementation below
76
+ ################################
77
+ */
78
+ /* assume that x1 == 1 && x0 == 0 */
79
+ function interpolateX(y, y0, y1) {
80
+ return (y - y0) / (y1 - y0);
81
+ }
82
+ /* compute the isocontour 4-bit grid */
83
+ function computeContourGrid(data, threshold) {
84
+ var rows = data.length - 1;
85
+ var cols = data[0].length - 1;
86
+ var ContourGrid = { rows: rows, cols: cols, cells: [] };
87
+ for (var j = 0; j < rows; ++j) {
88
+ ContourGrid.cells[j] = [];
89
+ for (var i = 0; i < cols; ++i) {
90
+ /* compose the 4-bit corner representation */
91
+ var cval = 0;
92
+ var tl = data[j + 1][i];
93
+ var tr = data[j + 1][i + 1];
94
+ var br = data[j][i + 1];
95
+ var bl = data[j][i];
96
+ if (isNaN(tl) || isNaN(tr) || isNaN(br) || isNaN(bl)) {
97
+ continue;
98
+ }
99
+ cval |= tl >= threshold ? 8 : 0;
100
+ cval |= tr >= threshold ? 4 : 0;
101
+ cval |= br >= threshold ? 2 : 0;
102
+ cval |= bl >= threshold ? 1 : 0;
103
+ /* resolve ambiguity for cval == 5 || 10 via averaging */
104
+ var flipped = false;
105
+ if (cval === 5 || cval === 10) {
106
+ var average = (tl + tr + br + bl) / 4;
107
+ if (cval === 5 && average < threshold) {
108
+ cval = 10;
109
+ flipped = true;
110
+ }
111
+ else if (cval === 10 && average < threshold) {
112
+ cval = 5;
113
+ flipped = true;
114
+ }
115
+ }
116
+ /* add cell to ContourGrid if it contains edges */
117
+ if (cval !== 0 && cval !== 15) {
118
+ var top, bottom, left, right;
119
+ top = bottom = left = right = 0.5;
120
+ /* interpolate edges of cell */
121
+ if (cval === 1) {
122
+ left = 1 - interpolateX(threshold, tl, bl);
123
+ bottom = 1 - interpolateX(threshold, br, bl);
124
+ }
125
+ else if (cval === 2) {
126
+ bottom = interpolateX(threshold, bl, br);
127
+ right = 1 - interpolateX(threshold, tr, br);
128
+ }
129
+ else if (cval === 3) {
130
+ left = 1 - interpolateX(threshold, tl, bl);
131
+ right = 1 - interpolateX(threshold, tr, br);
132
+ }
133
+ else if (cval === 4) {
134
+ top = interpolateX(threshold, tl, tr);
135
+ right = interpolateX(threshold, br, tr);
136
+ }
137
+ else if (cval === 5) {
138
+ top = interpolateX(threshold, tl, tr);
139
+ right = interpolateX(threshold, br, tr);
140
+ bottom = 1 - interpolateX(threshold, br, bl);
141
+ left = 1 - interpolateX(threshold, tl, bl);
142
+ }
143
+ else if (cval === 6) {
144
+ bottom = interpolateX(threshold, bl, br);
145
+ top = interpolateX(threshold, tl, tr);
146
+ }
147
+ else if (cval === 7) {
148
+ left = 1 - interpolateX(threshold, tl, bl);
149
+ top = interpolateX(threshold, tl, tr);
150
+ }
151
+ else if (cval === 8) {
152
+ left = interpolateX(threshold, bl, tl);
153
+ top = 1 - interpolateX(threshold, tr, tl);
154
+ }
155
+ else if (cval === 9) {
156
+ bottom = 1 - interpolateX(threshold, br, bl);
157
+ top = 1 - interpolateX(threshold, tr, tl);
158
+ }
159
+ else if (cval === 10) {
160
+ top = 1 - interpolateX(threshold, tr, tl);
161
+ right = 1 - interpolateX(threshold, tr, br);
162
+ bottom = interpolateX(threshold, bl, br);
163
+ left = interpolateX(threshold, bl, tl);
164
+ }
165
+ else if (cval === 11) {
166
+ top = 1 - interpolateX(threshold, tr, tl);
167
+ right = 1 - interpolateX(threshold, tr, br);
168
+ }
169
+ else if (cval === 12) {
170
+ left = interpolateX(threshold, bl, tl);
171
+ right = interpolateX(threshold, br, tr);
172
+ }
173
+ else if (cval === 13) {
174
+ bottom = 1 - interpolateX(threshold, br, bl);
175
+ right = interpolateX(threshold, br, tr);
176
+ }
177
+ else if (cval === 14) {
178
+ left = interpolateX(threshold, bl, tl);
179
+ bottom = interpolateX(threshold, bl, br);
180
+ }
181
+ else {
182
+ console.log("MarchingSquaresJS-isoContours: Illegal cval detected: " + cval);
183
+ }
184
+ ContourGrid.cells[j][i] = {
185
+ cval: cval,
186
+ flipped: flipped,
187
+ top: top,
188
+ right: right,
189
+ bottom: bottom,
190
+ left: left,
191
+ };
192
+ }
193
+ }
194
+ }
195
+ return ContourGrid;
196
+ }
197
+ function isSaddle(cell) {
198
+ return cell.cval === 5 || cell.cval === 10;
199
+ }
200
+ function isTrivial(cell) {
201
+ return cell.cval === 0 || cell.cval === 15;
202
+ }
203
+ function clearCell(cell) {
204
+ if (!isTrivial(cell) && cell.cval !== 5 && cell.cval !== 10) {
205
+ cell.cval = 15;
206
+ }
207
+ }
208
+ function getXY(cell, edge) {
209
+ if (edge === "top") {
210
+ return [cell.top, 1.0];
211
+ }
212
+ else if (edge === "bottom") {
213
+ return [cell.bottom, 0.0];
214
+ }
215
+ else if (edge === "right") {
216
+ return [1.0, cell.right];
217
+ }
218
+ else if (edge === "left") {
219
+ return [0.0, cell.left];
220
+ }
221
+ }
222
+ function contourGrid2Paths(grid) {
223
+ var paths = [];
224
+ var path_idx = 0;
225
+ var epsilon = 1e-7;
226
+ grid.cells.forEach(function (g, j) {
227
+ g.forEach(function (gg, i) {
228
+ if (typeof gg !== "undefined" && !isSaddle(gg) && !isTrivial(gg)) {
229
+ var p = tracePath(grid.cells, j, i);
230
+ var merged = false;
231
+ /* we may try to merge paths at this point */
232
+ if (p.info === "mergeable") {
233
+ /*
234
+ search backwards through the path array to find an entry
235
+ that starts with where the current path ends...
236
+ */
237
+ var x = p.path[p.path.length - 1][0], y = p.path[p.path.length - 1][1];
238
+ for (var k = path_idx - 1; k >= 0; k--) {
239
+ if (Math.abs(paths[k][0][0] - x) <= epsilon &&
240
+ Math.abs(paths[k][0][1] - y) <= epsilon) {
241
+ for (var l = p.path.length - 2; l >= 0; --l) {
242
+ paths[k].unshift(p.path[l]);
243
+ }
244
+ merged = true;
245
+ break;
246
+ }
247
+ }
248
+ }
249
+ if (!merged)
250
+ paths[path_idx++] = p.path;
251
+ }
252
+ });
253
+ });
254
+ return paths;
255
+ }
256
+ /*
257
+ construct consecutive line segments from starting cell by
258
+ walking arround the enclosed area clock-wise
259
+ */
260
+ function tracePath(grid, j, i) {
261
+ var maxj = grid.length;
262
+ var p = [];
263
+ var dxContour = [0, 0, 1, 1, 0, 0, 0, 0, -1, 0, 1, 1, -1, 0, -1, 0];
264
+ var dyContour = [0, -1, 0, 0, 1, 1, 1, 1, 0, -1, 0, 0, 0, -1, 0, 0];
265
+ var dx, dy;
266
+ var startEdge = [
267
+ "none",
268
+ "left",
269
+ "bottom",
270
+ "left",
271
+ "right",
272
+ "none",
273
+ "bottom",
274
+ "left",
275
+ "top",
276
+ "top",
277
+ "none",
278
+ "top",
279
+ "right",
280
+ "right",
281
+ "bottom",
282
+ "none",
283
+ ];
284
+ var nextEdge = [
285
+ "none",
286
+ "bottom",
287
+ "right",
288
+ "right",
289
+ "top",
290
+ "top",
291
+ "top",
292
+ "top",
293
+ "left",
294
+ "bottom",
295
+ "right",
296
+ "right",
297
+ "left",
298
+ "bottom",
299
+ "left",
300
+ "none",
301
+ ];
302
+ var edge;
303
+ var currentCell = grid[j][i];
304
+ var cval = currentCell.cval;
305
+ var edge = startEdge[cval];
306
+ var pt = getXY(currentCell, edge);
307
+ /* push initial segment */
308
+ p.push([i + pt[0], j + pt[1]]);
309
+ edge = nextEdge[cval];
310
+ pt = getXY(currentCell, edge);
311
+ p.push([i + pt[0], j + pt[1]]);
312
+ clearCell(currentCell);
313
+ /* now walk arround the enclosed area in clockwise-direction */
314
+ var k = i + dxContour[cval];
315
+ var l = j + dyContour[cval];
316
+ var prev_cval = cval;
317
+ while (k >= 0 && l >= 0 && l < maxj && (k != i || l != j)) {
318
+ currentCell = grid[l][k];
319
+ if (typeof currentCell === "undefined") {
320
+ /* path ends here */
321
+ //console.log(k + " " + l + " is undefined, stopping path!");
322
+ break;
323
+ }
324
+ cval = currentCell.cval;
325
+ if (cval === 0 || cval === 15) {
326
+ return { path: p, info: "mergeable" };
327
+ }
328
+ edge = nextEdge[cval];
329
+ dx = dxContour[cval];
330
+ dy = dyContour[cval];
331
+ if (cval === 5 || cval === 10) {
332
+ /* select upper or lower band, depending on previous cells cval */
333
+ if (cval === 5) {
334
+ if (currentCell.flipped) {
335
+ /* this is actually a flipped case 10 */
336
+ if (dyContour[prev_cval] === -1) {
337
+ edge = "left";
338
+ dx = -1;
339
+ dy = 0;
340
+ }
341
+ else {
342
+ edge = "right";
343
+ dx = 1;
344
+ dy = 0;
345
+ }
346
+ }
347
+ else {
348
+ /* real case 5 */
349
+ if (dxContour[prev_cval] === -1) {
350
+ edge = "bottom";
351
+ dx = 0;
352
+ dy = -1;
353
+ }
354
+ }
355
+ }
356
+ else if (cval === 10) {
357
+ if (currentCell.flipped) {
358
+ /* this is actually a flipped case 5 */
359
+ if (dxContour[prev_cval] === -1) {
360
+ edge = "top";
361
+ dx = 0;
362
+ dy = 1;
363
+ }
364
+ else {
365
+ edge = "bottom";
366
+ dx = 0;
367
+ dy = -1;
368
+ }
369
+ }
370
+ else {
371
+ /* real case 10 */
372
+ if (dyContour[prev_cval] === 1) {
373
+ edge = "left";
374
+ dx = -1;
375
+ dy = 0;
376
+ }
377
+ }
378
+ }
379
+ }
380
+ pt = getXY(currentCell, edge);
381
+ p.push([k + pt[0], l + pt[1]]);
382
+ clearCell(currentCell);
383
+ k += dx;
384
+ l += dy;
385
+ prev_cval = cval;
386
+ }
387
+ return { path: p, info: "closed" };
388
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@turf/isolines",
3
- "version": "6.5.0",
3
+ "version": "7.0.0-alpha.1",
4
4
  "description": "turf isolines module",
5
5
  "author": "Turf Authors",
6
6
  "contributors": [
@@ -32,44 +32,49 @@
32
32
  "exports": {
33
33
  "./package.json": "./package.json",
34
34
  ".": {
35
+ "types": "./dist/js/index.d.ts",
35
36
  "import": "./dist/es/index.js",
36
37
  "require": "./dist/js/index.js"
37
38
  }
38
39
  },
39
- "types": "index.d.ts",
40
+ "types": "dist/js/index.d.ts",
40
41
  "sideEffects": false,
41
42
  "files": [
42
- "dist",
43
- "index.d.ts"
43
+ "dist"
44
44
  ],
45
45
  "scripts": {
46
- "bench": "node -r esm bench.js",
47
- "build": "rollup -c ../../rollup.config.js && echo '{\"type\":\"module\"}' > dist/es/package.json",
48
- "docs": "node ../../scripts/generate-readmes",
46
+ "bench": "tsx bench.js",
47
+ "build": "npm-run-all build:*",
48
+ "build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
49
+ "build:js": "tsc",
50
+ "docs": "tsx ../../scripts/generate-readmes",
49
51
  "test": "npm-run-all test:*",
50
- "test:tape": "node -r esm test.js",
51
- "test:types": "tsc --esModuleInterop --noEmit types.ts"
52
+ "test:tape": "tsx test.js",
53
+ "test:types": "tsc --esModuleInterop --noEmit --strict types.ts"
52
54
  },
53
55
  "devDependencies": {
54
- "@turf/envelope": "^6.5.0",
55
- "@turf/point-grid": "^6.5.0",
56
- "@turf/random": "^6.5.0",
57
- "@turf/rhumb-destination": "^6.5.0",
58
- "@turf/truncate": "^6.5.0",
56
+ "@turf/envelope": "^7.0.0-alpha.1",
57
+ "@turf/point-grid": "^7.0.0-alpha.1",
58
+ "@turf/random": "^7.0.0-alpha.1",
59
+ "@turf/rhumb-destination": "^7.0.0-alpha.1",
60
+ "@turf/truncate": "^7.0.0-alpha.1",
59
61
  "benchmark": "*",
60
62
  "load-json-file": "*",
61
63
  "matrix-to-grid": "*",
62
64
  "npm-run-all": "*",
63
65
  "rollup": "*",
64
66
  "tape": "*",
67
+ "tslint": "*",
68
+ "tsx": "*",
69
+ "typescript": "*",
65
70
  "write-json-file": "*"
66
71
  },
67
72
  "dependencies": {
68
- "@turf/bbox": "^6.5.0",
69
- "@turf/helpers": "^6.5.0",
70
- "@turf/invariant": "^6.5.0",
71
- "@turf/meta": "^6.5.0",
72
- "object-assign": "*"
73
+ "@turf/bbox": "^7.0.0-alpha.1",
74
+ "@turf/helpers": "^7.0.0-alpha.1",
75
+ "@turf/invariant": "^7.0.0-alpha.1",
76
+ "@turf/meta": "^7.0.0-alpha.1",
77
+ "tslib": "^2.3.0"
73
78
  },
74
- "gitHead": "5375941072b90d489389db22b43bfe809d5e451e"
79
+ "gitHead": "cf7a0c507b017ca066acffd0ce23bda5b393fb5a"
75
80
  }
package/index.d.ts DELETED
@@ -1,19 +0,0 @@
1
- import {
2
- Point,
3
- MultiLineString,
4
- FeatureCollection,
5
- Properties,
6
- } from "@turf/helpers";
7
-
8
- /**
9
- * http://turfjs.org/docs/#isolines
10
- */
11
- export default function isolines(
12
- points: FeatureCollection<Point, any>,
13
- breaks: number[],
14
- options?: {
15
- zProperty?: string;
16
- commonProperties?: Properties;
17
- breaksProperties?: Properties[];
18
- }
19
- ): FeatureCollection<MultiLineString>;