dgeoutils 2.4.41 → 2.4.44

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.
Files changed (52) hide show
  1. package/package.json +1 -4
  2. package/dist/cjs/DCircle.d.ts +0 -18
  3. package/dist/cjs/DCircle.js +0 -102
  4. package/dist/cjs/DLine.d.ts +0 -39
  5. package/dist/cjs/DLine.js +0 -343
  6. package/dist/cjs/DNumbers.d.ts +0 -8
  7. package/dist/cjs/DNumbers.js +0 -30
  8. package/dist/cjs/DPlane.d.ts +0 -25
  9. package/dist/cjs/DPlane.js +0 -132
  10. package/dist/cjs/DPoint.d.ts +0 -138
  11. package/dist/cjs/DPoint.js +0 -803
  12. package/dist/cjs/DPolygon.d.ts +0 -137
  13. package/dist/cjs/DPolygon.js +0 -1745
  14. package/dist/cjs/DPolygonLoop.d.ts +0 -60
  15. package/dist/cjs/DPolygonLoop.js +0 -439
  16. package/dist/cjs/FastSearch.d.ts +0 -6
  17. package/dist/cjs/FastSearch.js +0 -53
  18. package/dist/cjs/InterpolationMatrix.d.ts +0 -24
  19. package/dist/cjs/InterpolationMatrix.js +0 -173
  20. package/dist/cjs/TraceMatrix.d.ts +0 -22
  21. package/dist/cjs/TraceMatrix.js +0 -285
  22. package/dist/cjs/index.d.ts +0 -11
  23. package/dist/cjs/index.js +0 -37
  24. package/dist/cjs/utils.d.ts +0 -49
  25. package/dist/cjs/utils.js +0 -280
  26. package/dist/es2015/DCircle.js +0 -87
  27. package/dist/es2015/DLine.js +0 -290
  28. package/dist/es2015/DNumbers.js +0 -22
  29. package/dist/es2015/DPlane.js +0 -105
  30. package/dist/es2015/DPoint.js +0 -676
  31. package/dist/es2015/DPolygon.js +0 -1193
  32. package/dist/es2015/DPolygonLoop.js +0 -430
  33. package/dist/es2015/FastSearch.js +0 -25
  34. package/dist/es2015/InterpolationMatrix.js +0 -128
  35. package/dist/es2015/TraceMatrix.js +0 -229
  36. package/dist/es2015/index.js +0 -11
  37. package/dist/es2015/utils.js +0 -207
  38. package/dist/esm/DCircle.js +0 -99
  39. package/dist/esm/DLine.js +0 -340
  40. package/dist/esm/DNumbers.js +0 -27
  41. package/dist/esm/DPlane.js +0 -129
  42. package/dist/esm/DPoint.js +0 -800
  43. package/dist/esm/DPolygon.js +0 -1742
  44. package/dist/esm/DPolygonLoop.js +0 -436
  45. package/dist/esm/FastSearch.js +0 -50
  46. package/dist/esm/InterpolationMatrix.js +0 -170
  47. package/dist/esm/TraceMatrix.js +0 -282
  48. package/dist/esm/index.js +0 -11
  49. package/dist/esm/utils.js +0 -265
  50. package/dist/umd/dgeoutils.js +0 -4347
  51. package/dist/umd/dgeoutils.min.js +0 -1
  52. package/dist/umd/dgeoutils.min.js.map +0 -1
