@math.gl/geospatial 5.0.0-beta.3 → 5.0.0-beta.5

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 (475) hide show
  1. package/README.md +192 -2
  2. package/THIRD-PARTY-NOTICES.md +192 -20
  3. package/dist/expressions.d.ts +1 -1
  4. package/dist/expressions.d.ts.map +1 -1
  5. package/dist/index.cjs +456 -4614
  6. package/dist/index.cjs.map +3 -3
  7. package/dist/index.d.ts +9 -8
  8. package/dist/index.d.ts.map +1 -1
  9. package/dist/index.js +5 -4
  10. package/dist/index.js.map +1 -1
  11. package/dist/projection/experimental/common/adjust_lat.js +1 -1
  12. package/dist/projection/experimental/common/adjust_lat.js.map +1 -1
  13. package/dist/projection/experimental/common/adjust_lon.js +1 -1
  14. package/dist/projection/experimental/common/adjust_lon.js.map +1 -1
  15. package/dist/projection/experimental/common/asinhy.js +1 -1
  16. package/dist/projection/experimental/common/asinhy.js.map +1 -1
  17. package/dist/projection/experimental/common/asinz.js +1 -1
  18. package/dist/projection/experimental/common/asinz.js.map +1 -1
  19. package/dist/projection/experimental/common/authlat.js +1 -1
  20. package/dist/projection/experimental/common/authlat.js.map +1 -1
  21. package/dist/projection/experimental/common/authset.js +1 -1
  22. package/dist/projection/experimental/common/authset.js.map +1 -1
  23. package/dist/projection/experimental/common/clens.js +1 -1
  24. package/dist/projection/experimental/common/clens.js.map +1 -1
  25. package/dist/projection/experimental/common/clens_cmplx.js +1 -1
  26. package/dist/projection/experimental/common/clens_cmplx.js.map +1 -1
  27. package/dist/projection/experimental/common/constants.js +1 -1
  28. package/dist/projection/experimental/common/constants.js.map +1 -1
  29. package/dist/projection/experimental/common/cosh.js +1 -1
  30. package/dist/projection/experimental/common/cosh.js.map +1 -1
  31. package/dist/projection/experimental/common/e0fn.js +1 -1
  32. package/dist/projection/experimental/common/e0fn.js.map +1 -1
  33. package/dist/projection/experimental/common/e1fn.js +1 -1
  34. package/dist/projection/experimental/common/e1fn.js.map +1 -1
  35. package/dist/projection/experimental/common/e2fn.js +1 -1
  36. package/dist/projection/experimental/common/e2fn.js.map +1 -1
  37. package/dist/projection/experimental/common/e3fn.js +1 -1
  38. package/dist/projection/experimental/common/e3fn.js.map +1 -1
  39. package/dist/projection/experimental/common/fL.js +1 -1
  40. package/dist/projection/experimental/common/fL.js.map +1 -1
  41. package/dist/projection/experimental/common/gN.js +1 -1
  42. package/dist/projection/experimental/common/gN.js.map +1 -1
  43. package/dist/projection/experimental/common/gatg.js +1 -1
  44. package/dist/projection/experimental/common/gatg.js.map +1 -1
  45. package/dist/projection/experimental/common/hypot.js +1 -1
  46. package/dist/projection/experimental/common/hypot.js.map +1 -1
  47. package/dist/projection/experimental/common/imlfn.js +1 -1
  48. package/dist/projection/experimental/common/imlfn.js.map +1 -1
  49. package/dist/projection/experimental/common/invlatiso.js +1 -1
  50. package/dist/projection/experimental/common/invlatiso.js.map +1 -1
  51. package/dist/projection/experimental/common/iqsfnz.js +1 -1
  52. package/dist/projection/experimental/common/iqsfnz.js.map +1 -1
  53. package/dist/projection/experimental/common/latiso.js +1 -1
  54. package/dist/projection/experimental/common/latiso.js.map +1 -1
  55. package/dist/projection/experimental/common/log1py.js +1 -1
  56. package/dist/projection/experimental/common/log1py.js.map +1 -1
  57. package/dist/projection/experimental/common/mlfn.js +1 -1
  58. package/dist/projection/experimental/common/mlfn.js.map +1 -1
  59. package/dist/projection/experimental/common/msfnz.js +1 -1
  60. package/dist/projection/experimental/common/msfnz.js.map +1 -1
  61. package/dist/projection/experimental/common/phi2z.js +1 -1
  62. package/dist/projection/experimental/common/phi2z.js.map +1 -1
  63. package/dist/projection/experimental/common/pj_enfn.js +1 -1
  64. package/dist/projection/experimental/common/pj_enfn.js.map +1 -1
  65. package/dist/projection/experimental/common/pj_inv_mlfn.js +1 -1
  66. package/dist/projection/experimental/common/pj_inv_mlfn.js.map +1 -1
  67. package/dist/projection/experimental/common/pj_mlfn.js +1 -1
  68. package/dist/projection/experimental/common/pj_mlfn.js.map +1 -1
  69. package/dist/projection/experimental/common/qsfnz.js +1 -1
  70. package/dist/projection/experimental/common/qsfnz.js.map +1 -1
  71. package/dist/projection/experimental/common/sign.js +1 -1
  72. package/dist/projection/experimental/common/sign.js.map +1 -1
  73. package/dist/projection/experimental/common/sinh.js +1 -1
  74. package/dist/projection/experimental/common/sinh.js.map +1 -1
  75. package/dist/projection/experimental/common/srat.js +1 -1
  76. package/dist/projection/experimental/common/srat.js.map +1 -1
  77. package/dist/projection/experimental/common/tsfnz.js +1 -1
  78. package/dist/projection/experimental/common/tsfnz.js.map +1 -1
  79. package/dist/projection/experimental/common/vincenty.js +1 -1
  80. package/dist/projection/experimental/common/vincenty.js.map +1 -1
  81. package/dist/projection/experimental/core.cjs +100 -2
  82. package/dist/projection/experimental/core.cjs.map +2 -2
  83. package/dist/projection/experimental/core.d.ts +1 -0
  84. package/dist/projection/experimental/core.d.ts.map +1 -1
  85. package/dist/projection/experimental/crs/datum-table.js +1 -1
  86. package/dist/projection/experimental/crs/datum-table.js.map +1 -1
  87. package/dist/projection/experimental/crs/ellipsoid-table.js +1 -1
  88. package/dist/projection/experimental/crs/ellipsoid-table.js.map +1 -1
  89. package/dist/projection/experimental/crs/primemeridian-table.js +1 -1
  90. package/dist/projection/experimental/crs/primemeridian-table.js.map +1 -1
  91. package/dist/projection/experimental/crs/structured.js +1 -1
  92. package/dist/projection/experimental/crs/structured.js.map +1 -1
  93. package/dist/projection/experimental/crs/wkt.js +1 -1
  94. package/dist/projection/experimental/crs/wkt.js.map +1 -1
  95. package/dist/projection/experimental/datum.js +1 -1
  96. package/dist/projection/experimental/datum.js.map +1 -1
  97. package/dist/projection/experimental/ellipsoidal-gnomonic.js +1 -1
  98. package/dist/projection/experimental/ellipsoidal-gnomonic.js.map +1 -1
  99. package/dist/projection/experimental/entries/projections/eqc.cjs +1 -0
  100. package/dist/projection/experimental/entries/projections/eqc.cjs.map +1 -1
  101. package/dist/projection/experimental/entries/projections/merc.cjs +1 -0
  102. package/dist/projection/experimental/entries/projections/merc.cjs.map +1 -1
  103. package/dist/projection/experimental/grids/geotiff.js +1 -1
  104. package/dist/projection/experimental/grids/geotiff.js.map +1 -1
  105. package/dist/projection/experimental/grids/ntv2.js +1 -1
  106. package/dist/projection/experimental/grids/ntv2.js.map +1 -1
  107. package/dist/projection/experimental/index.cjs +102 -2
  108. package/dist/projection/experimental/index.cjs.map +3 -3
  109. package/dist/projection/experimental/kernels/aea.js +1 -1
  110. package/dist/projection/experimental/kernels/aea.js.map +1 -1
  111. package/dist/projection/experimental/kernels/aeqd.js +1 -1
  112. package/dist/projection/experimental/kernels/aeqd.js.map +1 -1
  113. package/dist/projection/experimental/kernels/bonne.js +1 -1
  114. package/dist/projection/experimental/kernels/bonne.js.map +1 -1
  115. package/dist/projection/experimental/kernels/cass.js +1 -1
  116. package/dist/projection/experimental/kernels/cass.js.map +1 -1
  117. package/dist/projection/experimental/kernels/cea.js +1 -1
  118. package/dist/projection/experimental/kernels/cea.js.map +1 -1
  119. package/dist/projection/experimental/kernels/eck6.js +1 -1
  120. package/dist/projection/experimental/kernels/eck6.js.map +1 -1
  121. package/dist/projection/experimental/kernels/eqdc.js +1 -1
  122. package/dist/projection/experimental/kernels/eqdc.js.map +1 -1
  123. package/dist/projection/experimental/kernels/eqearth.js +1 -1
  124. package/dist/projection/experimental/kernels/eqearth.js.map +1 -1
  125. package/dist/projection/experimental/kernels/equi.js +1 -1
  126. package/dist/projection/experimental/kernels/equi.js.map +1 -1
  127. package/dist/projection/experimental/kernels/etmerc.js +1 -1
  128. package/dist/projection/experimental/kernels/etmerc.js.map +1 -1
  129. package/dist/projection/experimental/kernels/gauss.js +1 -1
  130. package/dist/projection/experimental/kernels/gauss.js.map +1 -1
  131. package/dist/projection/experimental/kernels/geos.js +1 -1
  132. package/dist/projection/experimental/kernels/geos.js.map +1 -1
  133. package/dist/projection/experimental/kernels/gnom.js +1 -1
  134. package/dist/projection/experimental/kernels/gnom.js.map +1 -1
  135. package/dist/projection/experimental/kernels/gstmerc.js +1 -1
  136. package/dist/projection/experimental/kernels/gstmerc.js.map +1 -1
  137. package/dist/projection/experimental/kernels/krovak.js +1 -1
  138. package/dist/projection/experimental/kernels/krovak.js.map +1 -1
  139. package/dist/projection/experimental/kernels/laea.js +1 -1
  140. package/dist/projection/experimental/kernels/laea.js.map +1 -1
  141. package/dist/projection/experimental/kernels/lcc.js +1 -1
  142. package/dist/projection/experimental/kernels/lcc.js.map +1 -1
  143. package/dist/projection/experimental/kernels/mill.js +1 -1
  144. package/dist/projection/experimental/kernels/mill.js.map +1 -1
  145. package/dist/projection/experimental/kernels/moll.js +1 -1
  146. package/dist/projection/experimental/kernels/moll.js.map +1 -1
  147. package/dist/projection/experimental/kernels/nzmg.js +1 -1
  148. package/dist/projection/experimental/kernels/nzmg.js.map +1 -1
  149. package/dist/projection/experimental/kernels/omerc.js +1 -1
  150. package/dist/projection/experimental/kernels/omerc.js.map +1 -1
  151. package/dist/projection/experimental/kernels/poly.js +1 -1
  152. package/dist/projection/experimental/kernels/poly.js.map +1 -1
  153. package/dist/projection/experimental/kernels/qsc.js +1 -1
  154. package/dist/projection/experimental/kernels/qsc.js.map +1 -1
  155. package/dist/projection/experimental/kernels/robin.js +1 -1
  156. package/dist/projection/experimental/kernels/robin.js.map +1 -1
  157. package/dist/projection/experimental/kernels/sinu.js +1 -1
  158. package/dist/projection/experimental/kernels/sinu.js.map +1 -1
  159. package/dist/projection/experimental/kernels/somerc.js +1 -1
  160. package/dist/projection/experimental/kernels/somerc.js.map +1 -1
  161. package/dist/projection/experimental/kernels/stere.js +1 -1
  162. package/dist/projection/experimental/kernels/stere.js.map +1 -1
  163. package/dist/projection/experimental/kernels/sterea.js +1 -1
  164. package/dist/projection/experimental/kernels/sterea.js.map +1 -1
  165. package/dist/projection/experimental/kernels/tmerc.js +1 -1
  166. package/dist/projection/experimental/kernels/tmerc.js.map +1 -1
  167. package/dist/projection/experimental/kernels/tpers.js +1 -1
  168. package/dist/projection/experimental/kernels/tpers.js.map +1 -1
  169. package/dist/projection/experimental/kernels/vandg.js +1 -1
  170. package/dist/projection/experimental/kernels/vandg.js.map +1 -1
  171. package/dist/projection/experimental/kinematic-helmert.js +1 -1
  172. package/dist/projection/experimental/kinematic-helmert.js.map +1 -1
  173. package/dist/projection/experimental/lazy-projections/index.cjs +100 -2
  174. package/dist/projection/experimental/lazy-projections/index.cjs.map +2 -2
  175. package/dist/projection/experimental/projections/equidistant-cylindrical.d.ts.map +1 -1
  176. package/dist/projection/experimental/projections/equidistant-cylindrical.js +1 -0
  177. package/dist/projection/experimental/projections/equidistant-cylindrical.js.map +1 -1
  178. package/dist/projection/experimental/projections/mercator.d.ts.map +1 -1
  179. package/dist/projection/experimental/projections/mercator.js +1 -0
  180. package/dist/projection/experimental/projections/mercator.js.map +1 -1
  181. package/dist/projection/experimental/transform-description.d.ts +8 -0
  182. package/dist/projection/experimental/transform-description.d.ts.map +1 -0
  183. package/dist/projection/experimental/transform-description.js +57 -0
  184. package/dist/projection/experimental/transform-description.js.map +1 -0
  185. package/dist/projection/experimental/types.d.ts +5 -0
  186. package/dist/projection/experimental/types.d.ts.map +1 -1
  187. package/dist/projection/experimental/typescript-projection.d.ts +4 -0
  188. package/dist/projection/experimental/typescript-projection.d.ts.map +1 -1
  189. package/dist/projection/experimental/typescript-projection.js +54 -5
  190. package/dist/projection/experimental/typescript-projection.js.map +1 -1
  191. package/dist/projection/index.cjs +102 -2
  192. package/dist/projection/index.cjs.map +3 -3
  193. package/dist/projection/transform-analysis.cjs +100 -2
  194. package/dist/projection/transform-analysis.cjs.map +2 -2
  195. package/dist/projection/transform-description.d.ts +44 -0
  196. package/dist/projection/transform-description.d.ts.map +1 -0
  197. package/dist/projection/transform-description.js +5 -0
  198. package/dist/projection/transform-description.js.map +1 -0
  199. package/dist/projection/types.d.ts +4 -0
  200. package/dist/projection/types.d.ts.map +1 -1
  201. package/dist/tasks/definitions.d.ts +3 -3
  202. package/dist/tasks/index.cjs +107 -2
  203. package/dist/tasks/index.cjs.map +3 -3
  204. package/dist/tasks/index.d.ts +1 -1
  205. package/dist/tasks/index.d.ts.map +1 -1
  206. package/dist/tasks/map-worker.js +1 -1
  207. package/dist/tasks/map-worker.js.map +1 -1
  208. package/dist/tasks/operations.d.ts +1 -1
  209. package/dist/tasks/operations.d.ts.map +1 -1
  210. package/dist/tasks/projection-worker.js +1 -1
  211. package/dist/tasks/projection-worker.js.map +1 -1
  212. package/dist/terrain/contour-boundary-diagnostics.d.ts +23 -0
  213. package/dist/terrain/contour-boundary-diagnostics.d.ts.map +1 -0
  214. package/dist/terrain/contour-boundary-diagnostics.js +62 -0
  215. package/dist/terrain/contour-boundary-diagnostics.js.map +1 -0
  216. package/dist/terrain/contour-mixed-weld.d.ts +25 -0
  217. package/dist/terrain/contour-mixed-weld.d.ts.map +1 -0
  218. package/dist/terrain/contour-mixed-weld.js +194 -0
  219. package/dist/terrain/contour-mixed-weld.js.map +1 -0
  220. package/dist/terrain/contour-tile-paths.d.ts +7 -0
  221. package/dist/terrain/contour-tile-paths.d.ts.map +1 -0
  222. package/dist/terrain/contour-tile-paths.js +12 -0
  223. package/dist/terrain/contour-tile-paths.js.map +1 -0
  224. package/dist/terrain/contour-tile-weld.d.ts +24 -0
  225. package/dist/terrain/contour-tile-weld.d.ts.map +1 -0
  226. package/dist/terrain/contour-tile-weld.js +147 -0
  227. package/dist/terrain/contour-tile-weld.js.map +1 -0
  228. package/dist/terrain/gradient-pyramid.d.ts +29 -0
  229. package/dist/terrain/gradient-pyramid.d.ts.map +1 -0
  230. package/dist/terrain/gradient-pyramid.js +94 -0
  231. package/dist/terrain/gradient-pyramid.js.map +1 -0
  232. package/dist/terrain/height-field.d.ts.map +1 -1
  233. package/dist/terrain/height-field.js +48 -5
  234. package/dist/terrain/height-field.js.map +1 -1
  235. package/dist/terrain/index.cjs +448 -4
  236. package/dist/terrain/index.cjs.map +3 -3
  237. package/dist/terrain/index.d.ts +9 -0
  238. package/dist/terrain/index.d.ts.map +1 -1
  239. package/dist/terrain/index.js +5 -0
  240. package/dist/terrain/index.js.map +1 -1
  241. package/dist/terrain/tiled.d.ts +10 -2
  242. package/dist/terrain/tiled.d.ts.map +1 -1
  243. package/dist/terrain/tiled.js +5 -1
  244. package/dist/terrain/tiled.js.map +1 -1
  245. package/dist/terrain/types.d.ts +6 -0
  246. package/dist/terrain/types.d.ts.map +1 -1
  247. package/dist/turf.cjs +25 -671
  248. package/dist/turf.cjs.map +3 -3
  249. package/dist/turf.d.ts +1 -1
  250. package/dist/turf.d.ts.map +1 -1
  251. package/dist/turf.js +2 -2
  252. package/dist/turf.js.map +1 -1
  253. package/package.json +15 -19
  254. package/src/expressions.ts +1 -1
  255. package/src/index.ts +15 -123
  256. package/src/projection/experimental/common/adjust_lat.ts +1 -1
  257. package/src/projection/experimental/common/adjust_lon.ts +1 -1
  258. package/src/projection/experimental/common/asinhy.ts +1 -1
  259. package/src/projection/experimental/common/asinz.ts +1 -1
  260. package/src/projection/experimental/common/authlat.ts +1 -1
  261. package/src/projection/experimental/common/authset.ts +1 -1
  262. package/src/projection/experimental/common/clens.ts +1 -1
  263. package/src/projection/experimental/common/clens_cmplx.ts +1 -1
  264. package/src/projection/experimental/common/constants.ts +1 -1
  265. package/src/projection/experimental/common/cosh.ts +1 -1
  266. package/src/projection/experimental/common/e0fn.ts +1 -1
  267. package/src/projection/experimental/common/e1fn.ts +1 -1
  268. package/src/projection/experimental/common/e2fn.ts +1 -1
  269. package/src/projection/experimental/common/e3fn.ts +1 -1
  270. package/src/projection/experimental/common/fL.ts +1 -1
  271. package/src/projection/experimental/common/gN.ts +1 -1
  272. package/src/projection/experimental/common/gatg.ts +1 -1
  273. package/src/projection/experimental/common/hypot.ts +1 -1
  274. package/src/projection/experimental/common/imlfn.ts +1 -1
  275. package/src/projection/experimental/common/invlatiso.ts +1 -1
  276. package/src/projection/experimental/common/iqsfnz.ts +1 -1
  277. package/src/projection/experimental/common/latiso.ts +1 -1
  278. package/src/projection/experimental/common/log1py.ts +1 -1
  279. package/src/projection/experimental/common/mlfn.ts +1 -1
  280. package/src/projection/experimental/common/msfnz.ts +1 -1
  281. package/src/projection/experimental/common/phi2z.ts +1 -1
  282. package/src/projection/experimental/common/pj_enfn.ts +1 -1
  283. package/src/projection/experimental/common/pj_inv_mlfn.ts +1 -1
  284. package/src/projection/experimental/common/pj_mlfn.ts +1 -1
  285. package/src/projection/experimental/common/qsfnz.ts +1 -1
  286. package/src/projection/experimental/common/sign.ts +1 -1
  287. package/src/projection/experimental/common/sinh.ts +1 -1
  288. package/src/projection/experimental/common/srat.ts +1 -1
  289. package/src/projection/experimental/common/tsfnz.ts +1 -1
  290. package/src/projection/experimental/common/vincenty.ts +1 -1
  291. package/src/projection/experimental/core.ts +8 -0
  292. package/src/projection/experimental/crs/datum-table.ts +1 -1
  293. package/src/projection/experimental/crs/ellipsoid-table.ts +1 -1
  294. package/src/projection/experimental/crs/primemeridian-table.ts +1 -1
  295. package/src/projection/experimental/crs/structured.ts +1 -1
  296. package/src/projection/experimental/crs/wkt.ts +1 -1
  297. package/src/projection/experimental/datum.ts +1 -1
  298. package/src/projection/experimental/ellipsoidal-gnomonic.ts +1 -1
  299. package/src/projection/experimental/exact-helmert.ts +1 -1
  300. package/src/projection/experimental/grids/geotiff.ts +1 -1
  301. package/src/projection/experimental/grids/grid.ts +1 -1
  302. package/src/projection/experimental/grids/ntv2.ts +1 -1
  303. package/src/projection/experimental/helmert-flat.ts +1 -1
  304. package/src/projection/experimental/kernels/aea.ts +1 -1
  305. package/src/projection/experimental/kernels/aeqd.ts +1 -1
  306. package/src/projection/experimental/kernels/bonne.ts +1 -1
  307. package/src/projection/experimental/kernels/cass.ts +1 -1
  308. package/src/projection/experimental/kernels/cea.ts +1 -1
  309. package/src/projection/experimental/kernels/eck6.ts +1 -1
  310. package/src/projection/experimental/kernels/eqdc.ts +1 -1
  311. package/src/projection/experimental/kernels/eqearth.ts +1 -1
  312. package/src/projection/experimental/kernels/equi.ts +1 -1
  313. package/src/projection/experimental/kernels/etmerc.ts +1 -1
  314. package/src/projection/experimental/kernels/gauss.ts +1 -1
  315. package/src/projection/experimental/kernels/geos.ts +1 -1
  316. package/src/projection/experimental/kernels/gnom.ts +1 -1
  317. package/src/projection/experimental/kernels/gstmerc.ts +1 -1
  318. package/src/projection/experimental/kernels/krovak.ts +1 -1
  319. package/src/projection/experimental/kernels/laea.ts +1 -1
  320. package/src/projection/experimental/kernels/lcc.ts +1 -1
  321. package/src/projection/experimental/kernels/mill.ts +1 -1
  322. package/src/projection/experimental/kernels/moll.ts +1 -1
  323. package/src/projection/experimental/kernels/nzmg.ts +1 -1
  324. package/src/projection/experimental/kernels/omerc.ts +1 -1
  325. package/src/projection/experimental/kernels/ortho.ts +1 -1
  326. package/src/projection/experimental/kernels/poly.ts +1 -1
  327. package/src/projection/experimental/kernels/qsc.ts +1 -1
  328. package/src/projection/experimental/kernels/robin.ts +1 -1
  329. package/src/projection/experimental/kernels/sinu.ts +1 -1
  330. package/src/projection/experimental/kernels/somerc.ts +1 -1
  331. package/src/projection/experimental/kernels/stere.ts +1 -1
  332. package/src/projection/experimental/kernels/sterea.ts +1 -1
  333. package/src/projection/experimental/kernels/tmerc.ts +1 -1
  334. package/src/projection/experimental/kernels/tpers.ts +1 -1
  335. package/src/projection/experimental/kernels/vandg.ts +1 -1
  336. package/src/projection/experimental/kinematic-helmert-flat.ts +1 -1
  337. package/src/projection/experimental/kinematic-helmert.ts +1 -1
  338. package/src/projection/experimental/projection-pipeline.ts +1 -1
  339. package/src/projection/experimental/projections/equidistant-cylindrical.ts +1 -0
  340. package/src/projection/experimental/projections/mercator.ts +1 -0
  341. package/src/projection/experimental/projections/ob-tran.ts +1 -1
  342. package/src/projection/experimental/transform-description.ts +82 -0
  343. package/src/projection/experimental/types.ts +5 -0
  344. package/src/projection/experimental/typescript-projection.ts +54 -6
  345. package/src/projection/transform-description.ts +69 -0
  346. package/src/projection/types.ts +11 -0
  347. package/src/tasks/definitions.ts +1 -1
  348. package/src/tasks/index.ts +1 -1
  349. package/src/tasks/map-worker.ts +1 -1
  350. package/src/tasks/operations.ts +1 -1
  351. package/src/tasks/projection-worker.ts +1 -1
  352. package/src/terrain/contour-boundary-diagnostics.ts +90 -0
  353. package/src/terrain/contour-mixed-weld.ts +254 -0
  354. package/src/terrain/contour-tile-paths.ts +20 -0
  355. package/src/terrain/contour-tile-weld.ts +182 -0
  356. package/src/terrain/gradient-pyramid.ts +129 -0
  357. package/src/terrain/height-field.ts +45 -5
  358. package/src/terrain/index.ts +12 -0
  359. package/src/terrain/tiled.ts +16 -3
  360. package/src/terrain/types.ts +9 -1
  361. package/src/turf.ts +7 -3
  362. package/crs/README.md +0 -84
  363. package/crs/schemas/README.md +0 -9
  364. package/dist/geoarrow/builder-entry.d.ts +0 -4
  365. package/dist/geoarrow/builder-entry.d.ts.map +0 -1
  366. package/dist/geoarrow/builder-entry.js +0 -5
  367. package/dist/geoarrow/builder-entry.js.map +0 -1
  368. package/dist/geoarrow/builder.d.ts +0 -106
  369. package/dist/geoarrow/builder.d.ts.map +0 -1
  370. package/dist/geoarrow/builder.js +0 -668
  371. package/dist/geoarrow/builder.js.map +0 -1
  372. package/dist/geoarrow/codecs.d.ts +0 -24
  373. package/dist/geoarrow/codecs.d.ts.map +0 -1
  374. package/dist/geoarrow/codecs.js +0 -916
  375. package/dist/geoarrow/codecs.js.map +0 -1
  376. package/dist/geoarrow/index.cjs +0 -4352
  377. package/dist/geoarrow/index.cjs.map +0 -6
  378. package/dist/geoarrow/index.d.ts +0 -21
  379. package/dist/geoarrow/index.d.ts.map +0 -1
  380. package/dist/geoarrow/index.js +0 -15
  381. package/dist/geoarrow/index.js.map +0 -1
  382. package/dist/geoarrow/kernels.d.ts +0 -56
  383. package/dist/geoarrow/kernels.d.ts.map +0 -1
  384. package/dist/geoarrow/kernels.js +0 -982
  385. package/dist/geoarrow/kernels.js.map +0 -1
  386. package/dist/geoarrow/layout.d.ts +0 -66
  387. package/dist/geoarrow/layout.d.ts.map +0 -1
  388. package/dist/geoarrow/layout.js +0 -723
  389. package/dist/geoarrow/layout.js.map +0 -1
  390. package/dist/geoarrow/stream-tessellate.d.ts +0 -34
  391. package/dist/geoarrow/stream-tessellate.d.ts.map +0 -1
  392. package/dist/geoarrow/stream-tessellate.js +0 -171
  393. package/dist/geoarrow/stream-tessellate.js.map +0 -1
  394. package/dist/geoarrow/stream.d.ts +0 -29
  395. package/dist/geoarrow/stream.d.ts.map +0 -1
  396. package/dist/geoarrow/stream.js +0 -100
  397. package/dist/geoarrow/stream.js.map +0 -1
  398. package/dist/geoarrow/tessellate.d.ts +0 -31
  399. package/dist/geoarrow/tessellate.d.ts.map +0 -1
  400. package/dist/geoarrow/tessellate.js +0 -102
  401. package/dist/geoarrow/tessellate.js.map +0 -1
  402. package/dist/geoarrow/tessellation-entry.d.ts +0 -4
  403. package/dist/geoarrow/tessellation-entry.d.ts.map +0 -1
  404. package/dist/geoarrow/tessellation-entry.js +0 -5
  405. package/dist/geoarrow/tessellation-entry.js.map +0 -1
  406. package/dist/geoarrow/types.d.ts +0 -155
  407. package/dist/geoarrow/types.d.ts.map +0 -1
  408. package/dist/geoarrow/types.js +0 -71
  409. package/dist/geoarrow/types.js.map +0 -1
  410. package/dist/geoarrow/views.d.ts +0 -45
  411. package/dist/geoarrow/views.d.ts.map +0 -1
  412. package/dist/geoarrow/views.js +0 -114
  413. package/dist/geoarrow/views.js.map +0 -1
  414. package/dist/geoarrow/wkb-entry.d.ts +0 -4
  415. package/dist/geoarrow/wkb-entry.d.ts.map +0 -1
  416. package/dist/geoarrow/wkb-entry.js +0 -6
  417. package/dist/geoarrow/wkb-entry.js.map +0 -1
  418. package/dist/geoarrow/worker.d.ts +0 -11
  419. package/dist/geoarrow/worker.d.ts.map +0 -1
  420. package/dist/geoarrow/worker.js +0 -10
  421. package/dist/geoarrow/worker.js.map +0 -1
  422. package/dist/wkb/index.d.ts +0 -11
  423. package/dist/wkb/index.d.ts.map +0 -1
  424. package/dist/wkb/index.js +0 -9
  425. package/dist/wkb/index.js.map +0 -1
  426. package/dist/wkb/types.d.ts +0 -30
  427. package/dist/wkb/types.d.ts.map +0 -1
  428. package/dist/wkb/types.js +0 -34
  429. package/dist/wkb/types.js.map +0 -1
  430. package/dist/wkb/wkb-builder.d.ts +0 -91
  431. package/dist/wkb/wkb-builder.d.ts.map +0 -1
  432. package/dist/wkb/wkb-builder.js +0 -283
  433. package/dist/wkb/wkb-builder.js.map +0 -1
  434. package/dist/wkb/wkb-reader.d.ts +0 -74
  435. package/dist/wkb/wkb-reader.d.ts.map +0 -1
  436. package/dist/wkb/wkb-reader.js +0 -251
  437. package/dist/wkb/wkb-reader.js.map +0 -1
  438. package/dist/wkb/wkb.d.ts +0 -21
  439. package/dist/wkb/wkb.d.ts.map +0 -1
  440. package/dist/wkb/wkb.js +0 -204
  441. package/dist/wkb/wkb.js.map +0 -1
  442. package/dist/wkb/wkt.d.ts +0 -19
  443. package/dist/wkb/wkt.d.ts.map +0 -1
  444. package/dist/wkb/wkt.js +0 -321
  445. package/dist/wkb/wkt.js.map +0 -1
  446. package/projection/THIRD-PARTY-NOTICES.md +0 -210
  447. package/src/discontinuous/elastic/README.md +0 -20
  448. package/src/discontinuous/spherical-clip/README.md +0 -16
  449. package/src/discontinuous/world-kernels/README.md +0 -24
  450. package/src/geoarrow/builder-entry.ts +0 -18
  451. package/src/geoarrow/builder.ts +0 -860
  452. package/src/geoarrow/codecs.ts +0 -1268
  453. package/src/geoarrow/index.ts +0 -111
  454. package/src/geoarrow/kernels.ts +0 -1290
  455. package/src/geoarrow/layout.ts +0 -900
  456. package/src/geoarrow/stream-tessellate.ts +0 -205
  457. package/src/geoarrow/stream.ts +0 -130
  458. package/src/geoarrow/tessellate.ts +0 -133
  459. package/src/geoarrow/tessellation-entry.ts +0 -7
  460. package/src/geoarrow/types.ts +0 -259
  461. package/src/geoarrow/views.ts +0 -150
  462. package/src/geoarrow/wkb-entry.ts +0 -13
  463. package/src/geoarrow/worker.ts +0 -20
  464. package/src/terrain/vendor/README.md +0 -20
  465. package/src/vendor/geographiclib-geodesic/README.md +0 -26
  466. package/src/wkb/index.ts +0 -38
  467. package/src/wkb/types.ts +0 -54
  468. package/src/wkb/wkb-builder.ts +0 -395
  469. package/src/wkb/wkb-reader.ts +0 -401
  470. package/src/wkb/wkb.ts +0 -255
  471. package/src/wkb/wkt.ts +0 -375
  472. /package/{projection/APACHE-2.0-LICENSE.txt → APACHE-2.0-LICENSE.txt} +0 -0
  473. /package/{projection/PROJ-LICENSE.txt → PROJ-LICENSE.txt} +0 -0
  474. /package/{projection/PROJ4-LICENSE.md → PROJ4-LICENSE.md} +0 -0
  475. /package/{crs/schemas → src/crs}/projjson.schema.json +0 -0
