@math.gl/geospatial 5.0.0-beta.9 → 5.0.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (559) hide show
  1. package/README.md +3 -3
  2. package/dist/crs/crs-descriptor-types.d.ts +2 -1
  3. package/dist/crs/crs-descriptor-types.d.ts.map +1 -1
  4. package/dist/crs/index.cjs +54 -0
  5. package/dist/crs/index.cjs.map +2 -2
  6. package/dist/crs/index.d.ts +1 -0
  7. package/dist/crs/index.d.ts.map +1 -1
  8. package/dist/crs/index.js +1 -0
  9. package/dist/crs/index.js.map +1 -1
  10. package/dist/crs/spatial-reference-metadata.d.ts +20 -0
  11. package/dist/crs/spatial-reference-metadata.d.ts.map +1 -0
  12. package/dist/crs/spatial-reference-metadata.js +86 -0
  13. package/dist/crs/spatial-reference-metadata.js.map +1 -0
  14. package/dist/ellipsoid-helpers/ellipsoid-transform.d.ts +1 -1
  15. package/dist/ellipsoid-helpers/ellipsoid-transform.d.ts.map +1 -1
  16. package/dist/ellipsoid-helpers/ellipsoid-transform.js +2 -2
  17. package/dist/ellipsoid-helpers/ellipsoid-transform.js.map +1 -1
  18. package/dist/ellipsoid-helpers/scale-to-geodetic-surface.js +1 -1
  19. package/dist/ellipsoid-helpers/scale-to-geodetic-surface.js.map +1 -1
  20. package/dist/ellipsoid-helpers/tangent-plane-numerics.d.ts +1 -1
  21. package/dist/ellipsoid-helpers/tangent-plane-numerics.d.ts.map +1 -1
  22. package/dist/ellipsoid-tangent-plane.d.ts +2 -2
  23. package/dist/ellipsoid-tangent-plane.d.ts.map +1 -1
  24. package/dist/ellipsoid-tangent-plane.js +1 -1
  25. package/dist/ellipsoid-tangent-plane.js.map +1 -1
  26. package/dist/ellipsoid-transforms.d.ts +2 -2
  27. package/dist/ellipsoid-transforms.d.ts.map +1 -1
  28. package/dist/ellipsoid-transforms.js +1 -1
  29. package/dist/ellipsoid-transforms.js.map +1 -1
  30. package/dist/ellipsoid.d.ts +2 -2
  31. package/dist/ellipsoid.d.ts.map +1 -1
  32. package/dist/ellipsoid.js +2 -2
  33. package/dist/ellipsoid.js.map +1 -1
  34. package/dist/expressions.d.ts +1 -1
  35. package/dist/expressions.d.ts.map +1 -1
  36. package/dist/expressions.js +1 -1
  37. package/dist/expressions.js.map +1 -1
  38. package/dist/geodesic-buffer.d.ts +1 -1
  39. package/dist/geodesic-buffer.d.ts.map +1 -1
  40. package/dist/geodesic-path.d.ts +1 -1
  41. package/dist/geodesic-path.d.ts.map +1 -1
  42. package/dist/geometry-constructors.d.ts +6 -0
  43. package/dist/geometry-constructors.d.ts.map +1 -0
  44. package/dist/geometry-constructors.js +37 -0
  45. package/dist/geometry-constructors.js.map +1 -0
  46. package/dist/geometry-inspection.d.ts +8 -0
  47. package/dist/geometry-inspection.d.ts.map +1 -0
  48. package/dist/geometry-inspection.js +61 -0
  49. package/dist/geometry-inspection.js.map +1 -0
  50. package/dist/index.cjs +2514 -558
  51. package/dist/index.cjs.map +3 -3
  52. package/dist/index.d.ts +164 -1
  53. package/dist/index.d.ts.map +1 -1
  54. package/dist/index.js +106 -0
  55. package/dist/index.js.map +1 -1
  56. package/dist/line-simplification.d.ts +4 -0
  57. package/dist/line-simplification.d.ts.map +1 -0
  58. package/dist/line-simplification.js +83 -0
  59. package/dist/line-simplification.js.map +1 -0
  60. package/dist/linear-referencing.d.ts +6 -0
  61. package/dist/linear-referencing.d.ts.map +1 -0
  62. package/dist/linear-referencing.js +74 -0
  63. package/dist/linear-referencing.js.map +1 -0
  64. package/dist/lng-lat-rectangle.d.ts +1 -1
  65. package/dist/lng-lat-rectangle.d.ts.map +1 -1
  66. package/dist/lng-lat-rectangle.js +1 -1
  67. package/dist/lng-lat-rectangle.js.map +1 -1
  68. package/dist/local-reference-frame.d.ts +3 -3
  69. package/dist/local-reference-frame.d.ts.map +1 -1
  70. package/dist/local-reference-frame.js +2 -2
  71. package/dist/local-reference-frame.js.map +1 -1
  72. package/dist/make-obb-from-region.d.ts +1 -1
  73. package/dist/make-obb-from-region.d.ts.map +1 -1
  74. package/dist/make-obb-from-region.js +1 -1
  75. package/dist/make-obb-from-region.js.map +1 -1
  76. package/dist/maps/air-ocean-mesh.js +1 -1
  77. package/dist/maps/air-ocean-mesh.js.map +1 -1
  78. package/dist/maps/myriahedral/unfold.d.ts +1 -1
  79. package/dist/maps/myriahedral/unfold.d.ts.map +1 -1
  80. package/dist/maps/myriahedral/unfold.js +1 -1
  81. package/dist/maps/myriahedral/unfold.js.map +1 -1
  82. package/dist/maps/presets.cjs +6 -6
  83. package/dist/maps/presets.cjs.map +2 -2
  84. package/dist/maps.cjs +6 -6
  85. package/dist/maps.cjs.map +2 -2
  86. package/dist/projection/deformation.cjs +5 -5
  87. package/dist/projection/deformation.cjs.map +2 -2
  88. package/dist/projection/experimental/core.cjs +8 -4
  89. package/dist/projection/experimental/core.cjs.map +1 -1
  90. package/dist/projection/experimental/crs/spatial-reference.d.ts.map +1 -1
  91. package/dist/projection/experimental/crs/spatial-reference.js.map +1 -1
  92. package/dist/projection/experimental/crs/types.d.ts +1 -1
  93. package/dist/projection/experimental/crs/types.d.ts.map +1 -1
  94. package/dist/projection/experimental/crs-rendering-scale.d.ts.map +1 -1
  95. package/dist/projection/experimental/crs-rendering-scale.js +13 -2
  96. package/dist/projection/experimental/crs-rendering-scale.js.map +1 -1
  97. package/dist/projection/experimental/datum.js +1 -1
  98. package/dist/projection/experimental/datum.js.map +1 -1
  99. package/dist/projection/experimental/entries/projections/geocent.cjs +3 -3
  100. package/dist/projection/experimental/entries/projections/geocent.cjs.map +1 -1
  101. package/dist/projection/experimental/lazy-projections/aea.cjs +4 -1
  102. package/dist/projection/experimental/lazy-projections/aea.cjs.map +1 -1
  103. package/dist/projection/experimental/lazy-projections/aea.d.ts.map +1 -1
  104. package/dist/projection/experimental/lazy-projections/aea.js +4 -1
  105. package/dist/projection/experimental/lazy-projections/aea.js.map +1 -1
  106. package/dist/projection/experimental/lazy-projections/bonne.cjs +4 -1
  107. package/dist/projection/experimental/lazy-projections/bonne.cjs.map +1 -1
  108. package/dist/projection/experimental/lazy-projections/bonne.d.ts.map +1 -1
  109. package/dist/projection/experimental/lazy-projections/bonne.js +4 -1
  110. package/dist/projection/experimental/lazy-projections/bonne.js.map +1 -1
  111. package/dist/projection/experimental/lazy-projections/cass.cjs +4 -1
  112. package/dist/projection/experimental/lazy-projections/cass.cjs.map +1 -1
  113. package/dist/projection/experimental/lazy-projections/cass.d.ts.map +1 -1
  114. package/dist/projection/experimental/lazy-projections/cass.js +4 -1
  115. package/dist/projection/experimental/lazy-projections/cass.js.map +1 -1
  116. package/dist/projection/experimental/lazy-projections/eck6.cjs +4 -1
  117. package/dist/projection/experimental/lazy-projections/eck6.cjs.map +1 -1
  118. package/dist/projection/experimental/lazy-projections/eck6.d.ts.map +1 -1
  119. package/dist/projection/experimental/lazy-projections/eck6.js +4 -1
  120. package/dist/projection/experimental/lazy-projections/eck6.js.map +1 -1
  121. package/dist/projection/experimental/lazy-projections/eqdc.cjs +4 -1
  122. package/dist/projection/experimental/lazy-projections/eqdc.cjs.map +1 -1
  123. package/dist/projection/experimental/lazy-projections/eqdc.d.ts.map +1 -1
  124. package/dist/projection/experimental/lazy-projections/eqdc.js +4 -1
  125. package/dist/projection/experimental/lazy-projections/eqdc.js.map +1 -1
  126. package/dist/projection/experimental/lazy-projections/eqearth.cjs +4 -1
  127. package/dist/projection/experimental/lazy-projections/eqearth.cjs.map +1 -1
  128. package/dist/projection/experimental/lazy-projections/eqearth.d.ts.map +1 -1
  129. package/dist/projection/experimental/lazy-projections/eqearth.js +4 -1
  130. package/dist/projection/experimental/lazy-projections/eqearth.js.map +1 -1
  131. package/dist/projection/experimental/lazy-projections/equi.cjs +4 -1
  132. package/dist/projection/experimental/lazy-projections/equi.cjs.map +1 -1
  133. package/dist/projection/experimental/lazy-projections/equi.d.ts.map +1 -1
  134. package/dist/projection/experimental/lazy-projections/equi.js +4 -1
  135. package/dist/projection/experimental/lazy-projections/equi.js.map +1 -1
  136. package/dist/projection/experimental/lazy-projections/geocent.cjs +4 -1
  137. package/dist/projection/experimental/lazy-projections/geocent.cjs.map +1 -1
  138. package/dist/projection/experimental/lazy-projections/geocent.d.ts.map +1 -1
  139. package/dist/projection/experimental/lazy-projections/geocent.js +4 -1
  140. package/dist/projection/experimental/lazy-projections/geocent.js.map +1 -1
  141. package/dist/projection/experimental/lazy-projections/geos.cjs +4 -1
  142. package/dist/projection/experimental/lazy-projections/geos.cjs.map +1 -1
  143. package/dist/projection/experimental/lazy-projections/geos.d.ts.map +1 -1
  144. package/dist/projection/experimental/lazy-projections/geos.js +4 -1
  145. package/dist/projection/experimental/lazy-projections/geos.js.map +1 -1
  146. package/dist/projection/experimental/lazy-projections/gnom.cjs +4 -1
  147. package/dist/projection/experimental/lazy-projections/gnom.cjs.map +1 -1
  148. package/dist/projection/experimental/lazy-projections/gnom.d.ts.map +1 -1
  149. package/dist/projection/experimental/lazy-projections/gnom.js +4 -1
  150. package/dist/projection/experimental/lazy-projections/gnom.js.map +1 -1
  151. package/dist/projection/experimental/lazy-projections/index.cjs +100 -27
  152. package/dist/projection/experimental/lazy-projections/index.cjs.map +1 -1
  153. package/dist/projection/experimental/lazy-projections/krovak.cjs +4 -1
  154. package/dist/projection/experimental/lazy-projections/krovak.cjs.map +1 -1
  155. package/dist/projection/experimental/lazy-projections/krovak.d.ts.map +1 -1
  156. package/dist/projection/experimental/lazy-projections/krovak.js +4 -1
  157. package/dist/projection/experimental/lazy-projections/krovak.js.map +1 -1
  158. package/dist/projection/experimental/lazy-projections/merc.cjs +4 -1
  159. package/dist/projection/experimental/lazy-projections/merc.cjs.map +1 -1
  160. package/dist/projection/experimental/lazy-projections/merc.d.ts.map +1 -1
  161. package/dist/projection/experimental/lazy-projections/merc.js +4 -1
  162. package/dist/projection/experimental/lazy-projections/merc.js.map +1 -1
  163. package/dist/projection/experimental/lazy-projections/mill.cjs +4 -1
  164. package/dist/projection/experimental/lazy-projections/mill.cjs.map +1 -1
  165. package/dist/projection/experimental/lazy-projections/mill.d.ts.map +1 -1
  166. package/dist/projection/experimental/lazy-projections/mill.js +4 -1
  167. package/dist/projection/experimental/lazy-projections/mill.js.map +1 -1
  168. package/dist/projection/experimental/lazy-projections/moll.cjs +4 -1
  169. package/dist/projection/experimental/lazy-projections/moll.cjs.map +1 -1
  170. package/dist/projection/experimental/lazy-projections/moll.d.ts.map +1 -1
  171. package/dist/projection/experimental/lazy-projections/moll.js +4 -1
  172. package/dist/projection/experimental/lazy-projections/moll.js.map +1 -1
  173. package/dist/projection/experimental/lazy-projections/nzmg.cjs +4 -1
  174. package/dist/projection/experimental/lazy-projections/nzmg.cjs.map +1 -1
  175. package/dist/projection/experimental/lazy-projections/nzmg.d.ts.map +1 -1
  176. package/dist/projection/experimental/lazy-projections/nzmg.js +4 -1
  177. package/dist/projection/experimental/lazy-projections/nzmg.js.map +1 -1
  178. package/dist/projection/experimental/lazy-projections/omerc.cjs +4 -1
  179. package/dist/projection/experimental/lazy-projections/omerc.cjs.map +1 -1
  180. package/dist/projection/experimental/lazy-projections/omerc.d.ts.map +1 -1
  181. package/dist/projection/experimental/lazy-projections/omerc.js +4 -1
  182. package/dist/projection/experimental/lazy-projections/omerc.js.map +1 -1
  183. package/dist/projection/experimental/lazy-projections/ortho.cjs +4 -1
  184. package/dist/projection/experimental/lazy-projections/ortho.cjs.map +1 -1
  185. package/dist/projection/experimental/lazy-projections/ortho.d.ts.map +1 -1
  186. package/dist/projection/experimental/lazy-projections/ortho.js +4 -1
  187. package/dist/projection/experimental/lazy-projections/ortho.js.map +1 -1
  188. package/dist/projection/experimental/lazy-projections/poly.cjs +4 -1
  189. package/dist/projection/experimental/lazy-projections/poly.cjs.map +1 -1
  190. package/dist/projection/experimental/lazy-projections/poly.d.ts.map +1 -1
  191. package/dist/projection/experimental/lazy-projections/poly.js +4 -1
  192. package/dist/projection/experimental/lazy-projections/poly.js.map +1 -1
  193. package/dist/projection/experimental/lazy-projections/robin.cjs +4 -1
  194. package/dist/projection/experimental/lazy-projections/robin.cjs.map +1 -1
  195. package/dist/projection/experimental/lazy-projections/robin.d.ts.map +1 -1
  196. package/dist/projection/experimental/lazy-projections/robin.js +4 -1
  197. package/dist/projection/experimental/lazy-projections/robin.js.map +1 -1
  198. package/dist/projection/experimental/lazy-projections/sinu.cjs +4 -1
  199. package/dist/projection/experimental/lazy-projections/sinu.cjs.map +1 -1
  200. package/dist/projection/experimental/lazy-projections/sinu.d.ts.map +1 -1
  201. package/dist/projection/experimental/lazy-projections/sinu.js +4 -1
  202. package/dist/projection/experimental/lazy-projections/sinu.js.map +1 -1
  203. package/dist/projection/experimental/lazy-projections/stere.cjs +4 -1
  204. package/dist/projection/experimental/lazy-projections/stere.cjs.map +1 -1
  205. package/dist/projection/experimental/lazy-projections/stere.d.ts.map +1 -1
  206. package/dist/projection/experimental/lazy-projections/stere.js +4 -1
  207. package/dist/projection/experimental/lazy-projections/stere.js.map +1 -1
  208. package/dist/projection/experimental/lazy-projections/tpers.cjs +4 -1
  209. package/dist/projection/experimental/lazy-projections/tpers.cjs.map +1 -1
  210. package/dist/projection/experimental/lazy-projections/tpers.d.ts.map +1 -1
  211. package/dist/projection/experimental/lazy-projections/tpers.js +4 -1
  212. package/dist/projection/experimental/lazy-projections/tpers.js.map +1 -1
  213. package/dist/projection/experimental/lazy-projections/vandg.cjs +4 -1
  214. package/dist/projection/experimental/lazy-projections/vandg.cjs.map +1 -1
  215. package/dist/projection/experimental/lazy-projections/vandg.d.ts.map +1 -1
  216. package/dist/projection/experimental/lazy-projections/vandg.js +4 -1
  217. package/dist/projection/experimental/lazy-projections/vandg.js.map +1 -1
  218. package/dist/projection/experimental/spatial-deformation.js +1 -1
  219. package/dist/projection/experimental/spatial-deformation.js.map +1 -1
  220. package/dist/projection/index.cjs +8 -4
  221. package/dist/projection/index.cjs.map +1 -1
  222. package/dist/projection/index.d.ts.map +1 -1
  223. package/dist/projection/index.js.map +1 -1
  224. package/dist/projection/lib/projection.js.map +1 -1
  225. package/dist/projection/pipeline.cjs +3 -3
  226. package/dist/projection/pipeline.cjs.map +1 -1
  227. package/dist/projection/temporal.cjs +5 -5
  228. package/dist/projection/temporal.cjs.map +2 -2
  229. package/dist/projection/transform-analysis.cjs +3 -3
  230. package/dist/projection/transform-analysis.cjs.map +1 -1
  231. package/dist/rhumb-path.d.ts +1 -1
  232. package/dist/rhumb-path.d.ts.map +1 -1
  233. package/dist/spatial-planar-intersects.d.ts +4 -0
  234. package/dist/spatial-planar-intersects.d.ts.map +1 -0
  235. package/dist/spatial-planar-intersects.js +108 -0
  236. package/dist/spatial-planar-intersects.js.map +1 -0
  237. package/dist/spatial-planar.d.ts +16 -0
  238. package/dist/spatial-planar.d.ts.map +1 -0
  239. package/dist/spatial-planar.js +240 -0
  240. package/dist/spatial-planar.js.map +1 -0
  241. package/dist/spatial-sql.d.ts +45 -0
  242. package/dist/spatial-sql.d.ts.map +1 -0
  243. package/dist/spatial-sql.js +192 -0
  244. package/dist/spatial-sql.js.map +1 -0
  245. package/dist/st-functions.cjs +1616 -0
  246. package/dist/st-functions.cjs.map +6 -0
  247. package/dist/st-functions.d.ts +307 -0
  248. package/dist/st-functions.d.ts.map +1 -0
  249. package/dist/st-functions.js +593 -0
  250. package/dist/st-functions.js.map +1 -0
  251. package/dist/subdivide-globe-mesh.js +1 -1
  252. package/dist/subdivide-globe-mesh.js.map +1 -1
  253. package/dist/tasks/index.cjs +216 -98
  254. package/dist/tasks/index.cjs.map +2 -2
  255. package/dist/tasks/terrain-residency.d.ts +9 -0
  256. package/dist/tasks/terrain-residency.d.ts.map +1 -1
  257. package/dist/tasks/terrain-residency.js +98 -19
  258. package/dist/tasks/terrain-residency.js.map +1 -1
  259. package/dist/terrain/cutout-polygons.d.ts +21 -0
  260. package/dist/terrain/cutout-polygons.d.ts.map +1 -0
  261. package/dist/terrain/cutout-polygons.js +172 -0
  262. package/dist/terrain/cutout-polygons.js.map +1 -0
  263. package/dist/terrain/cutout-region.d.ts +34 -0
  264. package/dist/terrain/cutout-region.d.ts.map +1 -0
  265. package/dist/terrain/cutout-region.js +33 -0
  266. package/dist/terrain/cutout-region.js.map +1 -0
  267. package/dist/terrain/cutout-skirts.d.ts +34 -0
  268. package/dist/terrain/cutout-skirts.d.ts.map +1 -0
  269. package/dist/terrain/cutout-skirts.js +29 -0
  270. package/dist/terrain/cutout-skirts.js.map +1 -0
  271. package/dist/terrain/depression-fill.d.ts +25 -0
  272. package/dist/terrain/depression-fill.d.ts.map +1 -0
  273. package/dist/terrain/depression-fill.js +106 -0
  274. package/dist/terrain/depression-fill.js.map +1 -0
  275. package/dist/terrain/geographic-cutout.d.ts +38 -0
  276. package/dist/terrain/geographic-cutout.d.ts.map +1 -0
  277. package/dist/terrain/geographic-cutout.js +120 -0
  278. package/dist/terrain/geographic-cutout.js.map +1 -0
  279. package/dist/terrain/geographic-lod-seams.d.ts +10 -0
  280. package/dist/terrain/geographic-lod-seams.d.ts.map +1 -0
  281. package/dist/terrain/geographic-lod-seams.js +100 -0
  282. package/dist/terrain/geographic-lod-seams.js.map +1 -0
  283. package/dist/terrain/geographic-neighbor.d.ts +18 -0
  284. package/dist/terrain/geographic-neighbor.d.ts.map +1 -0
  285. package/dist/terrain/geographic-neighbor.js +44 -0
  286. package/dist/terrain/geographic-neighbor.js.map +1 -0
  287. package/dist/terrain/geographic-poles.d.ts +24 -0
  288. package/dist/terrain/geographic-poles.d.ts.map +1 -0
  289. package/dist/terrain/geographic-poles.js +34 -0
  290. package/dist/terrain/geographic-poles.js.map +1 -0
  291. package/dist/terrain/hydrology.d.ts +42 -0
  292. package/dist/terrain/hydrology.d.ts.map +1 -0
  293. package/dist/terrain/hydrology.js +112 -0
  294. package/dist/terrain/hydrology.js.map +1 -0
  295. package/dist/terrain/index.cjs +2135 -161
  296. package/dist/terrain/index.cjs.map +3 -3
  297. package/dist/terrain/index.d.ts +23 -1
  298. package/dist/terrain/index.d.ts.map +1 -1
  299. package/dist/terrain/index.js +21 -0
  300. package/dist/terrain/index.js.map +1 -1
  301. package/dist/terrain/lod-screen-error.d.ts +28 -0
  302. package/dist/terrain/lod-screen-error.d.ts.map +1 -0
  303. package/dist/terrain/lod-screen-error.js +95 -0
  304. package/dist/terrain/lod-screen-error.js.map +1 -0
  305. package/dist/terrain/lod-select.d.ts +26 -10
  306. package/dist/terrain/lod-select.d.ts.map +1 -1
  307. package/dist/terrain/lod-select.js +27 -14
  308. package/dist/terrain/lod-select.js.map +1 -1
  309. package/dist/terrain/lod-stitch.d.ts +2 -0
  310. package/dist/terrain/lod-stitch.d.ts.map +1 -1
  311. package/dist/terrain/lod-stitch.js +21 -6
  312. package/dist/terrain/lod-stitch.js.map +1 -1
  313. package/dist/terrain/mesh-cutout.d.ts +45 -0
  314. package/dist/terrain/mesh-cutout.d.ts.map +1 -0
  315. package/dist/terrain/mesh-cutout.js +336 -0
  316. package/dist/terrain/mesh-cutout.js.map +1 -0
  317. package/dist/terrain/mesh-skirts.d.ts +8 -2
  318. package/dist/terrain/mesh-skirts.d.ts.map +1 -1
  319. package/dist/terrain/mesh-skirts.js +5 -4
  320. package/dist/terrain/mesh-skirts.js.map +1 -1
  321. package/dist/terrain/mixed-halo-update.d.ts.map +1 -1
  322. package/dist/terrain/mixed-halo-update.js +58 -23
  323. package/dist/terrain/mixed-halo-update.js.map +1 -1
  324. package/dist/terrain/mixed-vertex-halos.d.ts +24 -1
  325. package/dist/terrain/mixed-vertex-halos.d.ts.map +1 -1
  326. package/dist/terrain/mixed-vertex-halos.js +75 -58
  327. package/dist/terrain/mixed-vertex-halos.js.map +1 -1
  328. package/dist/terrain/regional-viewshed.d.ts +55 -0
  329. package/dist/terrain/regional-viewshed.d.ts.map +1 -0
  330. package/dist/terrain/regional-viewshed.js +119 -0
  331. package/dist/terrain/regional-viewshed.js.map +1 -0
  332. package/dist/terrain/surface.d.ts +1 -1
  333. package/dist/terrain/surface.d.ts.map +1 -1
  334. package/dist/terrain/surface.js +1 -1
  335. package/dist/terrain/surface.js.map +1 -1
  336. package/dist/terrain/sweep-capsule.d.ts +27 -0
  337. package/dist/terrain/sweep-capsule.d.ts.map +1 -0
  338. package/dist/terrain/sweep-capsule.js +104 -0
  339. package/dist/terrain/sweep-capsule.js.map +1 -0
  340. package/dist/terrain/sweep-cylinder.d.ts +16 -0
  341. package/dist/terrain/sweep-cylinder.d.ts.map +1 -0
  342. package/dist/terrain/sweep-cylinder.js +52 -0
  343. package/dist/terrain/sweep-cylinder.js.map +1 -0
  344. package/dist/terrain/sweep-plane.d.ts +9 -0
  345. package/dist/terrain/sweep-plane.d.ts.map +1 -0
  346. package/dist/terrain/sweep-plane.js +52 -0
  347. package/dist/terrain/sweep-plane.js.map +1 -0
  348. package/dist/terrain/sweep-polytope.d.ts +42 -0
  349. package/dist/terrain/sweep-polytope.d.ts.map +1 -0
  350. package/dist/terrain/sweep-polytope.js +189 -0
  351. package/dist/terrain/sweep-polytope.js.map +1 -0
  352. package/dist/terrain/sweep-rotating-capsule.d.ts +17 -0
  353. package/dist/terrain/sweep-rotating-capsule.d.ts.map +1 -0
  354. package/dist/terrain/sweep-rotating-capsule.js +118 -0
  355. package/dist/terrain/sweep-rotating-capsule.js.map +1 -0
  356. package/dist/terrain/sweep-rotation.d.ts +35 -0
  357. package/dist/terrain/sweep-rotation.d.ts.map +1 -0
  358. package/dist/terrain/sweep-rotation.js +114 -0
  359. package/dist/terrain/sweep-rotation.js.map +1 -0
  360. package/dist/terrain/sweep-sphere.d.ts +27 -0
  361. package/dist/terrain/sweep-sphere.d.ts.map +1 -0
  362. package/dist/terrain/sweep-sphere.js +69 -0
  363. package/dist/terrain/sweep-sphere.js.map +1 -0
  364. package/dist/terrain/tile-cutout-update.d.ts +73 -0
  365. package/dist/terrain/tile-cutout-update.d.ts.map +1 -0
  366. package/dist/terrain/tile-cutout-update.js +181 -0
  367. package/dist/terrain/tile-cutout-update.js.map +1 -0
  368. package/dist/terrain/tile-cutout.d.ts +33 -0
  369. package/dist/terrain/tile-cutout.d.ts.map +1 -0
  370. package/dist/terrain/tile-cutout.js +93 -0
  371. package/dist/terrain/tile-cutout.js.map +1 -0
  372. package/dist/terrain/watershed-accumulation.d.ts +20 -0
  373. package/dist/terrain/watershed-accumulation.d.ts.map +1 -0
  374. package/dist/terrain/watershed-accumulation.js +53 -0
  375. package/dist/terrain/watershed-accumulation.js.map +1 -0
  376. package/dist/triaxial.d.ts +1 -1
  377. package/dist/triaxial.d.ts.map +1 -1
  378. package/dist/turf-expressions.cjs +1997 -0
  379. package/dist/turf-expressions.cjs.map +6 -0
  380. package/dist/turf-expressions.d.ts +3 -0
  381. package/dist/turf-expressions.d.ts.map +1 -0
  382. package/dist/turf-expressions.js +7 -0
  383. package/dist/turf-expressions.js.map +1 -0
  384. package/dist/turf-functions.cjs +743 -0
  385. package/dist/turf-functions.cjs.map +6 -0
  386. package/dist/turf-functions.d.ts +90 -0
  387. package/dist/turf-functions.d.ts.map +1 -0
  388. package/dist/{turf/expressions.js → turf-functions.js} +51 -5
  389. package/dist/turf-functions.js.map +1 -0
  390. package/dist/turf.cjs +25 -25
  391. package/dist/turf.cjs.map +2 -2
  392. package/dist/turf.d.ts +1 -1
  393. package/dist/turf.d.ts.map +1 -1
  394. package/dist/turf.js +2 -2
  395. package/dist/turf.js.map +1 -1
  396. package/dist/type-utils.d.ts +1 -1
  397. package/dist/type-utils.d.ts.map +1 -1
  398. package/dist/type-utils.js +1 -1
  399. package/dist/type-utils.js.map +1 -1
  400. package/dist/web-mercator/assert.d.ts +2 -0
  401. package/dist/web-mercator/assert.d.ts.map +1 -0
  402. package/dist/web-mercator/assert.js +12 -0
  403. package/dist/web-mercator/assert.js.map +1 -0
  404. package/dist/web-mercator/fit-bounds.d.ts +52 -0
  405. package/dist/web-mercator/fit-bounds.d.ts.map +1 -0
  406. package/dist/web-mercator/fit-bounds.js +70 -0
  407. package/dist/web-mercator/fit-bounds.js.map +1 -0
  408. package/dist/web-mercator/fly-to-viewport.d.ts +19 -0
  409. package/dist/web-mercator/fly-to-viewport.d.ts.map +1 -0
  410. package/dist/web-mercator/fly-to-viewport.js +94 -0
  411. package/dist/web-mercator/fly-to-viewport.js.map +1 -0
  412. package/dist/web-mercator/get-bounds.d.ts +3 -0
  413. package/dist/web-mercator/get-bounds.d.ts.map +1 -0
  414. package/dist/web-mercator/get-bounds.js +56 -0
  415. package/dist/web-mercator/get-bounds.js.map +1 -0
  416. package/dist/web-mercator/index.cjs +705 -0
  417. package/dist/web-mercator/index.cjs.map +6 -0
  418. package/dist/web-mercator/index.d.ts +14 -0
  419. package/dist/web-mercator/index.d.ts.map +1 -0
  420. package/dist/web-mercator/index.js +14 -0
  421. package/dist/web-mercator/index.js.map +1 -0
  422. package/dist/web-mercator/math-utils.d.ts +7 -0
  423. package/dist/web-mercator/math-utils.d.ts.map +1 -0
  424. package/dist/web-mercator/math-utils.js +30 -0
  425. package/dist/web-mercator/math-utils.js.map +1 -0
  426. package/dist/web-mercator/mercator-meters.d.ts +29 -0
  427. package/dist/web-mercator/mercator-meters.d.ts.map +1 -0
  428. package/dist/web-mercator/mercator-meters.js +61 -0
  429. package/dist/web-mercator/mercator-meters.js.map +1 -0
  430. package/dist/web-mercator/normalize-viewport-props.d.ts +16 -0
  431. package/dist/web-mercator/normalize-viewport-props.d.ts.map +1 -0
  432. package/dist/web-mercator/normalize-viewport-props.js +45 -0
  433. package/dist/web-mercator/normalize-viewport-props.js.map +1 -0
  434. package/dist/web-mercator/web-mercator-utils.d.ts +192 -0
  435. package/dist/web-mercator/web-mercator-utils.d.ts.map +1 -0
  436. package/dist/web-mercator/web-mercator-utils.js +321 -0
  437. package/dist/web-mercator/web-mercator-utils.js.map +1 -0
  438. package/dist/web-mercator/web-mercator-viewport.d.ts +177 -0
  439. package/dist/web-mercator/web-mercator-viewport.d.ts.map +1 -0
  440. package/dist/web-mercator/web-mercator-viewport.js +276 -0
  441. package/dist/web-mercator/web-mercator-viewport.js.map +1 -0
  442. package/dist/web-mercator.d.ts +1 -1
  443. package/dist/web-mercator.d.ts.map +1 -1
  444. package/dist/web-mercator.js +1 -1
  445. package/dist/web-mercator.js.map +1 -1
  446. package/package.json +34 -462
  447. package/src/crs/crs-descriptor-types.ts +2 -1
  448. package/src/crs/index.ts +7 -0
  449. package/src/crs/spatial-reference-metadata.ts +118 -0
  450. package/src/ellipsoid-helpers/ellipsoid-transform.ts +3 -3
  451. package/src/ellipsoid-helpers/scale-to-geodetic-surface.ts +1 -1
  452. package/src/ellipsoid-helpers/tangent-plane-numerics.ts +1 -1
  453. package/src/ellipsoid-tangent-plane.ts +2 -2
  454. package/src/ellipsoid-transforms.ts +2 -2
  455. package/src/ellipsoid.ts +7 -3
  456. package/src/expressions.ts +2 -2
  457. package/src/geodesic-buffer.ts +1 -1
  458. package/src/geodesic-path.ts +1 -1
  459. package/src/geometry-constructors.ts +36 -0
  460. package/src/geometry-inspection.ts +66 -0
  461. package/src/index.ts +271 -4
  462. package/src/line-simplification.ts +97 -0
  463. package/src/linear-referencing.ts +94 -0
  464. package/src/lng-lat-rectangle.ts +1 -1
  465. package/src/local-reference-frame.ts +4 -4
  466. package/src/make-obb-from-region.ts +9 -1
  467. package/src/maps/air-ocean-mesh.ts +1 -1
  468. package/src/maps/myriahedral/unfold.ts +1 -1
  469. package/src/projection/experimental/crs/spatial-reference.ts +1 -6
  470. package/src/projection/experimental/crs/types.ts +2 -2
  471. package/src/projection/experimental/crs/wkt.ts +1 -1
  472. package/src/projection/experimental/crs-descriptor.ts +1 -1
  473. package/src/projection/experimental/crs-rendering-scale.ts +16 -4
  474. package/src/projection/experimental/datum.ts +1 -1
  475. package/src/projection/experimental/lazy-projections/aea.ts +4 -1
  476. package/src/projection/experimental/lazy-projections/bonne.ts +4 -1
  477. package/src/projection/experimental/lazy-projections/cass.ts +4 -1
  478. package/src/projection/experimental/lazy-projections/eck6.ts +4 -1
  479. package/src/projection/experimental/lazy-projections/eqdc.ts +4 -1
  480. package/src/projection/experimental/lazy-projections/eqearth.ts +4 -1
  481. package/src/projection/experimental/lazy-projections/equi.ts +4 -1
  482. package/src/projection/experimental/lazy-projections/geocent.ts +4 -1
  483. package/src/projection/experimental/lazy-projections/geos.ts +4 -1
  484. package/src/projection/experimental/lazy-projections/gnom.ts +4 -1
  485. package/src/projection/experimental/lazy-projections/krovak.ts +4 -1
  486. package/src/projection/experimental/lazy-projections/merc.ts +4 -1
  487. package/src/projection/experimental/lazy-projections/mill.ts +4 -1
  488. package/src/projection/experimental/lazy-projections/moll.ts +4 -1
  489. package/src/projection/experimental/lazy-projections/nzmg.ts +4 -1
  490. package/src/projection/experimental/lazy-projections/omerc.ts +4 -1
  491. package/src/projection/experimental/lazy-projections/ortho.ts +4 -1
  492. package/src/projection/experimental/lazy-projections/poly.ts +4 -1
  493. package/src/projection/experimental/lazy-projections/robin.ts +4 -1
  494. package/src/projection/experimental/lazy-projections/sinu.ts +4 -1
  495. package/src/projection/experimental/lazy-projections/stere.ts +4 -1
  496. package/src/projection/experimental/lazy-projections/tpers.ts +4 -1
  497. package/src/projection/experimental/lazy-projections/vandg.ts +4 -1
  498. package/src/projection/experimental/spatial-deformation.ts +1 -1
  499. package/src/projection/index.ts +1 -1
  500. package/src/projection/lib/projection.ts +1 -1
  501. package/src/rhumb-path.ts +1 -1
  502. package/src/spatial-planar-intersects.ts +134 -0
  503. package/src/spatial-planar.ts +266 -0
  504. package/src/spatial-sql.ts +276 -0
  505. package/src/st-functions.ts +852 -0
  506. package/src/subdivide-globe-mesh.ts +1 -1
  507. package/src/tasks/terrain-residency.ts +120 -24
  508. package/src/terrain/cutout-polygons.ts +202 -0
  509. package/src/terrain/cutout-region.ts +54 -0
  510. package/src/terrain/cutout-skirts.ts +52 -0
  511. package/src/terrain/depression-fill.ts +125 -0
  512. package/src/terrain/geographic-cutout.ts +154 -0
  513. package/src/terrain/geographic-lod-seams.ts +109 -0
  514. package/src/terrain/geographic-neighbor.ts +58 -0
  515. package/src/terrain/geographic-poles.ts +52 -0
  516. package/src/terrain/hydrology.ts +149 -0
  517. package/src/terrain/index.ts +122 -1
  518. package/src/terrain/lod-screen-error.ts +128 -0
  519. package/src/terrain/lod-select.ts +65 -31
  520. package/src/terrain/lod-stitch.ts +25 -7
  521. package/src/terrain/mesh-cutout.ts +420 -0
  522. package/src/terrain/mesh-skirts.ts +10 -7
  523. package/src/terrain/mixed-halo-update.ts +54 -20
  524. package/src/terrain/mixed-vertex-halos.ts +94 -78
  525. package/src/terrain/regional-viewshed.ts +177 -0
  526. package/src/terrain/surface.ts +1 -1
  527. package/src/terrain/sweep-capsule.ts +148 -0
  528. package/src/terrain/sweep-cylinder.ts +64 -0
  529. package/src/terrain/sweep-plane.ts +61 -0
  530. package/src/terrain/sweep-polytope.ts +253 -0
  531. package/src/terrain/sweep-rotating-capsule.ts +139 -0
  532. package/src/terrain/sweep-rotation.ts +149 -0
  533. package/src/terrain/sweep-sphere.ts +100 -0
  534. package/src/terrain/tile-cutout-update.ts +293 -0
  535. package/src/terrain/tile-cutout.ts +123 -0
  536. package/src/terrain/watershed-accumulation.ts +67 -0
  537. package/src/triaxial.ts +1 -1
  538. package/src/turf-expressions.ts +7 -0
  539. package/src/{turf/expressions.ts → turf-functions.ts} +121 -6
  540. package/src/turf.ts +3 -7
  541. package/src/type-utils.ts +2 -2
  542. package/src/web-mercator/assert.ts +11 -0
  543. package/src/web-mercator/fit-bounds.ts +132 -0
  544. package/src/web-mercator/fly-to-viewport.ts +157 -0
  545. package/src/web-mercator/get-bounds.ts +62 -0
  546. package/src/web-mercator/index.ts +49 -0
  547. package/src/web-mercator/math-utils.ts +35 -0
  548. package/src/web-mercator/mercator-meters.ts +83 -0
  549. package/src/web-mercator/normalize-viewport-props.ts +58 -0
  550. package/src/web-mercator/web-mercator-utils.ts +468 -0
  551. package/src/web-mercator/web-mercator-viewport.ts +406 -0
  552. package/src/web-mercator.ts +1 -1
  553. package/dist/projection/experimental/index.cjs +0 -11707
  554. package/dist/projection/experimental/index.cjs.map +0 -6
  555. package/dist/turf/expressions.cjs +0 -87
  556. package/dist/turf/expressions.cjs.map +0 -6
  557. package/dist/turf/expressions.d.ts +0 -24
  558. package/dist/turf/expressions.d.ts.map +0 -1
  559. package/dist/turf/expressions.js.map +0 -1
