@map-colonies/mc-utils 1.0.1 → 1.2.0

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 (71) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/README.md +67 -65
  3. package/dist/communication/http/httpClient.d.ts +24 -24
  4. package/dist/communication/http/httpClient.d.ts.map +1 -1
  5. package/dist/communication/http/httpClient.js +329 -315
  6. package/dist/communication/http/httpClient.js.map +1 -1
  7. package/dist/communication/http/index.d.ts +1 -1
  8. package/dist/communication/http/index.js +13 -13
  9. package/dist/communication/index.d.ts +1 -1
  10. package/dist/communication/index.js +13 -13
  11. package/dist/geo/bboxUtils.d.ts +23 -4
  12. package/dist/geo/bboxUtils.d.ts.map +1 -1
  13. package/dist/geo/bboxUtils.js +84 -42
  14. package/dist/geo/bboxUtils.js.map +1 -1
  15. package/dist/geo/geoConvertor.d.ts +18 -4
  16. package/dist/geo/geoConvertor.d.ts.map +1 -1
  17. package/dist/geo/geoConvertor.js +51 -27
  18. package/dist/geo/geoConvertor.js.map +1 -1
  19. package/dist/geo/geoHash.d.ts +24 -6
  20. package/dist/geo/geoHash.d.ts.map +1 -1
  21. package/dist/geo/geoHash.js +242 -224
  22. package/dist/geo/geoHash.js.map +1 -1
  23. package/dist/geo/index.d.ts +5 -4
  24. package/dist/geo/index.d.ts.map +1 -1
  25. package/dist/geo/index.js +17 -16
  26. package/dist/geo/index.js.map +1 -1
  27. package/dist/geo/tileRanger.d.ts +40 -0
  28. package/dist/geo/tileRanger.d.ts.map +1 -0
  29. package/dist/geo/tileRanger.js +255 -0
  30. package/dist/geo/tileRanger.js.map +1 -0
  31. package/dist/geo/tiles.d.ts +32 -2
  32. package/dist/geo/tiles.d.ts.map +1 -1
  33. package/dist/geo/tiles.js +65 -14
  34. package/dist/geo/tiles.js.map +1 -1
  35. package/dist/geo/tilesGenerator.d.ts +3 -0
  36. package/dist/geo/tilesGenerator.d.ts.map +1 -0
  37. package/dist/geo/tilesGenerator.js +95 -0
  38. package/dist/geo/tilesGenerator.js.map +1 -0
  39. package/dist/index.d.ts +3 -3
  40. package/dist/index.js +15 -15
  41. package/dist/models/enums/geo/index.d.ts +2 -0
  42. package/dist/models/enums/geo/index.d.ts.map +1 -0
  43. package/dist/models/enums/geo/index.js +14 -0
  44. package/dist/models/enums/geo/index.js.map +1 -0
  45. package/dist/models/enums/geo/tileOrigin.d.ts +8 -0
  46. package/dist/models/enums/geo/tileOrigin.d.ts.map +1 -0
  47. package/dist/models/enums/geo/tileOrigin.js +12 -0
  48. package/dist/models/enums/geo/tileOrigin.js.map +1 -0
  49. package/dist/models/enums/index.d.ts +2 -0
  50. package/dist/models/enums/index.d.ts.map +1 -0
  51. package/dist/models/enums/index.js +14 -0
  52. package/dist/models/enums/index.js.map +1 -0
  53. package/dist/models/index.d.ts +2 -1
  54. package/dist/models/index.d.ts.map +1 -1
  55. package/dist/models/index.js +14 -13
  56. package/dist/models/index.js.map +1 -1
  57. package/dist/models/interfaces/geo/iPoint.d.ts +7 -4
  58. package/dist/models/interfaces/geo/iPoint.d.ts.map +1 -1
  59. package/dist/models/interfaces/geo/iPoint.js +2 -2
  60. package/dist/models/interfaces/geo/iTile.d.ts +15 -5
  61. package/dist/models/interfaces/geo/iTile.d.ts.map +1 -1
  62. package/dist/models/interfaces/geo/iTile.js +2 -2
  63. package/dist/models/interfaces/geo/index.d.ts +2 -2
  64. package/dist/models/interfaces/geo/index.js +14 -14
  65. package/dist/models/interfaces/iLogger.d.ts +6 -6
  66. package/dist/models/interfaces/iLogger.js +2 -2
  67. package/dist/models/interfaces/index.d.ts +2 -2
  68. package/dist/models/interfaces/index.d.ts.map +1 -1
  69. package/dist/models/interfaces/index.js +14 -14
  70. package/dist/models/interfaces/index.js.map +1 -1
  71. package/package.json +76 -76
