@loaders.gl/tiles 5.0.0-alpha.12 → 5.0.0-alpha.13

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 (716) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +18 -72
  3. package/dist/dist.dev.js +6979 -42928
  4. package/dist/dist.min.js +3 -22
  5. package/dist/image-set.d.ts +1 -1
  6. package/dist/image-set.d.ts.map +1 -1
  7. package/dist/index.cjs +2847 -8781
  8. package/dist/index.cjs.map +3 -4
  9. package/dist/index.d.ts +4 -45
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +3 -27
  12. package/dist/index.js.map +1 -1
  13. package/dist/mlt/bundled.d.ts +3 -0
  14. package/dist/mlt/bundled.d.ts.map +1 -0
  15. package/dist/mlt/bundled.js +5 -0
  16. package/dist/mlt/bundled.js.map +1 -0
  17. package/dist/mlt/index.cjs +3701 -0
  18. package/dist/mlt/index.cjs.map +6 -0
  19. package/dist/mlt/index.d.ts +10 -0
  20. package/dist/mlt/index.d.ts.map +1 -0
  21. package/dist/mlt/index.js +12 -0
  22. package/dist/mlt/index.js.map +1 -0
  23. package/dist/mlt/lib/encode-mlt-geometry.d.ts +6 -0
  24. package/dist/mlt/lib/encode-mlt-geometry.d.ts.map +1 -0
  25. package/dist/mlt/lib/encode-mlt-geometry.js +150 -0
  26. package/dist/mlt/lib/encode-mlt-geometry.js.map +1 -0
  27. package/dist/mlt/lib/encode-mlt-streams.d.ts +13 -0
  28. package/dist/mlt/lib/encode-mlt-streams.d.ts.map +1 -0
  29. package/dist/mlt/lib/encode-mlt-streams.js +57 -0
  30. package/dist/mlt/lib/encode-mlt-streams.js.map +1 -0
  31. package/dist/mlt/lib/encode-mlt.d.ts +6 -0
  32. package/dist/mlt/lib/encode-mlt.d.ts.map +1 -0
  33. package/dist/mlt/lib/encode-mlt.js +174 -0
  34. package/dist/mlt/lib/encode-mlt.js.map +1 -0
  35. package/dist/mlt/lib/parse-mlt.d.ts +11 -0
  36. package/dist/mlt/lib/parse-mlt.d.ts.map +1 -0
  37. package/dist/mlt/lib/parse-mlt.js +675 -0
  38. package/dist/mlt/lib/parse-mlt.js.map +1 -0
  39. package/dist/mlt/mlt-format.d.ts +14 -0
  40. package/dist/mlt/mlt-format.d.ts.map +1 -0
  41. package/dist/mlt/mlt-format.js +17 -0
  42. package/dist/mlt/mlt-format.js.map +1 -0
  43. package/dist/mlt/mlt-loader-with-parser.d.ts +91 -0
  44. package/dist/mlt/mlt-loader-with-parser.d.ts.map +1 -0
  45. package/dist/mlt/mlt-loader-with-parser.js +29 -0
  46. package/dist/mlt/mlt-loader-with-parser.js.map +1 -0
  47. package/dist/mlt/mlt-loader.d.ts +115 -0
  48. package/dist/mlt/mlt-loader.d.ts.map +1 -0
  49. package/dist/mlt/mlt-loader.js +38 -0
  50. package/dist/mlt/mlt-loader.js.map +1 -0
  51. package/dist/mlt/mlt-source-loader.d.ts +82 -0
  52. package/dist/mlt/mlt-source-loader.d.ts.map +1 -0
  53. package/dist/mlt/mlt-source-loader.js +179 -0
  54. package/dist/mlt/mlt-source-loader.js.map +1 -0
  55. package/dist/mlt/mlt-writer.d.ts +45 -0
  56. package/dist/mlt/mlt-writer.d.ts.map +1 -0
  57. package/dist/mlt/mlt-writer.js +21 -0
  58. package/dist/mlt/mlt-writer.js.map +1 -0
  59. package/dist/mlt/unbundled.d.ts +3 -0
  60. package/dist/mlt/unbundled.d.ts.map +1 -0
  61. package/dist/mlt/unbundled.js +5 -0
  62. package/dist/mlt/unbundled.js.map +1 -0
  63. package/dist/mvt/arrow-table-tile-source-loader-types.d.ts +36 -0
  64. package/dist/mvt/arrow-table-tile-source-loader-types.d.ts.map +1 -0
  65. package/dist/mvt/arrow-table-tile-source-loader-types.js +36 -0
  66. package/dist/mvt/arrow-table-tile-source-loader-types.js.map +1 -0
  67. package/dist/mvt/arrow-table-tile-source-loader.cjs +6343 -0
  68. package/dist/mvt/arrow-table-tile-source-loader.cjs.map +6 -0
  69. package/dist/mvt/arrow-table-tile-source-loader.d.ts +69 -0
  70. package/dist/mvt/arrow-table-tile-source-loader.d.ts.map +1 -0
  71. package/dist/mvt/arrow-table-tile-source-loader.js +216 -0
  72. package/dist/mvt/arrow-table-tile-source-loader.js.map +1 -0
  73. package/dist/mvt/arrow-table-tile-source-types.d.ts +21 -0
  74. package/dist/mvt/arrow-table-tile-source-types.d.ts.map +1 -0
  75. package/dist/mvt/arrow-table-tile-source-types.js +6 -0
  76. package/dist/mvt/arrow-table-tile-source-types.js.map +1 -0
  77. package/dist/mvt/bundled.d.ts +6 -0
  78. package/dist/mvt/bundled.d.ts.map +1 -0
  79. package/dist/mvt/bundled.js +7 -0
  80. package/dist/mvt/bundled.js.map +1 -0
  81. package/dist/mvt/dist.dev.js +46689 -0
  82. package/dist/mvt/dist.min.js +94 -0
  83. package/dist/mvt/index.cjs +10095 -0
  84. package/dist/mvt/index.cjs.map +6 -0
  85. package/dist/mvt/index.d.ts +28 -0
  86. package/dist/mvt/index.d.ts.map +1 -0
  87. package/dist/mvt/index.js +27 -0
  88. package/dist/mvt/index.js.map +1 -0
  89. package/dist/mvt/lib/encode-mvt-arrow.d.ts +6 -0
  90. package/dist/mvt/lib/encode-mvt-arrow.d.ts.map +1 -0
  91. package/dist/mvt/lib/encode-mvt-arrow.js +225 -0
  92. package/dist/mvt/lib/encode-mvt-arrow.js.map +1 -0
  93. package/dist/mvt/lib/encode-mvt.d.ts +30 -0
  94. package/dist/mvt/lib/encode-mvt.d.ts.map +1 -0
  95. package/dist/mvt/lib/encode-mvt.js +20 -0
  96. package/dist/mvt/lib/encode-mvt.js.map +1 -0
  97. package/dist/mvt/lib/get-schemas-from-tilejson.d.ts +4 -0
  98. package/dist/mvt/lib/get-schemas-from-tilejson.d.ts.map +1 -0
  99. package/dist/mvt/lib/get-schemas-from-tilejson.js +56 -0
  100. package/dist/mvt/lib/get-schemas-from-tilejson.js.map +1 -0
  101. package/dist/mvt/lib/is-longitude-latitude-crs.d.ts +3 -0
  102. package/dist/mvt/lib/is-longitude-latitude-crs.d.ts.map +1 -0
  103. package/dist/mvt/lib/is-longitude-latitude-crs.js +13 -0
  104. package/dist/mvt/lib/is-longitude-latitude-crs.js.map +1 -0
  105. package/dist/mvt/lib/mapbox-vt-pbf/geojson-wrapper.d.ts +25 -0
  106. package/dist/mvt/lib/mapbox-vt-pbf/geojson-wrapper.d.ts.map +1 -0
  107. package/dist/mvt/lib/mapbox-vt-pbf/geojson-wrapper.js +73 -0
  108. package/dist/mvt/lib/mapbox-vt-pbf/geojson-wrapper.js.map +1 -0
  109. package/dist/mvt/lib/mapbox-vt-pbf/to-vector-tile.d.ts +52 -0
  110. package/dist/mvt/lib/mapbox-vt-pbf/to-vector-tile.d.ts.map +1 -0
  111. package/dist/mvt/lib/mapbox-vt-pbf/to-vector-tile.js +165 -0
  112. package/dist/mvt/lib/mapbox-vt-pbf/to-vector-tile.js.map +1 -0
  113. package/dist/mvt/lib/mvt-pbf/mvt-constants.d.ts +116 -0
  114. package/dist/mvt/lib/mvt-pbf/mvt-constants.d.ts.map +1 -0
  115. package/dist/mvt/lib/mvt-pbf/mvt-constants.js +127 -0
  116. package/dist/mvt/lib/mvt-pbf/mvt-constants.js.map +1 -0
  117. package/dist/mvt/lib/mvt-pbf/mvt-types.d.ts +17 -0
  118. package/dist/mvt/lib/mvt-pbf/mvt-types.d.ts.map +1 -0
  119. package/dist/mvt/lib/mvt-pbf/mvt-types.js +5 -0
  120. package/dist/mvt/lib/mvt-pbf/mvt-types.js.map +1 -0
  121. package/dist/mvt/lib/mvt-pbf/parse-geometry-from-pbf.d.ts +77 -0
  122. package/dist/mvt/lib/mvt-pbf/parse-geometry-from-pbf.d.ts.map +1 -0
  123. package/dist/mvt/lib/mvt-pbf/parse-geometry-from-pbf.js +235 -0
  124. package/dist/mvt/lib/mvt-pbf/parse-geometry-from-pbf.js.map +1 -0
  125. package/dist/mvt/lib/mvt-pbf/parse-mvt-from-pbf.d.ts +25 -0
  126. package/dist/mvt/lib/mvt-pbf/parse-mvt-from-pbf.d.ts.map +1 -0
  127. package/dist/mvt/lib/mvt-pbf/parse-mvt-from-pbf.js +263 -0
  128. package/dist/mvt/lib/mvt-pbf/parse-mvt-from-pbf.js.map +1 -0
  129. package/dist/mvt/lib/mvt-pbf/write-mvt-to-pbf.d.ts +4 -0
  130. package/dist/mvt/lib/mvt-pbf/write-mvt-to-pbf.d.ts.map +1 -0
  131. package/dist/mvt/lib/mvt-pbf/write-mvt-to-pbf.js +134 -0
  132. package/dist/mvt/lib/mvt-pbf/write-mvt-to-pbf.js.map +1 -0
  133. package/dist/mvt/lib/mvt-worker-transport.d.ts +15 -0
  134. package/dist/mvt/lib/mvt-worker-transport.d.ts.map +1 -0
  135. package/dist/mvt/lib/mvt-worker-transport.js +54 -0
  136. package/dist/mvt/lib/mvt-worker-transport.js.map +1 -0
  137. package/dist/mvt/lib/parse-mvt-geojson.d.ts +6 -0
  138. package/dist/mvt/lib/parse-mvt-geojson.d.ts.map +1 -0
  139. package/dist/mvt/lib/parse-mvt-geojson.js +48 -0
  140. package/dist/mvt/lib/parse-mvt-geojson.js.map +1 -0
  141. package/dist/mvt/lib/parse-mvt.d.ts +14 -0
  142. package/dist/mvt/lib/parse-mvt.d.ts.map +1 -0
  143. package/dist/mvt/lib/parse-mvt.js +105 -0
  144. package/dist/mvt/lib/parse-mvt.js.map +1 -0
  145. package/dist/mvt/lib/parse-tilejson.d.ts +74 -0
  146. package/dist/mvt/lib/parse-tilejson.d.ts.map +1 -0
  147. package/dist/mvt/lib/parse-tilejson.js +267 -0
  148. package/dist/mvt/lib/parse-tilejson.js.map +1 -0
  149. package/dist/mvt/lib/resolve-table-tile-parameters.d.ts +4 -0
  150. package/dist/mvt/lib/resolve-table-tile-parameters.d.ts.map +1 -0
  151. package/dist/mvt/lib/resolve-table-tile-parameters.js +16 -0
  152. package/dist/mvt/lib/resolve-table-tile-parameters.js.map +1 -0
  153. package/dist/mvt/lib/types.d.ts +88 -0
  154. package/dist/mvt/lib/types.d.ts.map +1 -0
  155. package/dist/mvt/lib/types.js.map +1 -0
  156. package/dist/mvt/lib/utils/geometry-utils.d.ts +83 -0
  157. package/dist/mvt/lib/utils/geometry-utils.d.ts.map +1 -0
  158. package/dist/mvt/lib/utils/geometry-utils.js +211 -0
  159. package/dist/mvt/lib/utils/geometry-utils.js.map +1 -0
  160. package/dist/mvt/lib/vector-tile/vector-tile-feature.d.ts +72 -0
  161. package/dist/mvt/lib/vector-tile/vector-tile-feature.d.ts.map +1 -0
  162. package/dist/mvt/lib/vector-tile/vector-tile-feature.js +350 -0
  163. package/dist/mvt/lib/vector-tile/vector-tile-feature.js.map +1 -0
  164. package/dist/mvt/lib/vector-tile/vector-tile-layer.d.ts +29 -0
  165. package/dist/mvt/lib/vector-tile/vector-tile-layer.d.ts.map +1 -0
  166. package/dist/mvt/lib/vector-tile/vector-tile-layer.js +108 -0
  167. package/dist/mvt/lib/vector-tile/vector-tile-layer.js.map +1 -0
  168. package/dist/mvt/lib/vector-tile/vector-tile.d.ts +9 -0
  169. package/dist/mvt/lib/vector-tile/vector-tile.d.ts.map +1 -0
  170. package/dist/mvt/lib/vector-tile/vector-tile.js +28 -0
  171. package/dist/mvt/lib/vector-tile/vector-tile.js.map +1 -0
  172. package/dist/mvt/lib/vector-tiler/arrow-tile.d.ts +6 -0
  173. package/dist/mvt/lib/vector-tiler/arrow-tile.d.ts.map +1 -0
  174. package/dist/mvt/lib/vector-tiler/arrow-tile.js +84 -0
  175. package/dist/mvt/lib/vector-tiler/arrow-tile.js.map +1 -0
  176. package/dist/mvt/lib/vector-tiler/features/clip-features.d.ts +16 -0
  177. package/dist/mvt/lib/vector-tiler/features/clip-features.d.ts.map +1 -0
  178. package/dist/mvt/lib/vector-tiler/features/clip-features.js +211 -0
  179. package/dist/mvt/lib/vector-tiler/features/clip-features.js.map +1 -0
  180. package/dist/mvt/lib/vector-tiler/features/convert-feature.d.ts +18 -0
  181. package/dist/mvt/lib/vector-tiler/features/convert-feature.d.ts.map +1 -0
  182. package/dist/mvt/lib/vector-tiler/features/convert-feature.js +161 -0
  183. package/dist/mvt/lib/vector-tiler/features/convert-feature.js.map +1 -0
  184. package/dist/mvt/lib/vector-tiler/features/proto-feature.d.ts +30 -0
  185. package/dist/mvt/lib/vector-tiler/features/proto-feature.d.ts.map +1 -0
  186. package/dist/mvt/lib/vector-tiler/features/proto-feature.js +53 -0
  187. package/dist/mvt/lib/vector-tiler/features/proto-feature.js.map +1 -0
  188. package/dist/mvt/lib/vector-tiler/features/simplify-path.d.ts +10 -0
  189. package/dist/mvt/lib/vector-tiler/features/simplify-path.d.ts.map +1 -0
  190. package/dist/mvt/lib/vector-tiler/features/simplify-path.js +67 -0
  191. package/dist/mvt/lib/vector-tiler/features/simplify-path.js.map +1 -0
  192. package/dist/mvt/lib/vector-tiler/features/wrap-features.d.ts +17 -0
  193. package/dist/mvt/lib/vector-tiler/features/wrap-features.d.ts.map +1 -0
  194. package/dist/mvt/lib/vector-tiler/features/wrap-features.js +95 -0
  195. package/dist/mvt/lib/vector-tiler/features/wrap-features.js.map +1 -0
  196. package/dist/mvt/lib/vector-tiler/proto-tile.d.ts +40 -0
  197. package/dist/mvt/lib/vector-tiler/proto-tile.d.ts.map +1 -0
  198. package/dist/mvt/lib/vector-tiler/proto-tile.js +139 -0
  199. package/dist/mvt/lib/vector-tiler/proto-tile.js.map +1 -0
  200. package/dist/mvt/lib/vector-tiler/tile-to-geojson.d.ts +12 -0
  201. package/dist/mvt/lib/vector-tiler/tile-to-geojson.d.ts.map +1 -0
  202. package/dist/mvt/lib/vector-tiler/tile-to-geojson.js +81 -0
  203. package/dist/mvt/lib/vector-tiler/tile-to-geojson.js.map +1 -0
  204. package/dist/mvt/lib/vector-tiler/transform-tile.d.ts +7 -0
  205. package/dist/mvt/lib/vector-tiler/transform-tile.d.ts.map +1 -0
  206. package/dist/mvt/lib/vector-tiler/transform-tile.js +42 -0
  207. package/dist/mvt/lib/vector-tiler/transform-tile.js.map +1 -0
  208. package/dist/mvt/map-style-format.d.ts +13 -0
  209. package/dist/mvt/map-style-format.d.ts.map +1 -0
  210. package/dist/mvt/map-style-format.js +16 -0
  211. package/dist/mvt/map-style-format.js.map +1 -0
  212. package/dist/mvt/map-style-loader-with-parser.d.ts +26 -0
  213. package/dist/mvt/map-style-loader-with-parser.d.ts.map +1 -0
  214. package/dist/mvt/map-style-loader-with-parser.js +38 -0
  215. package/dist/mvt/map-style-loader-with-parser.js.map +1 -0
  216. package/dist/mvt/map-style-loader.d.ts +44 -0
  217. package/dist/mvt/map-style-loader.d.ts.map +1 -0
  218. package/dist/mvt/map-style-loader.js +25 -0
  219. package/dist/mvt/map-style-loader.js.map +1 -0
  220. package/dist/mvt/map-style-schema.d.ts +58 -0
  221. package/dist/mvt/map-style-schema.d.ts.map +1 -0
  222. package/dist/mvt/map-style-schema.js +47 -0
  223. package/dist/mvt/map-style-schema.js.map +1 -0
  224. package/dist/mvt/map-style.d.ts +110 -0
  225. package/dist/mvt/map-style.d.ts.map +1 -0
  226. package/dist/mvt/map-style.js +90 -0
  227. package/dist/mvt/map-style.js.map +1 -0
  228. package/dist/mvt/mvt-format.d.ts +14 -0
  229. package/dist/mvt/mvt-format.d.ts.map +1 -0
  230. package/dist/mvt/mvt-format.js +23 -0
  231. package/dist/mvt/mvt-format.js.map +1 -0
  232. package/dist/mvt/mvt-geojson-loader-types.d.ts +82 -0
  233. package/dist/mvt/mvt-geojson-loader-types.d.ts.map +1 -0
  234. package/dist/mvt/mvt-geojson-loader-types.js +34 -0
  235. package/dist/mvt/mvt-geojson-loader-types.js.map +1 -0
  236. package/dist/mvt/mvt-geojson-loader.cjs +1366 -0
  237. package/dist/mvt/mvt-geojson-loader.cjs.map +6 -0
  238. package/dist/mvt/mvt-geojson-loader.d.ts +32 -0
  239. package/dist/mvt/mvt-geojson-loader.d.ts.map +1 -0
  240. package/dist/mvt/mvt-geojson-loader.js +13 -0
  241. package/dist/mvt/mvt-geojson-loader.js.map +1 -0
  242. package/dist/mvt/mvt-loader-with-parser.d.ts +105 -0
  243. package/dist/mvt/mvt-loader-with-parser.d.ts.map +1 -0
  244. package/dist/mvt/mvt-loader-with-parser.js +21 -0
  245. package/dist/mvt/mvt-loader-with-parser.js.map +1 -0
  246. package/dist/mvt/mvt-loader.d.ts +129 -0
  247. package/dist/mvt/mvt-loader.d.ts.map +1 -0
  248. package/dist/mvt/mvt-loader.js +40 -0
  249. package/dist/mvt/mvt-loader.js.map +1 -0
  250. package/dist/mvt/mvt-source-loader.d.ts +102 -0
  251. package/dist/mvt/mvt-source-loader.d.ts.map +1 -0
  252. package/dist/mvt/mvt-source-loader.js +275 -0
  253. package/dist/mvt/mvt-source-loader.js.map +1 -0
  254. package/dist/mvt/mvt-writer.d.ts +28 -0
  255. package/dist/mvt/mvt-writer.d.ts.map +1 -0
  256. package/dist/mvt/mvt-writer.js +32 -0
  257. package/dist/mvt/mvt-writer.js.map +1 -0
  258. package/dist/mvt/table-tile-source-loader.d.ts +169 -0
  259. package/dist/mvt/table-tile-source-loader.d.ts.map +1 -0
  260. package/dist/mvt/table-tile-source-loader.js +478 -0
  261. package/dist/mvt/table-tile-source-loader.js.map +1 -0
  262. package/dist/mvt/tilejson-format.d.ts +13 -0
  263. package/dist/mvt/tilejson-format.d.ts.map +1 -0
  264. package/dist/mvt/tilejson-format.js +16 -0
  265. package/dist/mvt/tilejson-format.js.map +1 -0
  266. package/dist/mvt/tilejson-loader-with-parser.d.ts +13 -0
  267. package/dist/mvt/tilejson-loader-with-parser.d.ts.map +1 -0
  268. package/dist/mvt/tilejson-loader-with-parser.js +25 -0
  269. package/dist/mvt/tilejson-loader-with-parser.js.map +1 -0
  270. package/dist/mvt/tilejson-loader.d.ts +56 -0
  271. package/dist/mvt/tilejson-loader.d.ts.map +1 -0
  272. package/dist/mvt/tilejson-loader.js +28 -0
  273. package/dist/mvt/tilejson-loader.js.map +1 -0
  274. package/dist/mvt/tilejson-zod-schema.cjs +79 -0
  275. package/dist/mvt/tilejson-zod-schema.cjs.map +6 -0
  276. package/dist/mvt/tilejson-zod-schema.d.ts +218 -0
  277. package/dist/mvt/tilejson-zod-schema.d.ts.map +1 -0
  278. package/dist/mvt/tilejson-zod-schema.js +68 -0
  279. package/dist/mvt/tilejson-zod-schema.js.map +1 -0
  280. package/dist/mvt/tilejson.schema.json +197 -0
  281. package/dist/mvt/unbundled.d.ts +8 -0
  282. package/dist/mvt/unbundled.d.ts.map +1 -0
  283. package/dist/mvt/unbundled.js +8 -0
  284. package/dist/mvt/unbundled.js.map +1 -0
  285. package/dist/mvt/workers/mvt-worker-node.d.ts +2 -0
  286. package/dist/mvt/workers/mvt-worker-node.d.ts.map +1 -0
  287. package/dist/mvt/workers/mvt-worker-node.js +8 -0
  288. package/dist/mvt/workers/mvt-worker-node.js.map +1 -0
  289. package/dist/mvt/workers/mvt-worker.d.ts +2 -0
  290. package/dist/mvt/workers/mvt-worker.d.ts.map +1 -0
  291. package/dist/mvt/workers/mvt-worker.js +7 -0
  292. package/dist/mvt/workers/mvt-worker.js.map +1 -0
  293. package/dist/mvt-worker-node.js +72460 -0
  294. package/dist/mvt-worker-node.js.map +7 -0
  295. package/dist/mvt-worker.js +21239 -0
  296. package/dist/pmtiles/bundled.d.ts +3 -0
  297. package/dist/pmtiles/bundled.d.ts.map +1 -0
  298. package/dist/pmtiles/bundled.js +5 -0
  299. package/dist/pmtiles/bundled.js.map +1 -0
  300. package/dist/pmtiles/dist.dev.js +50530 -0
  301. package/dist/pmtiles/dist.min.js +94 -0
  302. package/dist/pmtiles/geoarrow.cjs +6718 -0
  303. package/dist/pmtiles/geoarrow.cjs.map +6 -0
  304. package/dist/pmtiles/geoarrow.d.ts +30 -0
  305. package/dist/pmtiles/geoarrow.d.ts.map +1 -0
  306. package/dist/pmtiles/geoarrow.js +143 -0
  307. package/dist/pmtiles/geoarrow.js.map +1 -0
  308. package/dist/pmtiles/index.cjs +8011 -0
  309. package/dist/pmtiles/index.cjs.map +6 -0
  310. package/dist/pmtiles/index.d.ts +14 -0
  311. package/dist/pmtiles/index.d.ts.map +1 -0
  312. package/dist/pmtiles/index.js +10 -0
  313. package/dist/pmtiles/index.js.map +1 -0
  314. package/dist/pmtiles/lib/blob-source.d.ts +14 -0
  315. package/dist/pmtiles/lib/blob-source.d.ts.map +1 -0
  316. package/dist/pmtiles/lib/blob-source.js +32 -0
  317. package/dist/pmtiles/lib/blob-source.js.map +1 -0
  318. package/dist/pmtiles/lib/encode-pmtiles.d.ts +8 -0
  319. package/dist/pmtiles/lib/encode-pmtiles.d.ts.map +1 -0
  320. package/dist/pmtiles/lib/encode-pmtiles.js +268 -0
  321. package/dist/pmtiles/lib/encode-pmtiles.js.map +1 -0
  322. package/dist/pmtiles/lib/parse-pmtiles.d.ts +52 -0
  323. package/dist/pmtiles/lib/parse-pmtiles.d.ts.map +1 -0
  324. package/dist/pmtiles/lib/parse-pmtiles.js +95 -0
  325. package/dist/pmtiles/lib/parse-pmtiles.js.map +1 -0
  326. package/dist/pmtiles/lib/range-request-source.d.ts +24 -0
  327. package/dist/pmtiles/lib/range-request-source.d.ts.map +1 -0
  328. package/dist/pmtiles/lib/range-request-source.js +45 -0
  329. package/dist/pmtiles/lib/range-request-source.js.map +1 -0
  330. package/dist/pmtiles/lib/version.d.ts +2 -0
  331. package/dist/pmtiles/lib/version.d.ts.map +1 -0
  332. package/dist/pmtiles/lib/version.js +8 -0
  333. package/dist/pmtiles/lib/version.js.map +1 -0
  334. package/dist/pmtiles/pmtiles-format.d.ts +14 -0
  335. package/dist/pmtiles/pmtiles-format.d.ts.map +1 -0
  336. package/dist/pmtiles/pmtiles-format.js +17 -0
  337. package/dist/pmtiles/pmtiles-format.js.map +1 -0
  338. package/dist/pmtiles/pmtiles-loader-with-parser.d.ts +30 -0
  339. package/dist/pmtiles/pmtiles-loader-with-parser.d.ts.map +1 -0
  340. package/dist/pmtiles/pmtiles-loader-with-parser.js +41 -0
  341. package/dist/pmtiles/pmtiles-loader-with-parser.js.map +1 -0
  342. package/dist/pmtiles/pmtiles-loader.d.ts +41 -0
  343. package/dist/pmtiles/pmtiles-loader.d.ts.map +1 -0
  344. package/dist/pmtiles/pmtiles-loader.js +20 -0
  345. package/dist/pmtiles/pmtiles-loader.js.map +1 -0
  346. package/dist/pmtiles/pmtiles-source-loader.d.ts +85 -0
  347. package/dist/pmtiles/pmtiles-source-loader.d.ts.map +1 -0
  348. package/dist/pmtiles/pmtiles-source-loader.js +239 -0
  349. package/dist/pmtiles/pmtiles-source-loader.js.map +1 -0
  350. package/dist/pmtiles/pmtiles-writer-types.d.ts +39 -0
  351. package/dist/pmtiles/pmtiles-writer-types.d.ts.map +1 -0
  352. package/dist/{point-cloud-tile-source-types.js → pmtiles/pmtiles-writer-types.js} +1 -1
  353. package/dist/pmtiles/pmtiles-writer-types.js.map +1 -0
  354. package/dist/pmtiles/pmtiles-writer.d.ts +22 -0
  355. package/dist/pmtiles/pmtiles-writer.d.ts.map +1 -0
  356. package/dist/pmtiles/pmtiles-writer.js +15 -0
  357. package/dist/pmtiles/pmtiles-writer.js.map +1 -0
  358. package/dist/pmtiles/raster.cjs +1183 -0
  359. package/dist/pmtiles/raster.cjs.map +6 -0
  360. package/dist/pmtiles/raster.d.ts +30 -0
  361. package/dist/pmtiles/raster.d.ts.map +1 -0
  362. package/dist/pmtiles/raster.js +212 -0
  363. package/dist/pmtiles/raster.js.map +1 -0
  364. package/dist/pmtiles/source-info.d.ts +25 -0
  365. package/dist/pmtiles/source-info.d.ts.map +1 -0
  366. package/dist/{types.js → pmtiles/source-info.js} +1 -1
  367. package/dist/pmtiles/source-info.js.map +1 -0
  368. package/dist/pmtiles/unbundled.d.ts +3 -0
  369. package/dist/pmtiles/unbundled.d.ts.map +1 -0
  370. package/dist/pmtiles/unbundled.js +5 -0
  371. package/dist/pmtiles/unbundled.js.map +1 -0
  372. package/dist/raster-set.d.ts +1 -1
  373. package/dist/raster-set.d.ts.map +1 -1
  374. package/dist/raster-set.js +1 -1
  375. package/dist/raster-set.js.map +1 -1
  376. package/dist/tile-matrix.cjs +81 -0
  377. package/dist/tile-matrix.cjs.map +6 -0
  378. package/dist/tile-matrix.d.ts +52 -0
  379. package/dist/tile-matrix.d.ts.map +1 -0
  380. package/dist/tile-matrix.js +75 -0
  381. package/dist/tile-matrix.js.map +1 -0
  382. package/dist/tileset-2d/tile-2d-header.d.ts +2 -2
  383. package/dist/tileset-2d/tile-2d-header.d.ts.map +1 -1
  384. package/dist/tileset-2d/tile-2d-header.js +11 -11
  385. package/dist/tileset-2d/tile-2d-header.js.map +1 -1
  386. package/dist/tileset-2d/tileset-2d.d.ts +19 -10
  387. package/dist/tileset-2d/tileset-2d.d.ts.map +1 -1
  388. package/dist/tileset-2d/tileset-2d.js +69 -15
  389. package/dist/tileset-2d/tileset-2d.js.map +1 -1
  390. package/package.json +101 -25
  391. package/src/image-set.ts +1 -1
  392. package/src/index.ts +8 -128
  393. package/src/mlt/bundled.ts +9 -0
  394. package/src/mlt/index.ts +18 -0
  395. package/src/mlt/lib/encode-mlt-geometry.ts +162 -0
  396. package/src/mlt/lib/encode-mlt-streams.ts +66 -0
  397. package/src/mlt/lib/encode-mlt.ts +215 -0
  398. package/src/mlt/lib/parse-mlt.ts +906 -0
  399. package/src/mlt/libs/mlt-decoder.cjs +4552 -0
  400. package/src/mlt/mlt-format.ts +19 -0
  401. package/src/mlt/mlt-loader-with-parser.ts +57 -0
  402. package/src/mlt/mlt-loader.ts +64 -0
  403. package/src/mlt/mlt-source-loader.ts +266 -0
  404. package/src/mlt/mlt-writer.ts +47 -0
  405. package/src/mlt/unbundled.ts +6 -0
  406. package/src/mvt/arrow-table-tile-source-loader-types.ts +55 -0
  407. package/src/mvt/arrow-table-tile-source-loader.ts +307 -0
  408. package/src/mvt/arrow-table-tile-source-types.ts +32 -0
  409. package/src/mvt/bundled.ts +14 -0
  410. package/src/mvt/index.ts +67 -0
  411. package/src/mvt/lib/encode-mvt-arrow.ts +273 -0
  412. package/src/mvt/lib/encode-mvt.ts +46 -0
  413. package/src/mvt/lib/get-schemas-from-tilejson.ts +64 -0
  414. package/src/mvt/lib/is-longitude-latitude-crs.ts +15 -0
  415. package/src/mvt/lib/mapbox-vt-pbf/geojson-to-vt.ts.disabled +76 -0
  416. package/src/mvt/lib/mapbox-vt-pbf/geojson-wrapper.ts +89 -0
  417. package/src/mvt/lib/mapbox-vt-pbf/to-vector-tile.ts +230 -0
  418. package/src/mvt/lib/mvt-pbf/mvt-constants.ts +135 -0
  419. package/src/mvt/lib/mvt-pbf/mvt-types.ts +22 -0
  420. package/src/mvt/lib/mvt-pbf/parse-geometry-from-pbf.ts +285 -0
  421. package/src/mvt/lib/mvt-pbf/parse-mvt-from-pbf.ts +310 -0
  422. package/src/mvt/lib/mvt-pbf/write-mvt-to-pbf.ts +162 -0
  423. package/src/mvt/lib/mvt-worker-transport.ts +74 -0
  424. package/src/mvt/lib/parse-mvt-geojson.ts +65 -0
  425. package/src/mvt/lib/parse-mvt.ts +145 -0
  426. package/src/mvt/lib/parse-tilejson.ts +397 -0
  427. package/src/mvt/lib/resolve-table-tile-parameters.ts +23 -0
  428. package/src/mvt/lib/types.ts +90 -0
  429. package/src/mvt/lib/utils/geometry-utils.ts +238 -0
  430. package/src/mvt/lib/vector-tile/LICENSE.txt +31 -0
  431. package/src/mvt/lib/vector-tile/vector-tile-feature.ts +430 -0
  432. package/src/mvt/lib/vector-tile/vector-tile-layer.ts +130 -0
  433. package/src/mvt/lib/vector-tile/vector-tile.ts +32 -0
  434. package/src/mvt/lib/vector-tiler/LICENSE +19 -0
  435. package/src/mvt/lib/vector-tiler/arrow-tile.ts +93 -0
  436. package/src/mvt/lib/vector-tiler/features/clip-features.ts +250 -0
  437. package/src/mvt/lib/vector-tiler/features/convert-feature.ts +213 -0
  438. package/src/mvt/lib/vector-tiler/features/proto-feature.ts +104 -0
  439. package/src/mvt/lib/vector-tiler/features/simplify-path.ts +84 -0
  440. package/src/mvt/lib/vector-tiler/features/wrap-features.ts +125 -0
  441. package/src/mvt/lib/vector-tiler/proto-tile.ts +217 -0
  442. package/src/mvt/lib/vector-tiler/tile-to-geojson.ts +104 -0
  443. package/src/mvt/lib/vector-tiler/transform-tile.ts +57 -0
  444. package/src/mvt/map-style-format.ts +18 -0
  445. package/src/mvt/map-style-loader-with-parser.ts +62 -0
  446. package/src/mvt/map-style-loader.ts +31 -0
  447. package/src/mvt/map-style-schema.ts +53 -0
  448. package/src/mvt/map-style.ts +218 -0
  449. package/src/mvt/mvt-format.ts +25 -0
  450. package/src/mvt/mvt-geojson-loader-types.ts +60 -0
  451. package/src/mvt/mvt-geojson-loader.ts +20 -0
  452. package/src/mvt/mvt-loader-with-parser.ts +53 -0
  453. package/src/mvt/mvt-loader.ts +73 -0
  454. package/src/mvt/mvt-source-loader.ts +410 -0
  455. package/src/mvt/mvt-writer.ts +35 -0
  456. package/src/mvt/table-tile-source-loader.ts +672 -0
  457. package/src/mvt/tilejson-format.ts +18 -0
  458. package/src/mvt/tilejson-loader-with-parser.ts +38 -0
  459. package/src/mvt/tilejson-loader.ts +42 -0
  460. package/src/mvt/tilejson-zod-schema.ts +199 -0
  461. package/src/mvt/unbundled.ts +13 -0
  462. package/src/mvt/workers/mvt-worker-node.ts +9 -0
  463. package/src/mvt/workers/mvt-worker.ts +8 -0
  464. package/src/pmtiles/bundled.ts +6 -0
  465. package/src/pmtiles/geoarrow.ts +188 -0
  466. package/src/pmtiles/index.ts +27 -0
  467. package/src/pmtiles/lib/blob-source.ts +41 -0
  468. package/src/pmtiles/lib/encode-pmtiles.ts +322 -0
  469. package/src/pmtiles/lib/parse-pmtiles.ts +180 -0
  470. package/src/pmtiles/lib/range-request-source.ts +60 -0
  471. package/src/pmtiles/lib/version.ts +8 -0
  472. package/src/pmtiles/pmtiles-format.ts +19 -0
  473. package/src/pmtiles/pmtiles-loader-with-parser.ts +60 -0
  474. package/src/pmtiles/pmtiles-loader.ts +30 -0
  475. package/src/pmtiles/pmtiles-source-loader.ts +346 -0
  476. package/src/pmtiles/pmtiles-writer-types.ts +45 -0
  477. package/src/pmtiles/pmtiles-writer.ts +26 -0
  478. package/src/pmtiles/raster.ts +289 -0
  479. package/src/pmtiles/source-info.ts +25 -0
  480. package/src/pmtiles/unbundled.ts +6 -0
  481. package/src/raster-set.ts +2 -2
  482. package/src/tile-matrix.ts +138 -0
  483. package/src/tileset-2d/tile-2d-header.ts +14 -13
  484. package/src/tileset-2d/tileset-2d.ts +81 -19
  485. package/dist/constants.d.ts +0 -38
  486. package/dist/constants.d.ts.map +0 -1
  487. package/dist/constants.js +0 -39
  488. package/dist/constants.js.map +0 -1
  489. package/dist/point-cloud/point-cloud-tile.d.ts +0 -47
  490. package/dist/point-cloud/point-cloud-tile.d.ts.map +0 -1
  491. package/dist/point-cloud/point-cloud-tile.js +0 -70
  492. package/dist/point-cloud/point-cloud-tile.js.map +0 -1
  493. package/dist/point-cloud/point-cloud-tileset.d.ts +0 -135
  494. package/dist/point-cloud/point-cloud-tileset.d.ts.map +0 -1
  495. package/dist/point-cloud/point-cloud-tileset.js +0 -549
  496. package/dist/point-cloud/point-cloud-tileset.js.map +0 -1
  497. package/dist/point-cloud/types.d.ts +0 -81
  498. package/dist/point-cloud/types.d.ts.map +0 -1
  499. package/dist/point-cloud/types.js.map +0 -1
  500. package/dist/point-cloud-tile-source-loader-types.d.ts +0 -31
  501. package/dist/point-cloud-tile-source-loader-types.d.ts.map +0 -1
  502. package/dist/point-cloud-tile-source-loader-types.js +0 -34
  503. package/dist/point-cloud-tile-source-loader-types.js.map +0 -1
  504. package/dist/point-cloud-tile-source-loader.cjs +0 -81
  505. package/dist/point-cloud-tile-source-loader.cjs.map +0 -7
  506. package/dist/point-cloud-tile-source-loader.d.ts +0 -27
  507. package/dist/point-cloud-tile-source-loader.d.ts.map +0 -1
  508. package/dist/point-cloud-tile-source-loader.js +0 -17
  509. package/dist/point-cloud-tile-source-loader.js.map +0 -1
  510. package/dist/point-cloud-tile-source-types.d.ts +0 -15
  511. package/dist/point-cloud-tile-source-types.d.ts.map +0 -1
  512. package/dist/point-cloud-tile-source-types.js.map +0 -1
  513. package/dist/point-cloud-tile-source.cjs +0 -105
  514. package/dist/point-cloud-tile-source.cjs.map +0 -7
  515. package/dist/point-cloud-tile-source.d.ts +0 -36
  516. package/dist/point-cloud-tile-source.d.ts.map +0 -1
  517. package/dist/point-cloud-tile-source.js +0 -84
  518. package/dist/point-cloud-tile-source.js.map +0 -1
  519. package/dist/spatial/format-spatial-reference.d.ts +0 -68
  520. package/dist/spatial/format-spatial-reference.d.ts.map +0 -1
  521. package/dist/spatial/format-spatial-reference.js +0 -291
  522. package/dist/spatial/format-spatial-reference.js.map +0 -1
  523. package/dist/spatial/get-spatial-coordinate-frame.d.ts +0 -20
  524. package/dist/spatial/get-spatial-coordinate-frame.d.ts.map +0 -1
  525. package/dist/spatial/get-spatial-coordinate-frame.js +0 -139
  526. package/dist/spatial/get-spatial-coordinate-frame.js.map +0 -1
  527. package/dist/spatial/i3s-elevation.d.ts +0 -20
  528. package/dist/spatial/i3s-elevation.d.ts.map +0 -1
  529. package/dist/spatial/i3s-elevation.js +0 -90
  530. package/dist/spatial/i3s-elevation.js.map +0 -1
  531. package/dist/spatial/i3s-spatial-transformer.d.ts +0 -205
  532. package/dist/spatial/i3s-spatial-transformer.d.ts.map +0 -1
  533. package/dist/spatial/i3s-spatial-transformer.js +0 -731
  534. package/dist/spatial/i3s-spatial-transformer.js.map +0 -1
  535. package/dist/spatial/normalize-crs-identifier.d.ts +0 -15
  536. package/dist/spatial/normalize-crs-identifier.d.ts.map +0 -1
  537. package/dist/spatial/normalize-crs-identifier.js +0 -22
  538. package/dist/spatial/normalize-crs-identifier.js.map +0 -1
  539. package/dist/spatial/spatial-coordinate-transformer.d.ts +0 -54
  540. package/dist/spatial/spatial-coordinate-transformer.d.ts.map +0 -1
  541. package/dist/spatial/spatial-coordinate-transformer.js +0 -311
  542. package/dist/spatial/spatial-coordinate-transformer.js.map +0 -1
  543. package/dist/spatial/spatial-resource-registry.d.ts +0 -47
  544. package/dist/spatial/spatial-resource-registry.d.ts.map +0 -1
  545. package/dist/spatial/spatial-resource-registry.js +0 -76
  546. package/dist/spatial/spatial-resource-registry.js.map +0 -1
  547. package/dist/spatial/spatial-types.d.ts +0 -190
  548. package/dist/spatial/spatial-types.d.ts.map +0 -1
  549. package/dist/spatial/spatial-types.js +0 -192
  550. package/dist/spatial/spatial-types.js.map +0 -1
  551. package/dist/spatial/tiles-3d-spatial-transformer.d.ts +0 -32
  552. package/dist/spatial/tiles-3d-spatial-transformer.d.ts.map +0 -1
  553. package/dist/spatial/tiles-3d-spatial-transformer.js +0 -163
  554. package/dist/spatial/tiles-3d-spatial-transformer.js.map +0 -1
  555. package/dist/tileset-3d/common/indexed-archive-tileset-source.d.ts +0 -60
  556. package/dist/tileset-3d/common/indexed-archive-tileset-source.d.ts.map +0 -1
  557. package/dist/tileset-3d/common/indexed-archive-tileset-source.js +0 -130
  558. package/dist/tileset-3d/common/indexed-archive-tileset-source.js.map +0 -1
  559. package/dist/tileset-3d/common/tile-3d-contracts.d.ts +0 -63
  560. package/dist/tileset-3d/common/tile-3d-contracts.d.ts.map +0 -1
  561. package/dist/tileset-3d/common/tile-3d-contracts.js +0 -51
  562. package/dist/tileset-3d/common/tile-3d-contracts.js.map +0 -1
  563. package/dist/tileset-3d/common/tile-3d.d.ts +0 -410
  564. package/dist/tileset-3d/common/tile-3d.d.ts.map +0 -1
  565. package/dist/tileset-3d/common/tile-3d.js +0 -1056
  566. package/dist/tileset-3d/common/tile-3d.js.map +0 -1
  567. package/dist/tileset-3d/common/tileset-3d.d.ts +0 -369
  568. package/dist/tileset-3d/common/tileset-3d.d.ts.map +0 -1
  569. package/dist/tileset-3d/common/tileset-3d.js +0 -879
  570. package/dist/tileset-3d/common/tileset-3d.js.map +0 -1
  571. package/dist/tileset-3d/common/tileset-cache.d.ts +0 -29
  572. package/dist/tileset-3d/common/tileset-cache.d.ts.map +0 -1
  573. package/dist/tileset-3d/common/tileset-cache.js +0 -82
  574. package/dist/tileset-3d/common/tileset-cache.js.map +0 -1
  575. package/dist/tileset-3d/common/tileset-content-traversal.d.ts +0 -37
  576. package/dist/tileset-3d/common/tileset-content-traversal.d.ts.map +0 -1
  577. package/dist/tileset-3d/common/tileset-content-traversal.js +0 -80
  578. package/dist/tileset-3d/common/tileset-content-traversal.js.map +0 -1
  579. package/dist/tileset-3d/common/tileset-observability.d.ts +0 -60
  580. package/dist/tileset-3d/common/tileset-observability.d.ts.map +0 -1
  581. package/dist/tileset-3d/common/tileset-observability.js +0 -39
  582. package/dist/tileset-3d/common/tileset-observability.js.map +0 -1
  583. package/dist/tileset-3d/common/tileset-source.d.ts +0 -228
  584. package/dist/tileset-3d/common/tileset-source.d.ts.map +0 -1
  585. package/dist/tileset-3d/common/tileset-source.js +0 -17
  586. package/dist/tileset-3d/common/tileset-source.js.map +0 -1
  587. package/dist/tileset-3d/common/tileset-traverser.d.ts +0 -88
  588. package/dist/tileset-3d/common/tileset-traverser.d.ts.map +0 -1
  589. package/dist/tileset-3d/common/tileset-traverser.js +0 -341
  590. package/dist/tileset-3d/common/tileset-traverser.js.map +0 -1
  591. package/dist/tileset-3d/format-3d-tiles/implicit-tiling.d.ts +0 -182
  592. package/dist/tileset-3d/format-3d-tiles/implicit-tiling.d.ts.map +0 -1
  593. package/dist/tileset-3d/format-3d-tiles/implicit-tiling.js +0 -678
  594. package/dist/tileset-3d/format-3d-tiles/implicit-tiling.js.map +0 -1
  595. package/dist/tileset-3d/format-3d-tiles/tiles-3d-source.d.ts +0 -221
  596. package/dist/tileset-3d/format-3d-tiles/tiles-3d-source.d.ts.map +0 -1
  597. package/dist/tileset-3d/format-3d-tiles/tiles-3d-source.js +0 -770
  598. package/dist/tileset-3d/format-3d-tiles/tiles-3d-source.js.map +0 -1
  599. package/dist/tileset-3d/format-3d-tiles/tileset-3d-traverser.d.ts +0 -111
  600. package/dist/tileset-3d/format-3d-tiles/tileset-3d-traverser.d.ts.map +0 -1
  601. package/dist/tileset-3d/format-3d-tiles/tileset-3d-traverser.js +0 -339
  602. package/dist/tileset-3d/format-3d-tiles/tileset-3d-traverser.js.map +0 -1
  603. package/dist/tileset-3d/format-i3s/i3s-pending-tiles-register.d.ts +0 -27
  604. package/dist/tileset-3d/format-i3s/i3s-pending-tiles-register.d.ts.map +0 -1
  605. package/dist/tileset-3d/format-i3s/i3s-pending-tiles-register.js +0 -45
  606. package/dist/tileset-3d/format-i3s/i3s-pending-tiles-register.js.map +0 -1
  607. package/dist/tileset-3d/format-i3s/i3s-source.d.ts +0 -116
  608. package/dist/tileset-3d/format-i3s/i3s-source.d.ts.map +0 -1
  609. package/dist/tileset-3d/format-i3s/i3s-source.js +0 -450
  610. package/dist/tileset-3d/format-i3s/i3s-source.js.map +0 -1
  611. package/dist/tileset-3d/format-i3s/i3s-tile-manager.d.ts +0 -34
  612. package/dist/tileset-3d/format-i3s/i3s-tile-manager.d.ts.map +0 -1
  613. package/dist/tileset-3d/format-i3s/i3s-tile-manager.js +0 -81
  614. package/dist/tileset-3d/format-i3s/i3s-tile-manager.js.map +0 -1
  615. package/dist/tileset-3d/format-i3s/i3s-tileset-traverser.d.ts +0 -25
  616. package/dist/tileset-3d/format-i3s/i3s-tileset-traverser.d.ts.map +0 -1
  617. package/dist/tileset-3d/format-i3s/i3s-tileset-traverser.js +0 -84
  618. package/dist/tileset-3d/format-i3s/i3s-tileset-traverser.js.map +0 -1
  619. package/dist/tileset-3d/helpers/3d-tiles-options.d.ts +0 -5
  620. package/dist/tileset-3d/helpers/3d-tiles-options.d.ts.map +0 -1
  621. package/dist/tileset-3d/helpers/3d-tiles-options.js +0 -9
  622. package/dist/tileset-3d/helpers/3d-tiles-options.js.map +0 -1
  623. package/dist/tileset-3d/helpers/bounding-volume.d.ts +0 -23
  624. package/dist/tileset-3d/helpers/bounding-volume.d.ts.map +0 -1
  625. package/dist/tileset-3d/helpers/bounding-volume.js +0 -236
  626. package/dist/tileset-3d/helpers/bounding-volume.js.map +0 -1
  627. package/dist/tileset-3d/helpers/frame-state.d.ts +0 -93
  628. package/dist/tileset-3d/helpers/frame-state.d.ts.map +0 -1
  629. package/dist/tileset-3d/helpers/frame-state.js +0 -211
  630. package/dist/tileset-3d/helpers/frame-state.js.map +0 -1
  631. package/dist/tileset-3d/helpers/i3s-lod.d.ts +0 -20
  632. package/dist/tileset-3d/helpers/i3s-lod.d.ts.map +0 -1
  633. package/dist/tileset-3d/helpers/i3s-lod.js +0 -95
  634. package/dist/tileset-3d/helpers/i3s-lod.js.map +0 -1
  635. package/dist/tileset-3d/helpers/s2-bounding-volume.d.ts +0 -17
  636. package/dist/tileset-3d/helpers/s2-bounding-volume.d.ts.map +0 -1
  637. package/dist/tileset-3d/helpers/s2-bounding-volume.js +0 -17
  638. package/dist/tileset-3d/helpers/s2-bounding-volume.js.map +0 -1
  639. package/dist/tileset-3d/helpers/tiles-3d-lod.d.ts +0 -72
  640. package/dist/tileset-3d/helpers/tiles-3d-lod.d.ts.map +0 -1
  641. package/dist/tileset-3d/helpers/tiles-3d-lod.js +0 -257
  642. package/dist/tileset-3d/helpers/tiles-3d-lod.js.map +0 -1
  643. package/dist/tileset-3d/helpers/tiles-3d-request-priority.d.ts +0 -134
  644. package/dist/tileset-3d/helpers/tiles-3d-request-priority.d.ts.map +0 -1
  645. package/dist/tileset-3d/helpers/tiles-3d-request-priority.js +0 -179
  646. package/dist/tileset-3d/helpers/tiles-3d-request-priority.js.map +0 -1
  647. package/dist/tileset-3d/helpers/transform-utils.d.ts +0 -3
  648. package/dist/tileset-3d/helpers/transform-utils.d.ts.map +0 -1
  649. package/dist/tileset-3d/helpers/transform-utils.js +0 -86
  650. package/dist/tileset-3d/helpers/transform-utils.js.map +0 -1
  651. package/dist/tileset-3d/helpers/zoom.d.ts +0 -46
  652. package/dist/tileset-3d/helpers/zoom.d.ts.map +0 -1
  653. package/dist/tileset-3d/helpers/zoom.js +0 -86
  654. package/dist/tileset-3d/helpers/zoom.js.map +0 -1
  655. package/dist/types.d.ts +0 -48
  656. package/dist/types.d.ts.map +0 -1
  657. package/dist/types.js.map +0 -1
  658. package/dist/utils/doubly-linked-list-node.d.ts +0 -11
  659. package/dist/utils/doubly-linked-list-node.d.ts.map +0 -1
  660. package/dist/utils/doubly-linked-list-node.js +0 -20
  661. package/dist/utils/doubly-linked-list-node.js.map +0 -1
  662. package/dist/utils/doubly-linked-list.d.ts +0 -30
  663. package/dist/utils/doubly-linked-list.d.ts.map +0 -1
  664. package/dist/utils/doubly-linked-list.js +0 -93
  665. package/dist/utils/doubly-linked-list.js.map +0 -1
  666. package/dist/utils/managed-array.d.ts +0 -85
  667. package/dist/utils/managed-array.d.ts.map +0 -1
  668. package/dist/utils/managed-array.js +0 -152
  669. package/dist/utils/managed-array.js.map +0 -1
  670. package/src/constants.ts +0 -59
  671. package/src/point-cloud/point-cloud-tile.ts +0 -80
  672. package/src/point-cloud/point-cloud-tileset.ts +0 -767
  673. package/src/point-cloud/types.ts +0 -99
  674. package/src/point-cloud-tile-source-loader-types.ts +0 -53
  675. package/src/point-cloud-tile-source-loader.ts +0 -32
  676. package/src/point-cloud-tile-source-types.ts +0 -20
  677. package/src/point-cloud-tile-source.ts +0 -112
  678. package/src/spatial/format-spatial-reference.ts +0 -385
  679. package/src/spatial/get-spatial-coordinate-frame.ts +0 -169
  680. package/src/spatial/i3s-elevation.ts +0 -96
  681. package/src/spatial/i3s-spatial-transformer.ts +0 -1021
  682. package/src/spatial/normalize-crs-identifier.ts +0 -26
  683. package/src/spatial/spatial-coordinate-transformer.ts +0 -397
  684. package/src/spatial/spatial-resource-registry.ts +0 -90
  685. package/src/spatial/spatial-types.ts +0 -422
  686. package/src/spatial/tiles-3d-spatial-transformer.ts +0 -194
  687. package/src/tileset-3d/common/indexed-archive-tileset-source.ts +0 -205
  688. package/src/tileset-3d/common/tile-3d-contracts.ts +0 -115
  689. package/src/tileset-3d/common/tile-3d.ts +0 -1310
  690. package/src/tileset-3d/common/tileset-3d.ts +0 -1210
  691. package/src/tileset-3d/common/tileset-cache.ts +0 -111
  692. package/src/tileset-3d/common/tileset-content-traversal.ts +0 -114
  693. package/src/tileset-3d/common/tileset-observability.ts +0 -100
  694. package/src/tileset-3d/common/tileset-source.ts +0 -284
  695. package/src/tileset-3d/common/tileset-traverser.ts +0 -416
  696. package/src/tileset-3d/format-3d-tiles/implicit-tiling.ts +0 -1056
  697. package/src/tileset-3d/format-3d-tiles/tiles-3d-source.ts +0 -1025
  698. package/src/tileset-3d/format-3d-tiles/tileset-3d-traverser.ts +0 -391
  699. package/src/tileset-3d/format-i3s/i3s-pending-tiles-register.ts +0 -48
  700. package/src/tileset-3d/format-i3s/i3s-source.ts +0 -557
  701. package/src/tileset-3d/format-i3s/i3s-tile-manager.ts +0 -105
  702. package/src/tileset-3d/format-i3s/i3s-tileset-traverser.ts +0 -102
  703. package/src/tileset-3d/helpers/3d-tiles-options.ts +0 -11
  704. package/src/tileset-3d/helpers/bounding-volume.ts +0 -281
  705. package/src/tileset-3d/helpers/frame-state.ts +0 -322
  706. package/src/tileset-3d/helpers/i3s-lod.ts +0 -109
  707. package/src/tileset-3d/helpers/s2-bounding-volume.ts +0 -32
  708. package/src/tileset-3d/helpers/tiles-3d-lod.ts +0 -370
  709. package/src/tileset-3d/helpers/tiles-3d-request-priority.ts +0 -301
  710. package/src/tileset-3d/helpers/transform-utils.ts +0 -109
  711. package/src/tileset-3d/helpers/zoom.ts +0 -120
  712. package/src/types.ts +0 -54
  713. package/src/utils/doubly-linked-list-node.ts +0 -22
  714. package/src/utils/doubly-linked-list.ts +0 -105
  715. package/src/utils/managed-array.ts +0 -174
  716. /package/dist/{point-cloud → mvt/lib}/types.js +0 -0
