dgeoutils 2.4.31 → 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.
@@ -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;
@@ -90,6 +101,18 @@ var InterpolationMatrix = (function () {
90
101
  enumerable: false,
91
102
  configurable: true
92
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
+ }, {});
112
+ },
113
+ enumerable: false,
114
+ configurable: true
115
+ });
93
116
  Object.defineProperty(InterpolationMatrix.prototype, "allCellsClone", {
94
117
  get: function () {
95
118
  return this.allCells.map(function (p) { return p.clone(); });
@@ -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';
@@ -45,6 +56,14 @@ export class InterpolationMatrix {
45
56
  get size() {
46
57
  return new DPoint(Math.max(...Object.keys(this.cells).map(Number)), Math.max(...Object.keys(this.cells[0]).map(Number)));
47
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
+ }, {});
66
+ }
48
67
  get allCellsClone() {
49
68
  return this.allCells.map((p) => p.clone());
50
69
  }
@@ -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;
@@ -87,6 +98,18 @@ var InterpolationMatrix = (function () {
87
98
  enumerable: false,
88
99
  configurable: true
89
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
+ }, {});
109
+ },
110
+ enumerable: false,
111
+ configurable: true
112
+ });
90
113
  Object.defineProperty(InterpolationMatrix.prototype, "allCellsClone", {
91
114
  get: function () {
92
115
  return this.allCells.map(function (p) { return p.clone(); });