dgeoutils 2.4.30 → 2.4.32
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/cjs/InterpolationMatrix.d.ts +1 -0
- package/dist/cjs/InterpolationMatrix.js +33 -1
- package/dist/es2015/InterpolationMatrix.js +20 -1
- package/dist/esm/InterpolationMatrix.js +33 -1
- package/dist/umd/dgeoutils.js +62 -30
- package/dist/umd/dgeoutils.min.js +1 -1
- package/dist/umd/dgeoutils.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -16,6 +16,7 @@ export declare class InterpolationMatrix {
|
|
|
16
16
|
calculate(): InterpolationMatrix;
|
|
17
17
|
getCellValue({ x, y }: DPoint, key?: string | string[]): (number | Record<string, number>);
|
|
18
18
|
get size(): DPoint;
|
|
19
|
+
get getCellData(): Record<number, Record<number, Record<string, number>>>;
|
|
19
20
|
get allCellsClone(): DPolygon[];
|
|
20
21
|
private interpolateValues;
|
|
21
22
|
private setKnownValues;
|
|
@@ -10,6 +10,17 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
};
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
};
|
|
13
24
|
var __read = (this && this.__read) || function (o, n) {
|
|
14
25
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
15
26
|
if (!m) return o;
|
|
@@ -26,6 +37,15 @@ var __read = (this && this.__read) || function (o, n) {
|
|
|
26
37
|
}
|
|
27
38
|
return ar;
|
|
28
39
|
};
|
|
40
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
41
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
42
|
+
if (ar || !(i in from)) {
|
|
43
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
44
|
+
ar[i] = from[i];
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
48
|
+
};
|
|
29
49
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
50
|
exports.InterpolationMatrix = void 0;
|
|
31
51
|
var DPolygon_1 = require("./DPolygon");
|
|
@@ -76,7 +96,19 @@ var InterpolationMatrix = (function () {
|
|
|
76
96
|
};
|
|
77
97
|
Object.defineProperty(InterpolationMatrix.prototype, "size", {
|
|
78
98
|
get: function () {
|
|
79
|
-
return new DPoint_1.DPoint(Object.keys(this.cells).
|
|
99
|
+
return new DPoint_1.DPoint(Math.max.apply(Math, __spreadArray([], __read(Object.keys(this.cells).map(Number)), false)), Math.max.apply(Math, __spreadArray([], __read(Object.keys(this.cells[0]).map(Number)), false)));
|
|
100
|
+
},
|
|
101
|
+
enumerable: false,
|
|
102
|
+
configurable: true
|
|
103
|
+
});
|
|
104
|
+
Object.defineProperty(InterpolationMatrix.prototype, "getCellData", {
|
|
105
|
+
get: function () {
|
|
106
|
+
return this.allCells.reduce(function (a, c) {
|
|
107
|
+
var _a = c.properties, x = _a.x, y = _a.y, props = __rest(_a, ["x", "y"]);
|
|
108
|
+
a[x] = a[x] || {};
|
|
109
|
+
a[x][y] = __assign({}, props);
|
|
110
|
+
return a;
|
|
111
|
+
}, {});
|
|
80
112
|
},
|
|
81
113
|
enumerable: false,
|
|
82
114
|
configurable: true
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
1
12
|
import { DPolygon } from './DPolygon';
|
|
2
13
|
import { DPoint } from './DPoint';
|
|
3
14
|
import { isDefAndNotNull } from './utils';
|
|
@@ -43,7 +54,15 @@ export class InterpolationMatrix {
|
|
|
43
54
|
return Object.assign({}, cell.properties);
|
|
44
55
|
}
|
|
45
56
|
get size() {
|
|
46
|
-
return new DPoint(Object.keys(this.cells).
|
|
57
|
+
return new DPoint(Math.max(...Object.keys(this.cells).map(Number)), Math.max(...Object.keys(this.cells[0]).map(Number)));
|
|
58
|
+
}
|
|
59
|
+
get getCellData() {
|
|
60
|
+
return this.allCells.reduce((a, c) => {
|
|
61
|
+
const _a = c.properties, { x, y } = _a, props = __rest(_a, ["x", "y"]);
|
|
62
|
+
a[x] = a[x] || {};
|
|
63
|
+
a[x][y] = Object.assign({}, props);
|
|
64
|
+
return a;
|
|
65
|
+
}, {});
|
|
47
66
|
}
|
|
48
67
|
get allCellsClone() {
|
|
49
68
|
return this.allCells.map((p) => p.clone());
|
|
@@ -9,6 +9,17 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
12
23
|
var __read = (this && this.__read) || function (o, n) {
|
|
13
24
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
14
25
|
if (!m) return o;
|
|
@@ -25,6 +36,15 @@ var __read = (this && this.__read) || function (o, n) {
|
|
|
25
36
|
}
|
|
26
37
|
return ar;
|
|
27
38
|
};
|
|
39
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
40
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
41
|
+
if (ar || !(i in from)) {
|
|
42
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
43
|
+
ar[i] = from[i];
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
47
|
+
};
|
|
28
48
|
import { DPolygon } from './DPolygon';
|
|
29
49
|
import { DPoint } from './DPoint';
|
|
30
50
|
import { isDefAndNotNull } from './utils';
|
|
@@ -73,7 +93,19 @@ var InterpolationMatrix = (function () {
|
|
|
73
93
|
};
|
|
74
94
|
Object.defineProperty(InterpolationMatrix.prototype, "size", {
|
|
75
95
|
get: function () {
|
|
76
|
-
return new DPoint(Object.keys(this.cells).
|
|
96
|
+
return new DPoint(Math.max.apply(Math, __spreadArray([], __read(Object.keys(this.cells).map(Number)), false)), Math.max.apply(Math, __spreadArray([], __read(Object.keys(this.cells[0]).map(Number)), false)));
|
|
97
|
+
},
|
|
98
|
+
enumerable: false,
|
|
99
|
+
configurable: true
|
|
100
|
+
});
|
|
101
|
+
Object.defineProperty(InterpolationMatrix.prototype, "getCellData", {
|
|
102
|
+
get: function () {
|
|
103
|
+
return this.allCells.reduce(function (a, c) {
|
|
104
|
+
var _a = c.properties, x = _a.x, y = _a.y, props = __rest(_a, ["x", "y"]);
|
|
105
|
+
a[x] = a[x] || {};
|
|
106
|
+
a[x][y] = __assign({}, props);
|
|
107
|
+
return a;
|
|
108
|
+
}, {});
|
|
77
109
|
},
|
|
78
110
|
enumerable: false,
|
|
79
111
|
configurable: true
|