@@ -1,259 +0,0 @@
1
- // math.gl
2
- // SPDX-License-Identifier: MIT
3
- // SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
4
-
5
- import type {SpatialReference} from '../crs/index';
6
- import type {TypedArray} from '@math.gl/core';
7
- /** Minimal tagged geometry shape used only by compatibility builders.
8
- *
9
- * The physical GeoArrow APIs never create these values. Keeping the structural type here avoids
10
- * making the descriptor package depend on the WKB format package.
11
- */
12
- export type GeoArrowGeometryValue =
13
- | {type: 'Point'; coordinates: readonly number[]}
14
- | {type: 'LineString'; coordinates: readonly (readonly number[])[]}
15
- | {type: 'Polygon'; coordinates: readonly (readonly (readonly number[])[])[]}
16
- | {type: 'MultiPoint'; coordinates: readonly (readonly number[])[]}
17
- | {type: 'MultiLineString'; coordinates: readonly (readonly (readonly number[])[])[]}
18
- | {type: 'MultiPolygon'; coordinates: readonly (readonly (readonly (readonly number[])[])[])[]}
19
- | {type: 'GeometryCollection'; geometries: readonly GeoArrowGeometryValue[]};
20
-
21
- /** GeoArrow concrete, mixed, bounding-box, and serialized encodings. */
22
- export type GeoArrowEncoding =
23
- | 'geoarrow.point'
24
- | 'geoarrow.linestring'
25
- | 'geoarrow.polygon'
26
- | 'geoarrow.multipoint'
27
- | 'geoarrow.multilinestring'
28
- | 'geoarrow.multipolygon'
29
- | 'geoarrow.geometry'
30
- | 'geoarrow.geometrycollection'
31
- | 'geoarrow.box'
32
- | 'geoarrow.wkb'
33
- | 'geoarrow.wkt';
34
-
35
- /** Semantic coordinate dimensions. M is never interpreted as Z. */
36
- export type GeoArrowDimension = 'xy' | 'xyz' | 'xym' | 'xyzm';
37
-
38
- /** Physical coordinate organization for native geometries. */
39
- export type GeoArrowCoordinateLayout = 'interleaved' | 'separated';
40
-
41
- /** Supported list-offset buffers. */
42
- export type GeoArrowOffsets = Int32Array | BigInt64Array;
43
-
44
- /** Numeric physical storage accepted by GeoArrow descriptors. */
45
- export type GeoArrowNumericArray = TypedArray | BigInt64Array | BigUint64Array;
46
-
47
- /** Borrowed validity bitmap. Set bits are valid rows. */
48
- export type GeoArrowValidity = Readonly<{
49
- values: Uint8Array;
50
- /** Bit position corresponding to logical row zero. */
51
- bitOffset?: number;
52
- }>;
53
-
54
- /** Properties shared by all physical arrays. */
55
- export type GeoArrowArrayBase = Readonly<{
56
- /** Number of logical values represented by this array. */
57
- length: number;
58
- /** Optional borrowed validity bitmap for this nesting level. */
59
- validity?: GeoArrowValidity;
60
- }>;
61
-
62
- /** Primitive scalar storage, optionally strided within a typed array. */
63
- export type GeoArrowPrimitive = GeoArrowArrayBase &
64
- Readonly<{
65
- kind: 'primitive';
66
- values: GeoArrowNumericArray;
67
- /** Scalar offset of logical value zero. */
68
- offset?: number;
69
- /** Scalars between consecutive logical values. Defaults to one. */
70
- stride?: number;
71
- }>;
72
-
73
- /** Fixed-size list storage, used for interleaved coordinate tuples. */
74
- export type GeoArrowFixedSizeList = GeoArrowArrayBase &
75
- Readonly<{
76
- kind: 'fixed-size-list';
77
- size: number;
78
- child: GeoArrowArray;
79
- /** Logical list offset into the child. */
80
- offset?: number;
81
- }>;
82
-
83
- /** Variable-size list storage. */
84
- export type GeoArrowList = GeoArrowArrayBase &
85
- Readonly<{
86
- kind: 'list';
87
- offsets: GeoArrowOffsets;
88
- /** Index of logical row zero in `offsets`. */
89
- offset?: number;
90
- /** Value subtracted from offsets before indexing the supplied child view. */
91
- offsetBase?: number | bigint;
92
- child: GeoArrowArray;
93
- }>;
94
-
95
- /** Named separated children, used for separated coordinates and boxes. */
96
- export type GeoArrowStruct = GeoArrowArrayBase &
97
- Readonly<{
98
- kind: 'struct';
99
- children: Readonly<Record<string, GeoArrowArray>>;
100
- /** Logical struct offset applied to every child. */
101
- offset?: number;
102
- }>;
103
-
104
- /** Struct storage used by `geoarrow.box` minimum/maximum ordinate columns. */
105
- export type GeoArrowBox = GeoArrowStruct;
106
-
107
- /** One dense-union child and its stable type ID. */
108
- export type GeoArrowDenseUnionChild = Readonly<{
109
- name: string;
110
- typeId: number;
111
- /** Child-specific physical encoding (required for mixed-dimensional unions). */
112
- encoding?: GeoArrowEncoding;
113
- /** Child-specific semantic dimension. Falls back to the column dimension for legacy data. */
114
- dimension?: GeoArrowDimension;
115
- /** Child-specific coordinate layout. Falls back to the column layout for legacy data. */
116
- coordinateLayout?: GeoArrowCoordinateLayout | null;
117
- data: GeoArrowArray;
118
- }>;
119
-
120
- /** Dense-union storage for mixed geometry families. */
121
- export type GeoArrowDenseUnion = GeoArrowArrayBase &
122
- Readonly<{
123
- kind: 'dense-union';
124
- typeIds: Int8Array | Uint8Array;
125
- valueOffsets: Int32Array;
126
- children: readonly GeoArrowDenseUnionChild[];
127
- /** Logical row offset into typeIds and valueOffsets. */
128
- offset?: number;
129
- }>;
130
-
131
- /** Variable-width binary or UTF-8 storage for WKB and WKT. */
132
- export type GeoArrowSerialized = GeoArrowArrayBase &
133
- Readonly<{
134
- kind: 'serialized';
135
- encoding: 'binary' | 'utf8';
136
- offsets: GeoArrowOffsets;
137
- values: Uint8Array;
138
- /** Optional Arrow BinaryView-style records (four uint32 words per row). */
139
- views?: Uint32Array;
140
- /** Borrowed out-of-line buffers referenced by BinaryView records. */
141
- dataBuffers?: readonly Uint8Array[];
142
- /** Index of logical row zero in `offsets`. */
143
- offset?: number;
144
- /** Value subtracted from offsets before indexing `values`. */
145
- offsetBase?: number | bigint;
146
- }>;
147
-
148
- /** Arrow-compatible physical array tree without Arrow runtime classes. */
149
- export type GeoArrowArray =
150
- | GeoArrowPrimitive
151
- | GeoArrowFixedSizeList
152
- | GeoArrowList
153
- | GeoArrowStruct
154
- | GeoArrowDenseUnion
155
- | GeoArrowSerialized;
156
-
157
- /** One logical GeoArrow geometry column backed by borrowed chunks. */
158
- export type GeoArrowColumn = Readonly<{
159
- encoding: GeoArrowEncoding;
160
- dimension: GeoArrowDimension;
161
- coordinateLayout: GeoArrowCoordinateLayout | null;
162
- chunks: readonly GeoArrowArray[];
163
- spatialReference?: SpatialReference | null;
164
- edges?: 'planar' | 'spherical';
165
- metadata?: Readonly<Record<string, unknown>>;
166
- }>;
167
-
168
- /** Coordinate callback used by mapping kernels. */
169
- export type GeoArrowCoordinateMapper = (
170
- coordinate: readonly number[],
171
- rowIndex: number
172
- ) => readonly number[];
173
-
174
- /** Four-value XY bounds. */
175
- export type GeoArrowBounds = readonly [number, number, number, number];
176
-
177
- /** Returns the number of coordinate components for a semantic dimension. */
178
- export function getGeoArrowDimensionSize(dimension: GeoArrowDimension): 2 | 3 | 4 {
179
- switch (dimension) {
180
- case 'xy':
181
- return 2;
182
- case 'xyz':
183
- case 'xym':
184
- return 3;
185
- case 'xyzm':
186
- return 4;
187
- }
188
- }
189
-
190
- /** Combines semantic dimensions without confusing a measure ordinate with elevation. */
191
- export function mergeGeoArrowDimensions(
192
- left: GeoArrowDimension,
193
- right: GeoArrowDimension
194
- ): GeoArrowDimension {
195
- const hasZ = left === 'xyz' || left === 'xyzm' || right === 'xyz' || right === 'xyzm';
196
- const hasM = left === 'xym' || left === 'xyzm' || right === 'xym' || right === 'xyzm';
197
- return hasZ && hasM ? 'xyzm' : hasZ ? 'xyz' : hasM ? 'xym' : 'xy';
198
- }
199
-
200
- /**
201
- * Infers the dimensions present in coordinate arrays of a tagged geometry value.
202
- * Three ordinates are interpreted as XYZ; callers with XYM data should supply that semantic
203
- * dimension explicitly instead of inferring it from tuple length.
204
- */
205
- export function inferGeoArrowGeometryDimension(geometry: GeoArrowGeometryValue): GeoArrowDimension {
206
- if (geometry.type === 'GeometryCollection') {
207
- return geometry.geometries.reduce(
208
- (dimension, child) =>
209
- mergeGeoArrowDimensions(dimension, inferGeoArrowGeometryDimension(child)),
210
- 'xy' as GeoArrowDimension
211
- );
212
- }
213
- return inferCoordinateDimensions(geometry.coordinates);
214
- }
215
-
216
- /** Infers the combined dimensions of nested coordinate tuples. */
217
- function inferCoordinateDimensions(coordinates: readonly unknown[]): GeoArrowDimension {
218
- if (typeof coordinates[0] === 'number') {
219
- return coordinates.length >= 4 ? 'xyzm' : coordinates.length === 3 ? 'xyz' : 'xy';
220
- }
221
- let dimension: GeoArrowDimension = 'xy';
222
- for (const child of coordinates) {
223
- if (Array.isArray(child)) {
224
- dimension = mergeGeoArrowDimensions(dimension, inferCoordinateDimensions(child));
225
- }
226
- }
227
- return dimension;
228
- }
229
-
230
- /** Returns the concrete geometry family associated with an encoding. */
231
- export function getGeoArrowGeometryType(
232
- encoding: GeoArrowEncoding
233
- ): Exclude<GeoArrowGeometryValue['type'], 'GeometryCollection'> | 'GeometryCollection' | null {
234
- switch (encoding) {
235
- case 'geoarrow.point':
236
- return 'Point';
237
- case 'geoarrow.linestring':
238
- return 'LineString';
239
- case 'geoarrow.polygon':
240
- return 'Polygon';
241
- case 'geoarrow.multipoint':
242
- return 'MultiPoint';
243
- case 'geoarrow.multilinestring':
244
- return 'MultiLineString';
245
- case 'geoarrow.multipolygon':
246
- return 'MultiPolygon';
247
- case 'geoarrow.geometrycollection':
248
- return 'GeometryCollection';
249
- default:
250
- return null;
251
- }
252
- }
253
-
254
- /** Returns the canonical concrete encoding for a materialized geometry family. */
255
- export function getGeoArrowEncodingForGeometry(
256
- type: GeoArrowGeometryValue['type']
257
- ): GeoArrowEncoding {
258
- return `geoarrow.${type.toLowerCase()}` as GeoArrowEncoding;
259
- }
@@ -1,150 +0,0 @@
1
- // math.gl
2
- // SPDX-License-Identifier: MIT
3
- // SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
4
-
5
- import type {GeoArrowArray, GeoArrowColumn} from './types';
6
- import {getEncodingFromChildName, isGeoArrowValueValid, sliceGeoArrowArray} from './layout';
7
-
8
- /** One physical batch borrowed from a native geometry column. */
9
- export type GeoArrowBatchView = Readonly<{
10
- /** Single-chunk column retaining the source semantics and typed arrays. */
11
- column: GeoArrowColumn;
12
- /** Index of the physical chunk in the source column, including empty chunks. */
13
- chunkIndex: number;
14
- /** First logical row in the source column; not a feature ID or byte cursor. */
15
- rowOffset: number;
16
- }>;
17
-
18
- /** One logical row, with top-level union dispatch resolved without decoding coordinates. */
19
- export type GeoArrowRowView = Readonly<{
20
- /** One-row column, preserving nulls, collections, and exact single/multi identity. */
21
- column: GeoArrowColumn;
22
- /** Logical row index relative to the input column, including null rows. */
23
- rowIndex: number;
24
- /** Physical chunk index in the input column. */
25
- chunkIndex: number;
26
- /** Logical row index within that chunk, before union dispatch. */
27
- chunkRowIndex: number;
28
- }>;
29
-
30
- /**
31
- * Iterates native physical chunks lazily, including empty chunks, without new typed arrays.
32
- * This is not a loader record-batch protocol: one loader batch may contain several chunks.
33
- * Views borrow storage; callers must not mutate, recycle, or detach it while views are in use.
34
- * Assumes valid physical descriptors; use validateGeoArrowColumn for untrusted input.
35
- */
36
- export function* iterateGeoArrowBatches(
37
- column: GeoArrowColumn
38
- ): IterableIterator<GeoArrowBatchView> {
39
- assertNativeGeometryColumn(column);
40
- let rowOffset = 0;
41
- for (let chunkIndex = 0; chunkIndex < column.chunks.length; chunkIndex++) {
42
- const chunk = column.chunks[chunkIndex];
43
- yield {column: {...column, chunks: [chunk]}, chunkIndex, rowOffset};
44
- rowOffset += chunk.length;
45
- }
46
- }
47
-
48
- /**
49
- * Borrows one native geometry row, allocating descriptors but no typed arrays or coordinates.
50
- * Resolves the top-level union by type ID and retains collection grouping inside the row.
51
- * Indices are relative to the supplied column (including when it is already sliced).
52
- * Throws for an invalid row index, serialized/box encoding, or invalid union dispatch.
53
- * Assumes valid physical descriptors beyond the selected union dispatch.
54
- */
55
- export function getGeoArrowRowView(column: GeoArrowColumn, rowIndex: number): GeoArrowRowView {
56
- assertNativeGeometryColumn(column);
57
- if (!Number.isSafeInteger(rowIndex) || rowIndex < 0) {
58
- throw new RangeError('GeoArrow row index must be a nonnegative safe integer');
59
- }
60
- let chunkRowIndex = rowIndex;
61
- for (let chunkIndex = 0; chunkIndex < column.chunks.length; chunkIndex++) {
62
- const chunk = column.chunks[chunkIndex];
63
- if (chunkRowIndex >= chunk.length) {
64
- chunkRowIndex -= chunk.length;
65
- continue;
66
- }
67
- let rowColumn = {
68
- ...column,
69
- chunks: [sliceGeoArrowArray(chunk, chunkRowIndex, chunkRowIndex + 1)]
70
- };
71
- // A parent-masked union row has no child value to resolve; dispatch may be unused.
72
- if (
73
- column.encoding === 'geoarrow.geometry' &&
74
- isGeoArrowValueValid(chunk.validity, chunkRowIndex)
75
- ) {
76
- if (chunk.kind !== 'dense-union') {
77
- throw new Error('Mixed GeoArrow geometry requires dense-union storage');
78
- }
79
- const physicalIndex = (chunk.offset || 0) + chunkRowIndex;
80
- const child = chunk.children.find(
81
- candidate => candidate.typeId === chunk.typeIds[physicalIndex]
82
- );
83
- const valueOffset = chunk.valueOffsets[physicalIndex];
84
- if (
85
- !child ||
86
- !Number.isInteger(valueOffset) ||
87
- valueOffset < 0 ||
88
- valueOffset >= child.data.length
89
- ) {
90
- throw new Error('Invalid GeoArrow union row dispatch');
91
- }
92
- const encoding = child.encoding || getEncodingFromChildName(child.name);
93
- if (encoding === 'geoarrow.geometry') {
94
- throw new Error('GeoArrow geometry union children must be concrete geometries');
95
- }
96
- const data = sliceGeoArrowArray(child.data, valueOffset, valueOffset + 1);
97
- rowColumn = {
98
- ...column,
99
- encoding,
100
- dimension: child.dimension ?? column.dimension,
101
- coordinateLayout: child.coordinateLayout ?? column.coordinateLayout,
102
- chunks: [data]
103
- };
104
- assertNativeGeometryColumn(rowColumn);
105
- }
106
- return {column: rowColumn, rowIndex, chunkIndex, chunkRowIndex};
107
- }
108
- throw new RangeError('GeoArrow row index exceeds column length');
109
- }
110
-
111
- /**
112
- * Assembles a nonempty iterable of compatible native columns without merging physical chunks.
113
- * Encodings, dimensions, and layouts must match. CRS and opaque metadata must be the same
114
- * references (or both absent); no semantic equivalence, metadata merging, or reprojection is
115
- * attempted. Missing edges mean planar. Empty columns/chunks are permitted and retained.
116
- * Returns a new envelope and chunk-reference list, never new typed arrays.
117
- */
118
- export function concatenateGeoArrowColumns(columns: Iterable<GeoArrowColumn>): GeoArrowColumn {
119
- let firstColumn: GeoArrowColumn | undefined;
120
- const chunks: GeoArrowArray[] = [];
121
- for (const column of columns) {
122
- assertNativeGeometryColumn(column);
123
- if (!firstColumn) {
124
- firstColumn = column;
125
- } else if (
126
- column.encoding !== firstColumn.encoding ||
127
- column.dimension !== firstColumn.dimension ||
128
- column.coordinateLayout !== firstColumn.coordinateLayout ||
129
- (column.edges ?? 'planar') !== (firstColumn.edges ?? 'planar') ||
130
- column.spatialReference !== firstColumn.spatialReference ||
131
- column.metadata !== firstColumn.metadata
132
- ) {
133
- throw new Error('Cannot concatenate GeoArrow columns with different semantic envelopes');
134
- }
135
- for (const chunk of column.chunks) chunks.push(chunk);
136
- }
137
- if (!firstColumn) throw new Error('At least one GeoArrow column is required');
138
- return {...firstColumn, chunks};
139
- }
140
-
141
- /** Keeps borrowed geometry access distinct from decoding serialized data or interpreting boxes. */
142
- function assertNativeGeometryColumn(column: GeoArrowColumn): void {
143
- if (
144
- column.encoding === 'geoarrow.wkb' ||
145
- column.encoding === 'geoarrow.wkt' ||
146
- column.encoding === 'geoarrow.box'
147
- ) {
148
- throw new Error('GeoArrow geometry views require native geometry; decode WKB/WKT first');
149
- }
150
- }
@@ -1,13 +0,0 @@
1
- // math.gl
2
- // SPDX-License-Identifier: MIT
3
- // SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
4
-
5
- /** Optional serialized-format bridge. The parser implementation lives in @math.gl/geospatial/wkb. */
6
- export {
7
- decodeGeoArrowWKB,
8
- decodeGeoArrowWKT,
9
- encodeGeoArrowWKB,
10
- encodeGeoArrowWKT,
11
- getGeoArrowWKBVertexCount
12
- } from './codecs';
13
- export type {DecodeGeoArrowWKBOptions} from './codecs';
@@ -1,20 +0,0 @@
1
- // math.gl
2
- // SPDX-License-Identifier: MIT
3
- // SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
4
-
5
- import type {GeoArrowColumn} from './types';
6
- import {getGeoArrowTransferList} from './layout';
7
-
8
- export {getGeoArrowTransferList} from './layout';
9
- export type {GeoArrowColumn} from './types';
10
-
11
- /** A column and the unique borrowed buffers that may be transferred with it. */
12
- export type GeoArrowTransfer = Readonly<{
13
- column: GeoArrowColumn;
14
- transferList: ArrayBuffer[];
15
- }>;
16
-
17
- /** Prepares an explicit structured-clone transfer payload without detaching any buffers. */
18
- export function prepareGeoArrowTransfer(column: GeoArrowColumn): GeoArrowTransfer {
19
- return {column, transferList: getGeoArrowTransferList(column)};
20
- }
@@ -1,20 +0,0 @@
1
- <!-- SPDX-License-Identifier: MIT -->
2
- <!-- SPDX-FileCopyrightText: Copyright (c) vis.gl contributors -->
3
-
4
- # Delatin backend provenance
5
-
6
- `delatin.js` is the implementation used by loaders.gl's terrain loader, copied from
7
- `modules/terrain/src/lib/delatin/index.ts` at loaders.gl commit
8
- `2a9a5ef3094c972617f8208c8cda41c5b24507c0`.
9
- It is based on Michael Fogleman and Vladimir Agafonkin's Delatin algorithm and
10
- retains their ISC license in `DELATIN-LICENSE.txt`; vis.gl changes retain MIT terms.
11
-
12
- The initial transfer changes the source header, removes TypeScript-only suppression
13
- comments, uses a `.js` extension, and applies repository formatting. Algorithm code
14
- is otherwise unchanged. The adjacent public `../delatin.ts` adapter adds capacity
15
- checks, independent nodal-error measurement and plain-array output. This internal
16
- class is not exported as application API and is imported only by the Delatin entry.
17
-
18
- Vendoring the existing implementation enables loaders.gl to remove its copy after
19
- upgrading and preserves synchronous CommonJS consumption without requiring an ESM-only
20
- runtime dependency. This does not claim to track the latest upstream Delatin release.
@@ -1,26 +0,0 @@
1
- <!--
2
- SPDX-License-Identifier: MIT
3
- SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
4
- -->
5
-
6
- # GeographicLib geodesic source
7
-
8
- Upstream: https://github.com/geographiclib/geographiclib-js
9
- Version: 2.2.0
10
- Commit: 9c4036d6242aa997e08e43a20df789e2007fbe6f
11
- License: MIT, Charles Karney; see ../../../GEOGRAPHICLIB-LICENSE.txt.
12
-
13
- `runtime.js` combines `geodesic/Math.js.in`, `geodesic/Geodesic.js` and
14
- `geodesic/GeodesicLine.js`, in that order. Version placeholders in Math.js.in
15
- are filled with 2, 2, 0; an ESM `export {geodesic}` and SPDX header are added.
16
- Upstream implementation and comments are retained. The Math.js input already includes Accumulator. The typed facade exposes inverse, direct, arc and line calculations with optional longitude unrolling and edge area. Prolate geodesics are supported. The separate typed GeodesicPolygon uses the existing accumulator and adapts the MIT GeographicLib 2.7 polygon transit/reduction rules; PolygonArea.js is not vendored.
17
-
18
- Original math.gl short-edge area follow-up replaces cancellation in the C4 cosine-series subtraction with the trigonometric difference identity, for arcs below 0.01 radians. Native series/Exact disagreements at tiny areas are retained as diagnostics and independently gated by 80-digit small-triangle integrals. See the ellipsoid accuracy audit for qualified domains. No npm dependency is introduced.
19
-
20
- Do not replace this robust geodesic solver with a spherical or Vincenty fallback:
21
- the nearly antipodal tests and reduced-length/scale gnomonic checks must pass.
22
-
23
- The optional math.gl `GenPosition` output parameter reuses a caller-owned result
24
- for packed line sampling. Existing three-argument calls still create independent
25
- results. No geodesic equations or masks are changed. Internal kernel temporaries
26
- can still allocate; this is not a universal allocation-free claim.
package/src/wkb/index.ts DELETED
@@ -1,38 +0,0 @@
1
- // math.gl
2
- // SPDX-License-Identifier: MIT
3
- // SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
4
-
5
- export type {WellKnownDimension, WellKnownGeometry} from './types';
6
- export {
7
- getWellKnownDimensionSize,
8
- inferWellKnownGeometryDimension
9
- } from './types';
10
-
11
- export type {WKBParseOptions, WKBParseResult} from './wkb';
12
- export {parseWKB, writeWKB} from './wkb';
13
-
14
- export type {
15
- WKBBounds,
16
- WKBDialect,
17
- WKBGeometryCounts,
18
- WKBGeometryType,
19
- WKBHeader,
20
- WKBScanResult,
21
- WKBTraversalOptions,
22
- WKBVisitor
23
- } from './wkb-reader';
24
- export {inspectWKBHeader, scanWKB, visitWKB} from './wkb-reader';
25
-
26
- export type {
27
- WKBBuilderBaseOptions,
28
- WKBBuilderMeasureOptions,
29
- WKBBuilderOptions,
30
- WKBBuilderWriteOptions,
31
- WKBCoordinateTransform,
32
- WKBGeometryArray,
33
- WKBGeometryWriter
34
- } from './wkb-builder';
35
- export {WKBBuilder} from './wkb-builder';
36
-
37
- export type {WKTParseOptions, WKTParseResult} from './wkt';
38
- export {formatWKT, parseWKT, parseWKTWithMetadata} from './wkt';
package/src/wkb/types.ts DELETED
@@ -1,54 +0,0 @@
1
- // math.gl
2
- // SPDX-License-Identifier: MIT
3
- // SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
4
-
5
- /** Semantic coordinate dimensions used by WKB and WKT. M is distinct from Z. */
6
- export type WellKnownDimension = 'xy' | 'xyz' | 'xym' | 'xyzm';
7
-
8
- /** Immutable, format-neutral geometry value shared by the WKB and WKT codecs. */
9
- export type WellKnownGeometry =
10
- | Readonly<{type: 'Point'; coordinates: readonly number[]}>
11
- | Readonly<{type: 'LineString'; coordinates: readonly (readonly number[])[]}>
12
- | Readonly<{type: 'Polygon'; coordinates: readonly (readonly (readonly number[])[])[]}>
13
- | Readonly<{type: 'MultiPoint'; coordinates: readonly (readonly number[])[]}>
14
- | Readonly<{
15
- type: 'MultiLineString';
16
- coordinates: readonly (readonly (readonly number[])[])[];
17
- }>
18
- | Readonly<{
19
- type: 'MultiPolygon';
20
- coordinates: readonly (readonly (readonly (readonly number[])[])[])[];
21
- }>
22
- | Readonly<{type: 'GeometryCollection'; geometries: readonly WellKnownGeometry[]}>;
23
-
24
- /** Returns the number of coordinate components in a semantic dimension. */
25
- export function getWellKnownDimensionSize(dimension: WellKnownDimension): 2 | 3 | 4 {
26
- switch (dimension) {
27
- case 'xy':
28
- return 2;
29
- case 'xyz':
30
- case 'xym':
31
- return 3;
32
- case 'xyzm':
33
- return 4;
34
- }
35
- }
36
-
37
- /** Infers tuple width from the deepest non-empty geometry coordinate. Three values mean XYZ. */
38
- export function inferWellKnownGeometryDimension(geometry: WellKnownGeometry): WellKnownDimension {
39
- const size = getGeometryDimensionSize(geometry);
40
- return size >= 4 ? 'xyzm' : size === 3 ? 'xyz' : 'xy';
41
- }
42
-
43
- function getGeometryDimensionSize(geometry: WellKnownGeometry): number {
44
- if (geometry.type === 'GeometryCollection') {
45
- return Math.max(2, ...geometry.geometries.map(getGeometryDimensionSize));
46
- }
47
- return getCoordinateDimension(geometry.coordinates);
48
- }
49
-
50
- function getCoordinateDimension(value: readonly unknown[]): number {
51
- if (value.length === 0) return 2;
52
- if (typeof value[0] === 'number') return value.length;
53
- return Math.max(2, ...value.map(child => getCoordinateDimension(child as readonly unknown[])));
54
- }