dgeoutils 2.4.32 → 2.4.33
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 -1
- package/dist/cjs/InterpolationMatrix.js +3 -16
- package/dist/es2015/InterpolationMatrix.js +3 -3
- package/dist/esm/InterpolationMatrix.js +3 -16
- package/dist/umd/dgeoutils.js +30 -43
- package/dist/umd/dgeoutils.min.js +1 -1
- package/dist/umd/dgeoutils.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -10,12 +10,12 @@ export declare class InterpolationMatrix {
|
|
|
10
10
|
private allCells;
|
|
11
11
|
private readonly sizePoly;
|
|
12
12
|
private readonly keys;
|
|
13
|
+
readonly size: DPoint;
|
|
13
14
|
constructor(bboxLike: DPolygon, stepSize: number, keys: string[] | string, p?: number);
|
|
14
15
|
setKnownPoints(points: DPoint[] | DPolygon): InterpolationMatrix;
|
|
15
16
|
positionToCellCoords(d: DPoint): DPoint;
|
|
16
17
|
calculate(): InterpolationMatrix;
|
|
17
18
|
getCellValue({ x, y }: DPoint, key?: string | string[]): (number | Record<string, number>);
|
|
18
|
-
get size(): DPoint;
|
|
19
19
|
get getCellData(): Record<number, Record<number, Record<string, number>>>;
|
|
20
20
|
get allCellsClone(): DPolygon[];
|
|
21
21
|
private interpolateValues;
|
|
@@ -37,15 +37,6 @@ var __read = (this && this.__read) || function (o, n) {
|
|
|
37
37
|
}
|
|
38
38
|
return ar;
|
|
39
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
|
-
};
|
|
49
40
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50
41
|
exports.InterpolationMatrix = void 0;
|
|
51
42
|
var DPolygon_1 = require("./DPolygon");
|
|
@@ -62,6 +53,9 @@ var InterpolationMatrix = (function () {
|
|
|
62
53
|
this.minPoint = bboxLike.leftTop;
|
|
63
54
|
this.maxPoint = bboxLike.rightBottom;
|
|
64
55
|
this.sizePoly = DPolygon_1.DPolygon.createSquareBySize(new DPoint_1.DPoint(this.stepSize));
|
|
56
|
+
this.size = this.maxPoint.clone().move(this.minPoint.clone().minus())
|
|
57
|
+
.divide(this.stepSize)
|
|
58
|
+
.ceil();
|
|
65
59
|
this.keys = Array.isArray(keys) ? keys : [keys];
|
|
66
60
|
this.generateCells();
|
|
67
61
|
}
|
|
@@ -94,13 +88,6 @@ var InterpolationMatrix = (function () {
|
|
|
94
88
|
}
|
|
95
89
|
return __assign({}, cell.properties);
|
|
96
90
|
};
|
|
97
|
-
Object.defineProperty(InterpolationMatrix.prototype, "size", {
|
|
98
|
-
get: function () {
|
|
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
91
|
Object.defineProperty(InterpolationMatrix.prototype, "getCellData", {
|
|
105
92
|
get: function () {
|
|
106
93
|
return this.allCells.reduce(function (a, c) {
|
|
@@ -22,6 +22,9 @@ export class InterpolationMatrix {
|
|
|
22
22
|
this.minPoint = bboxLike.leftTop;
|
|
23
23
|
this.maxPoint = bboxLike.rightBottom;
|
|
24
24
|
this.sizePoly = DPolygon.createSquareBySize(new DPoint(this.stepSize));
|
|
25
|
+
this.size = this.maxPoint.clone().move(this.minPoint.clone().minus())
|
|
26
|
+
.divide(this.stepSize)
|
|
27
|
+
.ceil();
|
|
25
28
|
this.keys = Array.isArray(keys) ? keys : [keys];
|
|
26
29
|
this.generateCells();
|
|
27
30
|
}
|
|
@@ -53,9 +56,6 @@ export class InterpolationMatrix {
|
|
|
53
56
|
}
|
|
54
57
|
return Object.assign({}, cell.properties);
|
|
55
58
|
}
|
|
56
|
-
get size() {
|
|
57
|
-
return new DPoint(Math.max(...Object.keys(this.cells).map(Number)), Math.max(...Object.keys(this.cells[0]).map(Number)));
|
|
58
|
-
}
|
|
59
59
|
get getCellData() {
|
|
60
60
|
return this.allCells.reduce((a, c) => {
|
|
61
61
|
const _a = c.properties, { x, y } = _a, props = __rest(_a, ["x", "y"]);
|
|
@@ -36,15 +36,6 @@ var __read = (this && this.__read) || function (o, n) {
|
|
|
36
36
|
}
|
|
37
37
|
return ar;
|
|
38
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
|
-
};
|
|
48
39
|
import { DPolygon } from './DPolygon';
|
|
49
40
|
import { DPoint } from './DPoint';
|
|
50
41
|
import { isDefAndNotNull } from './utils';
|
|
@@ -59,6 +50,9 @@ var InterpolationMatrix = (function () {
|
|
|
59
50
|
this.minPoint = bboxLike.leftTop;
|
|
60
51
|
this.maxPoint = bboxLike.rightBottom;
|
|
61
52
|
this.sizePoly = DPolygon.createSquareBySize(new DPoint(this.stepSize));
|
|
53
|
+
this.size = this.maxPoint.clone().move(this.minPoint.clone().minus())
|
|
54
|
+
.divide(this.stepSize)
|
|
55
|
+
.ceil();
|
|
62
56
|
this.keys = Array.isArray(keys) ? keys : [keys];
|
|
63
57
|
this.generateCells();
|
|
64
58
|
}
|
|
@@ -91,13 +85,6 @@ var InterpolationMatrix = (function () {
|
|
|
91
85
|
}
|
|
92
86
|
return __assign({}, cell.properties);
|
|
93
87
|
};
|
|
94
|
-
Object.defineProperty(InterpolationMatrix.prototype, "size", {
|
|
95
|
-
get: function () {
|
|
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
88
|
Object.defineProperty(InterpolationMatrix.prototype, "getCellData", {
|
|
102
89
|
get: function () {
|
|
103
90
|
return this.allCells.reduce(function (a, c) {
|