@@ -0,0 +1,181 @@
1
+ // math.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
4
+ import { copyTerrainCutoutRegion, sameTerrainCutoutRegion } from "./cutout-region.js";
5
+ import { splitTerrainMesh, validateTerrainCutoutTopology } from "./mesh-cutout.js";
6
+ import { assembleTerrainCutoutTiles } from "./tile-cutout.js";
7
+ /** Private cache brand; the cache is local to this module instance. */
8
+ const CACHE = Symbol('terrain-cutout-cache');
9
+ /** Clip changed tiles independently and pair their exposed boundaries.
10
+ * Mixed-level inputs must already be reconciled. Cached source buffers and
11
+ * returned arrays are read-only by contract. Change revision after in-place
12
+ * edits; replacing the mesh object also invalidates its cache. Polygon or
13
+ * option changes invalidate all clips. Limits maxWork/maxVertices/maxTriangles
14
+ * apply per clip and per adjacent-pair validation, not to the entire update.
15
+ * Arrival/eviction can change a neighbor's cutEdges without rebuilding its mesh.
16
+ */
17
+ export function updateTerrainTileCutouts(residents, polygon, previous, options = {}) {
18
+ const limits = {
19
+ maxTiles: options.maxTiles ?? 512,
20
+ maxPairChecks: options.maxPairChecks ?? 131072,
21
+ maxBoundaryEdges: options.maxBoundaryEdges ?? 1000000,
22
+ maxWork: options.maxWork ?? 4000000,
23
+ maxVertices: options.maxVertices ?? 500000,
24
+ maxTriangles: options.maxTriangles ?? 500000
25
+ };
26
+ if (Object.values(limits).some(n => !Number.isSafeInteger(n) || n < 0) ||
27
+ limits.maxVertices > 0xffffffff ||
28
+ limits.maxTriangles > 0xffffffff ||
29
+ residents.length > limits.maxTiles)
30
+ throw new RangeError('Invalid terrain cutout update limits');
31
+ const prior = previous?.[CACHE];
32
+ const compatible = prior &&
33
+ sameTerrainCutoutRegion(prior.polygon, polygon) &&
34
+ Object.keys(limits).every(key => prior.options[key] === limits[key]);
35
+ // Validate the ring even for an empty resident set.
36
+ if (!compatible)
37
+ splitTerrainMesh({ positions: new Float64Array(), indices: new Uint32Array() }, polygon, limits);
38
+ const entries = new Map();
39
+ const rebuilt = [];
40
+ let boundaryCount = 0;
41
+ for (const resident of residents) {
42
+ if (!resident.id ||
43
+ typeof resident.id !== 'string' ||
44
+ entries.has(resident.id) ||
45
+ !Number.isSafeInteger(resident.revision) ||
46
+ resident.revision < 0)
47
+ throw new RangeError('Invalid or duplicate terrain cutout resident');
48
+ const old = compatible ? prior.entries.get(resident.id) : undefined;
49
+ let entry;
50
+ if (old && old.resident.mesh === resident.mesh && old.resident.revision === resident.revision)
51
+ entry = old;
52
+ else {
53
+ const split = splitTerrainMesh(resident.mesh, polygon, limits);
54
+ const edges = [...boundaryEdges(split.patch, 0), ...boundaryEdges(split.remainder, 1)];
55
+ const bounds = [Infinity, Infinity, -Infinity, -Infinity];
56
+ for (const id of resident.mesh.indices) {
57
+ const x = resident.mesh.positions[id * 3], y = resident.mesh.positions[id * 3 + 1];
58
+ bounds[0] = Math.min(bounds[0], x);
59
+ bounds[1] = Math.min(bounds[1], y);
60
+ bounds[2] = Math.max(bounds[2], x);
61
+ bounds[3] = Math.max(bounds[3], y);
62
+ }
63
+ entry = { resident: { ...resident }, split, displayed: split, bounds, edges };
64
+ rebuilt.push(resident.id);
65
+ }
66
+ boundaryCount += entry.edges.length;
67
+ if (boundaryCount > limits.maxBoundaryEdges)
68
+ throw new RangeError('Terrain cutout boundary budget exceeded');
69
+ entries.set(resident.id, entry);
70
+ }
71
+ const values = [...entries.values()];
72
+ let pairs = 0;
73
+ for (let i = 0; i < values.length; i++)
74
+ for (let j = i + 1; j < values.length; j++) {
75
+ if (++pairs > limits.maxPairChecks)
76
+ throw new RangeError('Terrain cutout pair budget exceeded');
77
+ const a = values[i], b = values[j];
78
+ if (a.bounds[2] < b.bounds[0] ||
79
+ b.bounds[2] < a.bounds[0] ||
80
+ a.bounds[3] < b.bounds[1] ||
81
+ b.bounds[3] < a.bounds[1])
82
+ continue;
83
+ if (compatible &&
84
+ prior.entries.get(a.resident.id) === a &&
85
+ prior.entries.get(b.resident.id) === b)
86
+ continue;
87
+ const combined = assembleTerrainCutoutTiles([a.resident.mesh, b.resident.mesh], limits);
88
+ validateTerrainCutoutTopology(combined.mesh, combined.remainingWork);
89
+ }
90
+ const boundaries = new Map();
91
+ const cutKeys = new Map();
92
+ for (let tile = 0; tile < values.length; tile++)
93
+ for (const edge of values[tile].edges) {
94
+ const other = boundaries.get(edge.key);
95
+ if (!other) {
96
+ boundaries.set(edge.key, { edge, paired: false });
97
+ continue;
98
+ }
99
+ if (other.paired || other.edge.start !== edge.end || other.edge.end !== edge.start)
100
+ throw new RangeError('Nonconforming terrain cutout tile boundary');
101
+ other.paired = true;
102
+ if (other.edge.side !== edge.side) {
103
+ cutKeys.set(edge.key, edge.side === 0 ? edge.polygon : other.edge.polygon);
104
+ }
105
+ }
106
+ const tiles = new Map();
107
+ const changed = [];
108
+ for (let i = 0; i < values.length; i++) {
109
+ const entry = values[i];
110
+ const old = prior?.entries.get(entry.resident.id);
111
+ // Emit in cached tile-local order, independent of resident visitation order.
112
+ const cuts = [[], []];
113
+ const polygons = [[], []];
114
+ for (const edge of entry.edges) {
115
+ const polygonIndex = cutKeys.get(edge.key);
116
+ if (polygonIndex !== undefined) {
117
+ cuts[edge.side].push(edge.a, edge.b);
118
+ polygons[edge.side].push(polygonIndex);
119
+ }
120
+ }
121
+ const patch = withEdges(entry.split.patch, cuts[0], polygons[0], old?.displayed.patch);
122
+ const remainder = withEdges(entry.split.remainder, cuts[1], polygons[1], old?.displayed.remainder);
123
+ const displayed = old && patch === old.displayed.patch && remainder === old.displayed.remainder
124
+ ? old.displayed
125
+ : { patch, remainder };
126
+ if (displayed !== old?.displayed)
127
+ changed.push(entry.resident.id);
128
+ entries.set(entry.resident.id, displayed === entry.displayed ? entry : { ...entry, displayed });
129
+ tiles.set(entry.resident.id, displayed);
130
+ }
131
+ return {
132
+ cache: { [CACHE]: { polygon: copyTerrainCutoutRegion(polygon), options: limits, entries } },
133
+ tiles,
134
+ changed,
135
+ rebuilt,
136
+ removed: prior ? [...prior.entries.keys()].filter(id => !entries.has(id)) : []
137
+ };
138
+ }
139
+ /** Reuse surface buffers and unchanged boundary descriptors. */
140
+ function withEdges(piece, edges, polygons, old) {
141
+ const same = old &&
142
+ old.positions === piece.positions &&
143
+ old.cutEdges.length === edges.length &&
144
+ old.cutEdges.every((id, i) => id === edges[i]) &&
145
+ old.cutPolygonIndices.every((id, i) => id === polygons[i]);
146
+ return same
147
+ ? old
148
+ : { ...piece, cutEdges: Uint32Array.from(edges), cutPolygonIndices: Uint32Array.from(polygons) };
149
+ }
150
+ /** Cache only exposed edges; interior triangulation edges never become walls. */
151
+ function boundaryEdges(piece, side) {
152
+ const edges = new Map();
153
+ for (let i = 0; i < piece.indices.length; i += 3)
154
+ for (let j = 0; j < 3; j++) {
155
+ const a = piece.indices[i + j], b = piece.indices[i + ((j + 1) % 3)];
156
+ const key = a < b ? `${a},${b}` : `${b},${a}`;
157
+ const old = edges.get(key);
158
+ if (old)
159
+ old.count++;
160
+ else
161
+ edges.set(key, { a, b, count: 1, polygon: piece.polygonIndices[i / 3] });
162
+ }
163
+ const result = [];
164
+ /** Encode exact XYZ; no snapping or tolerance-based topology decisions. */
165
+ const point = (id) => `${piece.positions[id * 3]},${piece.positions[id * 3 + 1]},${piece.positions[id * 3 + 2]}`;
166
+ for (const { a, b, count, polygon } of edges.values())
167
+ if (count === 1) {
168
+ const start = point(a), end = point(b);
169
+ result.push({
170
+ polygon,
171
+ a,
172
+ b,
173
+ side,
174
+ start,
175
+ end,
176
+ key: start < end ? `${start}/${end}` : `${end}/${start}`
177
+ });
178
+ }
179
+ return result;
180
+ }
181
+ //# sourceMappingURL=tile-cutout-update.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tile-cutout-update.js","sourceRoot":"","sources":["../../src/terrain/tile-cutout-update.ts"],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, type TerrainCutoutOptions } from "./mesh-cutout.js";
3
+ /** A resident tile expressed in the same local Cartesian frame as its neighbors. */
4
+ export type TerrainCutoutTile = TerrainCutoutInput;
5
+ /** A resident-set cut and its input-face provenance. */
6
+ export type TerrainTileCutout = TerrainCutout & {
7
+ /** Tile-array index for each input face referenced by either piece. */
8
+ sourceTiles: Uint32Array;
9
+ /** Original tile triangle index for each input face referenced by either piece. */
10
+ sourceTileFaces: Uint32Array;
11
+ };
12
+ /** Split a conforming resident tile set, with paired walls only along the cut.
13
+ *
14
+ * Vertices with identical XYZ are welded before clipping. Mixed-level neighbors
15
+ * must first be reconciled with stitchTerrainMeshEdges or stitchTerrainLodCut;
16
+ * hanging vertices, overlapping tiles and conflicting elevations are rejected.
17
+ * No snapping, height adjustment, missing-tile filling or tile caching occurs.
18
+ * Recompute from the new resident set after arrival or eviction. Source triangle
19
+ * and barycentric references retain the original tile face's corner order.
20
+ * Limits apply to the total input (including duplicate vertices) and the splitter.
21
+ */
22
+ export declare function splitTerrainMeshTiles(tiles: readonly TerrainCutoutTile[], polygon: TerrainCutoutRegion, options?: TerrainCutoutOptions): TerrainTileCutout;
23
+ /** @internal Assemble a bounded, exact-welded mesh without clipping it. */
24
+ export declare function assembleTerrainCutoutTiles(tiles: readonly TerrainCutoutInput[], options?: TerrainCutoutOptions): {
25
+ mesh: {
26
+ positions: Float64Array<ArrayBuffer>;
27
+ indices: Uint32Array<ArrayBuffer>;
28
+ };
29
+ sourceTiles: Uint32Array<ArrayBuffer>;
30
+ sourceTileFaces: Uint32Array<ArrayBuffer>;
31
+ remainingWork: number;
32
+ };
33
+ //# sourceMappingURL=tile-cutout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tile-cutout.d.ts","sourceRoot":"","sources":["../../src/terrain/tile-cutout.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,mBAAmB,EAAC,2BAAwB;AAEzD,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EAC1B,yBAAsB;AAEvB,oFAAoF;AACpF,MAAM,MAAM,iBAAiB,GAAG,kBAAkB,CAAC;AAEnD,wDAAwD;AACxD,MAAM,MAAM,iBAAiB,GAAG,aAAa,GAAG;IAC9C,uEAAuE;IACvE,WAAW,EAAE,WAAW,CAAC;IACzB,mFAAmF;IACnF,eAAe,EAAE,WAAW,CAAC;CAC9B,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,SAAS,iBAAiB,EAAE,EACnC,OAAO,EAAE,mBAAmB,EAC5B,OAAO,GAAE,oBAAyB,GACjC,iBAAiB,CAOnB;AAED,2EAA2E;AAC3E,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,SAAS,kBAAkB,EAAE,EACpC,OAAO,GAAE,oBAAyB;;;;;;;;EAwEnC"}
@@ -0,0 +1,93 @@
1
+ // math.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
4
+ import { splitTerrainMesh } from "./mesh-cutout.js";
5
+ /** Split a conforming resident tile set, with paired walls only along the cut.
6
+ *
7
+ * Vertices with identical XYZ are welded before clipping. Mixed-level neighbors
8
+ * must first be reconciled with stitchTerrainMeshEdges or stitchTerrainLodCut;
9
+ * hanging vertices, overlapping tiles and conflicting elevations are rejected.
10
+ * No snapping, height adjustment, missing-tile filling or tile caching occurs.
11
+ * Recompute from the new resident set after arrival or eviction. Source triangle
12
+ * and barycentric references retain the original tile face's corner order.
13
+ * Limits apply to the total input (including duplicate vertices) and the splitter.
14
+ */
15
+ export function splitTerrainMeshTiles(tiles, polygon, options = {}) {
16
+ const assembled = assembleTerrainCutoutTiles(tiles, options);
17
+ return {
18
+ ...splitTerrainMesh(assembled.mesh, polygon, { ...options, maxWork: assembled.remainingWork }),
19
+ sourceTiles: assembled.sourceTiles,
20
+ sourceTileFaces: assembled.sourceTileFaces
21
+ };
22
+ }
23
+ /** @internal Assemble a bounded, exact-welded mesh without clipping it. */
24
+ export function assembleTerrainCutoutTiles(tiles, options = {}) {
25
+ const maxVertices = options.maxVertices ?? 500000;
26
+ const maxTriangles = options.maxTriangles ?? 500000;
27
+ const maxWork = options.maxWork ?? 4000000;
28
+ if (![maxVertices, maxTriangles, maxWork].every(n => Number.isSafeInteger(n) && n >= 0) ||
29
+ maxVertices > 0xffffffff ||
30
+ maxTriangles > 0xffffffff)
31
+ throw new RangeError('Invalid terrain tile cutout limits');
32
+ let vertexCount = 0;
33
+ let faceCount = 0;
34
+ let work = 0;
35
+ for (const tile of tiles) {
36
+ if (!(tile.positions instanceof Float32Array || tile.positions instanceof Float64Array) ||
37
+ !(tile.indices instanceof Uint16Array || tile.indices instanceof Uint32Array) ||
38
+ tile.positions.length % 3 ||
39
+ tile.indices.length % 3)
40
+ throw new RangeError('Invalid terrain tile cutout mesh');
41
+ vertexCount += tile.positions.length / 3;
42
+ faceCount += tile.indices.length / 3;
43
+ work += 1 + tile.positions.length / 3 + tile.indices.length;
44
+ if (vertexCount > maxVertices || faceCount > maxTriangles || work > maxWork)
45
+ throw new RangeError('Terrain tile cutout input budget exceeded');
46
+ }
47
+ const positions = new Float64Array(vertexCount * 3);
48
+ const indices = new Uint32Array(faceCount * 3);
49
+ const sourceTiles = new Uint32Array(faceCount);
50
+ const sourceTileFaces = new Uint32Array(faceCount);
51
+ const vertices = new Map();
52
+ let vertexOffset = 0;
53
+ let faceOffset = 0;
54
+ for (let tileIndex = 0; tileIndex < tiles.length; tileIndex++) {
55
+ const tile = tiles[tileIndex];
56
+ const remap = new Uint32Array(tile.positions.length / 3);
57
+ for (let i = 0; i < remap.length; i++) {
58
+ const x = tile.positions[i * 3];
59
+ const y = tile.positions[i * 3 + 1];
60
+ const z = tile.positions[i * 3 + 2];
61
+ if (!Number.isFinite(x) || !Number.isFinite(y) || !Number.isFinite(z))
62
+ throw new RangeError('Invalid terrain tile cutout coordinate');
63
+ const key = `${x},${y},${z}`;
64
+ let id = vertices.get(key);
65
+ if (id === undefined) {
66
+ id = vertexOffset++;
67
+ vertices.set(key, id);
68
+ positions[id * 3] = x;
69
+ positions[id * 3 + 1] = y;
70
+ positions[id * 3 + 2] = z;
71
+ }
72
+ remap[i] = id;
73
+ }
74
+ for (let i = 0; i < tile.indices.length; i++) {
75
+ const id = tile.indices[i];
76
+ if (id >= remap.length)
77
+ throw new RangeError('Invalid terrain tile cutout index');
78
+ indices[faceOffset * 3 + i] = remap[id];
79
+ }
80
+ for (let i = 0; i < tile.indices.length / 3; i++) {
81
+ sourceTiles[faceOffset + i] = tileIndex;
82
+ sourceTileFaces[faceOffset + i] = i;
83
+ }
84
+ faceOffset += tile.indices.length / 3;
85
+ }
86
+ return {
87
+ mesh: { positions: positions.subarray(0, vertexOffset * 3), indices },
88
+ sourceTiles,
89
+ sourceTileFaces,
90
+ remainingWork: maxWork - work
91
+ };
92
+ }
93
+ //# sourceMappingURL=tile-cutout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tile-cutout.js","sourceRoot":"","sources":["../../src/terrain/tile-cutout.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AAI5D,OAAO,EACL,gBAAgB,EAIjB,yBAAsB;AAavB;;;;;;;;;GASG;AACH,MAAM,UAAU,qBAAqB,CACnC,KAAmC,EACnC,OAA4B,EAC5B,UAAgC,EAAE;IAElC,MAAM,SAAS,GAAG,0BAA0B,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAC7D,OAAO;QACL,GAAG,gBAAgB,CAAC,SAAS,CAAC,IAAI,EAAE,OAAO,EAAE,EAAC,GAAG,OAAO,EAAE,OAAO,EAAE,SAAS,CAAC,aAAa,EAAC,CAAC;QAC5F,WAAW,EAAE,SAAS,CAAC,WAAW;QAClC,eAAe,EAAE,SAAS,CAAC,eAAe;KAC3C,CAAC;AACJ,CAAC;AAED,2EAA2E;AAC3E,MAAM,UAAU,0BAA0B,CACxC,KAAoC,EACpC,UAAgC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UAAU,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;QACtC,CAAC;QACD,UAAU,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;IACxC,CAAC;IACD,OAAO;QACL,IAAI,EAAE,EAAC,SAAS,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAC,EAAE,YAAY,GAAG,CAAC,CAAC,EAAE,OAAO,EAAC;QACnE,WAAW;QACX,eAAe;QACf,aAAa,EAAE,OAAO,GAAG,IAAI;KAC9B,CAAC;AACJ,CAAC"}
@@ -0,0 +1,20 @@
1
+ /** Outlet labels and upstream counts for a terrain receiver forest. */
2
+ export type TerrainWatershedAccumulation = {
3
+ /** Row-major outlet index, or -1 for excluded cells. */
4
+ terminal: Int32Array;
5
+ /** Number of contributing cells, including the cell itself. Excluded cells have zero. */
6
+ contributingCells: Uint32Array;
7
+ };
8
+ /** Controls allocation for watershed accumulation. */
9
+ export type TerrainWatershedAccumulationOptions = {
10
+ /** Limit before allocating working buffers. */
11
+ maxCells?: number;
12
+ };
13
+ /**
14
+ * Accumulates a receiver forest such as that returned by fillTerrainDepressions.
15
+ * Each entry is a receiver index, -1 for an outlet, or -2 for an excluded cell.
16
+ * createTerrainDrainage uses -1 for nodata. Map nodata cells to -2 before calling.
17
+ * Rejects cycles and links to excluded cells. Time and storage are O(cell count).
18
+ */
19
+ export declare function accumulateTerrainWatersheds(receiver: Int32Array, { maxCells }?: TerrainWatershedAccumulationOptions): TerrainWatershedAccumulation;
20
+ //# sourceMappingURL=watershed-accumulation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"watershed-accumulation.d.ts","sourceRoot":"","sources":["../../src/terrain/watershed-accumulation.ts"],"names":[],"mappings":"AAIA,uEAAuE;AACvE,MAAM,MAAM,4BAA4B,GAAG;IACzC,wDAAwD;IACxD,QAAQ,EAAE,UAAU,CAAC;IACrB,yFAAyF;IACzF,iBAAiB,EAAE,WAAW,CAAC;CAChC,CAAC;AAEF,sDAAsD;AACtD,MAAM,MAAM,mCAAmC,GAAG;IAChD,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,UAAU,EACpB,EAAC,QAAoB,EAAC,GAAE,mCAAwC,GAC/D,4BAA4B,CAuC9B"}
@@ -0,0 +1,53 @@
1
+ // math.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
4
+ /**
5
+ * Accumulates a receiver forest such as that returned by fillTerrainDepressions.
6
+ * Each entry is a receiver index, -1 for an outlet, or -2 for an excluded cell.
7
+ * createTerrainDrainage uses -1 for nodata. Map nodata cells to -2 before calling.
8
+ * Rejects cycles and links to excluded cells. Time and storage are O(cell count).
9
+ */
10
+ export function accumulateTerrainWatersheds(receiver, { maxCells = 4194304 } = {}) {
11
+ const count = receiver.length;
12
+ if (!Number.isSafeInteger(maxCells) || maxCells < 0 || count > maxCells || count > 0x7fffffff)
13
+ throw new RangeError('Terrain watershed accumulation exceeds its cell budget');
14
+ const incoming = new Uint32Array(count);
15
+ const contributingCells = new Uint32Array(count);
16
+ const terminal = new Int32Array(count).fill(-1);
17
+ const queue = new Int32Array(count);
18
+ let active = 0;
19
+ for (let i = 0; i < count; i++) {
20
+ const next = receiver[i];
21
+ if (next === -2)
22
+ continue;
23
+ if (next < -1 || next >= count || (next >= 0 && receiver[next] === -2))
24
+ throw new RangeError('Invalid terrain watershed receiver');
25
+ active++;
26
+ contributingCells[i] = 1;
27
+ if (next >= 0)
28
+ incoming[next]++;
29
+ }
30
+ let end = 0;
31
+ for (let i = 0; i < count; i++) {
32
+ if (contributingCells[i] && !incoming[i])
33
+ queue[end++] = i;
34
+ }
35
+ for (let cursor = 0; cursor < end; cursor++) {
36
+ const i = queue[cursor];
37
+ const next = receiver[i];
38
+ if (next < 0)
39
+ continue;
40
+ contributingCells[next] += contributingCells[i];
41
+ if (--incoming[next] === 0)
42
+ queue[end++] = next;
43
+ }
44
+ if (end !== active)
45
+ throw new RangeError('Terrain watershed receiver graph contains a cycle');
46
+ for (let cursor = end - 1; cursor >= 0; cursor--) {
47
+ const i = queue[cursor];
48
+ const next = receiver[i];
49
+ terminal[i] = next < 0 ? i : terminal[next];
50
+ }
51
+ return { terminal, contributingCells };
52
+ }
53
+ //# sourceMappingURL=watershed-accumulation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"watershed-accumulation.js","sourceRoot":"","sources":["../../src/terrain/watershed-accumulation.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AAgB5D;;;;;GAKG;AACH,MAAM,UAAU,2BAA2B,CACzC,QAAoB,EACpB,EAAC,QAAQ,GAAG,OAAS,KAAyC,EAAE;IAEhE,MAAM,KAAK,GAAG,QAAQ,CAAC,MAAM,CAAC;IAC9B,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,QAAQ,CAAC,IAAI,QAAQ,GAAG,CAAC,IAAI,KAAK,GAAG,QAAQ,IAAI,KAAK,GAAG,UAAU;QAC3F,MAAM,IAAI,UAAU,CAAC,wDAAwD,CAAC,CAAC;IAEjF,MAAM,QAAQ,GAAG,IAAI,WAAW,CAAC,KAAK,CAAC,CAAC;IACxC,MAAM,iBAAiB,GAAG,IAAI,WAAW,CAAC,KAAK,CAAC,CAAC;IACjD,MAAM,QAAQ,GAAG,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IAChD,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC;IACpC,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC;QAC/B,MAAM,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;QACzB,IAAI,IAAI,KAAK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,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC;QACjD,MAAM,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;QACxB,MAAM,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;QACzB,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC9C,CAAC;IACD,OAAO,EAAC,QAAQ,EAAE,iBAAiB,EAAC,CAAC;AACvC,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { NumericArray } from '@math.gl/core';
1
+ import type { NumericArray } from '@math.gl/core/matrix';
2
2
  export type TriaxialCoordinates = 'geodetic' | 'parametric' | 'geocentric';
3
3
  export type TriaxialParameters = {
4
4
  radii: readonly [number, number, number];
@@ -1 +1 @@
1
- {"version":3,"file":"triaxial.d.ts","sourceRoot":"","sources":["../src/triaxial.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,eAAe,CAAC;AAEhD,MAAM,MAAM,mBAAmB,GAAG,UAAU,GAAG,YAAY,GAAG,YAAY,CAAC;AAC3E,MAAM,MAAM,kBAAkB,GAAG;IAAC,KAAK,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA;CAAC,CAAC;AAC5E,MAAM,MAAM,sBAAsB,GAAG;IACnC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AACF,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,sBAAsB,CAAC;CACpD;AACD,KAAK,GAAG,GAAG,QAAQ,CAAC,YAAY,CAAC,CAAC;AA0BlC;;GAEG;AACH,q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