@loaders.gl/mvt 4.2.1 → 4.3.0-alpha.2

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 (120) hide show
  1. package/dist/dist.dev.js +1784 -847
  2. package/dist/dist.min.js +1 -1
  3. package/dist/index.cjs +713 -640
  4. package/dist/index.cjs.map +4 -4
  5. package/dist/index.d.ts +2 -2
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +1 -1
  8. package/dist/lib/parse-mvt.d.ts +2 -1
  9. package/dist/lib/parse-mvt.d.ts.map +1 -1
  10. package/dist/lib/parse-mvt.js +15 -45
  11. package/dist/lib/parse-tilejson.d.ts +4 -4
  12. package/dist/lib/parse-tilejson.d.ts.map +1 -1
  13. package/dist/lib/types.d.ts +1 -39
  14. package/dist/lib/types.d.ts.map +1 -1
  15. package/dist/lib/utils/geometry-utils.d.ts +83 -0
  16. package/dist/lib/utils/geometry-utils.d.ts.map +1 -0
  17. package/dist/lib/utils/geometry-utils.js +206 -0
  18. package/dist/lib/vector-tile/vector-tile-feature.d.ts +72 -0
  19. package/dist/lib/vector-tile/vector-tile-feature.d.ts.map +1 -0
  20. package/dist/lib/vector-tile/vector-tile-feature.js +342 -0
  21. package/dist/lib/{mapbox-vector-tile → vector-tile}/vector-tile-layer.d.ts +10 -1
  22. package/dist/lib/vector-tile/vector-tile-layer.d.ts.map +1 -0
  23. package/dist/lib/{mapbox-vector-tile → vector-tile}/vector-tile-layer.js +16 -1
  24. package/dist/lib/vector-tile/vector-tile.d.ts.map +1 -0
  25. package/dist/lib/{geojson-tiler → vector-tiler}/clip.d.ts +3 -3
  26. package/dist/lib/vector-tiler/clip.d.ts.map +1 -0
  27. package/dist/lib/vector-tiler/convert.d.ts +18 -0
  28. package/dist/lib/vector-tiler/convert.d.ts.map +1 -0
  29. package/dist/lib/{geojson-tiler → vector-tiler}/convert.js +8 -1
  30. package/dist/lib/vector-tiler/feature.d.ts +3 -0
  31. package/dist/lib/vector-tiler/feature.d.ts.map +1 -0
  32. package/dist/lib/vector-tiler/simplify.d.ts.map +1 -0
  33. package/dist/lib/{geojson-tiler → vector-tiler}/tile.d.ts +4 -4
  34. package/dist/lib/vector-tiler/tile.d.ts.map +1 -0
  35. package/dist/lib/vector-tiler/transform.d.ts +7 -0
  36. package/dist/lib/vector-tiler/transform.d.ts.map +1 -0
  37. package/dist/lib/{geojson-tiler → vector-tiler}/wrap.d.ts +2 -2
  38. package/dist/lib/vector-tiler/wrap.d.ts.map +1 -0
  39. package/dist/mvt-loader.d.ts +19 -8
  40. package/dist/mvt-loader.d.ts.map +1 -1
  41. package/dist/mvt-loader.js +3 -2
  42. package/dist/mvt-source.d.ts +4 -4
  43. package/dist/mvt-source.d.ts.map +1 -1
  44. package/dist/mvt-source.js +7 -7
  45. package/dist/mvt-worker.js +1244 -762
  46. package/dist/table-tile-source.d.ts +118 -0
  47. package/dist/table-tile-source.d.ts.map +1 -0
  48. package/dist/table-tile-source.js +370 -0
  49. package/dist/tilejson-loader.js +1 -1
  50. package/package.json +7 -6
  51. package/src/index.ts +3 -3
  52. package/src/lib/parse-mvt.ts +28 -66
  53. package/src/lib/parse-tilejson.ts +5 -5
  54. package/src/lib/types.ts +1 -39
  55. package/src/lib/utils/geometry-utils.ts +234 -0
  56. package/src/lib/vector-tile/vector-tile-feature.ts +416 -0
  57. package/src/lib/{mapbox-vector-tile → vector-tile}/vector-tile-layer.ts +28 -2
  58. package/src/lib/{geojson-tiler → vector-tiler}/clip.ts +4 -4
  59. package/src/lib/{geojson-tiler → vector-tiler}/convert.ts +19 -9
  60. package/src/lib/{geojson-tiler → vector-tiler}/feature.ts +3 -3
  61. package/src/lib/{geojson-tiler → vector-tiler}/tile.ts +10 -10
  62. package/src/lib/{geojson-tiler → vector-tiler}/transform.ts +2 -2
  63. package/src/lib/{geojson-tiler → vector-tiler}/wrap.ts +5 -5
  64. package/src/mvt-loader.ts +14 -6
  65. package/src/mvt-source.ts +9 -10
  66. package/src/table-tile-source.ts +508 -0
  67. package/dist/helpers/binary-util-functions.d.ts +0 -35
  68. package/dist/helpers/binary-util-functions.d.ts.map +0 -1
  69. package/dist/helpers/binary-util-functions.js +0 -114
  70. package/dist/helpers/mapbox-util-functions.d.ts +0 -29
  71. package/dist/helpers/mapbox-util-functions.d.ts.map +0 -1
  72. package/dist/helpers/mapbox-util-functions.js +0 -78
  73. package/dist/lib/binary-vector-tile/vector-tile-feature.d.ts +0 -41
  74. package/dist/lib/binary-vector-tile/vector-tile-feature.d.ts.map +0 -1
  75. package/dist/lib/binary-vector-tile/vector-tile-feature.js +0 -163
  76. package/dist/lib/binary-vector-tile/vector-tile-layer.d.ts +0 -23
  77. package/dist/lib/binary-vector-tile/vector-tile-layer.d.ts.map +0 -1
  78. package/dist/lib/binary-vector-tile/vector-tile-layer.js +0 -96
  79. package/dist/lib/binary-vector-tile/vector-tile.d.ts +0 -9
  80. package/dist/lib/binary-vector-tile/vector-tile.d.ts.map +0 -1
  81. package/dist/lib/binary-vector-tile/vector-tile.js +0 -27
  82. package/dist/lib/geojson-tiler/clip.d.ts.map +0 -1
  83. package/dist/lib/geojson-tiler/convert.d.ts +0 -10
  84. package/dist/lib/geojson-tiler/convert.d.ts.map +0 -1
  85. package/dist/lib/geojson-tiler/feature.d.ts +0 -3
  86. package/dist/lib/geojson-tiler/feature.d.ts.map +0 -1
  87. package/dist/lib/geojson-tiler/geojson-tiler.d.ts +0 -44
  88. package/dist/lib/geojson-tiler/geojson-tiler.d.ts.map +0 -1
  89. package/dist/lib/geojson-tiler/geojson-tiler.js +0 -209
  90. package/dist/lib/geojson-tiler/simplify.d.ts.map +0 -1
  91. package/dist/lib/geojson-tiler/tile.d.ts.map +0 -1
  92. package/dist/lib/geojson-tiler/transform.d.ts +0 -7
  93. package/dist/lib/geojson-tiler/transform.d.ts.map +0 -1
  94. package/dist/lib/geojson-tiler/wrap.d.ts.map +0 -1
  95. package/dist/lib/mapbox-vector-tile/vector-tile-feature.d.ts +0 -27
  96. package/dist/lib/mapbox-vector-tile/vector-tile-feature.d.ts.map +0 -1
  97. package/dist/lib/mapbox-vector-tile/vector-tile-feature.js +0 -178
  98. package/dist/lib/mapbox-vector-tile/vector-tile-layer.d.ts.map +0 -1
  99. package/dist/lib/mapbox-vector-tile/vector-tile.d.ts.map +0 -1
  100. package/src/helpers/binary-util-functions.ts +0 -125
  101. package/src/helpers/mapbox-util-functions.ts +0 -82
  102. package/src/lib/binary-vector-tile/vector-tile-feature.ts +0 -203
  103. package/src/lib/binary-vector-tile/vector-tile-layer.ts +0 -113
  104. package/src/lib/binary-vector-tile/vector-tile.ts +0 -36
  105. package/src/lib/geojson-tiler/geojson-tiler.ts +0 -283
  106. package/src/lib/mapbox-vector-tile/LICENSE.txt +0 -31
  107. package/src/lib/mapbox-vector-tile/vector-tile-feature.ts +0 -207
  108. /package/dist/lib/{mapbox-vector-tile → vector-tile}/vector-tile.d.ts +0 -0
  109. /package/dist/lib/{mapbox-vector-tile → vector-tile}/vector-tile.js +0 -0
  110. /package/dist/lib/{geojson-tiler → vector-tiler}/clip.js +0 -0
  111. /package/dist/lib/{geojson-tiler → vector-tiler}/feature.js +0 -0
  112. /package/dist/lib/{geojson-tiler → vector-tiler}/simplify.d.ts +0 -0
  113. /package/dist/lib/{geojson-tiler → vector-tiler}/simplify.js +0 -0
  114. /package/dist/lib/{geojson-tiler → vector-tiler}/tile.js +0 -0
  115. /package/dist/lib/{geojson-tiler → vector-tiler}/transform.js +0 -0
  116. /package/dist/lib/{geojson-tiler → vector-tiler}/wrap.js +0 -0
  117. /package/src/lib/{binary-vector-tile → vector-tile}/LICENSE.txt +0 -0
  118. /package/src/lib/{mapbox-vector-tile → vector-tile}/vector-tile.ts +0 -0
  119. /package/src/lib/{geojson-tiler → vector-tiler}/LICENSE +0 -0
  120. /package/src/lib/{geojson-tiler → vector-tiler}/simplify.ts +0 -0