@@ -0,0 +1,478 @@
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT AND ISC
3
+ // Copyright (c) vis.gl contributors
4
+ // Based on https://github.com/mapbox/geojson-vt under compatible ISC license
5
+ import { DataSource, getRequiredOptions, getSourceLoaderOptions, log } from '@loaders.gl/core/loader-utils';
6
+ import { convertFeaturesToWKBArrowTable } from '@loaders.gl/arrow-geometry/feature-collection-to-arrow';
7
+ import { deduceTableSchema } from '@loaders.gl/core/schema-utils';
8
+ import { Stats, Stat } from 'probe.gl/stats';
9
+ import { resolveTableTileParameters } from "./lib/resolve-table-tile-parameters.js";
10
+ import { createProtoTile } from "./lib/vector-tiler/proto-tile.js";
11
+ import { transformTile } from "./lib/vector-tiler/transform-tile.js"; // coordinate transformation
12
+ import { convertTileToGeoJSON } from "./lib/vector-tiler/tile-to-geojson.js"; // tile clipping and wrapping
13
+ import { convertFeaturesToProtoFeature } from "./lib/vector-tiler/features/convert-feature.js";
14
+ import { clipFeatures } from "./lib/vector-tiler/features/clip-features.js"; // stripe clipping algorithm
15
+ import { wrapFeatures } from "./lib/vector-tiler/features/wrap-features.js"; // date line processing
16
+ /** Options to configure tiling */
17
+ export const TableTileSourceLoader = {
18
+ dataType: null,
19
+ batchType: null,
20
+ name: 'TableTiler',
21
+ id: 'table-tiler',
22
+ module: 'tiles',
23
+ version: '0.0.0',
24
+ extensions: ['mvt'],
25
+ mimeTypes: ['application/octet-stream'],
26
+ type: 'table',
27
+ fromUrl: true,
28
+ fromBlob: true,
29
+ options: {
30
+ table: {
31
+ coordinates: 'local',
32
+ promoteId: undefined,
33
+ maxZoom: 14,
34
+ indexMaxZoom: 5,
35
+ maxPointsPerTile: 10000,
36
+ tolerance: 3,
37
+ extent: 4096,
38
+ buffer: 64,
39
+ generateId: undefined,
40
+ shape: 'geojson-table'
41
+ }
42
+ },
43
+ defaultOptions: {
44
+ table: {
45
+ coordinates: 'local',
46
+ promoteId: undefined,
47
+ maxZoom: 14,
48
+ indexMaxZoom: 5,
49
+ maxPointsPerTile: 10000,
50
+ tolerance: 3,
51
+ extent: 4096,
52
+ buffer: 64,
53
+ generateId: undefined,
54
+ shape: 'geojson-table'
55
+ }
56
+ },
57
+ testURL: (url) => url.endsWith('.geojson'),
58
+ createDataSource(url, options, coreApi) {
59
+ const tablePromise = isLoadableTableInput(url) ? url : loadTable(url, options, coreApi);
60
+ return new TableVectorTileSource(tablePromise, options);
61
+ }
62
+ };
63
+ /**
64
+ * Dynamically vector tiles a table (the table needs a geometry column)
65
+ * - Tiles are generated when requested.
66
+ * - Each tile contains a tables of clipped features.
67
+ *
68
+ * @note - Currently only accepts `GeoJSONTable` tables
69
+ * @note - Currently only outputs `GeoJSONTable`
70
+ * @note - (can be initialized with a promise that resolves to GeoJSONTable).
71
+ *
72
+ * @todo - metadata should scan all rows to determine schema
73
+ * @todo - metadata scan all rows to determine tilestats (field values[] etc).
74
+ * @todo - handle binary input tables
75
+ * @todo - generate binary output tables
76
+ * @todo - how does TileSourceLayer specify coordinates / decided which layer to render with
77
+ */
78
+ export class TableVectorTileSource extends DataSource {
79
+ /** Global stats for all DynamicVectorTileSources */
80
+ static stats = new Stats({
81
+ id: 'table-tile-source-loader-all',
82
+ stats: [new Stat('count', 'tiles'), new Stat('count', 'features')]
83
+ });
84
+ /** Stats for this TableVectorTileSource */
85
+ stats = new Stats({
86
+ id: 'table-tile-source-loader',
87
+ stats: [new Stat('tiles', 'count'), new Stat('features', 'count')]
88
+ });
89
+ /** MIME type of the tiles emitted by this tile source */
90
+ mimeType = 'application/vnd.mapbox-vector-tile';
91
+ /** Whether emitted tile geometries use tile-local coordinates. */
92
+ localCoordinates;
93
+ tableOptions;
94
+ /* Schema of the data */
95
+ schema = null;
96
+ /** Map of generated tiles, indexed by stringified tile coordinates */
97
+ tiles = {};
98
+ /** Array of tile coordinates */
99
+ tileCoords = [];
100
+ /** Input data has loaded, initial top-level tiling is done, sync methods can now be called */
101
+ ready;
102
+ /** Metadata for the tile source (generated TileJSON/tilestats */
103
+ metadata;
104
+ constructor(table, options) {
105
+ super(table, options, TableTileSourceLoader.defaultOptions);
106
+ this.tableOptions = getRequiredOptions(this.options).table;
107
+ this.localCoordinates = this.tableOptions.coordinates === 'local';
108
+ this.getTileData = this.getTileData.bind(this);
109
+ this.ready = this.initializeTilesAsync(table);
110
+ this.metadata = this.getMetadata();
111
+ }
112
+ async initializeTilesAsync(tablePromise) {
113
+ const table = await tablePromise;
114
+ this.schema = table.features.length > 0 ? deduceTableSchema(table) : { fields: [], metadata: {} };
115
+ this.createRootTiles(table);
116
+ }
117
+ async getMetadata() {
118
+ await this.ready;
119
+ return { schema: this.schema, minZoom: 0, maxZoom: this.tableOptions.maxZoom };
120
+ }
121
+ async getSchema() {
122
+ await this.ready;
123
+ return this.schema;
124
+ }
125
+ /**
126
+ * Get a tile at the specified index
127
+ * @param tileIndex z, x, y of tile
128
+ * @returns
129
+ */
130
+ async getVectorTile(tileIndex) {
131
+ await this.ready;
132
+ const table = this.getTileSync(tileIndex);
133
+ log.info(2, 'getVectorTile', tileIndex, table)();
134
+ return this.tableOptions.shape === 'arrow-table' && table
135
+ ? convertFeaturesToWKBArrowTable(table.features, {
136
+ encodingPreference: this.options.geoarrow?.encodingPreference ||
137
+ this.tableOptions.geoarrow?.encodingPreference
138
+ })
139
+ : table;
140
+ }
141
+ async getTile(tileIndex) {
142
+ await this.ready;
143
+ return this.getTileSync(tileIndex);
144
+ }
145
+ async getTileData(tileParams) {
146
+ await this.ready;
147
+ const tile = this.getTileSync({
148
+ ...tileParams.index,
149
+ tileMatrix: tileParams.tileMatrix,
150
+ signal: tileParams.signal
151
+ });
152
+ return tile?.features || [];
153
+ }
154
+ // Implementation
155
+ /**
156
+ * Synchronously request a tile
157
+ * @note Application must await `source.ready` before calling sync methods.
158
+ */
159
+ getTileSync(tileIndex) {
160
+ tileIndex = resolveTableTileParameters(tileIndex, this.tableOptions.maxZoom);
161
+ const protoTile = this.getProtoTile(tileIndex);
162
+ if (!protoTile) {
163
+ return null;
164
+ }
165
+ return convertTileToGeoJSON(protoTile, {
166
+ coordinates: this.tableOptions.coordinates,
167
+ tileIndex,
168
+ extent: this.tableOptions.extent
169
+ });
170
+ }
171
+ /**
172
+ * Create the initial tiles
173
+ * @note the tiles stores all the features together with additional data
174
+ */
175
+ createRootTiles(table) {
176
+ if (this.tableOptions.maxZoom < 0 || this.tableOptions.maxZoom > 24) {
177
+ throw new Error('maxZoom should be in the 0-24 range');
178
+ }
179
+ if (this.tableOptions.promoteId && this.tableOptions.generateId) {
180
+ throw new Error('promoteId and generateId cannot be used together.');
181
+ }
182
+ log.log(1, 'TableVectorTileSource creating root tiles', this.tableOptions)();
183
+ // projects and adds simplification info
184
+ log.time(1, 'preprocess table')();
185
+ let features = convertFeaturesToProtoFeature(table, this.tableOptions);
186
+ log.timeEnd(1, 'preprocess table')();
187
+ // wraps features (ie extreme west and extreme east)
188
+ log.time(1, 'generate tiles')();
189
+ features = wrapFeatures(features, this.tableOptions);
190
+ // start slicing from the top tile down
191
+ if (features.length === 0) {
192
+ log.log(1, 'TableVectorTileSource: no features generated')();
193
+ return;
194
+ }
195
+ this.splitTile(features, 0, 0, 0);
196
+ const rootTile = this.tiles[0];
197
+ log.log(1, `root tile features: ${rootTile.numFeatures}, points: ${rootTile.numPoints}`)();
198
+ log.timeEnd(1, 'generate tiles')();
199
+ log.log(1, `TableVectorTileSource: tiles generated: ${this.stats.get('total').count}`, this.stats)();
200
+ }
201
+ /**
202
+ * Return geojsonvt-style "half formed" vector tile
203
+ * @note Application must await `source.ready` before calling sync methods.
204
+ */
205
+ // eslint-disable-next-line complexity, max-statements
206
+ getProtoTile(tileIndex) {
207
+ const { z, y } = tileIndex;
208
+ let { x } = tileIndex;
209
+ // z = +z;
210
+ // x = +x;
211
+ // y = +y;
212
+ const { extent } = this.tableOptions;
213
+ if (z < 0 || z > 24) {
214
+ return null;
215
+ }
216
+ const z2 = 1 << z;
217
+ x = (x + z2) & (z2 - 1); // wrapFeatures tile x coordinate
218
+ const id = toID(z, x, y);
219
+ if (this.tiles[id]) {
220
+ return transformTile(this.tiles[id], extent);
221
+ }
222
+ log.log(log, 'drilling down to z%d-%d-%d', z, x, y)();
223
+ let z0 = z;
224
+ let x0 = x;
225
+ let y0 = y;
226
+ let parent;
227
+ while (!parent && z0 > 0) {
228
+ z0--;
229
+ x0 = x0 >> 1;
230
+ y0 = y0 >> 1;
231
+ parent = this.tiles[toID(z0, x0, y0)];
232
+ }
233
+ if (!parent || !parent.sourceFeatures) {
234
+ return null;
235
+ }
236
+ // if we found a parent tile containing the original geometry, we can drill down from it
237
+ log.log(1, 'found parent tile z%d-%d-%d', z0, x0, y0)();
238
+ log.time(1, 'drilling down')();
239
+ this.splitTile(parent.sourceFeatures, z0, x0, y0, z, x, y);
240
+ log.timeEnd(1, 'drilling down')();
241
+ return this.tiles[id] ? transformTile(this.tiles[id], extent) : null;
242
+ }
243
+ /**
244
+ * splits features from a parent tile to sub-tiles.
245
+ * @param z, x, and y are the coordinates of the parent tile
246
+ * @param cz, cx, and cy are the coordinates of the target tile
247
+ *
248
+ * If no target tile is specified, splitting stops when we reach the maximum
249
+ * zoom or the number of points is low as specified in the options.
250
+ */
251
+ // eslint-disable-next-line max-params, max-statements, complexity
252
+ splitTile(features, z, x, y, cz, cx, cy) {
253
+ const stack = [features, z, x, y];
254
+ // avoid recursion by using a processing queue
255
+ while (stack.length) {
256
+ y = stack.pop();
257
+ x = stack.pop();
258
+ z = stack.pop();
259
+ features = stack.pop();
260
+ const z2 = 1 << z;
261
+ const id = toID(z, x, y);
262
+ let tile = this.tiles[id];
263
+ if (!tile) {
264
+ log.time(2, 'tile creation')();
265
+ tile = this.tiles[id] = createProtoTile(features, z, x, y, this.tableOptions);
266
+ this.tileCoords.push({ z, x, y });
267
+ const key = `z${z}`;
268
+ let stat = this.stats.get(key, 'count');
269
+ stat.incrementCount();
270
+ stat = this.stats.get('total');
271
+ stat.incrementCount();
272
+ stat = TableVectorTileSource.stats.get(key, 'count');
273
+ stat.incrementCount();
274
+ stat = TableVectorTileSource.stats.get('total');
275
+ stat.incrementCount();
276
+ log.log(2, 'tile z%d-%d-%d (features: %d, points: %d, simplified: %d)', z, x, y, tile.numFeatures, tile.numPoints, tile.numSimplified)();
277
+ log.timeEnd(2, 'tile creation')();
278
+ }
279
+ // save reference to original geometry in tile so that we can drill down later if we stop now
280
+ tile.sourceFeatures = features;
281
+ /* eslint-disable no-continue */
282
+ // if it's the first-pass tiling
283
+ if (cz === undefined) {
284
+ // stop tiling if we reached max zoom, or if the tile is too simple
285
+ if (z === this.tableOptions.indexMaxZoom ||
286
+ tile.numPoints <= this.tableOptions.maxPointsPerTile) {
287
+ continue;
288
+ }
289
+ // if a drilldown to a specific tile
290
+ }
291
+ else if (z === this.tableOptions.maxZoom || z === cz) {
292
+ // stop tiling if we reached base zoom or our target tile zoom
293
+ continue;
294
+ }
295
+ else if (cz !== undefined) {
296
+ // stop tiling if it's not an ancestor of the target tile
297
+ const zoomSteps = cz - z;
298
+ // @ts-expect-error TODO fix the types of cx cy
299
+ if (x !== cx >> zoomSteps || y !== cy >> zoomSteps) {
300
+ continue;
301
+ }
302
+ }
303
+ // if we slice further down, no need to keep source geometry
304
+ tile.sourceFeatures = null;
305
+ if (features.length === 0)
306
+ continue;
307
+ log.time(2, 'clipping tile')();
308
+ // values we'll use for clipping
309
+ const k1 = (0.5 * this.tableOptions.buffer) / this.tableOptions.extent;
310
+ const k2 = 0.5 - k1;
311
+ const k3 = 0.5 + k1;
312
+ const k4 = 1 + k1;
313
+ let tl = null;
314
+ let bl = null;
315
+ let tr = null;
316
+ let br = null;
317
+ let left = clipFeatures(features, z2, x - k1, x + k3, 0, tile.minX, tile.maxX, this.tableOptions);
318
+ let right = clipFeatures(features, z2, x + k2, x + k4, 0, tile.minX, tile.maxX, this.tableOptions);
319
+ // @ts-expect-error - unclear why this is needed?
320
+ features = null;
321
+ if (left) {
322
+ tl = clipFeatures(left, z2, y - k1, y + k3, 1, tile.minY, tile.maxY, this.tableOptions);
323
+ bl = clipFeatures(left, z2, y + k2, y + k4, 1, tile.minY, tile.maxY, this.tableOptions);
324
+ left = null;
325
+ }
326
+ if (right) {
327
+ tr = clipFeatures(right, z2, y - k1, y + k3, 1, tile.minY, tile.maxY, this.tableOptions);
328
+ br = clipFeatures(right, z2, y + k2, y + k4, 1, tile.minY, tile.maxY, this.tableOptions);
329
+ right = null;
330
+ }
331
+ log.timeEnd(2, 'clipping tile')();
332
+ stack.push(tl || [], z + 1, x * 2, y * 2);
333
+ stack.push(bl || [], z + 1, x * 2, y * 2 + 1);
334
+ stack.push(tr || [], z + 1, x * 2 + 1, y * 2);
335
+ stack.push(br || [], z + 1, x * 2 + 1, y * 2 + 1);
336
+ }
337
+ }
338
+ }
339
+ function toID(z, x, y) {
340
+ return ((1 << z) * y + x) * 32 + z;
341
+ }
342
+ /** Detects whether the supplied input is already a resolved table payload. */
343
+ function isLoadableTableInput(data) {
344
+ return typeof data !== 'string' && !(data instanceof Blob);
345
+ }
346
+ /** Loads a GeoJSON table from URL/blob input through the injected core API. */
347
+ async function loadTable(url, options, coreApi) {
348
+ const loaders = options?.core?.loaders;
349
+ if (!coreApi?.load) {
350
+ throw new Error('TableTileSourceLoader requires an injected CoreAPI to load tables from URL or Blob inputs.');
351
+ }
352
+ if (!loaders?.length) {
353
+ throw new Error('TableTileSourceLoader requires `options.core.loaders` when creating a source from URL or Blob inputs.');
354
+ }
355
+ const loadOptions = {
356
+ ...getSourceLoaderOptions(options),
357
+ // This source's tiler consumes object-row GeoJSON features internally.
358
+ geojson: {
359
+ ...options.geojson,
360
+ shape: 'geojson-table'
361
+ }
362
+ };
363
+ const table = await coreApi.load(url, loaders.length === 1 ? loaders[0] : loaders, loadOptions);
364
+ if (!isGeoJSONTable(table)) {
365
+ throw new Error('TableTileSourceLoader requires the configured parser loaders to return a GeoJSONTable.');
366
+ }
367
+ return table;
368
+ }
369
+ /** Checks whether a parser result matches the GeoJSONTable runtime shape. */
370
+ function isGeoJSONTable(table) {
371
+ return Boolean(table &&
372
+ typeof table === 'object' &&
373
+ 'shape' in table &&
374
+ table.shape === 'geojson-table' &&
375
+ 'features' in table &&
376
+ Array.isArray(table.features));
377
+ }
378
+ /*
379
+
380
+ // eslint-disable-next-line max-statements, complexity
381
+ function convertToGeoJSONTable(
382
+ vtTile: ProtoTile,
383
+ options: {
384
+ coordinates: 'local' | 'wgs84' | 'EPSG:4326';
385
+ tileIndex: {x: number; y: number; z: number};
386
+ extent: number;
387
+ }
388
+ ): GeoJSONTable | null {
389
+ const features: Feature[] = [];
390
+ for (const rawFeature of vtTile.features) {
391
+ if (!rawFeature || !rawFeature.geometry) {
392
+ continue;
393
+ }
394
+
395
+ let type:
396
+ | 'Point'
397
+ | 'MultiPoint'
398
+ | 'LineString'
399
+ | 'MultiLineString'
400
+ | 'Polygon'
401
+ | 'MultiPolygon';
402
+
403
+ let coordinates: any;
404
+
405
+ // raw geometry
406
+ switch (rawFeature.type) {
407
+ case 1:
408
+ if (rawFeature.geometry.length === 1) {
409
+ type = 'Point';
410
+ coordinates = rawFeature.geometry[0];
411
+ } else {
412
+ type = 'MultiPoint';
413
+ coordinates = rawFeature.geometry;
414
+ }
415
+ break;
416
+ case 2:
417
+ if (rawFeature.geometry.length === 1) {
418
+ type = 'LineString';
419
+ coordinates = rawFeature.geometry[0];
420
+ } else {
421
+ type = 'MultiLineString';
422
+ coordinates = rawFeature.geometry;
423
+ }
424
+ break;
425
+ case 3:
426
+ if (rawFeature.geometry.length > 1) {
427
+ type = 'MultiPolygon';
428
+ coordinates = [rawFeature.geometry];
429
+ } else {
430
+ type = 'Polygon';
431
+ coordinates = rawFeature.geometry;
432
+ }
433
+ break;
434
+ default:
435
+ continue;
436
+ }
437
+
438
+ switch (options.coordinates) {
439
+ case 'EPSG:4326':
440
+ case 'wgs84':
441
+ projectToLngLat(coordinates, options.tileIndex, options.extent);
442
+ break;
443
+
444
+ case 'local':
445
+ convertToLocalCoordinates(coordinates, options.extent);
446
+ break;
447
+
448
+ default:
449
+ throw new Error(`Unsupported CRS ${options.coordinates}`);
450
+ }
451
+
452
+ const feature: Feature = {
453
+ type: 'Feature',
454
+ geometry: {
455
+ type,
456
+ coordinates
457
+ },
458
+ properties: rawFeature.tags || {},
459
+ id: rawFeature.id
460
+ };
461
+
462
+ features.push(feature);
463
+ }
464
+
465
+ if (features.length === 0) {
466
+ return null;
467
+ }
468
+
469
+ const table: GeoJSONTable = {
470
+ shape: 'geojson-table',
471
+ type: 'FeatureCollection',
472
+ features
473
+ };
474
+
475
+ return table;
476
+ }
477
+ */
478
+ //# sourceMappingURL=table-tile-source-loader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table-tile-source-loader.js","sourceRoot":"","sources":["../../src/mvt/table-tile-source-loader.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,uCAAuC;AACvC,oCAAoC;AACpC,6EAA6E;AAW7E,OAAO,EACL,UAAU,EACV,kBAAkB,EAClB,sBAAsB,EACtB,GAAG,EACJ,MAAM,+BAA+B,CAAC;AASvC,OAAO,EAAC,8BAA8B,EAAC,MAAM,wDAAwD,CAAC;AACtG,OAAO,EAAC,iBAAiB,EAAC,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAC,KAAK,EAAE,IAAI,EAAC,MAAM,gBAAgB,CAAC;AAE3C,OAAO,EAAC,0BAA0B,EAAC,+CAA4C;AAG/E,OAAO,EAAC,eAAe,EAAC,yCAAsC;AAC9D,OAAO,EAAC,aAAa,EAAC,6CAA0C,CAAC,4BAA4B;AAC7F,OAAO,EAAC,oBAAoB,EAAC,8CAA2C,CAAC,6BAA6B;AACtG,OAAO,EAAC,6BAA6B,EAAC,uDAAoD;AAC1F,OAAO,EAAC,YAAY,EAAC,qDAAkD,CAAC,4BAA4B;AACpG,OAAO,EAAC,YAAY,EAAC,qDAAkD,CAAC,uBAAuB;AAmC/F,kCAAkC;AAClC,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,QAAQ,EAAE,IAAwC;IAClD,SAAS,EAAE,IAAa;IACxB,IAAI,EAAE,YAAY;IAClB,EAAE,EAAE,aAAa;IACjB,MAAM,EAAE,OAAO;IACf,OAAO,EAAE,OAAO;IAChB,UAAU,EAAE,CAAC,KAAK,CAAC;IACnB,SAAS,EAAE,CAAC,0BAA0B,CAAC;I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b,4FAA4F,CAC7F,CAAC;IACJ,CAAC;IAED,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC;QACrB,MAAM,IAAI,KAAK,CACb,uGAAuG,CACxG,CAAC;IACJ,CAAC;IAED,MAAM,WAAW,GAAG;QAClB,GAAG,sBAAsB,CAAC,OAAO,CAAC;QAClC,uEAAuE;QACvE,OAAO,EAAE;YACP,GAAI,OAAO,CAAC,OAA+C;YAC3D,KAAK,EAAE,eAAe;SACvB;KACF,CAAC;IACF,MAAM,KAAK,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IAChG,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,CAAC;QAC3B,MAAM,IAAI,KAAK,CACb,wFAAwF,CACzF,CAAC;IACJ,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED,6EAA6E;AAC7E,SAAS,cAAc,CAAC,KAAc;IACpC,OAAO,OAAO,CACZ,KAAK;QACH,OAAO,KAAK,KAAK,QAAQ;QACzB,OAAO,IAAI,KAAK;QACf,KAAsB,CAAC,KAAK,KAAK,eAAe;QACjD,UAAU,IAAI,KAAK;QACnB,KAAK,CAAC,OAAO,CAAE,KAAsB,CAAC,QAAQ,CAAC,CAClD,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmGE"}
@@ -0,0 +1,13 @@
1
+ /** TileJSON metadata format. */
2
+ export declare const TileJSONFormat: {
3
+ readonly name: "TileJSON";
4
+ readonly id: "tilejson";
5
+ readonly module: "tiles";
6
+ readonly encoding: "json";
7
+ readonly format: "tilejson";
8
+ readonly extensions: ["json"];
9
+ readonly mimeTypes: ["application/json"];
10
+ readonly category: "metadata";
11
+ readonly text: true;
12
+ };
13
+ //# sourceMappingURL=tilejson-format.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tilejson-format.d.ts","sourceRoot":"","sources":["../../src/mvt/tilejson-format.ts"],"names":[],"mappings":"AAMA,gCAAgC;AAChC,eAAO,MAAM,cAAc;;;;;;;;;;CAUA,CAAC"}
@@ -0,0 +1,16 @@
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
4
+ /** TileJSON metadata format. */
5
+ export const TileJSONFormat = {
6
+ name: 'TileJSON',
7
+ id: 'tilejson',
8
+ module: 'tiles',
9
+ encoding: 'json',
10
+ format: 'tilejson',
11
+ extensions: ['json'],
12
+ mimeTypes: ['application/json'],
13
+ category: 'metadata',
14
+ text: true
15
+ };
16
+ //# sourceMappingURL=tilejson-format.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tilejson-format.js","sourceRoot":"","sources":["../../src/mvt/tilejson-format.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;AAIpC,gCAAgC;AAChC,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,IAAI,EAAE,UAAU;IAChB,EAAE,EAAE,UAAU;IACd,MAAM,EAAE,OAAO;IACf,QAAQ,EAAE,MAAM;IAChB,MAAM,EAAE,UAAU;IAClB,UAAU,EAAE,CAAC,MAAM,CAAC;IACpB,SAAS,EAAE,CAAC,kBAAkB,CAAC;IAC/B,QAAQ,EAAE,UAAU;IACpB,IAAI,EAAE,IAAI;CACe,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { LoaderOptions } from '@loaders.gl/core/loader-utils';
2
+ export type TileJSONLoaderOptions = LoaderOptions & {
3
+ /** Options for the TileJSONLoaderWithParser */
4
+ tilejson?: {
5
+ /** Max number of unique values */
6
+ maxValues?: number;
7
+ };
8
+ };
9
+ /**
10
+ * Loader for TileJSON metadata
11
+ */
12
+ export declare const TileJSONLoaderWithParser: any;
13
+ //# sourceMappingURL=tilejson-loader-with-parser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tilejson-loader-with-parser.d.ts","sourceRoot":"","sources":["../../src/mvt/tilejson-loader-with-parser.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAmB,aAAa,EAAC,MAAM,+BAA+B,CAAC;AAQnF,MAAM,MAAM,qBAAqB,GAAG,aAAa,GAAG;IAClD,+CAA+C;IAC/C,QAAQ,CAAC,EAAE;QACT,kCAAkC;QAClC,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;CACH,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB,KAcwC,CAAC"}
@@ -0,0 +1,25 @@
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
4
+ import { parseTileJSON } from "./lib/parse-tilejson.js";
5
+ import { TileJSONLoader as TileJSONLoaderMetadata } from "./tilejson-loader.js";
6
+ const { preload: _TileJSONLoaderPreload, ...TileJSONLoaderMetadataWithoutPreload } = TileJSONLoaderMetadata;
7
+ /**
8
+ * Loader for TileJSON metadata
9
+ */
10
+ export const TileJSONLoaderWithParser = {
11
+ ...TileJSONLoaderMetadataWithoutPreload,
12
+ worker: false,
13
+ parse: async (arrayBuffer, options) => {
14
+ const jsonString = new TextDecoder().decode(arrayBuffer);
15
+ const json = JSON.parse(jsonString);
16
+ const tilejsonOptions = { ...TileJSONLoaderWithParser.options.tilejson, ...options?.tilejson };
17
+ return parseTileJSON(json, tilejsonOptions);
18
+ },
19
+ parseTextSync: (text, options) => {
20
+ const json = JSON.parse(text);
21
+ const tilejsonOptions = { ...TileJSONLoaderWithParser.options.tilejson, ...options?.tilejson };
22
+ return parseTileJSON(json, tilejsonOptions);
23
+ }
24
+ };
25
+ //# sourceMappingURL=tilejson-loader-with-parser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tilejson-loader-with-parser.js","sourceRoot":"","sources":["../../src/mvt/tilejson-loader-with-parser.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;AAIpC,OAAO,EAAC,aAAa,EAAC,gCAA6B;AACnD,OAAO,EAAC,cAAc,IAAI,sBAAsB,EAAC,6BAA0B;AAE3E,MAAM,EAAC,OAAO,EAAE,sBAAsB,EAAE,GAAG,oCAAoC,EAAC,GAC9E,sBAAsB,CAAC;AAUzB;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,GAAG,oCAAoC;IACvC,MAAM,EAAE,KAAK;IACb,KAAK,EAAE,KAAK,EAAE,WAAwB,EAAE,OAA+B,EAAE,EAAE;QACzE,MAAM,UAAU,GAAG,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;QACzD,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QACpC,MAAM,eAAe,GAAG,EAAC,GAAG,wBAAwB,CAAC,OAAO,CAAC,QAAQ,EAAE,GAAG,OAAO,EAAE,QAAQ,EAAC,CAAC;QAC7F,OAAO,aAAa,CAAC,IAAI,EAAE,eAAe,CAAa,CAAC;IAC1D,CAAC;IACD,aAAa,EAAE,CAAC,IAAY,EAAE,OAA+B,EAAE,EAAE;QAC/D,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC9B,MAAM,eAAe,GAAG,EAAC,GAAG,wBAAwB,CAAC,OAAO,CAAC,QAAQ,EAAE,GAAG,OAAO,EAAE,QAAQ,EAAC,CAAC;QAC7F,OAAO,aAAa,CAAC,IAAI,EAAE,eAAe,CAAa,CAAC;IAC1D,CAAC;CAC0E,CAAC"}
@@ -0,0 +1,56 @@
1
+ import type { LoaderOptions } from '@loaders.gl/core/loader-utils';
2
+ import type { TileJSON } from "./lib/parse-tilejson.js";
3
+ export type TileJSONLoaderOptions = LoaderOptions & {
4
+ /** Options for the TileJSONLoader */
5
+ tilejson?: {
6
+ /** Max number of unique values */
7
+ maxValues?: number;
8
+ };
9
+ };
10
+ /** Preloads the parser-bearing TileJSON loader implementation. */
11
+ declare function preload(): Promise<{
12
+ readonly worker: false;
13
+ readonly parse: (arrayBuffer: ArrayBuffer, options?: import("./tilejson-loader-with-parser").TileJSONLoaderOptions) => any;
14
+ readonly parseTextSync: (text: string, options?: import("./tilejson-loader-with-parser").TileJSONLoaderOptions) => TileJSON;
15
+ readonly module: "pmtiles";
16
+ readonly version: any;
17
+ readonly options: {
18
+ readonly tilejson: {
19
+ readonly maxValues: undefined;
20
+ };
21
+ };
22
+ readonly name: "TileJSON";
23
+ readonly id: "tilejson";
24
+ readonly encoding: "json";
25
+ readonly format: "tilejson";
26
+ readonly extensions: ["json"];
27
+ readonly mimeTypes: ["application/json"];
28
+ readonly category: "metadata";
29
+ readonly text: true;
30
+ readonly dataType: TileJSON;
31
+ readonly batchType: never;
32
+ }>;
33
+ /** Metadata-only loader for TileJSON metadata. */
34
+ export declare const TileJSONLoader: {
35
+ readonly module: "pmtiles";
36
+ readonly version: any;
37
+ readonly worker: true;
38
+ readonly options: {
39
+ readonly tilejson: {
40
+ readonly maxValues: undefined;
41
+ };
42
+ };
43
+ readonly preload: typeof preload;
44
+ readonly name: "TileJSON";
45
+ readonly id: "tilejson";
46
+ readonly encoding: "json";
47
+ readonly format: "tilejson";
48
+ readonly extensions: ["json"];
49
+ readonly mimeTypes: ["application/json"];
50
+ readonly category: "metadata";
51
+ readonly text: true;
52
+ readonly dataType: TileJSON;
53
+ readonly batchType: never;
54
+ };
55
+ export {};
56
+ //# sourceMappingURL=tilejson-loader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tilejson-loader.d.ts","sourceRoot":"","sources":["../../src/mvt/tilejson-loader.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAS,aAAa,EAAC,MAAM,+BAA+B,CAAC;AACzE,OAAO,KAAK,EAAC,QAAQ,EAAC,gCAA6B;AAOnD,MAAM,MAAM,qBAAqB,GAAG,aAAa,GAAG;IAClD,qCAAqC;IACrC,QAAQ,CAAC,EAAE;QACT,kCAAkC;QAClC,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;CACH,CAAC;AAEF,kEAAkE;AAClE,iBAAe,OAAO;;;;;;;;;;;;;;;;;;;uBAOS,QAAQ;wBAClB,KAAK;GALzB;AAED,kDAAkD;AAClD,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;uBACI,QAAQ;wBAClB,KAAK;CAYyC,CAAC"}