@loaders.gl/geospatial 0.0.0-stage → 5.0.0-alpha.14

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 (422) hide show
  1. package/LICENSE +52 -0
  2. package/README.md +8 -2
  3. package/dist/dbf-worker.js +17099 -0
  4. package/dist/dbf.d.ts +2 -0
  5. package/dist/dbf.d.ts.map +1 -0
  6. package/dist/dbf.js +5 -0
  7. package/dist/dbf.js.map +1 -0
  8. package/dist/flatgeobuf/bundled.d.ts +3 -0
  9. package/dist/flatgeobuf/bundled.d.ts.map +1 -0
  10. package/dist/flatgeobuf/bundled.js +5 -0
  11. package/dist/flatgeobuf/bundled.js.map +1 -0
  12. package/dist/flatgeobuf/flatgeobuf-format.d.ts +12 -0
  13. package/dist/flatgeobuf/flatgeobuf-format.d.ts.map +1 -0
  14. package/dist/flatgeobuf/flatgeobuf-format.js +15 -0
  15. package/dist/flatgeobuf/flatgeobuf-format.js.map +1 -0
  16. package/dist/flatgeobuf/flatgeobuf-loader-types.d.ts +104 -0
  17. package/dist/flatgeobuf/flatgeobuf-loader-types.d.ts.map +1 -0
  18. package/dist/flatgeobuf/flatgeobuf-loader-types.js +36 -0
  19. package/dist/flatgeobuf/flatgeobuf-loader-types.js.map +1 -0
  20. package/dist/flatgeobuf/flatgeobuf-loader.d.ts +59 -0
  21. package/dist/flatgeobuf/flatgeobuf-loader.d.ts.map +1 -0
  22. package/dist/flatgeobuf/flatgeobuf-loader.js +38 -0
  23. package/dist/flatgeobuf/flatgeobuf-loader.js.map +1 -0
  24. package/dist/flatgeobuf/flatgeobuf-source-loader.d.ts +105 -0
  25. package/dist/flatgeobuf/flatgeobuf-source-loader.d.ts.map +1 -0
  26. package/dist/flatgeobuf/flatgeobuf-source-loader.js +240 -0
  27. package/dist/flatgeobuf/flatgeobuf-source-loader.js.map +1 -0
  28. package/dist/flatgeobuf/flatgeobuf-table-query-capabilities.d.ts +4 -0
  29. package/dist/flatgeobuf/flatgeobuf-table-query-capabilities.d.ts.map +1 -0
  30. package/dist/flatgeobuf/flatgeobuf-table-query-capabilities.js +12 -0
  31. package/dist/flatgeobuf/flatgeobuf-table-query-capabilities.js.map +1 -0
  32. package/dist/flatgeobuf/index.cjs +5543 -0
  33. package/dist/flatgeobuf/index.cjs.map +6 -0
  34. package/dist/flatgeobuf/index.d.ts +9 -0
  35. package/dist/flatgeobuf/index.d.ts.map +1 -0
  36. package/dist/flatgeobuf/index.js +11 -0
  37. package/dist/flatgeobuf/index.js.map +1 -0
  38. package/dist/flatgeobuf/lib/flatgeobuf-reader.d.ts +97 -0
  39. package/dist/flatgeobuf/lib/flatgeobuf-reader.d.ts.map +1 -0
  40. package/dist/flatgeobuf/lib/flatgeobuf-reader.js +577 -0
  41. package/dist/flatgeobuf/lib/flatgeobuf-reader.js.map +1 -0
  42. package/dist/flatgeobuf/lib/flatgeobuf-worker-transport.d.ts +8 -0
  43. package/dist/flatgeobuf/lib/flatgeobuf-worker-transport.d.ts.map +1 -0
  44. package/dist/flatgeobuf/lib/flatgeobuf-worker-transport.js +44 -0
  45. package/dist/flatgeobuf/lib/flatgeobuf-worker-transport.js.map +1 -0
  46. package/dist/flatgeobuf/lib/parse-flatgeobuf.d.ts +36 -0
  47. package/dist/flatgeobuf/lib/parse-flatgeobuf.d.ts.map +1 -0
  48. package/dist/flatgeobuf/lib/parse-flatgeobuf.js +269 -0
  49. package/dist/flatgeobuf/lib/parse-flatgeobuf.js.map +1 -0
  50. package/dist/flatgeobuf/unbundled.d.ts +3 -0
  51. package/dist/flatgeobuf/unbundled.d.ts.map +1 -0
  52. package/dist/flatgeobuf/unbundled.js +5 -0
  53. package/dist/flatgeobuf/unbundled.js.map +1 -0
  54. package/dist/flatgeobuf-worker.js +32891 -0
  55. package/dist/flatgeobuf.d.ts +2 -0
  56. package/dist/flatgeobuf.d.ts.map +1 -0
  57. package/dist/flatgeobuf.js +5 -0
  58. package/dist/flatgeobuf.js.map +1 -0
  59. package/dist/geopackage/bundled.d.ts +3 -0
  60. package/dist/geopackage/bundled.d.ts.map +1 -0
  61. package/dist/geopackage/bundled.js +5 -0
  62. package/dist/geopackage/bundled.js.map +1 -0
  63. package/dist/geopackage/geopackage-format.d.ts +11 -0
  64. package/dist/geopackage/geopackage-format.d.ts.map +1 -0
  65. package/dist/geopackage/geopackage-format.js +14 -0
  66. package/dist/geopackage/geopackage-format.js.map +1 -0
  67. package/dist/geopackage/geopackage-loader-options.d.ts +5 -0
  68. package/dist/geopackage/geopackage-loader-options.d.ts.map +1 -0
  69. package/dist/geopackage/geopackage-loader-options.js +12 -0
  70. package/dist/geopackage/geopackage-loader-options.js.map +1 -0
  71. package/dist/geopackage/geopackage-loader-types.d.ts +72 -0
  72. package/dist/geopackage/geopackage-loader-types.d.ts.map +1 -0
  73. package/dist/geopackage/geopackage-loader-types.js +30 -0
  74. package/dist/geopackage/geopackage-loader-types.js.map +1 -0
  75. package/dist/geopackage/geopackage-loader.d.ts +26 -0
  76. package/dist/geopackage/geopackage-loader.d.ts.map +1 -0
  77. package/dist/geopackage/geopackage-loader.js +12 -0
  78. package/dist/geopackage/geopackage-loader.js.map +1 -0
  79. package/dist/geopackage/geopackage-source-loader.d.ts +99 -0
  80. package/dist/geopackage/geopackage-source-loader.d.ts.map +1 -0
  81. package/dist/geopackage/geopackage-source-loader.js +258 -0
  82. package/dist/geopackage/geopackage-source-loader.js.map +1 -0
  83. package/dist/geopackage/index.cjs +4433 -0
  84. package/dist/geopackage/index.cjs.map +6 -0
  85. package/dist/geopackage/index.d.ts +7 -0
  86. package/dist/geopackage/index.d.ts.map +1 -0
  87. package/dist/geopackage/index.js +7 -0
  88. package/dist/geopackage/index.js.map +1 -0
  89. package/dist/geopackage/lib/geopackage-tile-metadata.d.ts +22 -0
  90. package/dist/geopackage/lib/geopackage-tile-metadata.d.ts.map +1 -0
  91. package/dist/geopackage/lib/geopackage-tile-metadata.js +105 -0
  92. package/dist/geopackage/lib/geopackage-tile-metadata.js.map +1 -0
  93. package/dist/geopackage/lib/parse-geopackage.d.ts +39 -0
  94. package/dist/geopackage/lib/parse-geopackage.d.ts.map +1 -0
  95. package/dist/geopackage/lib/parse-geopackage.js +485 -0
  96. package/dist/geopackage/lib/parse-geopackage.js.map +1 -0
  97. package/dist/geopackage/lib/types.d.ts +216 -0
  98. package/dist/geopackage/lib/types.d.ts.map +1 -0
  99. package/dist/geopackage/lib/types.js +5 -0
  100. package/dist/geopackage/lib/types.js.map +1 -0
  101. package/dist/geopackage/unbundled.d.ts +3 -0
  102. package/dist/geopackage/unbundled.d.ts.map +1 -0
  103. package/dist/geopackage/unbundled.js +5 -0
  104. package/dist/geopackage/unbundled.js.map +1 -0
  105. package/dist/geopackage.d.ts +2 -0
  106. package/dist/geopackage.d.ts.map +1 -0
  107. package/dist/geopackage.js +5 -0
  108. package/dist/geopackage.js.map +1 -0
  109. package/dist/gpx.d.ts +2 -0
  110. package/dist/gpx.d.ts.map +1 -0
  111. package/dist/gpx.js +5 -0
  112. package/dist/gpx.js.map +1 -0
  113. package/dist/index.cjs +15191 -0
  114. package/dist/index.cjs.map +6 -0
  115. package/dist/index.d.ts +27 -0
  116. package/dist/index.d.ts.map +1 -0
  117. package/dist/index.js +20 -0
  118. package/dist/index.js.map +1 -0
  119. package/dist/kml/bundled.d.ts +13 -0
  120. package/dist/kml/bundled.d.ts.map +1 -0
  121. package/dist/kml/bundled.js +10 -0
  122. package/dist/kml/bundled.js.map +1 -0
  123. package/dist/kml/gpx-loader-types.d.ts +61 -0
  124. package/dist/kml/gpx-loader-types.d.ts.map +1 -0
  125. package/dist/kml/gpx-loader-types.js +25 -0
  126. package/dist/kml/gpx-loader-types.js.map +1 -0
  127. package/dist/kml/gpx-loader.d.ts +56 -0
  128. package/dist/kml/gpx-loader.d.ts.map +1 -0
  129. package/dist/kml/gpx-loader.js +62 -0
  130. package/dist/kml/gpx-loader.js.map +1 -0
  131. package/dist/kml/index.cjs +11435 -0
  132. package/dist/kml/index.cjs.map +6 -0
  133. package/dist/kml/index.d.ts +18 -0
  134. package/dist/kml/index.d.ts.map +1 -0
  135. package/dist/kml/index.js +13 -0
  136. package/dist/kml/index.js.map +1 -0
  137. package/dist/kml/kml-format.d.ts +50 -0
  138. package/dist/kml/kml-format.d.ts.map +1 -0
  139. package/dist/kml/kml-format.js +62 -0
  140. package/dist/kml/kml-format.js.map +1 -0
  141. package/dist/kml/kml-loader-types.d.ts +61 -0
  142. package/dist/kml/kml-loader-types.d.ts.map +1 -0
  143. package/dist/kml/kml-loader-types.js +25 -0
  144. package/dist/kml/kml-loader-types.js.map +1 -0
  145. package/dist/kml/kml-loader.d.ts +56 -0
  146. package/dist/kml/kml-loader.d.ts.map +1 -0
  147. package/dist/kml/kml-loader.js +60 -0
  148. package/dist/kml/kml-loader.js.map +1 -0
  149. package/dist/kml/kml-parser.d.ts +98 -0
  150. package/dist/kml/kml-parser.d.ts.map +1 -0
  151. package/dist/kml/kml-parser.js +461 -0
  152. package/dist/kml/kml-parser.js.map +1 -0
  153. package/dist/kml/kml-writer.d.ts +64 -0
  154. package/dist/kml/kml-writer.d.ts.map +1 -0
  155. package/dist/kml/kml-writer.js +202 -0
  156. package/dist/kml/kml-writer.js.map +1 -0
  157. package/dist/kml/kmz-archive.d.ts +19 -0
  158. package/dist/kml/kmz-archive.d.ts.map +1 -0
  159. package/dist/kml/kmz-archive.js +72 -0
  160. package/dist/kml/kmz-archive.js.map +1 -0
  161. package/dist/kml/kmz-loader-types.d.ts +58 -0
  162. package/dist/kml/kmz-loader-types.d.ts.map +1 -0
  163. package/dist/kml/kmz-loader-types.js +24 -0
  164. package/dist/kml/kmz-loader-types.js.map +1 -0
  165. package/dist/kml/kmz-loader.d.ts +29 -0
  166. package/dist/kml/kmz-loader.d.ts.map +1 -0
  167. package/dist/kml/kmz-loader.js +41 -0
  168. package/dist/kml/kmz-loader.js.map +1 -0
  169. package/dist/kml/kmz-source.d.ts +62 -0
  170. package/dist/kml/kmz-source.d.ts.map +1 -0
  171. package/dist/kml/kmz-source.js +177 -0
  172. package/dist/kml/kmz-source.js.map +1 -0
  173. package/dist/kml/lib/feature-collection-to-arrow.d.ts +90 -0
  174. package/dist/kml/lib/feature-collection-to-arrow.d.ts.map +1 -0
  175. package/dist/kml/lib/feature-collection-to-arrow.js +181 -0
  176. package/dist/kml/lib/feature-collection-to-arrow.js.map +1 -0
  177. package/dist/kml/sports-track-parser.d.ts +6 -0
  178. package/dist/kml/sports-track-parser.d.ts.map +1 -0
  179. package/dist/kml/sports-track-parser.js +411 -0
  180. package/dist/kml/sports-track-parser.js.map +1 -0
  181. package/dist/kml/tcx-loader-types.d.ts +61 -0
  182. package/dist/kml/tcx-loader-types.d.ts.map +1 -0
  183. package/dist/kml/tcx-loader-types.js +25 -0
  184. package/dist/kml/tcx-loader-types.js.map +1 -0
  185. package/dist/kml/tcx-loader.d.ts +56 -0
  186. package/dist/kml/tcx-loader.d.ts.map +1 -0
  187. package/dist/kml/tcx-loader.js +62 -0
  188. package/dist/kml/tcx-loader.js.map +1 -0
  189. package/dist/kml/unbundled.d.ts +13 -0
  190. package/dist/kml/unbundled.d.ts.map +1 -0
  191. package/dist/kml/unbundled.js +10 -0
  192. package/dist/kml/unbundled.js.map +1 -0
  193. package/dist/kml.d.ts +2 -0
  194. package/dist/kml.d.ts.map +1 -0
  195. package/dist/kml.js +5 -0
  196. package/dist/kml.js.map +1 -0
  197. package/dist/kmz.d.ts +2 -0
  198. package/dist/kmz.d.ts.map +1 -0
  199. package/dist/kmz.js +5 -0
  200. package/dist/kmz.js.map +1 -0
  201. package/dist/shapefile/bundled.d.ts +7 -0
  202. package/dist/shapefile/bundled.d.ts.map +1 -0
  203. package/dist/shapefile/bundled.js +7 -0
  204. package/dist/shapefile/bundled.js.map +1 -0
  205. package/dist/shapefile/dbf-format.d.ts +12 -0
  206. package/dist/shapefile/dbf-format.d.ts.map +1 -0
  207. package/dist/shapefile/dbf-format.js +15 -0
  208. package/dist/shapefile/dbf-format.js.map +1 -0
  209. package/dist/shapefile/dbf-loader-types.d.ts +15 -0
  210. package/dist/shapefile/dbf-loader-types.d.ts.map +1 -0
  211. package/dist/shapefile/dbf-loader-types.js +34 -0
  212. package/dist/shapefile/dbf-loader-types.js.map +1 -0
  213. package/dist/shapefile/dbf-loader.d.ts +49 -0
  214. package/dist/shapefile/dbf-loader.d.ts.map +1 -0
  215. package/dist/shapefile/dbf-loader.js +39 -0
  216. package/dist/shapefile/dbf-loader.js.map +1 -0
  217. package/dist/shapefile/index.cjs +5742 -0
  218. package/dist/shapefile/index.cjs.map +6 -0
  219. package/dist/shapefile/index.d.ts +16 -0
  220. package/dist/shapefile/index.d.ts.map +1 -0
  221. package/dist/shapefile/index.js +18 -0
  222. package/dist/shapefile/index.js.map +1 -0
  223. package/dist/shapefile/lib/parsers/build-geoarrow-geometry-arrow.d.ts +18 -0
  224. package/dist/shapefile/lib/parsers/build-geoarrow-geometry-arrow.d.ts.map +1 -0
  225. package/dist/shapefile/lib/parsers/build-geoarrow-geometry-arrow.js +129 -0
  226. package/dist/shapefile/lib/parsers/build-geoarrow-geometry-arrow.js.map +1 -0
  227. package/dist/shapefile/lib/parsers/build-wkb-geometry-arrow.d.ts +12 -0
  228. package/dist/shapefile/lib/parsers/build-wkb-geometry-arrow.d.ts.map +1 -0
  229. package/dist/shapefile/lib/parsers/build-wkb-geometry-arrow.js +206 -0
  230. package/dist/shapefile/lib/parsers/build-wkb-geometry-arrow.js.map +1 -0
  231. package/dist/shapefile/lib/parsers/parse-dbf-to-arrow.d.ts +26 -0
  232. package/dist/shapefile/lib/parsers/parse-dbf-to-arrow.d.ts.map +1 -0
  233. package/dist/shapefile/lib/parsers/parse-dbf-to-arrow.js +347 -0
  234. package/dist/shapefile/lib/parsers/parse-dbf-to-arrow.js.map +1 -0
  235. package/dist/shapefile/lib/parsers/parse-dbf.d.ts +14 -0
  236. package/dist/shapefile/lib/parsers/parse-dbf.d.ts.map +1 -0
  237. package/dist/shapefile/lib/parsers/parse-dbf.js +352 -0
  238. package/dist/shapefile/lib/parsers/parse-dbf.js.map +1 -0
  239. package/dist/shapefile/lib/parsers/parse-shapefile.d.ts +50 -0
  240. package/dist/shapefile/lib/parsers/parse-shapefile.d.ts.map +1 -0
  241. package/dist/shapefile/lib/parsers/parse-shapefile.js +306 -0
  242. package/dist/shapefile/lib/parsers/parse-shapefile.js.map +1 -0
  243. package/dist/shapefile/lib/parsers/parse-shp-geometry.d.ts +50 -0
  244. package/dist/shapefile/lib/parsers/parse-shp-geometry.d.ts.map +1 -0
  245. package/dist/shapefile/lib/parsers/parse-shp-geometry.js +384 -0
  246. package/dist/shapefile/lib/parsers/parse-shp-geometry.js.map +1 -0
  247. package/dist/shapefile/lib/parsers/parse-shp-header.d.ts +26 -0
  248. package/dist/shapefile/lib/parsers/parse-shp-header.d.ts.map +1 -0
  249. package/dist/shapefile/lib/parsers/parse-shp-header.js +43 -0
  250. package/dist/shapefile/lib/parsers/parse-shp-header.js.map +1 -0
  251. package/dist/shapefile/lib/parsers/parse-shp-to-arrow.d.ts +5 -0
  252. package/dist/shapefile/lib/parsers/parse-shp-to-arrow.d.ts.map +1 -0
  253. package/dist/shapefile/lib/parsers/parse-shp-to-arrow.js +130 -0
  254. package/dist/shapefile/lib/parsers/parse-shp-to-arrow.js.map +1 -0
  255. package/dist/shapefile/lib/parsers/parse-shp.d.ts +24 -0
  256. package/dist/shapefile/lib/parsers/parse-shp.d.ts.map +1 -0
  257. package/dist/shapefile/lib/parsers/parse-shp.js +194 -0
  258. package/dist/shapefile/lib/parsers/parse-shp.js.map +1 -0
  259. package/dist/shapefile/lib/parsers/parse-shx.d.ts +10 -0
  260. package/dist/shapefile/lib/parsers/parse-shx.d.ts.map +1 -0
  261. package/dist/shapefile/lib/parsers/parse-shx.js +28 -0
  262. package/dist/shapefile/lib/parsers/parse-shx.js.map +1 -0
  263. package/dist/shapefile/lib/parsers/types.d.ts +85 -0
  264. package/dist/shapefile/lib/parsers/types.d.ts.map +1 -0
  265. package/dist/shapefile/lib/parsers/types.js +5 -0
  266. package/dist/shapefile/lib/parsers/types.js.map +1 -0
  267. package/dist/shapefile/lib/shapefile-worker-transport.d.ts +10 -0
  268. package/dist/shapefile/lib/shapefile-worker-transport.d.ts.map +1 -0
  269. package/dist/shapefile/lib/shapefile-worker-transport.js +46 -0
  270. package/dist/shapefile/lib/shapefile-worker-transport.js.map +1 -0
  271. package/dist/shapefile/lib/streaming/binary-chunk-reader.d.ts +2 -0
  272. package/dist/shapefile/lib/streaming/binary-chunk-reader.d.ts.map +1 -0
  273. package/dist/shapefile/lib/streaming/binary-chunk-reader.js +5 -0
  274. package/dist/shapefile/lib/streaming/binary-chunk-reader.js.map +1 -0
  275. package/dist/shapefile/lib/streaming/binary-reader.d.ts +32 -0
  276. package/dist/shapefile/lib/streaming/binary-reader.d.ts.map +1 -0
  277. package/dist/shapefile/lib/streaming/binary-reader.js +55 -0
  278. package/dist/shapefile/lib/streaming/binary-reader.js.map +1 -0
  279. package/dist/shapefile/lib/streaming/zip-batch-iterators.d.ts +11 -0
  280. package/dist/shapefile/lib/streaming/zip-batch-iterators.d.ts.map +1 -0
  281. package/dist/shapefile/lib/streaming/zip-batch-iterators.js +67 -0
  282. package/dist/shapefile/lib/streaming/zip-batch-iterators.js.map +1 -0
  283. package/dist/shapefile/shapefile-arrow-loader.d.ts +8 -0
  284. package/dist/shapefile/shapefile-arrow-loader.d.ts.map +1 -0
  285. package/dist/shapefile/shapefile-arrow-loader.js +316 -0
  286. package/dist/shapefile/shapefile-arrow-loader.js.map +1 -0
  287. package/dist/shapefile/shapefile-loader-types.d.ts +80 -0
  288. package/dist/shapefile/shapefile-loader-types.d.ts.map +1 -0
  289. package/dist/shapefile/shapefile-loader-types.js +29 -0
  290. package/dist/shapefile/shapefile-loader-types.js.map +1 -0
  291. package/dist/shapefile/shapefile-loader.d.ts +57 -0
  292. package/dist/shapefile/shapefile-loader.d.ts.map +1 -0
  293. package/dist/shapefile/shapefile-loader.js +29 -0
  294. package/dist/shapefile/shapefile-loader.js.map +1 -0
  295. package/dist/shapefile/shp-format.d.ts +27 -0
  296. package/dist/shapefile/shp-format.d.ts.map +1 -0
  297. package/dist/shapefile/shp-format.js +31 -0
  298. package/dist/shapefile/shp-format.js.map +1 -0
  299. package/dist/shapefile/shp-loader-types.d.ts +28 -0
  300. package/dist/shapefile/shp-loader-types.d.ts.map +1 -0
  301. package/dist/shapefile/shp-loader-types.js +31 -0
  302. package/dist/shapefile/shp-loader-types.js.map +1 -0
  303. package/dist/shapefile/shp-loader.d.ts +54 -0
  304. package/dist/shapefile/shp-loader.d.ts.map +1 -0
  305. package/dist/shapefile/shp-loader.js +38 -0
  306. package/dist/shapefile/shp-loader.js.map +1 -0
  307. package/dist/shapefile/unbundled.d.ts +7 -0
  308. package/dist/shapefile/unbundled.d.ts.map +1 -0
  309. package/dist/shapefile/unbundled.js +7 -0
  310. package/dist/shapefile/unbundled.js.map +1 -0
  311. package/dist/shapefile.d.ts +2 -0
  312. package/dist/shapefile.d.ts.map +1 -0
  313. package/dist/shapefile.js +5 -0
  314. package/dist/shapefile.js.map +1 -0
  315. package/dist/shp-worker.js +20232 -0
  316. package/dist/shp.d.ts +2 -0
  317. package/dist/shp.d.ts.map +1 -0
  318. package/dist/shp.js +5 -0
  319. package/dist/shp.js.map +1 -0
  320. package/dist/tcx.d.ts +2 -0
  321. package/dist/tcx.d.ts.map +1 -0
  322. package/dist/tcx.js +5 -0
  323. package/dist/tcx.js.map +1 -0
  324. package/dist/workers/dbf-worker.d.ts +2 -0
  325. package/dist/workers/dbf-worker.d.ts.map +1 -0
  326. package/dist/workers/dbf-worker.js +7 -0
  327. package/dist/workers/dbf-worker.js.map +1 -0
  328. package/dist/workers/flatgeobuf-worker.d.ts +2 -0
  329. package/dist/workers/flatgeobuf-worker.d.ts.map +1 -0
  330. package/dist/workers/flatgeobuf-worker.js +7 -0
  331. package/dist/workers/flatgeobuf-worker.js.map +1 -0
  332. package/dist/workers/geopackage-worker.d.ts +2 -0
  333. package/dist/workers/geopackage-worker.d.ts.map +1 -0
  334. package/dist/workers/geopackage-worker.js +7 -0
  335. package/dist/workers/geopackage-worker.js.map +1 -0
  336. package/dist/workers/shp-worker.d.ts +2 -0
  337. package/dist/workers/shp-worker.d.ts.map +1 -0
  338. package/dist/workers/shp-worker.js +7 -0
  339. package/dist/workers/shp-worker.js.map +1 -0
  340. package/package.json +291 -4
  341. package/src/dbf.ts +5 -0
  342. package/src/flatgeobuf/LICENSE +9 -0
  343. package/src/flatgeobuf/bundled.ts +9 -0
  344. package/src/flatgeobuf/flatgeobuf-format.ts +17 -0
  345. package/src/flatgeobuf/flatgeobuf-loader-types.ts +70 -0
  346. package/src/flatgeobuf/flatgeobuf-loader.ts +66 -0
  347. package/src/flatgeobuf/flatgeobuf-source-loader.ts +338 -0
  348. package/src/flatgeobuf/flatgeobuf-table-query-capabilities.ts +14 -0
  349. package/src/flatgeobuf/index.ts +24 -0
  350. package/src/flatgeobuf/lib/flatgeobuf-reader.ts +719 -0
  351. package/src/flatgeobuf/lib/flatgeobuf-worker-transport.ts +63 -0
  352. package/src/flatgeobuf/lib/parse-flatgeobuf.ts +383 -0
  353. package/src/flatgeobuf/unbundled.ts +6 -0
  354. package/src/flatgeobuf.ts +5 -0
  355. package/src/geopackage/bundled.ts +6 -0
  356. package/src/geopackage/geopackage-format.ts +16 -0
  357. package/src/geopackage/geopackage-loader-options.ts +13 -0
  358. package/src/geopackage/geopackage-loader-types.ts +60 -0
  359. package/src/geopackage/geopackage-loader.ts +21 -0
  360. package/src/geopackage/geopackage-source-loader.ts +364 -0
  361. package/src/geopackage/index.ts +16 -0
  362. package/src/geopackage/lib/geopackage-tile-metadata.ts +156 -0
  363. package/src/geopackage/lib/parse-geopackage.ts +679 -0
  364. package/src/geopackage/lib/types.ts +293 -0
  365. package/src/geopackage/unbundled.ts +6 -0
  366. package/src/geopackage.ts +5 -0
  367. package/src/gpx.ts +5 -0
  368. package/src/index.ts +30 -0
  369. package/src/kml/bundled.ts +21 -0
  370. package/src/kml/gpx-loader-types.ts +50 -0
  371. package/src/kml/gpx-loader.ts +101 -0
  372. package/src/kml/index.ts +39 -0
  373. package/src/kml/kml-format.ts +70 -0
  374. package/src/kml/kml-loader-types.ts +46 -0
  375. package/src/kml/kml-loader.ts +98 -0
  376. package/src/kml/kml-parser.ts +593 -0
  377. package/src/kml/kml-writer.ts +252 -0
  378. package/src/kml/kmz-archive.ts +92 -0
  379. package/src/kml/kmz-loader-types.ts +37 -0
  380. package/src/kml/kmz-loader.ts +56 -0
  381. package/src/kml/kmz-source.ts +234 -0
  382. package/src/kml/lib/feature-collection-to-arrow.ts +231 -0
  383. package/src/kml/sports-track-parser.ts +426 -0
  384. package/src/kml/tcx-loader-types.ts +50 -0
  385. package/src/kml/tcx-loader.ts +101 -0
  386. package/src/kml/unbundled.ts +21 -0
  387. package/src/kml.ts +5 -0
  388. package/src/kmz.ts +5 -0
  389. package/src/shapefile/bundled.ts +18 -0
  390. package/src/shapefile/dbf-format.ts +17 -0
  391. package/src/shapefile/dbf-loader-types.ts +51 -0
  392. package/src/shapefile/dbf-loader.ts +79 -0
  393. package/src/shapefile/index.ts +25 -0
  394. package/src/shapefile/lib/parsers/build-geoarrow-geometry-arrow.ts +172 -0
  395. package/src/shapefile/lib/parsers/build-wkb-geometry-arrow.ts +340 -0
  396. package/src/shapefile/lib/parsers/parse-dbf-to-arrow.ts +429 -0
  397. package/src/shapefile/lib/parsers/parse-dbf.ts +422 -0
  398. package/src/shapefile/lib/parsers/parse-shapefile.ts +417 -0
  399. package/src/shapefile/lib/parsers/parse-shp-geometry.ts +527 -0
  400. package/src/shapefile/lib/parsers/parse-shp-header.ts +64 -0
  401. package/src/shapefile/lib/parsers/parse-shp-to-arrow.ts +184 -0
  402. package/src/shapefile/lib/parsers/parse-shp.ts +245 -0
  403. package/src/shapefile/lib/parsers/parse-shx.ts +39 -0
  404. package/src/shapefile/lib/parsers/types.ts +96 -0
  405. package/src/shapefile/lib/shapefile-worker-transport.ts +72 -0
  406. package/src/shapefile/lib/streaming/binary-chunk-reader.ts +8 -0
  407. package/src/shapefile/lib/streaming/binary-reader.ts +60 -0
  408. package/src/shapefile/lib/streaming/zip-batch-iterators.ts +78 -0
  409. package/src/shapefile/shapefile-arrow-loader.ts +448 -0
  410. package/src/shapefile/shapefile-loader-types.ts +70 -0
  411. package/src/shapefile/shapefile-loader.ts +76 -0
  412. package/src/shapefile/shp-format.ts +34 -0
  413. package/src/shapefile/shp-loader-types.ts +60 -0
  414. package/src/shapefile/shp-loader.ts +80 -0
  415. package/src/shapefile/unbundled.ts +12 -0
  416. package/src/shapefile.ts +5 -0
  417. package/src/shp.ts +5 -0
  418. package/src/tcx.ts +5 -0
  419. package/src/workers/dbf-worker.ts +8 -0
  420. package/src/workers/flatgeobuf-worker.ts +8 -0
  421. package/src/workers/geopackage-worker.ts +8 -0
  422. package/src/workers/shp-worker.ts +8 -0