@@ -0,0 +1,342 @@
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright vis.gl contributors
4
+ import { classifyRings, classifyRingsFlat } from "../utils/geometry-utils.js";
5
+ import { projectToLngLat, projectToLngLatFlat } from "../utils/geometry-utils.js";
6
+ import { convertToLocalCoordinates, convertToLocalCoordinatesFlat } from "../utils/geometry-utils.js";
7
+ export class VectorTileFeature {
8
+ properties;
9
+ extent;
10
+ type;
11
+ id;
12
+ _pbf;
13
+ _geometry;
14
+ _keys;
15
+ _values;
16
+ _geometryInfo;
17
+ static types = ['Unknown', 'Point', 'LineString', 'Polygon'];
18
+ // eslint-disable-next-line max-params
19
+ constructor(pbf, end, extent, keys, values, geometryInfo) {
20
+ // Public
21
+ this.properties = {};
22
+ this.extent = extent;
23
+ this.type = 0;
24
+ this.id = null;
25
+ // Private
26
+ this._pbf = pbf;
27
+ this._geometry = -1;
28
+ this._keys = keys;
29
+ this._values = values;
30
+ // Only used by binary tiles
31
+ this._geometryInfo = geometryInfo;
32
+ pbf.readFields(readFeature, this, end);
33
+ }
34
+ toGeoJSONFeature(coordinates, tileIndex) {
35
+ const coords = this.loadGeometry();
36
+ switch (coordinates) {
37
+ case 'wgs84':
38
+ return _toGeoJSONFeature(this, coords, (line) => projectToLngLat(line, tileIndex, this.extent));
39
+ default:
40
+ return _toGeoJSONFeature(this, coords, convertToLocalCoordinates);
41
+ }
42
+ }
43
+ /**
44
+ *
45
+ * @param options
46
+ * @returns
47
+ */
48
+ toBinaryFeature(coordinates, tileIndex) {
49
+ const geom = this.loadFlatGeometry();
50
+ switch (coordinates) {
51
+ case 'wgs84':
52
+ return this._toBinaryCoordinates(geom, (coords) => projectToLngLatFlat(coords, tileIndex, this.extent));
53
+ default:
54
+ return this._toBinaryCoordinates(geom, convertToLocalCoordinatesFlat);
55
+ }
56
+ }
57
+ /** Read a bounding box from the feature */
58
+ // eslint-disable-next-line max-statements
59
+ bbox() {
60
+ const pbf = this._pbf;
61
+ pbf.pos = this._geometry;
62
+ const end = pbf.readVarint() + pbf.pos;
63
+ let cmd = 1;
64
+ let length = 0;
65
+ let x = 0;
66
+ let y = 0;
67
+ let x1 = Infinity;
68
+ let x2 = -Infinity;
69
+ let y1 = Infinity;
70
+ let y2 = -Infinity;
71
+ while (pbf.pos < end) {
72
+ if (length <= 0) {
73
+ const cmdLen = pbf.readVarint();
74
+ cmd = cmdLen & 0x7;
75
+ length = cmdLen >> 3;
76
+ }
77
+ length--;
78
+ if (cmd === 1 || cmd === 2) {
79
+ x += pbf.readSVarint();
80
+ y += pbf.readSVarint();
81
+ if (x < x1)
82
+ x1 = x;
83
+ if (x > x2)
84
+ x2 = x;
85
+ if (y < y1)
86
+ y1 = y;
87
+ if (y > y2)
88
+ y2 = y;
89
+ }
90
+ else if (cmd !== 7) {
91
+ throw new Error(`unknown command ${cmd}`);
92
+ }
93
+ }
94
+ return [x1, y1, x2, y2];
95
+ }
96
+ // BINARY HELPERS
97
+ /**
98
+ *
99
+ * @param transform
100
+ * @returns result
101
+ */
102
+ _toBinaryCoordinates(geom, transform) {
103
+ let geometry;
104
+ // Apply the supplied transformation to data
105
+ transform(geom.data, this.extent);
106
+ const coordLength = 2;
107
+ // eslint-disable-next-line default-case
108
+ switch (this.type) {
109
+ case 1: // Point
110
+ this._geometryInfo.pointFeaturesCount++;
111
+ this._geometryInfo.pointPositionsCount += geom.indices.length;
112
+ geometry = { type: 'Point', ...geom };
113
+ break;
114
+ case 2: // LineString
115
+ this._geometryInfo.lineFeaturesCount++;
116
+ this._geometryInfo.linePathsCount += geom.indices.length;
117
+ this._geometryInfo.linePositionsCount += geom.data.length / coordLength;
118
+ geometry = { type: 'LineString', ...geom };
119
+ break;
120
+ case 3: // Polygon
121
+ geometry = classifyRingsFlat(geom);
122
+ // Unlike Point & LineString geom.indices is a 2D array, thanks
123
+ // to the classifyRings method
124
+ this._geometryInfo.polygonFeaturesCount++;
125
+ this._geometryInfo.polygonObjectsCount += geometry.indices.length;
126
+ for (const indices of geometry.indices) {
127
+ this._geometryInfo.polygonRingsCount += indices.length;
128
+ }
129
+ this._geometryInfo.polygonPositionsCount += geometry.data.length / coordLength;
130
+ break;
131
+ default:
132
+ throw new Error(`Invalid geometry type: ${this.type}`);
133
+ }
134
+ const result = { type: 'Feature', geometry, properties: this.properties };
135
+ if (this.id !== null) {
136
+ result.id = this.id;
137
+ }
138
+ return result;
139
+ }
140
+ // GEOJSON HELPER
141
+ // eslint-disable-next-line complexity, max-statements
142
+ loadGeometry() {
143
+ const pbf = this._pbf;
144
+ pbf.pos = this._geometry;
145
+ const end = pbf.readVarint() + pbf.pos;
146
+ let cmd = 1;
147
+ let length = 0;
148
+ let x = 0;
149
+ let y = 0;
150
+ const lines = [];
151
+ let line;
152
+ while (pbf.pos < end) {
153
+ if (length <= 0) {
154
+ const cmdLen = pbf.readVarint();
155
+ cmd = cmdLen & 0x7;
156
+ length = cmdLen >> 3;
157
+ }
158
+ length--;
159
+ switch (cmd) {
160
+ case 1:
161
+ case 2:
162
+ x += pbf.readSVarint();
163
+ y += pbf.readSVarint();
164
+ if (cmd === 1) {
165
+ // moveTo
166
+ if (line)
167
+ lines.push(line);
168
+ line = [];
169
+ }
170
+ if (line)
171
+ line.push([x, y]);
172
+ break;
173
+ case 7:
174
+ // Workaround for https://github.com/mapbox/mapnik-vector-tile/issues/90
175
+ if (line) {
176
+ line.push(line[0].slice()); // closePolygon
177
+ }
178
+ break;
179
+ default:
180
+ throw new Error(`unknown command ${cmd}`);
181
+ }
182
+ }
183
+ if (line)
184
+ lines.push(line);
185
+ return lines;
186
+ }
187
+ /**
188
+ * Expands the protobuf data to an intermediate Flat GeoJSON
189
+ * data format, which maps closely to the binary data buffers.
190
+ * It is similar to GeoJSON, but rather than storing the coordinates
191
+ * in multidimensional arrays, we have a 1D `data` with all the
192
+ * coordinates, and then index into this using the `indices`
193
+ * parameter, e.g.
194
+ *
195
+ * geometry: {
196
+ * type: 'Point', data: [1,2], indices: [0]
197
+ * }
198
+ * geometry: {
199
+ * type: 'LineString', data: [1,2,3,4,...], indices: [0]
200
+ * }
201
+ * geometry: {
202
+ * type: 'Polygon', data: [1,2,3,4,...], indices: [[0, 2]]
203
+ * }
204
+ * Thus the indices member lets us look up the relevant range
205
+ * from the data array.
206
+ * The Multi* versions of the above types share the same data
207
+ * structure, just with multiple elements in the indices array
208
+ */
209
+ // eslint-disable-next-line complexity, max-statements
210
+ loadFlatGeometry() {
211
+ const pbf = this._pbf;
212
+ pbf.pos = this._geometry;
213
+ const endPos = pbf.readVarint() + pbf.pos;
214
+ let cmd = 1;
215
+ let cmdLen;
216
+ let length = 0;
217
+ let x = 0;
218
+ let y = 0;
219
+ let i = 0;
220
+ // Note: I attempted to replace the `data` array with a
221
+ // Float32Array, but performance was worse, both using
222
+ // `set()` and direct index access. Also, we cannot
223
+ // know how large the buffer should be, so it would
224
+ // increase memory usage
225
+ const indices = []; // Indices where geometries start
226
+ const data = []; // Flat array of coordinate data
227
+ while (pbf.pos < endPos) {
228
+ if (length <= 0) {
229
+ cmdLen = pbf.readVarint();
230
+ cmd = cmdLen & 0x7;
231
+ length = cmdLen >> 3;
232
+ }
233
+ length--;
234
+ if (cmd === 1 || cmd === 2) {
235
+ x += pbf.readSVarint();
236
+ y += pbf.readSVarint();
237
+ if (cmd === 1) {
238
+ // New line
239
+ indices.push(i);
240
+ }
241
+ data.push(x, y);
242
+ i += 2;
243
+ }
244
+ else if (cmd === 7) {
245
+ // Workaround for https://github.com/mapbox/mapnik-vector-tile/issues/90
246
+ if (i > 0) {
247
+ const start = indices[indices.length - 1]; // start index of polygon
248
+ data.push(data[start], data[start + 1]); // closePolygon
249
+ i += 2;
250
+ }
251
+ }
252
+ else {
253
+ throw new Error(`unknown command ${cmd}`);
254
+ }
255
+ }
256
+ return { data, indices };
257
+ }
258
+ }
259
+ function _toGeoJSONFeature(vtFeature, coords, transform) {
260
+ let type = VectorTileFeature.types[vtFeature.type];
261
+ let i;
262
+ let j;
263
+ let coordinates;
264
+ switch (vtFeature.type) {
265
+ case 1:
266
+ const points = [];
267
+ for (i = 0; i < coords.length; i++) {
268
+ points[i] = coords[i][0];
269
+ }
270
+ coordinates = points;
271
+ transform(coordinates, vtFeature.extent);
272
+ break;
273
+ case 2:
274
+ coordinates = coords;
275
+ for (i = 0; i < coordinates.length; i++) {
276
+ transform(coordinates[i], vtFeature.extent);
277
+ }
278
+ break;
279
+ case 3:
280
+ coordinates = classifyRings(coords);
281
+ for (i = 0; i < coordinates.length; i++) {
282
+ for (j = 0; j < coordinates[i].length; j++) {
283
+ transform(coordinates[i][j], vtFeature.extent);
284
+ }
285
+ }
286
+ break;
287
+ default:
288
+ throw new Error('illegal vector tile type');
289
+ }
290
+ if (coordinates.length === 1) {
291
+ // @ts-expect-error
292
+ coordinates = coordinates[0];
293
+ }
294
+ else {
295
+ type = `Multi${type}`;
296
+ }
297
+ const result = {
298
+ type: 'Feature',
299
+ geometry: {
300
+ type: type,
301
+ coordinates: coordinates
302
+ },
303
+ properties: vtFeature.properties
304
+ };
305
+ if (vtFeature.id !== null) {
306
+ result.properties ||= {};
307
+ result.properties.id = vtFeature.id;
308
+ }
309
+ return result;
310
+ }
311
+ // PBF READER UTILS
312
+ /**
313
+ *
314
+ * @param tag
315
+ * @param feature
316
+ * @param pbf
317
+ */
318
+ function readFeature(tag, feature, pbf) {
319
+ if (feature && pbf) {
320
+ if (tag === 1)
321
+ feature.id = pbf.readVarint();
322
+ else if (tag === 2)
323
+ readTag(pbf, feature);
324
+ else if (tag === 3)
325
+ feature.type = pbf.readVarint();
326
+ else if (tag === 4)
327
+ feature._geometry = pbf.pos;
328
+ }
329
+ }
330
+ /**
331
+ *
332
+ * @param pbf
333
+ * @param feature
334
+ */
335
+ function readTag(pbf, feature) {
336
+ const end = pbf.readVarint() + pbf.pos;
337
+ while (pbf.pos < end) {
338
+ const key = feature._keys[pbf.readVarint()];
339
+ const value = feature._values[pbf.readVarint()];
340
+ feature.properties[key] = value;
341
+ }
342
+ }
@@ -1,5 +1,6 @@
1
1
  import Protobuf from 'pbf';