@@ -0,0 +1,255 @@
1
+ "use strict";
2
+ var __generator = (this && this.__generator) || function (thisArg, body) {
3
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
4
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
5
+ function verb(n) { return function (v) { return step([n, v]); }; }
6
+ function step(op) {
7
+ if (f) throw new TypeError("Generator is already executing.");
8
+ while (_) try {
9
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
10
+ if (y = 0, t) op = [op[0] & 2, t.value];
11
+ switch (op[0]) {
12
+ case 0: case 1: t = op; break;
13
+ case 4: _.label++; return { value: op[1], done: false };
14
+ case 5: _.label++; y = op[1]; op = [0]; continue;
15
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
16
+ default:
17
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
18
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
19
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
20
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
21
+ if (t[2]) _.ops.pop();
22
+ _.trys.pop(); continue;
23
+ }
24
+ op = body.call(thisArg, _);
25
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
26
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
27
+ }
28
+ };
29
+ var __values = (this && this.__values) || function(o) {
30
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
31
+ if (m) return m.call(o);
32
+ if (o && typeof o.length === "number") return {
33
+ next: function () {
34
+ if (o && i >= o.length) o = void 0;
35
+ return { value: o && o[i++], done: !o };
36
+ }
37
+ };
38
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
39
+ };
40
+ Object.defineProperty(exports, "__esModule", { value: true });
41
+ exports.TileRanger = void 0;
42
+ var turf_1 = require("@turf/turf");
43
+ var bboxUtils_1 = require("./bboxUtils");
44
+ var tiles_1 = require("./tiles");
45
+ var tilesGenerator_1 = require("./tilesGenerator");
46
+ var TileIntersectionState;
47
+ (function (TileIntersectionState) {
48
+ TileIntersectionState["FULL"] = "full";
49
+ TileIntersectionState["PARTIAL"] = "partial";
50
+ TileIntersectionState["NONE"] = "none";
51
+ })(TileIntersectionState || (TileIntersectionState = {}));
52
+ /**
53
+ * class for generating and decoding tile hashes
54
+ */
55
+ var TileRanger = /** @class */ (function () {
56
+ function TileRanger() {
57
+ this.tileFootprintIntersection = function (tile, intersectionParams) {
58
+ var tileBbox = tiles_1.tileToBbox(tile);
59
+ var tilePoly = turf_1.bboxPolygon(tileBbox);
60
+ var intersection = turf_1.intersect(intersectionParams.footprint, tilePoly);
61
+ if (intersection === null) {
62
+ return TileIntersectionState.NONE;
63
+ }
64
+ if (tile.zoom === intersectionParams.maxZoom) {
65
+ return TileIntersectionState.FULL;
66
+ }
67
+ var intArea = turf_1.area(intersection);
68
+ var hashArea = turf_1.area(tilePoly);
69
+ if (intArea == hashArea) {
70
+ return TileIntersectionState.FULL;
71
+ }
72
+ return TileIntersectionState.PARTIAL;
73
+ };
74
+ }
75
+ /**
76
+ * converts tile to tile range of specified zoom level
77
+ * @param tile
78
+ * @param zoom target tile range zoom
79
+ * @returns
80
+ */
81
+ TileRanger.prototype.tileToRange = function (tile, zoom) {
82
+ var minX, minY, maxX, maxY;
83
+ minX = tile.x;
84
+ maxX = tile.x + 1;
85
+ minY = tile.y;
86
+ maxY = tile.y + 1;
87
+ if (tile.zoom < zoom) {
88
+ var dz = zoom - tile.zoom;
89
+ minX = minX << dz;
90
+ maxX = maxX << dz;
91
+ minY = minY << dz;
92
+ maxY = maxY << dz;
93
+ }
94
+ else if (tile.zoom > zoom) {
95
+ var dz = tile.zoom - zoom;
96
+ minX = minX >> dz;
97
+ minY = minY >> dz;
98
+ maxX = minX + 1;
99
+ maxY = minY + 1;
100
+ }
101
+ return {
102
+ minX: minX,
103
+ minY: minY,
104
+ maxX: maxX,
105
+ maxY: maxY,
106
+ zoom: zoom,
107
+ };
108
+ };
109
+ /**
110
+ * generate tile hashes
111
+ * @param footprint footprint to cover with generated tile hashes
112
+ * @param zoom max hash zoom
113
+ * @returns
114
+ */
115
+ TileRanger.prototype.encodeFootprint = function (footprint, zoom) {
116
+ var bbox, intersectionParams;
117
+ return __generator(this, function (_a) {
118
+ switch (_a.label) {
119
+ case 0:
120
+ bbox = turf_1.bbox(footprint);
121
+ if (!this.isBbox(footprint)) return [3 /*break*/, 2];
122
+ return [4 /*yield*/, bboxUtils_1.bboxToTileRange(bbox, zoom)];
123
+ case 1:
124
+ _a.sent();
125
+ return [3 /*break*/, 4];
126
+ case 2:
127
+ intersectionParams = {
128
+ footprint: footprint,
129
+ maxZoom: zoom,
130
+ };
131
+ return [5 /*yield**/, __values(this.generateRanges(bbox, zoom, intersectionParams, this.tileFootprintIntersection))];
132
+ case 3:
133
+ _a.sent();
134
+ _a.label = 4;
135
+ case 4: return [2 /*return*/];
136
+ }
137
+ });
138
+ };
139
+ TileRanger.prototype.generateTiles = function (area, zoom) {
140
+ var gen;
141
+ if (Array.isArray(area)) {
142
+ gen = [bboxUtils_1.bboxToTileRange(area, zoom)];
143
+ }
144
+ else {
145
+ gen = this.encodeFootprint(area, zoom);
146
+ }
147
+ return tilesGenerator_1.tilesGenerator(gen);
148
+ };
149
+ TileRanger.prototype.generateRanges = function (bbox, zoom, intersectionTarget, intersectionFunction) {
150
+ var boundingRange, dx, dy, minXZoom, minYZoom, minZoom, minimalRange, x, y, tile, intersection;
151
+ return __generator(this, function (_a) {
152
+ switch (_a.label) {
153
+ case 0:
154
+ boundingRange = bboxUtils_1.bboxToTileRange(bbox, zoom);
155
+ dx = boundingRange.maxX - boundingRange.minX;
156
+ dy = boundingRange.maxY - boundingRange.minY;
157
+ minXZoom = Math.max(Math.floor(Math.log2(1 << (zoom + 1)) / dx) - 1, 0);
158
+ minYZoom = Math.max(Math.floor(Math.log2(1 << zoom) / dy), 0);
159
+ minZoom = Math.min(minXZoom, minYZoom);
160
+ minimalRange = bboxUtils_1.bboxToTileRange(bbox, minZoom);
161
+ x = minimalRange.minX;
162
+ _a.label = 1;
163
+ case 1:
164
+ if (!(x < minimalRange.maxX)) return [3 /*break*/, 8];
165
+ y = minimalRange.minY;
166
+ _a.label = 2;
167
+ case 2:
168
+ if (!(y < minimalRange.maxY)) return [3 /*break*/, 7];
169
+ tile = { x: x, y: y, zoom: minimalRange.zoom };
170
+ intersection = intersectionFunction(tile, intersectionTarget);
171
+ if (!(intersection === TileIntersectionState.FULL)) return [3 /*break*/, 4];
172
+ return [4 /*yield*/, this.tileToRange(tile, zoom)];
173
+ case 3:
174
+ _a.sent();
175
+ return [3 /*break*/, 6];
176
+ case 4:
177
+ if (!(intersection === TileIntersectionState.PARTIAL)) return [3 /*break*/, 6];
178
+ //optimize partial base hashes
179
+ return [5 /*yield**/, __values(this.optimizeHash(tile, zoom, intersectionTarget, intersectionFunction))];
180
+ case 5:
181
+ //optimize partial base hashes
182
+ _a.sent();
183
+ _a.label = 6;
184
+ case 6:
185
+ y++;
186
+ return [3 /*break*/, 2];
187
+ case 7:
188
+ x++;
189
+ return [3 /*break*/, 1];
190
+ case 8: return [2 /*return*/];
191
+ }
192
+ });
193
+ };
194
+ TileRanger.prototype.optimizeHash = function (tile, targetZoom, intersectionTarget, intersectionFunction) {
195
+ var tiles, tiles_2, tiles_2_1, subTile, intersection, e_1_1;
196
+ var e_1, _a;
197
+ return __generator(this, function (_b) {
198
+ switch (_b.label) {
199
+ case 0:
200
+ tiles = this.generateSubTiles(tile);
201
+ _b.label = 1;
202
+ case 1:
203
+ _b.trys.push([1, 8, 9, 10]);
204
+ tiles_2 = __values(tiles), tiles_2_1 = tiles_2.next();
205
+ _b.label = 2;
206
+ case 2:
207
+ if (!!tiles_2_1.done) return [3 /*break*/, 7];
208
+ subTile = tiles_2_1.value;
209
+ intersection = intersectionFunction(subTile, intersectionTarget);
210
+ if (!(intersection === TileIntersectionState.FULL)) return [3 /*break*/, 4];
211
+ return [4 /*yield*/, this.tileToRange(subTile, targetZoom)];
212
+ case 3:
213
+ _b.sent();
214
+ return [3 /*break*/, 6];
215
+ case 4:
216
+ if (!(intersection === TileIntersectionState.PARTIAL)) return [3 /*break*/, 6];
217
+ return [5 /*yield**/, __values(this.optimizeHash(subTile, targetZoom, intersectionTarget, intersectionFunction))];
218
+ case 5:
219
+ _b.sent();
220
+ _b.label = 6;
221
+ case 6:
222
+ tiles_2_1 = tiles_2.next();
223
+ return [3 /*break*/, 2];
224
+ case 7: return [3 /*break*/, 10];
225
+ case 8:
226
+ e_1_1 = _b.sent();
227
+ e_1 = { error: e_1_1 };
228
+ return [3 /*break*/, 10];
229
+ case 9:
230
+ try {
231
+ if (tiles_2_1 && !tiles_2_1.done && (_a = tiles_2.return)) _a.call(tiles_2);
232
+ }
233
+ finally { if (e_1) throw e_1.error; }
234
+ return [7 /*endfinally*/];
235
+ case 10: return [2 /*return*/];
236
+ }
237
+ });
238
+ };
239
+ TileRanger.prototype.generateSubTiles = function (tile) {
240
+ var tile0 = { x: tile.x << 1, y: tile.y << 1, zoom: tile.zoom + 1 };
241
+ var tile1 = { x: tile0.x + 1, y: tile0.y, zoom: tile0.zoom };
242
+ var tile2 = { x: tile0.x, y: tile0.y + 1, zoom: tile0.zoom };
243
+ var tile3 = { x: tile0.x + 1, y: tile0.y + 1, zoom: tile0.zoom };
244
+ var tiles = [tile0, tile1, tile2, tile3];
245
+ return tiles;
246
+ };
247
+ TileRanger.prototype.isBbox = function (footprint) {
248
+ var bbox = turf_1.bbox(footprint);
249
+ var bboxPoly = turf_1.bboxPolygon(bbox);
250
+ return turf_1.booleanEqual(footprint, bboxPoly);
251
+ };
252
+ return TileRanger;
253
+ }());
254
+ exports.TileRanger = TileRanger;
255
+ //# sourceMappingURL=tileRanger.js.map
@@ -0,0 +1 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;IAC3C,CAAC;IACH,iBAAC;AAAD,CAAC,AA3JD,IA2JC;AA3JY,gCAAU"}
@@ -1,3 +1,33 @@
1
- export declare function degreesPerTile(zoomLevel: number): number;
2
- export declare function degreesPerPixel(zoomLevel: number): number;
1
+ import { BBox2d } from '@turf/helpers/dist/js/lib/geojson';
2
+ import { ITile } from '../models/interfaces/geo/iTile';
3
+ /**
4
+ * calculates tile size (resolution) in degrees
5
+ * @param zoomLevel zoom level of returned tile size
6
+ * @returns tile size (resolution) in degrees
7
+ */
8
+ export declare function degreesPerTile(zoomLevel: number): number;
9
+ /**
10
+ * returns pixel size (resolution) in degrees
11
+ * @param zoomLevel tile zoom level of returned tile pixel size
12
+ * @returns pixel size (resolution) in degrees
13
+ */
14
+ export declare function degreesPerPixel(zoomLevel: number): number;
15
+ /**
16
+ * coverts tile coordinates between ll and ul
17
+ * @param tile source tile
18
+ * @returns converted tile
19
+ */
20
+ export declare function flipYAxis(tile: ITile): ITile;
21
+ /**
22
+ * converts pixel size (resolution) in degrees to matching zoom level (rounded up)
23
+ * @param resolution pixel size (resolution) in degrees
24
+ * @returns zoom level for given pixel size
25
+ */
26
+ export declare function degreesPerPixelToZoomLevel(resolution: number): number;
27
+ /**
28
+ * returns bbox of given tile
29
+ * @param tile
30
+ * @returns
31
+ */
32
+ export declare function tileToBbox(tile: ITile): BBox2d;
3
33
  //# sourceMappingURL=tiles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tiles.d.ts","sourceRoot":"","sources":["../../src/geo/tiles.ts"],"names":[],"mappings":"AAAA,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAGxD;AAED,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAIzD"}
1
+ {"version":3,"file":"tiles.d.ts","sourceRoot":"","sources":["../../src/geo/tiles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mCAAmC,CAAC;AAC3D,OAAO,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AAGvD;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAGxD;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAIzD;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,KAAK,GAAG,KAAK,CAO5C;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAQrE;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,KAAK,GAAG,MAAM,CAI9C"}
package/dist/geo/tiles.js CHANGED
@@ -1,15 +1,66 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.degreesPerPixel = exports.degreesPerTile = void 0;
4
- function degreesPerTile(zoomLevel) {
5
- var latRange = 180;
6
- return latRange / (1 << zoomLevel);
7
- }
8
- exports.degreesPerTile = degreesPerTile;
9
- function degreesPerPixel(zoomLevel) {
10
- var tileSize = 256;
11
- var tileRes = degreesPerTile(zoomLevel);
12
- return tileRes / tileSize;
13
- }
14
- exports.degreesPerPixel = degreesPerPixel;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.tileToBbox = exports.degreesPerPixelToZoomLevel = exports.flipYAxis = exports.degreesPerPixel = exports.degreesPerTile = void 0;
4
+ var geoConvertor_1 = require("./geoConvertor");
5
+ /**
6
+ * calculates tile size (resolution) in degrees
7
+ * @param zoomLevel zoom level of returned tile size
8
+ * @returns tile size (resolution) in degrees
9
+ */
10
+ function degreesPerTile(zoomLevel) {
11
+ var latRange = 180;
12
+ return latRange / (1 << zoomLevel);
13
+ }
14
+ exports.degreesPerTile = degreesPerTile;
15
+ /**
16
+ * returns pixel size (resolution) in degrees
17
+ * @param zoomLevel tile zoom level of returned tile pixel size
18
+ * @returns pixel size (resolution) in degrees
19
+ */
20
+ function degreesPerPixel(zoomLevel) {
21
+ var tileSize = 256;
22
+ var tileRes = degreesPerTile(zoomLevel);
23
+ return tileRes / tileSize;
24
+ }
25
+ exports.degreesPerPixel = degreesPerPixel;
26
+ /**
27
+ * coverts tile coordinates between ll and ul
28
+ * @param tile source tile
29
+ * @returns converted tile
30
+ */
31
+ function flipYAxis(tile) {
32
+ var yTiles = 1 << tile.zoom;
33
+ return {
34
+ x: tile.x,
35
+ y: yTiles - tile.y - 1,
36
+ zoom: tile.zoom,
37
+ };
38
+ }
39
+ exports.flipYAxis = flipYAxis;
40
+ /**
41
+ * converts pixel size (resolution) in degrees to matching zoom level (rounded up)
42
+ * @param resolution pixel size (resolution) in degrees
43
+ * @returns zoom level for given pixel size
44
+ */
45
+ function degreesPerPixelToZoomLevel(resolution) {
46
+ var MIN_ZOOM_LEVEL = 0;
47
+ // eslint-disable-next-line @typescript-eslint/no-magic-numbers
48
+ var zoomLevel = Math.ceil(Math.log2(180 / (resolution * 256)));
49
+ if (zoomLevel < MIN_ZOOM_LEVEL) {
50
+ throw new Error("Invalid zoom level " + zoomLevel + " for resolution " + resolution);
51
+ }
52
+ return zoomLevel;
53
+ }
54
+ exports.degreesPerPixelToZoomLevel = degreesPerPixelToZoomLevel;
55
+ /**
56
+ * returns bbox of given tile
57
+ * @param tile
58
+ * @returns
59
+ */
60
+ function tileToBbox(tile) {
61
+ var minPoint = geoConvertor_1.tileToDegrees(tile);
62
+ var tileSize = degreesPerTile(tile.zoom);
63
+ return [minPoint.longitude, minPoint.latitude, minPoint.longitude + tileSize, minPoint.latitude + tileSize];
64
+ }
65
+ exports.tileToBbox = tileToBbox;
15
66
  //# sourceMappingURL=tiles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tiles.js","sourceRoot":"","sources":["../../src/geo/tiles.ts"],"names":[],"mappings":";;;AAAA,SAAgB,cAAc,CAAC,SAAiB;IAC9C,IAAM,QAAQ,GAAG,GAAG,CAAC;IACrB,OAAO,QAAQ,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AC,CAAC;IACjE,IAAI,SAAS,GAAG,cAAc,EAAE;QAC9B,MAAM,IAAI,KAAK,CAAC,wBAAsB,SAAS,wBAAmB,UAAY,CAAC,CAAC;KACjF;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AARD,gEAQC;AAED;;;;GAIG;AACH,SAAgB,UAAU,CAAC,IAAW;IACpC,IAAM,QAAQ,GAAG,4BAAa,CAAC,IAAI,CAAC,CAAC;IACrC,IAAM,QAAQ,GAAG,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3C,OAAO,CAAC,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,SAAS,GAAG,QAAQ,EAAE,QAAQ,CAAC,QAAQ,GAAG,QAAQ,CAAC,CAAC;AAC9G,CAAC;AAJD,gCAIC"}
@@ -0,0 +1,3 @@
1
+ import { ITile, ITileRange } from '../models/interfaces/geo/iTile';
2
+ export declare function tilesGenerator(rangeGen: Iterable<ITileRange>): Generator<ITile>;
3
+ //# sourceMappingURL=tilesGenerator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tilesGenerator.d.ts","sourceRoot":"","sources":["../../src/geo/tilesGenerator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAEnE,wBAAiB,cAAc,CAAC,QAAQ,EAAE,QAAQ,CAAC,UAAU,CAAC,GAAG,SAAS,CAAC,KAAK,CAAC,CAYhF"}
@@ -0,0 +1,95 @@
1
+ "use strict";
2
+ var __generator = (this && this.__generator) || function (thisArg, body) {
3
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
4
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
5
+ function verb(n) { return function (v) { return step([n, v]); }; }
6
+ function step(op) {
7
+ if (f) throw new TypeError("Generator is already executing.");
8
+ while (_) try {
9
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
10
+ if (y = 0, t) op = [op[0] & 2, t.value];
11
+ switch (op[0]) {
12
+ case 0: case 1: t = op; break;
13
+ case 4: _.label++; return { value: op[1], done: false };
14
+ case 5: _.label++; y = op[1]; op = [0]; continue;
15
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
16
+ default:
17
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
18
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
19
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
20
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
21
+ if (t[2]) _.ops.pop();
22
+ _.trys.pop(); continue;
23
+ }
24
+ op = body.call(thisArg, _);
25
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
26
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
27
+ }
28
+ };
29
+ var __values = (this && this.__values) || function(o) {
30
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
31
+ if (m) return m.call(o);
32
+ if (o && typeof o.length === "number") return {
33
+ next: function () {
34
+ if (o && i >= o.length) o = void 0;
35
+ return { value: o && o[i++], done: !o };
36
+ }
37
+ };
38
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
39
+ };
40
+ Object.defineProperty(exports, "__esModule", { value: true });
41
+ exports.tilesGenerator = void 0;
42
+ function tilesGenerator(rangeGen) {
43
+ var rangeGen_1, rangeGen_1_1, range, x, y, e_1_1;
44
+ var e_1, _a;
45
+ return __generator(this, function (_b) {
46
+ switch (_b.label) {
47
+ case 0:
48
+ _b.trys.push([0, 9, 10, 11]);
49
+ rangeGen_1 = __values(rangeGen), rangeGen_1_1 = rangeGen_1.next();
50
+ _b.label = 1;
51
+ case 1:
52
+ if (!!rangeGen_1_1.done) return [3 /*break*/, 8];
53
+ range = rangeGen_1_1.value;
54
+ x = range.minX;
55
+ _b.label = 2;
56
+ case 2:
57
+ if (!(x < range.maxX)) return [3 /*break*/, 7];
58
+ y = range.minY;
59
+ _b.label = 3;
60
+ case 3:
61
+ if (!(y < range.maxY)) return [3 /*break*/, 6];
62
+ return [4 /*yield*/, {
63
+ x: x,
64
+ y: y,
65
+ zoom: range.zoom,
66
+ }];
67
+ case 4:
68
+ _b.sent();
69
+ _b.label = 5;
70
+ case 5:
71
+ y++;
72
+ return [3 /*break*/, 3];
73
+ case 6:
74
+ x++;
75
+ return [3 /*break*/, 2];
76
+ case 7:
77
+ rangeGen_1_1 = rangeGen_1.next();
78
+ return [3 /*break*/, 1];
79
+ case 8: return [3 /*break*/, 11];
80
+ case 9:
81
+ e_1_1 = _b.sent();
82
+ e_1 = { error: e_1_1 };
83
+ return [3 /*break*/, 11];
84
+ case 10:
85
+ try {
86
+ if (rangeGen_1_1 && !rangeGen_1_1.done && (_a = rangeGen_1.return)) _a.call(rangeGen_1);
87
+ }
88
+ finally { if (e_1) throw e_1.error; }
89
+ return [7 /*endfinally*/];
90
+ case 11: return [2 /*return*/];
91
+ }
92
+ });
93
+ }
94
+ exports.tilesGenerator = tilesGenerator;
95
+ //# sourceMappingURL=tilesGenerator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tilesGenerator.js","sourceRoot":"","sources":["../../src/geo/tilesGenerator.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,SAAiB,cAAc,CAAC,QAA8B;;;;;;;gBACxC,aAAA,SAAA,QAAQ,CAAA;;;;gBAAjB,KAAK;gBACL,CAAC,GAAG,KAAK,CAAC,IAAI;;;qBAAE,CAAA,CAAC,GAAG,KAAK,CAAC,IAAI,CAAA;gBAC5B,CAAC,GAAG,KAAK,CAAC,IAAI;;;qBAAE,CAAA,CAAC,GAAG,KAAK,CAAC,IAAI,CAAA;gBACrC,qBAAM;wBACJ,CAAC,GAAA;wBACD,CAAC,GAAA;wBACD,IAAI,EAAE,KAAK,CAAC,IAAI;qBACjB,EAAA;;gBAJD,SAIC,CAAC;;;gBALqC,CAAC,EAAE,CAAA;;;gBADL,CAAC,EAAE,CAAA;;;;;;;;;;;;;;;;;;;CAU/C;AAZD,wCAYC"}
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export * from './models';
2
- export * from './communication';
3
- export * from './geo';
1
+ export * from './models';
2
+ export * from './communication';
3
+ export * from './geo';
4
4
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -1,16 +1,16 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
- };
12
- Object.defineProperty(exports, "__esModule", { value: true });
13
- __exportStar(require("./models"), exports);
14
- __exportStar(require("./communication"), exports);
15
- __exportStar(require("./geo"), exports);
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
+ };
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ __exportStar(require("./models"), exports);
14
+ __exportStar(require("./communication"), exports);
15
+ __exportStar(require("./geo"), exports);
16
16
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,2 @@
1
+ export * from './tileOrigin';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/models/enums/geo/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
+ };
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ __exportStar(require("./tileOrigin"), exports);
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/models/enums/geo/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAA6B"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * tile grid origin locations
3
+ */
4
+ export declare enum TileOrigin {
5
+ UPPER_LEFT = "ul",
6
+ LOWER_LEFT = "ll"
7
+ }
8
+ //# sourceMappingURL=tileOrigin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tileOrigin.d.ts","sourceRoot":"","sources":["../../../../src/models/enums/geo/tileOrigin.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,UAAU;IACpB,UAAU,OAAO;IACjB,UAAU,OAAO;CAClB"}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TileOrigin = void 0;
4
+ /**
5
+ * tile grid origin locations
6
+ */
7
+ var TileOrigin;
8
+ (function (TileOrigin) {
9
+ TileOrigin["UPPER_LEFT"] = "ul";
10
+ TileOrigin["LOWER_LEFT"] = "ll";
11
+ })(TileOrigin = exports.TileOrigin || (exports.TileOrigin = {}));
12
+ //# sourceMappingURL=tileOrigin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tileOrigin.js","sourceRoot":"","sources":["../../../../src/models/enums/geo/tileOrigin.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,UAGX;AAHD,WAAY,UAAU;IACpB,+BAAiB,CAAA;IACjB,+BAAiB,CAAA;AACnB,CAAC,EAHW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAGrB"}
@@ -0,0 +1,2 @@
1
+ export * from './geo';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/models/enums/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
+ };
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ __exportStar(require("./geo"), exports);
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/enums/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wCAAsB"}
@@ -1,2 +1,3 @@
1
- export * from './interfaces';
1
+ export * from './interfaces';
2
+ export * from './enums';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC"}