@@ -1,60 +0,0 @@
1
- import { DPolygon } from './DPolygon';
2
- import { DPoint } from './DPoint';
3
- export declare type SetterFunction<T> = (t: DPoint, index: number) => T;
4
- export declare type LoopFunction = (k: DPoint, index: number) => DPoint;
5
- export declare class DPolygonLoop {
6
- private readonly parent;
7
- private pool;
8
- constructor(parent: DPolygon);
9
- private getLoopFunction;
10
- run(): DPolygon;
11
- getTileFromCoords(zoom?: number): DPolygonLoop;
12
- getCoordsFromTile(zoom?: number): DPolygonLoop;
13
- height(z: number): DPolygonLoop;
14
- setX(x: number): DPolygonLoop;
15
- setX(f: SetterFunction<number>): DPolygonLoop;
16
- setProperties(setterArgByObject: SetterFunction<Record<string, any>> | Record<string, any>): DPolygonLoop;
17
- setY(y: number): DPolygonLoop;
18
- setY(f: SetterFunction<number>): DPolygonLoop;
19
- setZ(z: number): DPolygonLoop;
20
- setZ(f: SetterFunction<number>): DPolygonLoop;
21
- rotate(a: number): DPolygonLoop;
22
- rotate3dX(a: number): DPolygonLoop;
23
- rotate3dY(a: number): DPolygonLoop;
24
- rotate3dZ(a: number): DPolygonLoop;
25
- move(v: number): DPolygonLoop;
26
- move(p: DPoint): DPolygonLoop;
27
- move(x: number, y: number): DPolygonLoop;
28
- round(): DPolygonLoop;
29
- ceil(): DPolygonLoop;
30
- floor(): DPolygonLoop;
31
- toFixed(n?: number): DPolygonLoop;
32
- abs(): DPolygonLoop;
33
- scale(v: number): DPolygonLoop;
34
- scale(p: DPoint): DPolygonLoop;
35
- scale(x: number, y: number): DPolygonLoop;
36
- divide(v: number): DPolygonLoop;
37
- divide(p: DPoint): DPolygonLoop;
38
- divide(x: number, y: number): DPolygonLoop;
39
- div(v: number): DPolygonLoop;
40
- div(p: DPoint): DPolygonLoop;
41
- div(x: number, y: number): DPolygonLoop;
42
- mod(v: number): DPolygonLoop;
43
- mod(p: DPoint): DPolygonLoop;
44
- mod(x: number, y: number): DPolygonLoop;
45
- degreeToRadians(): DPolygonLoop;
46
- radiansToDegrees(): DPolygonLoop;
47
- radiansToMeters(): DPolygonLoop;
48
- metersToRadians(): DPolygonLoop;
49
- getHipPoint(): DPolygonLoop;
50
- getXPoint(): DPolygonLoop;
51
- getYPoint(): DPolygonLoop;
52
- getWPoint(): DPolygonLoop;
53
- getHPoint(): DPolygonLoop;
54
- setIfLessThan(p: DPoint): DPolygonLoop;
55
- minus(): DPolygonLoop;
56
- degreeToMeters(): DPolygonLoop;
57
- metersToDegree(): DPolygonLoop;
58
- flipVertically(size: DPoint): DPolygonLoop;
59
- flipVertically(height: number): DPolygonLoop;
60
- }
@@ -1,439 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DPolygonLoop = void 0;
4
- var LoopFunctions;
5
- (function (LoopFunctions) {
6
- LoopFunctions[LoopFunctions["getTileFromCoords"] = 0] = "getTileFromCoords";
7
- LoopFunctions[LoopFunctions["getCoordsFromTile"] = 1] = "getCoordsFromTile";
8
- LoopFunctions[LoopFunctions["height"] = 2] = "height";
9
- LoopFunctions[LoopFunctions["setX"] = 3] = "setX";
10
- LoopFunctions[LoopFunctions["setY"] = 4] = "setY";
11
- LoopFunctions[LoopFunctions["setZ"] = 5] = "setZ";
12
- LoopFunctions[LoopFunctions["rotate"] = 6] = "rotate";
13
- LoopFunctions[LoopFunctions["rotate3dX"] = 7] = "rotate3dX";
14
- LoopFunctions[LoopFunctions["rotate3dY"] = 8] = "rotate3dY";
15
- LoopFunctions[LoopFunctions["rotate3dZ"] = 9] = "rotate3dZ";
16
- LoopFunctions[LoopFunctions["move"] = 10] = "move";
17
- LoopFunctions[LoopFunctions["round"] = 11] = "round";
18
- LoopFunctions[LoopFunctions["ceil"] = 12] = "ceil";
19
- LoopFunctions[LoopFunctions["floor"] = 13] = "floor";
20
- LoopFunctions[LoopFunctions["toFixed"] = 14] = "toFixed";
21
- LoopFunctions[LoopFunctions["abs"] = 15] = "abs";
22
- LoopFunctions[LoopFunctions["scale"] = 16] = "scale";
23
- LoopFunctions[LoopFunctions["divide"] = 17] = "divide";
24
- LoopFunctions[LoopFunctions["degreeToRadians"] = 18] = "degreeToRadians";
25
- LoopFunctions[LoopFunctions["radiansToDegrees"] = 19] = "radiansToDegrees";
26
- LoopFunctions[LoopFunctions["radiansToMeters"] = 20] = "radiansToMeters";
27
- LoopFunctions[LoopFunctions["metersToRadians"] = 21] = "metersToRadians";
28
- LoopFunctions[LoopFunctions["hipPoint"] = 22] = "hipPoint";
29
- LoopFunctions[LoopFunctions["xPoint"] = 23] = "xPoint";
30
- LoopFunctions[LoopFunctions["yPoint"] = 24] = "yPoint";
31
- LoopFunctions[LoopFunctions["wPoint"] = 25] = "wPoint";
32
- LoopFunctions[LoopFunctions["hPoint"] = 26] = "hPoint";
33
- LoopFunctions[LoopFunctions["setIfLessThan"] = 27] = "setIfLessThan";
34
- LoopFunctions[LoopFunctions["minus"] = 28] = "minus";
35
- LoopFunctions[LoopFunctions["degreeToMeters"] = 29] = "degreeToMeters";
36
- LoopFunctions[LoopFunctions["metersToDegree"] = 30] = "metersToDegree";
37
- LoopFunctions[LoopFunctions["flipVertically"] = 31] = "flipVertically";
38
- LoopFunctions[LoopFunctions["setProperties"] = 32] = "setProperties";
39
- LoopFunctions[LoopFunctions["div"] = 33] = "div";
40
- LoopFunctions[LoopFunctions["mod"] = 34] = "mod";
41
- })(LoopFunctions || (LoopFunctions = {}));
42
- var decodePoolRecord = function (a, _a) {
43
- var functionName = _a.functionName, pointArg = _a.pointArg, numberPointArg = _a.numberPointArg, numberArg = _a.numberArg, setterArg = _a.setterArg, setterArgByObject = _a.setterArgByObject;
44
- var res = a;
45
- switch (functionName) {
46
- case LoopFunctions.getTileFromCoords:
47
- res = function (k, index) { return a(k, index)
48
- .getTileFromCoords(numberArg); };
49
- break;
50
- case LoopFunctions.getCoordsFromTile:
51
- res = function (k, index) { return a(k, index)
52
- .getCoordsFromTile(numberArg); };
53
- break;
54
- case LoopFunctions.height:
55
- res = function (k, index) { return a(k, index)
56
- .height(numberArg); };
57
- break;
58
- case LoopFunctions.setX:
59
- res = function (k, index) { return typeof setterArg === 'number' ? a(k, index)
60
- .setX(setterArg) : a(k, index).setX(function (p) { return setterArg(p, index); }); };
61
- break;
62
- case LoopFunctions.setY:
63
- res = function (k, index) { return typeof setterArg === 'number' ? a(k, index)
64
- .setY(setterArg) : a(k, index).setY(function (p) { return setterArg(p, index); }); };
65
- break;
66
- case LoopFunctions.setZ:
67
- res = function (k, index) { return typeof setterArg === 'number' ? a(k, index)
68
- .setZ(setterArg) : a(k, index).setZ(function (p) { return setterArg(p, index); }); };
69
- break;
70
- case LoopFunctions.rotate:
71
- res = function (k, index) { return a(k, index)
72
- .rotate(numberArg); };
73
- break;
74
- case LoopFunctions.rotate3dX:
75
- res = function (k, index) { return a(k, index)
76
- .rotate3dX(numberArg); };
77
- break;
78
- case LoopFunctions.rotate3dY:
79
- res = function (k, index) { return a(k, index)
80
- .rotate3dY(numberArg); };
81
- break;
82
- case LoopFunctions.rotate3dZ:
83
- res = function (k, index) { return a(k, index)
84
- .rotate3dZ(numberArg); };
85
- break;
86
- case LoopFunctions.move:
87
- res = function (k, index) { return a(k, index)
88
- .move(numberPointArg, numberArg); };
89
- break;
90
- case LoopFunctions.round:
91
- res = function (k, index) { return a(k, index)
92
- .round(); };
93
- break;
94
- case LoopFunctions.ceil:
95
- res = function (k, index) { return a(k, index)
96
- .ceil(); };
97
- break;
98
- case LoopFunctions.floor:
99
- res = function (k, index) { return a(k, index)
100
- .floor(); };
101
- break;
102
- case LoopFunctions.toFixed:
103
- res = function (k, index) { return a(k, index)
104
- .toFixed(numberArg); };
105
- break;
106
- case LoopFunctions.abs:
107
- res = function (k, index) { return a(k, index)
108
- .abs(); };
109
- break;
110
- case LoopFunctions.scale:
111
- res = function (k, index) { return a(k, index)
112
- .scale(numberPointArg, numberArg); };
113
- break;
114
- case LoopFunctions.divide:
115
- res = function (k, index) { return a(k, index)
116
- .divide(numberPointArg, numberArg); };
117
- break;
118
- case LoopFunctions.div:
119
- res = function (k, index) { return a(k, index)
120
- .div(numberPointArg, numberArg); };
121
- break;
122
- case LoopFunctions.mod:
123
- res = function (k, index) { return a(k, index)
124
- .mod(numberPointArg, numberArg); };
125
- break;
126
- case LoopFunctions.degreeToRadians:
127
- res = function (k, index) { return a(k, index)
128
- .degreeToRadians(); };
129
- break;
130
- case LoopFunctions.radiansToDegrees:
131
- res = function (k, index) { return a(k, index)
132
- .radiansToDegrees(); };
133
- break;
134
- case LoopFunctions.radiansToMeters:
135
- res = function (k, index) { return a(k, index)
136
- .radiansToMeters(); };
137
- break;
138
- case LoopFunctions.metersToRadians:
139
- res = function (k, index) { return a(k, index)
140
- .metersToRadians(); };
141
- break;
142
- case LoopFunctions.hipPoint:
143
- res = function (k, index) { return a(k, index)
144
- .hipPoint; };
145
- break;
146
- case LoopFunctions.xPoint:
147
- res = function (k, index) { return a(k, index)
148
- .xPoint; };
149
- break;
150
- case LoopFunctions.yPoint:
151
- res = function (k, index) { return a(k, index)
152
- .yPoint; };
153
- break;
154
- case LoopFunctions.wPoint:
155
- res = function (k, index) { return a(k, index)
156
- .wPoint; };
157
- break;
158
- case LoopFunctions.hPoint:
159
- res = function (k, index) { return a(k, index)
160
- .hPoint; };
161
- break;
162
- case LoopFunctions.setIfLessThan:
163
- res = function (k, index) { return a(k, index)
164
- .setIfLessThan(pointArg); };
165
- break;
166
- case LoopFunctions.minus:
167
- res = function (k, index) { return a(k, index)
168
- .minus(); };
169
- break;
170
- case LoopFunctions.degreeToMeters:
171
- res = function (k, index) { return a(k, index)
172
- .degreeToMeters(); };
173
- break;
174
- case LoopFunctions.metersToDegree:
175
- res = function (k, index) { return a(k, index)
176
- .metersToDegree(); };
177
- break;
178
- case LoopFunctions.flipVertically:
179
- res = function (k, index) { return a(k, index)
180
- .flipVertically(numberPointArg); };
181
- break;
182
- case LoopFunctions.setProperties:
183
- res = function (k, index) { return typeof setterArgByObject === 'object' ? a(k, index)
184
- .setProperties(setterArgByObject) : a(k, index).setProperties(function (p) { return setterArgByObject(p, index); }); };
185
- break;
186
- }
187
- return res;
188
- };
189
- var DPolygonLoop = (function () {
190
- function DPolygonLoop(parent) {
191
- this.parent = parent;
192
- this.pool = [];
193
- }
194
- DPolygonLoop.prototype.getLoopFunction = function () {
195
- return this.pool.reduce(decodePoolRecord, function (k) { return k; });
196
- };
197
- DPolygonLoop.prototype.run = function () {
198
- return this.parent.map(this.getLoopFunction());
199
- };
200
- DPolygonLoop.prototype.getTileFromCoords = function (zoom) {
201
- this.pool.push({
202
- functionName: LoopFunctions.getTileFromCoords,
203
- numberArg: zoom
204
- });
205
- return this;
206
- };
207
- DPolygonLoop.prototype.getCoordsFromTile = function (zoom) {
208
- this.pool.push({
209
- functionName: LoopFunctions.getCoordsFromTile,
210
- numberArg: zoom
211
- });
212
- return this;
213
- };
214
- DPolygonLoop.prototype.height = function (z) {
215
- this.pool.push({
216
- functionName: LoopFunctions.height,
217
- numberArg: z
218
- });
219
- return this;
220
- };
221
- DPolygonLoop.prototype.setX = function (x) {
222
- this.pool.push({
223
- functionName: LoopFunctions.setX,
224
- setterArg: x
225
- });
226
- return this;
227
- };
228
- DPolygonLoop.prototype.setProperties = function (setterArgByObject) {
229
- this.pool.push({
230
- functionName: LoopFunctions.setProperties,
231
- setterArgByObject: setterArgByObject
232
- });
233
- return this;
234
- };
235
- DPolygonLoop.prototype.setY = function (y) {
236
- this.pool.push({
237
- functionName: LoopFunctions.setY,
238
- setterArg: y
239
- });
240
- return this;
241
- };
242
- DPolygonLoop.prototype.setZ = function (z) {
243
- this.pool.push({
244
- functionName: LoopFunctions.setZ,
245
- setterArg: z
246
- });
247
- return this;
248
- };
249
- DPolygonLoop.prototype.rotate = function (a) {
250
- this.pool.push({
251
- functionName: LoopFunctions.rotate,
252
- numberArg: a
253
- });
254
- return this;
255
- };
256
- DPolygonLoop.prototype.rotate3dX = function (a) {
257
- this.pool.push({
258
- functionName: LoopFunctions.rotate3dX,
259
- numberArg: a
260
- });
261
- return this;
262
- };
263
- DPolygonLoop.prototype.rotate3dY = function (a) {
264
- this.pool.push({
265
- functionName: LoopFunctions.rotate3dY,
266
- numberArg: a
267
- });
268
- return this;
269
- };
270
- DPolygonLoop.prototype.rotate3dZ = function (a) {
271
- this.pool.push({
272
- functionName: LoopFunctions.rotate3dZ,
273
- numberArg: a
274
- });
275
- return this;
276
- };
277
- DPolygonLoop.prototype.move = function (x, y) {
278
- if (y === void 0) { y = x; }
279
- this.pool.push({
280
- functionName: LoopFunctions.move,
281
- numberPointArg: x,
282
- numberArg: y
283
- });
284
- return this;
285
- };
286
- DPolygonLoop.prototype.round = function () {
287
- this.pool.push({
288
- functionName: LoopFunctions.round
289
- });
290
- return this;
291
- };
292
- DPolygonLoop.prototype.ceil = function () {
293
- this.pool.push({
294
- functionName: LoopFunctions.ceil
295
- });
296
- return this;
297
- };
298
- DPolygonLoop.prototype.floor = function () {
299
- this.pool.push({
300
- functionName: LoopFunctions.floor
301
- });
302
- return this;
303
- };
304
- DPolygonLoop.prototype.toFixed = function (n) {
305
- if (n === void 0) { n = 2; }
306
- this.pool.push({
307
- functionName: LoopFunctions.toFixed,
308
- numberArg: n
309
- });
310
- return this;
311
- };
312
- DPolygonLoop.prototype.abs = function () {
313
- this.pool.push({
314
- functionName: LoopFunctions.abs
315
- });
316
- return this;
317
- };
318
- DPolygonLoop.prototype.scale = function (x, y) {
319
- if (y === void 0) { y = x; }
320
- this.pool.push({
321
- functionName: LoopFunctions.scale,
322
- numberPointArg: x,
323
- numberArg: y
324
- });
325
- return this;
326
- };
327
- DPolygonLoop.prototype.divide = function (x, y) {
328
- this.pool.push({
329
- functionName: LoopFunctions.divide,
330
- numberPointArg: x,
331
- numberArg: y
332
- });
333
- return this;
334
- };
335
- DPolygonLoop.prototype.div = function (x, y) {
336
- this.pool.push({
337
- functionName: LoopFunctions.div,
338
- numberPointArg: x,
339
- numberArg: y
340
- });
341
- return this;
342
- };
343
- DPolygonLoop.prototype.mod = function (x, y) {
344
- this.pool.push({
345
- functionName: LoopFunctions.mod,
346
- numberPointArg: x,
347
- numberArg: y
348
- });
349
- return this;
350
- };
351
- DPolygonLoop.prototype.degreeToRadians = function () {
352
- this.pool.push({
353
- functionName: LoopFunctions.degreeToRadians
354
- });
355
- return this;
356
- };
357
- DPolygonLoop.prototype.radiansToDegrees = function () {
358
- this.pool.push({
359
- functionName: LoopFunctions.radiansToDegrees
360
- });
361
- return this;
362
- };
363
- DPolygonLoop.prototype.radiansToMeters = function () {
364
- this.pool.push({
365
- functionName: LoopFunctions.radiansToMeters
366
- });
367
- return this;
368
- };
369
- DPolygonLoop.prototype.metersToRadians = function () {
370
- this.pool.push({
371
- functionName: LoopFunctions.metersToRadians
372
- });
373
- return this;
374
- };
375
- DPolygonLoop.prototype.getHipPoint = function () {
376
- this.pool.push({
377
- functionName: LoopFunctions.hipPoint
378
- });
379
- return this;
380
- };
381
- DPolygonLoop.prototype.getXPoint = function () {
382
- this.pool.push({
383
- functionName: LoopFunctions.xPoint
384
- });
385
- return this;
386
- };
387
- DPolygonLoop.prototype.getYPoint = function () {
388
- this.pool.push({
389
- functionName: LoopFunctions.yPoint
390
- });
391
- return this;
392
- };
393
- DPolygonLoop.prototype.getWPoint = function () {
394
- this.pool.push({
395
- functionName: LoopFunctions.wPoint
396
- });
397
- return this;
398
- };
399
- DPolygonLoop.prototype.getHPoint = function () {
400
- this.pool.push({
401
- functionName: LoopFunctions.hPoint
402
- });
403
- return this;
404
- };
405
- DPolygonLoop.prototype.setIfLessThan = function (p) {
406
- this.pool.push({
407
- functionName: LoopFunctions.setIfLessThan,
408
- pointArg: p
409
- });
410
- return this;
411
- };
412
- DPolygonLoop.prototype.minus = function () {
413
- this.pool.push({
414
- functionName: LoopFunctions.minus
415
- });
416
- return this;
417
- };
418
- DPolygonLoop.prototype.degreeToMeters = function () {
419
- this.pool.push({
420
- functionName: LoopFunctions.degreeToMeters
421
- });
422
- return this;
423
- };
424
- DPolygonLoop.prototype.metersToDegree = function () {
425
- this.pool.push({
426
- functionName: LoopFunctions.metersToDegree
427
- });
428
- return this;
429
- };
430
- DPolygonLoop.prototype.flipVertically = function (size) {
431
- this.pool.push({
432
- functionName: LoopFunctions.flipVertically,
433
- numberPointArg: size
434
- });
435
- return this;
436
- };
437
- return DPolygonLoop;
438
- }());
439
- exports.DPolygonLoop = DPolygonLoop;
@@ -1,6 +0,0 @@
1
- import { DPoint } from './DPoint';
2
- export declare class FastSearch {
3
- private searchStore;
4
- add(points: DPoint[]): void;
5
- find({ x, y, z }: DPoint): boolean;
6
- }
@@ -1,53 +0,0 @@
1
- "use strict";
2
- var __values = (this && this.__values) || function(o) {
3
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
4
- if (m) return m.call(o);
5
- if (o && typeof o.length === "number") return {
6
- next: function () {
7
- if (o && i >= o.length) o = void 0;
8
- return { value: o && o[i++], done: !o };
9
- }
10
- };
11
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
12
- };
13
- Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.FastSearch = void 0;
15
- var FastSearch = (function () {
16
- function FastSearch() {
17
- this.searchStore = {};
18
- }
19
- FastSearch.prototype.add = function (points) {
20
- var e_1, _a;
21
- try {
22
- for (var points_1 = __values(points), points_1_1 = points_1.next(); !points_1_1.done; points_1_1 = points_1.next()) {
23
- var _b = points_1_1.value, x = _b.x, y = _b.y, z = _b.z;
24
- if (!this.searchStore[x]) {
25
- this.searchStore[x] = {};
26
- }
27
- if (!this.searchStore[x][y]) {
28
- this.searchStore[x][y] = {};
29
- }
30
- this.searchStore[x][y][z || 'undefined'] = true;
31
- }
32
- }
33
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
34
- finally {
35
- try {
36
- if (points_1_1 && !points_1_1.done && (_a = points_1.return)) _a.call(points_1);
37
- }
38
- finally { if (e_1) throw e_1.error; }
39
- }
40
- };
41
- FastSearch.prototype.find = function (_a) {
42
- var x = _a.x, y = _a.y, z = _a.z;
43
- if (!this.searchStore[x]) {
44
- return false;
45
- }
46
- if (!this.searchStore[x][y]) {
47
- return false;
48
- }
49
- return this.searchStore[x][y][z || 'undefined'];
50
- };
51
- return FastSearch;
52
- }());
53
- exports.FastSearch = FastSearch;
@@ -1,24 +0,0 @@
1
- import { DPolygon } from './DPolygon';
2
- import { DPoint } from './DPoint';
3
- export declare class InterpolationMatrix {
4
- private readonly stepSize;
5
- private readonly p;
6
- readonly minPoint: DPoint;
7
- readonly maxPoint: DPoint;
8
- private points;
9
- private cells;
10
- private allCells;
11
- private readonly sizePoly;
12
- private readonly keys;
13
- readonly size: DPoint;
14
- constructor(bboxLike: DPolygon, stepSize: number, keys: string[] | string, p?: number);
15
- setKnownPoints(points: DPoint[] | DPolygon): InterpolationMatrix;
16
- positionToCellCoords(d: DPoint): DPoint;
17
- calculate(): InterpolationMatrix;
18
- getCellValue({ x, y }: DPoint, key?: string | string[]): (number | Record<string, number>);
19
- get getCellData(): Record<number, Record<number, Record<string, number>>>;
20
- get allCellsClone(): DPolygon[];
21
- private interpolateValues;
22
- private setKnownValues;
23
- private generateCells;
24
- }