2
2
  import { VectorTileFeature } from "./vector-tile-feature.js";
3
+ import { GeojsonGeometryInfo } from '@loaders.gl/schema';
3
4
  export declare class VectorTileLayer {
4
5
  version: number;
5
6
  name: string;
@@ -15,6 +16,14 @@ export declare class VectorTileLayer {
15
16
  * @param index
16
17
  * @returns feature
17
18
  */
18
- feature(i: number): VectorTileFeature;
19
+ getGeoJSONFeature(i: number): VectorTileFeature;
20
+ /**
21
+ * return binary feature `i` from this layer as a `VectorTileFeature`
22
+ *
23
+ * @param index
24
+ * @param geometryInfo
25
+ * @returns binary feature
26
+ */
27
+ getBinaryFeature(i: number, geometryInfo: GeojsonGeometryInfo): VectorTileFeature;
19
28
  }
20
29
  //# sourceMappingURL=vector-tile-layer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vector-tile-layer.d.ts","sourceRoot":"","sources":["../../../src/lib/vector-tile/vector-tile-layer.ts"],"names":[],"mappings":"AAOA,OAAO,QAAQ,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAC,iBAAiB,EAAC,iCAA8B;AACxD,OAAO,EAAC,mBAAmB,EAAC,MAAM,oBAAoB,CAAC;AAEvD,qBAAa,eAAe;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,EAAE,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC,EAAE,CAAC;IAC9C,SAAS,EAAE,MAAM,EAAE,CAAC;gBAER,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM;IAkBtC;;;;OAIG;IACH,iBAAiB,CAAC,CAAC,EAAE,MAAM,GAAG,iBAAiB;IAW/C;;;;;;OAMG;IACH,gBAAgB,CAAC,CAAC,EAAE,MAAM,EAAE,YAAY,EAAE,mBAAmB,GAAG,iBAAiB;CAiBlF"}
@@ -30,7 +30,7 @@ export class VectorTileLayer {
30
30
  * @param index
31
31
  * @returns feature
32
32
  */
33
- feature(i) {
33
+ getGeoJSONFeature(i) {
34
34
  if (i < 0 || i >= this._features.length) {
35
35
  throw new Error('feature index out of bounds');
36
36
  }
@@ -38,6 +38,21 @@ export class VectorTileLayer {
38
38
  const end = this._pbf.readVarint() + this._pbf.pos;
39
39
  return new VectorTileFeature(this._pbf, end, this.extent, this._keys, this._values);
40
40
  }
41
+ /**
42
+ * return binary feature `i` from this layer as a `VectorTileFeature`
43
+ *
44
+ * @param index
45
+ * @param geometryInfo
46
+ * @returns binary feature
47
+ */
48
+ getBinaryFeature(i, geometryInfo) {
49
+ if (i < 0 || i >= this._features.length) {
50
+ throw new Error('feature index out of bounds');
51
+ }
52
+ this._pbf.pos = this._features[i];
53
+ const end = this._pbf.readVarint() + this._pbf.pos;
54
+ return new VectorTileFeature(this._pbf, end, this.extent, this._keys, this._values, geometryInfo);
55
+ }
41
56
  }
42
57
  /**
43
58
  *
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vector-tile.d.ts","sourceRoot":"","sources":["../../../src/lib/vector-tile/vector-tile.ts"],"names":[],"mappings":"AAMA,OAAO,EAAC,eAAe,EAAC,+BAA4B;AACpD,OAAO,QAAQ,MAAM,KAAK,CAAC;AAE3B,qBAAa,UAAU;IACrB,MAAM,EAAE;QAAC,CAAC,CAAC,EAAE,MAAM,GAAG,eAAe,CAAA;KAAC,CAAC;gBAC3B,GAAG,EAAE,QAAQ,EAAE,GAAG,CAAC,EAAE,MAAM;CAGxC"}
@@ -1,4 +1,4 @@
1
- import type { GeoJSONTileFeature } from "./tile.js";
1
+ import type { TableTileFeature } from "./tile.js";
2
2
  /**
3
3
  * Clip features between two vertical or horizontal axis-parallel lines:
4
4
  * | |
@@ -10,7 +10,7 @@ import type { GeoJSONTileFeature } from "./tile.js";
10
10
  * @param axis: 0 for x, 1 for y
11
11
  * @param minAll and maxAll: minimum and maximum coordinate value for all features
12
12
  */
13
- export declare function clip(features: GeoJSONTileFeature[], scale: number, k1: number, k2: number, axis: any, minAll: number, maxAll: number, options: {
13
+ export declare function clip(features: TableTileFeature[], scale: number, k1: number, k2: number, axis: any, minAll: number, maxAll: number, options: {
14
14
  lineMetrics: boolean;
15
- }): GeoJSONTileFeature[] | null;
15
+ }): TableTileFeature[] | null;
16
16
  //# sourceMappingURL=clip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clip.d.ts","sourceRoot":"","sources":["../../../src/lib/vector-tiler/clip.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,gBAAgB,EAAC,kBAAe;AAK7C;;;;;;;;;;GAUG;AAEH,wBAAgB,IAAI,CAClB,QAAQ,EAAE,gBAAgB,EAAE,EAC5B,KAAK,EAAE,MAAM,EACb,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,IAAI,KAAA,EACJ,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE;IAAC,WAAW,EAAE,OAAO,CAAA;CAAC,GAC9B,gBAAgB,EAAE,GAAG,IAAI,CA4E3B"}
@@ -0,0 +1,18 @@
1
+ import type { Feature, FeatureCollection } from '@loaders.gl/schema';
2
+ import type { TableTileFeature } from "./tile.js";
3
+ /**
4
+ * converts a GeoJSON feature into an intermediate projected JSON vector format
5
+ * with simplification data
6
+ */
7
+ export declare function convert(data: Feature | FeatureCollection, options: any): TableTileFeature[];
8
+ export type ConvertFeatureOptions = {
9
+ /** max zoom to preserve detail on */
10
+ maxZoom?: number;
11
+ /** simplification tolerance (higher means simpler) */
12
+ tolerance?: number;
13
+ /** tile extent */
14
+ extent?: number;
15
+ /** whether to calculate line metrics */
16
+ lineMetrics?: boolean;
17
+ };
18
+ //# sourceMappingURL=convert.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convert.d.ts","sourceRoot":"","sources":["../../../src/lib/vector-tiler/convert.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAC,OAAO,EAAE,iBAAiB,EAAC,MAAM,oBAAoB,CAAC;AACnE,OAAO,KAAK,EAAC,gBAAgB,EAAC,kBAAe;AAK7C;;;GAGG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,OAAO,GAAG,iBAAiB,EAAE,OAAO,KAAA,GAAG,gBAAgB,EAAE,CActF;AAED,MAAM,MAAM,qBAAqB,GAAG;IAClC,qCAAqC;IACrC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sDAAsD;IACtD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,wCAAwC;IACxC,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC"}
@@ -4,7 +4,10 @@
4
4
  // Forked from https://github.com/mapbox/geojson-vt under compatible ISC license
5
5
  import { simplify } from "./simplify.js";
6
6
  import { createFeature } from "./feature.js";
7
- // converts GeoJSON feature into an intermediate projected JSON vector format with simplification data
7
+ /**
8
+ * converts a GeoJSON feature into an intermediate projected JSON vector format
9
+ * with simplification data
10
+ */
8
11
  export function convert(data, options) {
9
12
  const features = [];
10
13
  if (data.type === 'FeatureCollection') {
@@ -21,6 +24,10 @@ export function convert(data, options) {
21
24
  }
22
25
  return features;
23
26
  }
27
+ /**
28
+ * converts a GeoJSON feature into an intermediate projected JSON vector format
29
+ * with simplification data
30
+ */
24
31
  function convertFeature(features, geojson, options, index) {
25
32
  if (!geojson.geometry) {
26
33
  return;
@@ -0,0 +1,3 @@
1
+ import { TableTileFeature } from "./tile.js";
2
+ export declare function createFeature(id: any, type: any, geom: any, tags: any): TableTileFeature;
3
+ //# sourceMappingURL=feature.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feature.d.ts","sourceRoot":"","sources":["../../../src/lib/vector-tiler/feature.ts"],"names":[],"mappings":"AAKA,OAAO,EAAC,gBAAgB,EAAC,kBAAe;AAExC,wBAAgB,aAAa,CAAC,EAAE,KAAA,EAAE,IAAI,KAAA,EAAE,IAAI,KAAA,EAAE,IAAI,KAAA,GAAG,gBAAgB,CA8BpE"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"simplify.d.ts","sourceRoot":"","sources":["../../../src/lib/vector-tiler/simplify.ts"],"names":[],"mappings":"AAKA;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI,CAkCjG"}
@@ -1,4 +1,4 @@
1
- export type GeoJSONTileFeature = {
1
+ export type TableTileFeature = {
2
2
  type: any;
3
3
  geometry: any;
4
4
  id?: string;
@@ -8,8 +8,8 @@ export type GeoJSONTileFeature = {
8
8
  minY: number;
9
9
  maxY: number;
10
10
  };
11
- export type GeoJSONTile = {
12
- features: GeoJSONTileFeature[];
11
+ export type TableTile = {
12
+ features: TableTileFeature[];
13
13
  type?: number;
14
14
  tags?: Record<string, string>;
15
15
  x: number;
@@ -34,5 +34,5 @@ export type CreateTileOptions = {
34
34
  /**
35
35
  * Create a tile from features and tile index
36
36
  */
37
- export declare function createTile(features: any[], z: any, tx: any, ty: any, options: CreateTileOptions): GeoJSONTile;
37
+ export declare function createTile(features: any[], z: any, tx: any, ty: any, options: CreateTileOptions): TableTile;
38
38
  //# sourceMappingURL=tile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tile.d.ts","sourceRoot":"","sources":["../../../src/lib/vector-tiler/tile.ts"],"names":[],"mappings":"AAOA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,GAAG,CAAC;IACV,QAAQ,EAAE,GAAG,CAAC;IAGd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAGhB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,QAAQ,EAAE,gBAAgB,EAAE,CAAC;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAG9B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IAGV,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IAEb,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,GAAG,GAAG,IAAI,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF;;GAEG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE,CAAC,KAAA,EAAE,EAAE,KAAA,EAAE,EAAE,KAAA,EAAE,OAAO,EAAE,iBAAiB,GAAG,SAAS,CAqB5F"}
@@ -0,0 +1,7 @@
1
+ import type { TableTile } from "./tile.js";
2
+ /**
3
+ * Transforms the coordinates of each feature in the given tile from
4
+ * mercator-projected space into (extent x extent) tile space.
5
+ */
6
+ export declare function transformTile(tile: TableTile, extent: number): TableTile;
7
+ //# sourceMappingURL=transform.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../../../src/lib/vector-tiler/transform.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,SAAS,EAAC,kBAAe;AAEtC;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,SAAS,CAiCxE"}
@@ -1,4 +1,4 @@
1
- import type { GeoJSONTileFeature } from "./tile.js";
1
+ import type { TableTileFeature } from "./tile.js";
2
2
  /**
3
3
  * Options for wrap()
4
4
  */
@@ -13,5 +13,5 @@ export type WrapOptions = {
13
13
  * @param options buffer and extent
14
14
  * @returns
15
15
  */
16
- export declare function wrap(features: GeoJSONTileFeature[], options: WrapOptions): GeoJSONTileFeature[];
16
+ export declare function wrap(features: TableTileFeature[], options: WrapOptions): TableTileFeature[];
17
17
  //# sourceMappingURL=wrap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wrap.d.ts","sourceRoot":"","sources":["../../../src/lib/vector-tiler/wrap.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,gBAAgB,EAAC,kBAAe;AAI7C;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,MAAM,EAAE,MAAM,CAAC,8CAA8C,CAAC;IAC9D,MAAM,EAAE,MAAM,CAAC,0BAA0B,CAAC;IAC1C,WAAW,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,IAAI,CAAC,QAAQ,EAAE,gBAAgB,EAAE,EAAE,OAAO,EAAE,WAAW,sBAkBtE"}
@@ -1,14 +1,25 @@
1
1
  import type { LoaderOptions } from '@loaders.gl/loader-utils';
2
2
  import { parseMVT } from "./lib/parse-mvt.js";
3
- import type { MVTOptions } from "./lib/types.js";
4
3
  export type MVTLoaderOptions = LoaderOptions & {
5
- mvt?: MVTOptions & {
4
+ mvt?: {
5
+ /** Shape of returned data */
6
+ shape?: 'geojson-table' | 'columnar-table' | 'geojson' | 'binary' | 'binary-geometry';
7
+ /** `wgs84`: coordinates in long, lat (`tileIndex` must be provided. `local` coordinates are `0-1` from tile origin */
8
+ coordinates?: 'wgs84' | 'local';
9
+ /** An object containing tile index values (`x`, `y`, `z`) to reproject features' coordinates into WGS84. Mandatory with `wgs84` coordinates option. */
10
+ tileIndex?: {
11
+ x: number;
12
+ y: number;
13
+ z: number;
14
+ };
15
+ /** If provided, stored the layer name of each feature is added to `feature.properties[layerProperty]`. */
16
+ layerProperty?: string | number;
17
+ /** layer filter. If provided, only features belonging to the named layers will be included, otherwise features from all layers are returned. */
18
+ layers?: string[];
6
19
  /** Override the URL to the worker bundle (by default loads from unpkg.com) */
7
20
  workerUrl?: string;
8
21
  };
9
22
  gis?: {
10
- /** `true`: parser will output the data in binary format. Equivalent to loading the data as GeoJSON and then applying geojsonToBinary */
11
- binary?: boolean;
12
23
  /** @deprecated. Use options.mvt.shape */
13
24
  format?: 'geojson-table' | 'columnar-table' | 'geojson' | 'binary' | 'binary-geometry';
14
25
  };
@@ -32,8 +43,8 @@ export declare const MVTWorkerLoader: {
32
43
  readonly shape: "geojson";
33
44
  readonly coordinates: "local";
34
45
  readonly layerProperty: "layerName";
35
- readonly layers: undefined;
36
- readonly tileIndex: null;
46
+ readonly layers: never;
47
+ readonly tileIndex: never;
37
48
  };
38
49
  };
39
50
  };
@@ -62,8 +73,8 @@ export declare const MVTLoader: {
62
73
  readonly shape: "geojson";
63
74
  readonly coordinates: "local";
64
75
  readonly layerProperty: "layerName";
65
- readonly layers: undefined;
66
- readonly tileIndex: null;
76
+ readonly layers: never;
77
+ readonly tileIndex: never;
67
78
  };
68
79
  };
69
80
  };
@@ -1 +1 @@
1
- {"version":3,"file":"mvt-loader.d.ts","sourceRoot":"","sources":["../src/mvt-loader.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAA2B,aAAa,EAAC,MAAM,0BAA0B,CAAC;AACtF,OAAO,EAAC,QAAQ,EAAC,2BAAwB;AACzC,OAAO,KAAK,EAAC,UAAU,EAAC,uBAAoB;AAM5C,MAAM,MAAM,gBAAgB,GAAG,aAAa,GAAG;IAC7C,GAAG,CAA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CAAyC;QACzC,MAAM,CAAC,EAAE,eAAe,GAAG,gBAAgB,GAAG,SAAS,GAAG,QAAQ,GAAG,iBAAiB,CAAC;KACxF,CAAC;CACH,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;CA+B3B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS;yDAEiB,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;CAOtD,CAAC"}
@@ -1,10 +1,11 @@
1
1
  // loaders.gl
2
2
  // SPDX-License-Identifier: MIT
3
3
  // Copyright vis.gl contributors
4
+ // import type {MVTOptions} from './lib/types';
4
5
  import { parseMVT } from "./lib/parse-mvt.js";
5
6
  // __VERSION__ is injected by babel-plugin-version-inline
6
7
  // @ts-ignore TS2304: Cannot find name '__VERSION__'.
7
- const VERSION = typeof "4.2.0" !== 'undefined' ? "4.2.0" : 'latest';
8
+ const VERSION = typeof "4.3.0-alpha.1" !== 'undefined' ? "4.3.0-alpha.1" : 'latest';
8
9
  /**
9
10
  * Worker loader for the Mapbox Vector Tile format
10
11
  */
@@ -31,7 +32,7 @@ export const MVTWorkerLoader = {
31
32
  coordinates: 'local',
32
33
  layerProperty: 'layerName',
33
34
  layers: undefined,
34
- tileIndex: null
35
+ tileIndex: undefined
35
36
  }
36
37
  }
37
38
  };
@@ -1,9 +1,9 @@
1
- import type { GetTileParameters, ImageType, DataSourceProps } from '@loaders.gl/loader-utils';
1
+ import type { ImageType, DataSourceProps } from '@loaders.gl/loader-utils';
2
2
  import type { ImageTileSource, VectorTileSource } from '@loaders.gl/loader-utils';
3
+ import type { GetTileParameters, GetTileDataParameters } from '@loaders.gl/loader-utils';
3
4
  import { DataSource } from '@loaders.gl/loader-utils';
4
5
  import { ImageLoaderOptions } from '@loaders.gl/images';
5
6
  import { MVTLoaderOptions, TileJSON, TileJSONLoaderOptions } from '@loaders.gl/mvt';
6
- import { TileLoadParameters } from '@loaders.gl/loader-utils';
7
7
  /** Properties for a Mapbox Vector Tile Source */
8
8
  export type MVTSourceProps = DataSourceProps & {
9
9
  /** Root url of tileset */
@@ -36,8 +36,8 @@ export declare class MVTSource extends DataSource implements ImageTileSource, Ve
36
36
  constructor(props: MVTSourceProps);
37
37
  getMetadata(): Promise<TileJSON | null>;
38
38
  getTileMIMEType(): string | null;
39
- getTile(tileParams: GetTileParameters): Promise<ArrayBuffer | null>;
40
- getTileData(tileParams: TileLoadParameters): Promise<unknown | null>;
39
+ getTile(parameters: GetTileParameters): Promise<ArrayBuffer | null>;
40
+ getTileData(parameters: GetTileDataParameters): Promise<any>;
41
41
  getImageTile(tileParams: GetTileParameters): Promise<ImageType | null>;
42
42
  protected _parseImageTile(arrayBuffer: ArrayBuffer): Promise<ImageType>;
43
43
  getVectorTile(tileParams: GetTileParameters): Promise<unknown | null>;
@@ -1 +1 @@
1
- {"version":3,"file":"mvt-source.d.ts","sourceRoot":"","sources":["../src/mvt-source.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,iBAAiB,EAAE,SAAS,EAAE,eAAe,EAAC,MAAM,0BAA0B,CAAC;AAC5F,OAAO,KAAK,EAAC,eAAe,EAAE,gBAAgB,EAAC,MAAM,0BAA0B,CAAC;AAChF,OAAO,EAAC,UAAU,EAAc,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAc,kBAAkB,EAAyB,MAAM,oBAAoB,CAAC;AAC3F,OAAO,EAEL,gBAAgB,EAEhB,QAAQ,EACR,qBAAqB,EACtB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAC,kBAAkB,EAAC,MAAM,0BAA0B,CAAC;AAE5D,iDAAiD;AACjD,MAAM,MAAM,cAAc,GAAG,eAAe,GAAG;IAC7C,0BAA0B;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,2EAA2E;IAC3E,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,oDAAoD;IACpD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mFAAmF;I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