@@ -0,0 +1,177 @@
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
4
+ import { DataSource } from '@loaders.gl/core/loader-utils';
5
+ import { buildFeatureTableSchema, convertFeatureCollectionToArrowTable } from "./lib/feature-collection-to-arrow.js";
6
+ import { KMZFormat } from "./kml-format.js";
7
+ import { openKMZArchive } from "./kmz-archive.js";
8
+ // __VERSION__ is injected by babel-plugin-version-inline
9
+ // @ts-ignore TS2304: Cannot find name '__VERSION__'.
10
+ const VERSION = typeof "5.0.0-alpha.14" !== 'undefined' ? "5.0.0-alpha.14" : 'latest';
11
+ /** Source loader for KMZ archives containing one primary KML document. */
12
+ export const KMZSourceLoader = {
13
+ dataType: null,
14
+ batchType: null,
15
+ ...KMZFormat,
16
+ version: VERSION,
17
+ type: 'kmz',
18
+ fromUrl: true,
19
+ fromBlob: true,
20
+ options: { kmz: { format: 'arrow' } },
21
+ defaultOptions: { kmz: { format: 'arrow' } },
22
+ testURL: (url) => /\.kmz($|[?#])/i.test(url),
23
+ testData: (data) => ['application/vnd.google-earth.kmz', 'application/vnd.google-earth.kmz+zip'].includes(data.type.toLowerCase()),
24
+ createDataSource: (data, options, coreApi) => new KMZVectorSource(data, options, coreApi)
25
+ };
26
+ /** Lazy vector source backed by a KMZ archive. */
27
+ export class KMZVectorSource extends DataSource {
28
+ archivePromise;
29
+ /** Creates a source from a KMZ URL, Blob, or File. */
30
+ constructor(data, options, coreApi) {
31
+ super(data, options, KMZSourceLoader.defaultOptions, coreApi);
32
+ this.archivePromise = openKMZArchive(data, this.fetch);
33
+ }
34
+ /** Opens the archive and parses its primary KML document. */
35
+ async initialize() {
36
+ await this.archivePromise;
37
+ }
38
+ /** Releases the archive's underlying file handle. */
39
+ async close() {
40
+ const archive = await this.archivePromise;
41
+ await archive.close();
42
+ }
43
+ /** Returns the schema inferred from Placemark properties. */
44
+ async getSchema() {
45
+ const archive = await this.archivePromise;
46
+ return buildFeatureTableSchema(archive.document.features);
47
+ }
48
+ /** Returns normalized KMZ metadata, including the archive entry names when requested. */
49
+ async getMetadata(options = {}) {
50
+ const archive = await this.archivePromise;
51
+ const metadata = {
52
+ name: archive.document.name || archive.kmlFileName,
53
+ title: archive.document.name,
54
+ abstract: archive.document.description,
55
+ keywords: [],
56
+ layers: [makeRootLayer(archive.document.features, archive.document.folders)]
57
+ };
58
+ if (options.formatSpecificMetadata) {
59
+ metadata.formatSpecificMetadata = {
60
+ kmlFileName: archive.kmlFileName,
61
+ fileNames: archive.fileNames,
62
+ coordinateReferenceSystem: archive.document.coordinateReferenceSystem,
63
+ overlays: omitRawMetadata(archive.document.overlays),
64
+ networkLinks: omitRawMetadata(archive.document.networkLinks),
65
+ models: omitRawMetadata(archive.document.models),
66
+ styles: archive.document.styles
67
+ };
68
+ }
69
+ return metadata;
70
+ }
71
+ /** Returns lazily decoded bytes for a resource referenced by the primary KML document. */
72
+ async getResource(path) {
73
+ const archive = await this.archivePromise;
74
+ return archive.getResource(path);
75
+ }
76
+ /** Returns all matching Placemark features, optionally filtered by a WGS84 bounding box. */
77
+ async getFeatures(parameters) {
78
+ const archive = await this.archivePromise;
79
+ const features = parameters.boundingBox
80
+ ? archive.document.features.filter(feature => featureIntersectsBounds(feature, parameters.boundingBox))
81
+ : archive.document.features;
82
+ const format = parameters.format || this.options.kmz?.format || 'arrow';
83
+ if (format === 'arrow')
84
+ return convertFeatureCollectionToArrowTable(features);
85
+ if (format === 'binary') {
86
+ throw new Error('KMZVectorSource does not yet support binary geometry output');
87
+ }
88
+ const table = {
89
+ shape: 'geojson-table',
90
+ schema: buildFeatureTableSchema(features),
91
+ type: 'FeatureCollection',
92
+ features
93
+ };
94
+ return table;
95
+ }
96
+ }
97
+ /** Removes DOM nodes from metadata exposed through the serializable source API. */
98
+ function omitRawMetadata(values) {
99
+ return values.map(({ raw: _raw, ...value }) => value);
100
+ }
101
+ function makeRootLayer(features, folders) {
102
+ const bounds = getFeatureBounds(features);
103
+ return {
104
+ name: 'default',
105
+ title: 'KML features',
106
+ crs: ['OGC:CRS84'],
107
+ boundingBox: bounds,
108
+ layers: folders.map(folder => ({
109
+ name: folder.path.join('/'),
110
+ title: folder.name,
111
+ crs: ['OGC:CRS84'],
112
+ boundingBox: getFeatureBounds(folder.features)
113
+ }))
114
+ };
115
+ }
116
+ function featureIntersectsBounds(feature, bounds) {
117
+ const featureBounds = getGeometryBounds(feature.geometry);
118
+ if (!featureBounds)
119
+ return false;
120
+ return !(featureBounds[1][0] < bounds[0][0] ||
121
+ featureBounds[0][0] > bounds[1][0] ||
122
+ featureBounds[1][1] < bounds[0][1] ||
123
+ featureBounds[0][1] > bounds[1][1]);
124
+ }
125
+ function getFeatureBounds(features) {
126
+ const bounds = features.map(feature => getGeometryBounds(feature.geometry)).filter(Boolean);
127
+ if (!bounds.length)
128
+ return undefined;
129
+ return [
130
+ [
131
+ Math.min(...bounds.map(bound => bound[0][0])),
132
+ Math.min(...bounds.map(bound => bound[0][1]))
133
+ ],
134
+ [Math.max(...bounds.map(bound => bound[1][0])), Math.max(...bounds.map(bound => bound[1][1]))]
135
+ ];
136
+ }
137
+ function getGeometryBounds(geometry) {
138
+ if (!geometry)
139
+ return undefined;
140
+ const bounds = { minX: Infinity, minY: Infinity, maxX: -Infinity, maxY: -Infinity };
141
+ visitGeometryCoordinates(geometry, bounds);
142
+ if (bounds.minX === Infinity)
143
+ return undefined;
144
+ return [
145
+ [bounds.minX, bounds.minY],
146
+ [bounds.maxX, bounds.maxY]
147
+ ];
148
+ }
149
+ function visitGeometryCoordinates(geometry, bounds) {
150
+ if (!geometry)
151
+ return;
152
+ if ('coordinates' in geometry) {
153
+ visitCoordinates(geometry.coordinates, bounds);
154
+ }
155
+ else {
156
+ for (const child of geometry.geometries)
157
+ visitGeometryCoordinates(child, bounds);
158
+ }
159
+ }
160
+ function visitCoordinates(coordinates, bounds) {
161
+ if (!Array.isArray(coordinates))
162
+ return;
163
+ if (typeof coordinates[0] === 'number') {
164
+ const x = Number(coordinates[0]);
165
+ const y = Number(coordinates[1]);
166
+ if (Number.isFinite(x) && Number.isFinite(y)) {
167
+ bounds.minX = Math.min(bounds.minX, x);
168
+ bounds.minY = Math.min(bounds.minY, y);
169
+ bounds.maxX = Math.max(bounds.maxX, x);
170
+ bounds.maxY = Math.max(bounds.maxY, y);
171
+ }
172
+ return;
173
+ }
174
+ for (const child of coordinates)
175
+ visitCoordinates(child, bounds);
176
+ }
177
+ //# sourceMappingURL=kmz-source.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kmz-source.js","sourceRoot":"","sources":["../../src/kml/kmz-source.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;AAapC,OAAO,EAAC,UAAU,EAAC,MAAM,+BAA+B,CAAC;AACzD,OAAO,EACL,uBAAuB,EACvB,oCAAoC,EACrC,6CAA0C;AAC3C,OAAO,EAAC,SAAS,EAAC,wBAAqB;AACvC,OAAO,EAAC,cAAc,EAAkB,yBAAsB;AAG9D,yDAAyD;AACzD,qDAAqD;AACrD,MAAM,OAAO,GAAG,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,OAAO;IACT,CAAC;IACD,KAAK,MAAM,KAAK,IAAI,WAAW;QAAE,gBAAgB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;AACnE,CAAC"}
@@ -0,0 +1,90 @@
1
+ import type { ArrowTable, Feature, Geometry, GeoJsonProperties, Schema } from '@loaders.gl/core/schema';
2
+ import type { GeoArrowEncodingPreference } from '@loaders.gl/core/schema';
3
+ /**
4
+ * Converts GeoJSON features into a loaders.gl Arrow table with WKB geometry metadata.
5
+ *
6
+ * @param features - Parsed GeoJSON features.
7
+ * @returns Arrow table preserving properties and storing geometry as WKB bytes.
8
+ */
9
+ export declare function convertFeatureCollectionToArrowTable(features: Feature[], options?: {
10
+ encodingPreference?: GeoArrowEncodingPreference;
11
+ }): ArrowTable;
12
+ /**
13
+ * Builds the output Arrow schema for a feature table with a WKB geometry column.
14
+ *
15
+ * @param propertySchema - Schema inferred from feature properties.
16
+ * @param features - Features used to infer geometry metadata.
17
+ * @returns Output schema with appended geometry field and geo metadata.
18
+ */
19
+ export declare function buildFeatureArrowSchema(propertySchema: Schema, features: Feature[]): Schema;
20
+ /**
21
+ * Builds a feature-table schema from GeoJSON feature properties.
22
+ *
23
+ * @param features - Parsed GeoJSON features.
24
+ * @returns Schema inferred from feature properties.
25
+ */
26
+ export declare function buildFeatureTableSchema(features: Feature[]): Schema;
27
+ /**
28
+ * Converts one feature into an object row suitable for `ArrowTableBuilder`.
29
+ *
30
+ * @param properties - Normalized feature properties.
31
+ * @param feature - Feature containing optional geometry.
32
+ * @returns Object row with a WKB geometry column.
33
+ */
34
+ export declare function makeFeatureArrowRow(properties: Record<string, unknown>, feature: Feature): Record<string, unknown>;
35
+ /**
36
+ * Infers GeoParquet geometry type strings from a feature collection.
37
+ *
38
+ * @param features - Features to inspect.
39
+ * @returns Unique geometry type strings in encounter order.
40
+ */
41
+ export declare function inferFeatureGeometryTypes(features: Feature[]): string[];
42
+ /**
43
+ * Normalizes nullable GeoJSON properties to a plain object.
44
+ *
45
+ * @param properties - Feature properties value.
46
+ * @returns Plain object safe for schema deduction and Arrow row building.
47
+ */
48
+ export declare function normalizeProperties(properties: GeoJsonProperties): Record<string, unknown>;
49
+ /**
50
+ * Deduces a property-only schema from normalized object rows.
51
+ *
52
+ * @param propertyRows - Normalized property rows.
53
+ * @returns Property schema or an empty schema when no rows are present.
54
+ */
55
+ export declare function getPropertySchema(propertyRows: Record<string, unknown>[]): Schema;
56
+ /**
57
+ * Selects WKB dimensional flags based on the geometry coordinate dimensionality.
58
+ *
59
+ * @param geometry - Geometry to serialize.
60
+ * @returns WKB options preserving Z and M ordinates when present.
61
+ */
62
+ export declare function getGeometryWKBOptions(geometry: Geometry): {
63
+ hasZ?: boolean;
64
+ hasM?: boolean;
65
+ };
66
+ /**
67
+ * Returns the coordinate dimensionality of a representative geometry coordinate tuple.
68
+ *
69
+ * @param coordinates - Geometry coordinates or nested coordinate arrays.
70
+ * @returns Coordinate tuple length, defaulting to `2`.
71
+ */
72
+ export declare function getCoordinateDimensions(coordinates: unknown): number;
73
+ /**
74
+ * Extracts one representative coordinate payload from a geometry.
75
+ *
76
+ * @param geometry - Geometry to sample.
77
+ * @returns Representative coordinates or `undefined` when the geometry is empty.
78
+ */
79
+ export declare function getGeometrySampleCoordinates(geometry: Geometry): unknown;
80
+ /**
81
+ * Normalizes one property value to an Arrow-friendly scalar representation.
82
+ *
83
+ * Arrays and plain objects are preserved as JSON strings so nested content is not dropped by
84
+ * schema inference.
85
+ *
86
+ * @param propertyValue - Original GeoJSON property value.
87
+ * @returns Arrow-friendly scalar value.
88
+ */
89
+ export declare function normalizePropertyValue(propertyValue: unknown): unknown;
90
+ //# sourceMappingURL=feature-collection-to-arrow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feature-collection-to-arrow.d.ts","sourceRoot":"","sources":["../../../src/kml/lib/feature-collection-to-arrow.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,UAAU,EACV,OAAO,EAEP,QAAQ,EACR,iBAA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,EAAE,QAAQ,GAAG,OAAO,CAExE;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,aAAa,EAAE,OAAO,GAAG,OAAO,CAgBtE"}
@@ -0,0 +1,181 @@
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
4
+ import { convertFeaturesToGeoArrowTable } from '@loaders.gl/arrow-geometry/feature-table';
5
+ import { encodeWKBGeometryValue, getCoordinateDimensions as getCoordinateDimensionsFromGeometry, getGeometrySampleCoordinates as getGeometrySampleCoordinatesFromGeometry, getGeometryWKBOptions as getGeometryWKBOptionsFromGeometry, inferGeoParquetGeometryTypes, makeWKBGeometryField, setWKBGeometrySchemaMetadata } from '@loaders.gl/arrow-geometry/geometry-field';
6
+ import { ArrowTableBuilder, getDataTypeFromArray } from '@loaders.gl/core/schema-utils';
7
+ const GEOMETRY_COLUMN_NAME = 'geometry';
8
+ /**
9
+ * Converts GeoJSON features into a loaders.gl Arrow table with WKB geometry metadata.
10
+ *
11
+ * @param features - Parsed GeoJSON features.
12
+ * @returns Arrow table preserving properties and storing geometry as WKB bytes.
13
+ */
14
+ export function convertFeatureCollectionToArrowTable(features, options = {}) {
15
+ if (options.encodingPreference && options.encodingPreference !== 'geoarrow.wkb') {
16
+ return convertFeaturesToGeoArrowTable(features, options);
17
+ }
18
+ const propertyRows = features.map(feature => normalizeProperties(feature.properties));
19
+ const propertySchema = getPropertySchema(propertyRows);
20
+ const schema = buildFeatureArrowSchema(propertySchema, features);
21
+ const arrowTableBuilder = new ArrowTableBuilder(schema);
22
+ for (let featureIndex = 0; featureIndex < features.length; featureIndex++) {
23
+ arrowTableBuilder.addObjectRow(makeFeatureArrowRow(propertyRows[featureIndex], features[featureIndex]));
24
+ }
25
+ return arrowTableBuilder.finishTable();
26
+ }
27
+ /**
28
+ * Builds the output Arrow schema for a feature table with a WKB geometry column.
29
+ *
30
+ * @param propertySchema - Schema inferred from feature properties.
31
+ * @param features - Features used to infer geometry metadata.
32
+ * @returns Output schema with appended geometry field and geo metadata.
33
+ */
34
+ export function buildFeatureArrowSchema(propertySchema, features) {
35
+ const geometryField = makeWKBGeometryField(GEOMETRY_COLUMN_NAME);
36
+ const schema = {
37
+ fields: [...propertySchema.fields, geometryField],
38
+ metadata: { ...(propertySchema.metadata || {}) }
39
+ };
40
+ setWKBGeometrySchemaMetadata(schema, {
41
+ geometryColumnName: GEOMETRY_COLUMN_NAME,
42
+ geometryTypes: inferGeoParquetGeometryTypes(features.map(feature => feature.geometry))
43
+ });
44
+ return schema;
45
+ }
46
+ /**
47
+ * Builds a feature-table schema from GeoJSON feature properties.
48
+ *
49
+ * @param features - Parsed GeoJSON features.
50
+ * @returns Schema inferred from feature properties.
51
+ */
52
+ export function buildFeatureTableSchema(features) {
53
+ const propertyRows = features.map(feature => normalizeProperties(feature.properties));
54
+ return getPropertySchema(propertyRows);
55
+ }
56
+ /**
57
+ * Converts one feature into an object row suitable for `ArrowTableBuilder`.
58
+ *
59
+ * @param properties - Normalized feature properties.
60
+ * @param feature - Feature containing optional geometry.
61
+ * @returns Object row with a WKB geometry column.
62
+ */
63
+ export function makeFeatureArrowRow(properties, feature) {
64
+ return {
65
+ ...properties,
66
+ [GEOMETRY_COLUMN_NAME]: encodeWKBGeometryValue(feature.geometry)
67
+ };
68
+ }
69
+ /**
70
+ * Infers GeoParquet geometry type strings from a feature collection.
71
+ *
72
+ * @param features - Features to inspect.
73
+ * @returns Unique geometry type strings in encounter order.
74
+ */
75
+ export function inferFeatureGeometryTypes(features) {
76
+ return inferGeoParquetGeometryTypes(features.map(feature => feature.geometry));
77
+ }
78
+ /**
79
+ * Normalizes nullable GeoJSON properties to a plain object.
80
+ *
81
+ * @param properties - Feature properties value.
82
+ * @returns Plain object safe for schema deduction and Arrow row building.
83
+ */
84
+ export function normalizeProperties(properties) {
85
+ if (!properties || typeof properties !== 'object') {
86
+ return {};
87
+ }
88
+ const normalizedProperties = {};
89
+ for (const [propertyName, propertyValue] of Object.entries(properties)) {
90
+ normalizedProperties[propertyName] = normalizePropertyValue(propertyValue);
91
+ }
92
+ return normalizedProperties;
93
+ }
94
+ /**
95
+ * Deduces a property-only schema from normalized object rows.
96
+ *
97
+ * @param propertyRows - Normalized property rows.
98
+ * @returns Property schema or an empty schema when no rows are present.
99
+ */
100
+ export function getPropertySchema(propertyRows) {
101
+ if (propertyRows.length === 0) {
102
+ return { fields: [], metadata: {} };
103
+ }
104
+ const fieldNames = getFieldNames(propertyRows);
105
+ return {
106
+ metadata: {},
107
+ fields: fieldNames.map((fieldName) => {
108
+ const inferredType = getDataTypeFromArray(propertyRows.map(propertyRow => propertyRow[fieldName]));
109
+ return {
110
+ name: fieldName,
111
+ type: inferredType.type === 'float32' ? 'float64' : inferredType.type,
112
+ nullable: inferredType.nullable
113
+ };
114
+ })
115
+ };
116
+ }
117
+ /**
118
+ * Selects WKB dimensional flags based on the geometry coordinate dimensionality.
119
+ *
120
+ * @param geometry - Geometry to serialize.
121
+ * @returns WKB options preserving Z and M ordinates when present.
122
+ */
123
+ export function getGeometryWKBOptions(geometry) {
124
+ return getGeometryWKBOptionsFromGeometry(geometry);
125
+ }
126
+ /**
127
+ * Returns the coordinate dimensionality of a representative geometry coordinate tuple.
128
+ *
129
+ * @param coordinates - Geometry coordinates or nested coordinate arrays.
130
+ * @returns Coordinate tuple length, defaulting to `2`.
131
+ */
132
+ export function getCoordinateDimensions(coordinates) {
133
+ return getCoordinateDimensionsFromGeometry(coordinates);
134
+ }
135
+ /**
136
+ * Extracts one representative coordinate payload from a geometry.
137
+ *
138
+ * @param geometry - Geometry to sample.
139
+ * @returns Representative coordinates or `undefined` when the geometry is empty.
140
+ */
141
+ export function getGeometrySampleCoordinates(geometry) {
142
+ return getGeometrySampleCoordinatesFromGeometry(geometry);
143
+ }
144
+ /**
145
+ * Normalizes one property value to an Arrow-friendly scalar representation.
146
+ *
147
+ * Arrays and plain objects are preserved as JSON strings so nested content is not dropped by
148
+ * schema inference.
149
+ *
150
+ * @param propertyValue - Original GeoJSON property value.
151
+ * @returns Arrow-friendly scalar value.
152
+ */
153
+ export function normalizePropertyValue(propertyValue) {
154
+ if (propertyValue === null ||
155
+ propertyValue === undefined ||
156
+ typeof propertyValue === 'string' ||
157
+ typeof propertyValue === 'number' ||
158
+ typeof propertyValue === 'boolean') {
159
+ return propertyValue ?? null;
160
+ }
161
+ if (propertyValue instanceof Date) {
162
+ return propertyValue.toISOString();
163
+ }
164
+ return JSON.stringify(propertyValue);
165
+ }
166
+ /**
167
+ * Collects stable field names in first-seen order across property rows.
168
+ *
169
+ * @param propertyRows - Normalized property rows.
170
+ * @returns Field names in encounter order.
171
+ */
172
+ function getFieldNames(propertyRows) {
173
+ const fieldNames = new Set();
174
+ for (const propertyRow of propertyRows) {
175
+ for (const fieldName of Object.keys(propertyRow)) {
176
+ fieldNames.add(fieldName);
177
+ }
178
+ }
179
+ return [...fieldNames];
180
+ }
181
+ //# sourceMappingURL=feature-collection-to-arrow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feature-collection-to-arrow.js","sourceRoot":"","sources":["../../../src/kml/lib/feature-collection-to-arrow.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;AAWpC,OAAO,EAAC,8BAA8B,EAAC,MAAM,0CAA0C,CAAC;AACxF,OAAO,EACL,sBAAsB,EACtB,uBAAuB,IAAI,mCAAmC,EAC9D,4BAA4B,IAAI,wCAAwC,EACxE,qBAAqB,IAAI,iCAAiC,EAC1D,4BAA4B,EAC5B,oBAAoB,EACpB,4BAA4B,EAC7B,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAC,iBAAiB,EAAE,oBAAoB,EAAC,MAAM,+BAA+B,CAAC;AAEtF,MAAM,oBAAoB,GAAG,UAAU,CAAC;AAExC;;;;;GAKG;AACH,MAAM,UAAU,oCAAoC,CAClD,QAAmB,EACnB,UAA6D,EAAE;IAE/D,IAAI,OAAO,CAAC,kBAAkB,IAAI,OAAO,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rC,CAAC;IAED,OAAO,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;AACvC,CAAC;AAED;;;;;GAKG;AACH,SAAS,aAAa,CAAC,YAAuC;IAC5D,MAAM,UAAU,GAAG,IAAI,GAAG,EAAU,CAAC;IACrC,KAAK,MAAM,WAAW,IAAI,YAAY,EAAE,CAAC;QACvC,KAAK,MAAM,SAAS,IAAI,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC;YACjD,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC;IACD,OAAO,CAAC,GAAG,UAAU,CAAC,CAAC;AACzB,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { FeatureCollection } from '@loaders.gl/core/schema';
2
+ /** Parses GPX XML text into a GeoJSON feature collection. */
3
+ export declare function parseGPXTextToFeatureCollection(text: string): FeatureCollection;
4
+ /** Parses TCX XML text into a GeoJSON feature collection. */
5
+ export declare function parseTCXTextToFeatureCollection(text: string): FeatureCollection;
6
+ //# sourceMappingURL=sports-track-parser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sports-track-parser.d.ts","sourceRoot":"","sources":["../../src/kml/sports-track-parser.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAU,iBAAiB,EAAW,MAAM,yBAAyB,CAAC;AAuBlF,6DAA6D;AAC7D,wBAAgB,+BAA+B,CAAC,IAAI,EAAE,MAAM,GAAG,iBAAiB,CAiB/E;AAED,6DAA6D;AAC7D,wBAAgB,+BAA+B,CAAC,IAAI,EAAE,MAAM,GAAG,iBAAiB,CAc/E"}