@math.gl/geospatial 5.0.0-beta.8 → 5.0.0-rc.1

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 (620) 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 +3773 -846
  51. package/dist/index.cjs.map +3 -3
  52. package/dist/index.d.ts +173 -0
  53. package/dist/index.d.ts.map +1 -1
  54. package/dist/index.js +115 -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 +1266 -155
  254. package/dist/tasks/index.cjs.map +3 -3
  255. package/dist/tasks/index.d.ts +12 -0
  256. package/dist/tasks/index.d.ts.map +1 -1
  257. package/dist/tasks/index.js +26 -0
  258. package/dist/tasks/index.js.map +1 -1
  259. package/dist/tasks/terrain-coverage-worker.d.ts +2 -0
  260. package/dist/tasks/terrain-coverage-worker.d.ts.map +1 -0
  261. package/dist/tasks/terrain-coverage-worker.js +7 -0
  262. package/dist/tasks/terrain-coverage-worker.js.map +1 -0
  263. package/dist/tasks/terrain-coverage.d.ts +25 -0
  264. package/dist/tasks/terrain-coverage.d.ts.map +1 -0
  265. package/dist/tasks/terrain-coverage.js +15 -0
  266. package/dist/tasks/terrain-coverage.js.map +1 -0
  267. package/dist/tasks/terrain-residency-worker.d.ts +2 -0
  268. package/dist/tasks/terrain-residency-worker.d.ts.map +1 -0
  269. package/dist/tasks/terrain-residency-worker.js +7 -0
  270. package/dist/tasks/terrain-residency-worker.js.map +1 -0
  271. package/dist/tasks/terrain-residency.d.ts +73 -0
  272. package/dist/tasks/terrain-residency.d.ts.map +1 -0
  273. package/dist/tasks/terrain-residency.js +203 -0
  274. package/dist/tasks/terrain-residency.js.map +1 -0
  275. package/dist/terrain/breakline-mesh.d.ts +18 -0
  276. package/dist/terrain/breakline-mesh.d.ts.map +1 -0
  277. package/dist/terrain/breakline-mesh.js +126 -0
  278. package/dist/terrain/breakline-mesh.js.map +1 -0
  279. package/dist/terrain/breakline-preprocess.d.ts +11 -0
  280. package/dist/terrain/breakline-preprocess.d.ts.map +1 -0
  281. package/dist/terrain/breakline-preprocess.js +94 -0
  282. package/dist/terrain/breakline-preprocess.js.map +1 -0
  283. package/dist/terrain/continuous-mesh-error.d.ts +34 -0
  284. package/dist/terrain/continuous-mesh-error.d.ts.map +1 -0
  285. package/dist/terrain/continuous-mesh-error.js +221 -0
  286. package/dist/terrain/continuous-mesh-error.js.map +1 -0
  287. package/dist/terrain/cutout-polygons.d.ts +21 -0
  288. package/dist/terrain/cutout-polygons.d.ts.map +1 -0
  289. package/dist/terrain/cutout-polygons.js +172 -0
  290. package/dist/terrain/cutout-polygons.js.map +1 -0
  291. package/dist/terrain/cutout-region.d.ts +34 -0
  292. package/dist/terrain/cutout-region.d.ts.map +1 -0
  293. package/dist/terrain/cutout-region.js +33 -0
  294. package/dist/terrain/cutout-region.js.map +1 -0
  295. package/dist/terrain/cutout-skirts.d.ts +34 -0
  296. package/dist/terrain/cutout-skirts.d.ts.map +1 -0
  297. package/dist/terrain/cutout-skirts.js +29 -0
  298. package/dist/terrain/cutout-skirts.js.map +1 -0
  299. package/dist/terrain/depression-fill.d.ts +25 -0
  300. package/dist/terrain/depression-fill.d.ts.map +1 -0
  301. package/dist/terrain/depression-fill.js +106 -0
  302. package/dist/terrain/depression-fill.js.map +1 -0
  303. package/dist/terrain/geographic-cutout.d.ts +38 -0
  304. package/dist/terrain/geographic-cutout.d.ts.map +1 -0
  305. package/dist/terrain/geographic-cutout.js +120 -0
  306. package/dist/terrain/geographic-cutout.js.map +1 -0
  307. package/dist/terrain/geographic-lod-seams.d.ts +10 -0
  308. package/dist/terrain/geographic-lod-seams.d.ts.map +1 -0
  309. package/dist/terrain/geographic-lod-seams.js +100 -0
  310. package/dist/terrain/geographic-lod-seams.js.map +1 -0
  311. package/dist/terrain/geographic-neighbor.d.ts +18 -0
  312. package/dist/terrain/geographic-neighbor.d.ts.map +1 -0
  313. package/dist/terrain/geographic-neighbor.js +44 -0
  314. package/dist/terrain/geographic-neighbor.js.map +1 -0
  315. package/dist/terrain/geographic-poles.d.ts +24 -0
  316. package/dist/terrain/geographic-poles.d.ts.map +1 -0
  317. package/dist/terrain/geographic-poles.js +34 -0
  318. package/dist/terrain/geographic-poles.js.map +1 -0
  319. package/dist/terrain/geographic-seam.d.ts +21 -0
  320. package/dist/terrain/geographic-seam.d.ts.map +1 -0
  321. package/dist/terrain/geographic-seam.js +52 -0
  322. package/dist/terrain/geographic-seam.js.map +1 -0
  323. package/dist/terrain/hydrology.d.ts +42 -0
  324. package/dist/terrain/hydrology.d.ts.map +1 -0
  325. package/dist/terrain/hydrology.js +112 -0
  326. package/dist/terrain/hydrology.js.map +1 -0
  327. package/dist/terrain/index.cjs +3158 -213
  328. package/dist/terrain/index.cjs.map +3 -3
  329. package/dist/terrain/index.d.ts +32 -0
  330. package/dist/terrain/index.d.ts.map +1 -1
  331. package/dist/terrain/index.js +30 -0
  332. package/dist/terrain/index.js.map +1 -1
  333. package/dist/terrain/lod-screen-error.d.ts +28 -0
  334. package/dist/terrain/lod-screen-error.d.ts.map +1 -0
  335. package/dist/terrain/lod-screen-error.js +95 -0
  336. package/dist/terrain/lod-screen-error.js.map +1 -0
  337. package/dist/terrain/lod-select.d.ts +48 -0
  338. package/dist/terrain/lod-select.d.ts.map +1 -0
  339. package/dist/terrain/lod-select.js +73 -0
  340. package/dist/terrain/lod-select.js.map +1 -0
  341. package/dist/terrain/lod-stitch.d.ts +15 -0
  342. package/dist/terrain/lod-stitch.d.ts.map +1 -0
  343. package/dist/terrain/lod-stitch.js +64 -0
  344. package/dist/terrain/lod-stitch.js.map +1 -0
  345. package/dist/terrain/mesh-coverage.d.ts +35 -0
  346. package/dist/terrain/mesh-coverage.d.ts.map +1 -0
  347. package/dist/terrain/mesh-coverage.js +186 -0
  348. package/dist/terrain/mesh-coverage.js.map +1 -0
  349. package/dist/terrain/mesh-cutout.d.ts +45 -0
  350. package/dist/terrain/mesh-cutout.d.ts.map +1 -0
  351. package/dist/terrain/mesh-cutout.js +336 -0
  352. package/dist/terrain/mesh-cutout.js.map +1 -0
  353. package/dist/terrain/mesh-regions-data.d.ts +2 -2
  354. package/dist/terrain/mesh-regions-data.d.ts.map +1 -1
  355. package/dist/terrain/mesh-regions-data.js +20 -10
  356. package/dist/terrain/mesh-regions-data.js.map +1 -1
  357. package/dist/terrain/mesh-skirts.d.ts +8 -2
  358. package/dist/terrain/mesh-skirts.d.ts.map +1 -1
  359. package/dist/terrain/mesh-skirts.js +5 -4
  360. package/dist/terrain/mesh-skirts.js.map +1 -1
  361. package/dist/terrain/mixed-halo-update.d.ts.map +1 -1
  362. package/dist/terrain/mixed-halo-update.js +138 -26
  363. package/dist/terrain/mixed-halo-update.js.map +1 -1
  364. package/dist/terrain/mixed-vertex-halos.d.ts +34 -1
  365. package/dist/terrain/mixed-vertex-halos.d.ts.map +1 -1
  366. package/dist/terrain/mixed-vertex-halos.js +98 -43
  367. package/dist/terrain/mixed-vertex-halos.js.map +1 -1
  368. package/dist/terrain/regional-viewshed.d.ts +55 -0
  369. package/dist/terrain/regional-viewshed.d.ts.map +1 -0
  370. package/dist/terrain/regional-viewshed.js +119 -0
  371. package/dist/terrain/regional-viewshed.js.map +1 -0
  372. package/dist/terrain/surface.d.ts +1 -1
  373. package/dist/terrain/surface.d.ts.map +1 -1
  374. package/dist/terrain/surface.js +1 -1
  375. package/dist/terrain/surface.js.map +1 -1
  376. package/dist/terrain/sweep-capsule.d.ts +27 -0
  377. package/dist/terrain/sweep-capsule.d.ts.map +1 -0
  378. package/dist/terrain/sweep-capsule.js +104 -0
  379. package/dist/terrain/sweep-capsule.js.map +1 -0
  380. package/dist/terrain/sweep-cylinder.d.ts +16 -0
  381. package/dist/terrain/sweep-cylinder.d.ts.map +1 -0
  382. package/dist/terrain/sweep-cylinder.js +52 -0
  383. package/dist/terrain/sweep-cylinder.js.map +1 -0
  384. package/dist/terrain/sweep-plane.d.ts +9 -0
  385. package/dist/terrain/sweep-plane.d.ts.map +1 -0
  386. package/dist/terrain/sweep-plane.js +52 -0
  387. package/dist/terrain/sweep-plane.js.map +1 -0
  388. package/dist/terrain/sweep-polytope.d.ts +42 -0
  389. package/dist/terrain/sweep-polytope.d.ts.map +1 -0
  390. package/dist/terrain/sweep-polytope.js +189 -0
  391. package/dist/terrain/sweep-polytope.js.map +1 -0
  392. package/dist/terrain/sweep-rotating-capsule.d.ts +17 -0
  393. package/dist/terrain/sweep-rotating-capsule.d.ts.map +1 -0
  394. package/dist/terrain/sweep-rotating-capsule.js +118 -0
  395. package/dist/terrain/sweep-rotating-capsule.js.map +1 -0
  396. package/dist/terrain/sweep-rotation.d.ts +35 -0
  397. package/dist/terrain/sweep-rotation.d.ts.map +1 -0
  398. package/dist/terrain/sweep-rotation.js +114 -0
  399. package/dist/terrain/sweep-rotation.js.map +1 -0
  400. package/dist/terrain/sweep-sphere.d.ts +27 -0
  401. package/dist/terrain/sweep-sphere.d.ts.map +1 -0
  402. package/dist/terrain/sweep-sphere.js +69 -0
  403. package/dist/terrain/sweep-sphere.js.map +1 -0
  404. package/dist/terrain/tile-cutout-update.d.ts +73 -0
  405. package/dist/terrain/tile-cutout-update.d.ts.map +1 -0
  406. package/dist/terrain/tile-cutout-update.js +181 -0
  407. package/dist/terrain/tile-cutout-update.js.map +1 -0
  408. package/dist/terrain/tile-cutout.d.ts +33 -0
  409. package/dist/terrain/tile-cutout.d.ts.map +1 -0
  410. package/dist/terrain/tile-cutout.js +93 -0
  411. package/dist/terrain/tile-cutout.js.map +1 -0
  412. package/dist/terrain/valid-domain-mesh.d.ts +29 -0
  413. package/dist/terrain/valid-domain-mesh.d.ts.map +1 -0
  414. package/dist/terrain/valid-domain-mesh.js +183 -0
  415. package/dist/terrain/valid-domain-mesh.js.map +1 -0
  416. package/dist/terrain/valid-domain-regions.d.ts +16 -0
  417. package/dist/terrain/valid-domain-regions.d.ts.map +1 -0
  418. package/dist/terrain/valid-domain-regions.js +19 -0
  419. package/dist/terrain/valid-domain-regions.js.map +1 -0
  420. package/dist/terrain/watershed-accumulation.d.ts +20 -0
  421. package/dist/terrain/watershed-accumulation.d.ts.map +1 -0
  422. package/dist/terrain/watershed-accumulation.js +53 -0
  423. package/dist/terrain/watershed-accumulation.js.map +1 -0
  424. package/dist/triaxial.d.ts +1 -1
  425. package/dist/triaxial.d.ts.map +1 -1
  426. package/dist/turf-expressions.cjs +1997 -0
  427. package/dist/turf-expressions.cjs.map +6 -0
  428. package/dist/turf-expressions.d.ts +3 -0
  429. package/dist/turf-expressions.d.ts.map +1 -0
  430. package/dist/turf-expressions.js +7 -0
  431. package/dist/turf-expressions.js.map +1 -0
  432. package/dist/turf-functions.cjs +743 -0
  433. package/dist/turf-functions.cjs.map +6 -0
  434. package/dist/turf-functions.d.ts +90 -0
  435. package/dist/turf-functions.d.ts.map +1 -0
  436. package/dist/{turf/expressions.js → turf-functions.js} +51 -5
  437. package/dist/turf-functions.js.map +1 -0
  438. package/dist/turf.cjs +25 -25
  439. package/dist/turf.cjs.map +2 -2
  440. package/dist/turf.d.ts +1 -1
  441. package/dist/turf.d.ts.map +1 -1
  442. package/dist/turf.js +2 -2
  443. package/dist/turf.js.map +1 -1
  444. package/dist/type-utils.d.ts +1 -1
  445. package/dist/type-utils.d.ts.map +1 -1
  446. package/dist/type-utils.js +1 -1
  447. package/dist/type-utils.js.map +1 -1
  448. package/dist/web-mercator/assert.d.ts +2 -0
  449. package/dist/web-mercator/assert.d.ts.map +1 -0
  450. package/dist/web-mercator/assert.js +12 -0
  451. package/dist/web-mercator/assert.js.map +1 -0
  452. package/dist/web-mercator/fit-bounds.d.ts +52 -0
  453. package/dist/web-mercator/fit-bounds.d.ts.map +1 -0
  454. package/dist/web-mercator/fit-bounds.js +70 -0
  455. package/dist/web-mercator/fit-bounds.js.map +1 -0
  456. package/dist/web-mercator/fly-to-viewport.d.ts +19 -0
  457. package/dist/web-mercator/fly-to-viewport.d.ts.map +1 -0
  458. package/dist/web-mercator/fly-to-viewport.js +94 -0
  459. package/dist/web-mercator/fly-to-viewport.js.map +1 -0
  460. package/dist/web-mercator/get-bounds.d.ts +3 -0
  461. package/dist/web-mercator/get-bounds.d.ts.map +1 -0
  462. package/dist/web-mercator/get-bounds.js +56 -0
  463. package/dist/web-mercator/get-bounds.js.map +1 -0
  464. package/dist/web-mercator/index.cjs +705 -0
  465. package/dist/web-mercator/index.cjs.map +6 -0
  466. package/dist/web-mercator/index.d.ts +14 -0
  467. package/dist/web-mercator/index.d.ts.map +1 -0
  468. package/dist/web-mercator/index.js +14 -0
  469. package/dist/web-mercator/index.js.map +1 -0
  470. package/dist/web-mercator/math-utils.d.ts +7 -0
  471. package/dist/web-mercator/math-utils.d.ts.map +1 -0
  472. package/dist/web-mercator/math-utils.js +30 -0
  473. package/dist/web-mercator/math-utils.js.map +1 -0
  474. package/dist/web-mercator/mercator-meters.d.ts +29 -0
  475. package/dist/web-mercator/mercator-meters.d.ts.map +1 -0
  476. package/dist/web-mercator/mercator-meters.js +61 -0
  477. package/dist/web-mercator/mercator-meters.js.map +1 -0
  478. package/dist/web-mercator/normalize-viewport-props.d.ts +16 -0
  479. package/dist/web-mercator/normalize-viewport-props.d.ts.map +1 -0
  480. package/dist/web-mercator/normalize-viewport-props.js +45 -0
  481. package/dist/web-mercator/normalize-viewport-props.js.map +1 -0
  482. package/dist/web-mercator/web-mercator-utils.d.ts +192 -0
  483. package/dist/web-mercator/web-mercator-utils.d.ts.map +1 -0
  484. package/dist/web-mercator/web-mercator-utils.js +321 -0
  485. package/dist/web-mercator/web-mercator-utils.js.map +1 -0
  486. package/dist/web-mercator/web-mercator-viewport.d.ts +177 -0
  487. package/dist/web-mercator/web-mercator-viewport.d.ts.map +1 -0
  488. package/dist/web-mercator/web-mercator-viewport.js +276 -0
  489. package/dist/web-mercator/web-mercator-viewport.js.map +1 -0
  490. package/dist/web-mercator.d.ts +1 -1
  491. package/dist/web-mercator.d.ts.map +1 -1
  492. package/dist/web-mercator.js +1 -1
  493. package/dist/web-mercator.js.map +1 -1
  494. package/package.json +35 -462
  495. package/src/crs/crs-descriptor-types.ts +2 -1
  496. package/src/crs/index.ts +7 -0
  497. package/src/crs/spatial-reference-metadata.ts +118 -0
  498. package/src/ellipsoid-helpers/ellipsoid-transform.ts +3 -3
  499. package/src/ellipsoid-helpers/scale-to-geodetic-surface.ts +1 -1
  500. package/src/ellipsoid-helpers/tangent-plane-numerics.ts +1 -1
  501. package/src/ellipsoid-tangent-plane.ts +2 -2
  502. package/src/ellipsoid-transforms.ts +2 -2
  503. package/src/ellipsoid.ts +7 -3
  504. package/src/expressions.ts +2 -2
  505. package/src/geodesic-buffer.ts +1 -1
  506. package/src/geodesic-path.ts +1 -1
  507. package/src/geometry-constructors.ts +36 -0
  508. package/src/geometry-inspection.ts +66 -0
  509. package/src/index.ts +314 -4
  510. package/src/line-simplification.ts +97 -0
  511. package/src/linear-referencing.ts +94 -0
  512. package/src/lng-lat-rectangle.ts +1 -1
  513. package/src/local-reference-frame.ts +4 -4
  514. package/src/make-obb-from-region.ts +9 -1
  515. package/src/maps/air-ocean-mesh.ts +1 -1
  516. package/src/maps/myriahedral/unfold.ts +1 -1
  517. package/src/projection/experimental/crs/spatial-reference.ts +1 -6
  518. package/src/projection/experimental/crs/types.ts +2 -2
  519. package/src/projection/experimental/crs/wkt.ts +1 -1
  520. package/src/projection/experimental/crs-descriptor.ts +1 -1
  521. package/src/projection/experimental/crs-rendering-scale.ts +16 -4
  522. package/src/projection/experimental/datum.ts +1 -1
  523. package/src/projection/experimental/lazy-projections/aea.ts +4 -1
  524. package/src/projection/experimental/lazy-projections/bonne.ts +4 -1
  525. package/src/projection/experimental/lazy-projections/cass.ts +4 -1
  526. package/src/projection/experimental/lazy-projections/eck6.ts +4 -1
  527. package/src/projection/experimental/lazy-projections/eqdc.ts +4 -1
  528. package/src/projection/experimental/lazy-projections/eqearth.ts +4 -1
  529. package/src/projection/experimental/lazy-projections/equi.ts +4 -1
  530. package/src/projection/experimental/lazy-projections/geocent.ts +4 -1
  531. package/src/projection/experimental/lazy-projections/geos.ts +4 -1
  532. package/src/projection/experimental/lazy-projections/gnom.ts +4 -1
  533. package/src/projection/experimental/lazy-projections/krovak.ts +4 -1
  534. package/src/projection/experimental/lazy-projections/merc.ts +4 -1
  535. package/src/projection/experimental/lazy-projections/mill.ts +4 -1
  536. package/src/projection/experimental/lazy-projections/moll.ts +4 -1
  537. package/src/projection/experimental/lazy-projections/nzmg.ts +4 -1
  538. package/src/projection/experimental/lazy-projections/omerc.ts +4 -1
  539. package/src/projection/experimental/lazy-projections/ortho.ts +4 -1
  540. package/src/projection/experimental/lazy-projections/poly.ts +4 -1
  541. package/src/projection/experimental/lazy-projections/robin.ts +4 -1
  542. package/src/projection/experimental/lazy-projections/sinu.ts +4 -1
  543. package/src/projection/experimental/lazy-projections/stere.ts +4 -1
  544. package/src/projection/experimental/lazy-projections/tpers.ts +4 -1
  545. package/src/projection/experimental/lazy-projections/vandg.ts +4 -1
  546. package/src/projection/experimental/spatial-deformation.ts +1 -1
  547. package/src/projection/index.ts +1 -1
  548. package/src/projection/lib/projection.ts +1 -1
  549. package/src/rhumb-path.ts +1 -1
  550. package/src/spatial-planar-intersects.ts +134 -0
  551. package/src/spatial-planar.ts +266 -0
  552. package/src/spatial-sql.ts +276 -0
  553. package/src/st-functions.ts +852 -0
  554. package/src/subdivide-globe-mesh.ts +1 -1
  555. package/src/tasks/index.ts +34 -0
  556. package/src/tasks/terrain-coverage-worker.ts +6 -0
  557. package/src/tasks/terrain-coverage.ts +25 -0
  558. package/src/tasks/terrain-residency-worker.ts +6 -0
  559. package/src/tasks/terrain-residency.ts +250 -0
  560. package/src/terrain/breakline-mesh.ts +164 -0
  561. package/src/terrain/breakline-preprocess.ts +106 -0
  562. package/src/terrain/cdt2d.d.ts +10 -0
  563. package/src/terrain/continuous-mesh-error.ts +321 -0
  564. package/src/terrain/cutout-polygons.ts +202 -0
  565. package/src/terrain/cutout-region.ts +54 -0
  566. package/src/terrain/cutout-skirts.ts +52 -0
  567. package/src/terrain/depression-fill.ts +125 -0
  568. package/src/terrain/geographic-cutout.ts +154 -0
  569. package/src/terrain/geographic-lod-seams.ts +109 -0
  570. package/src/terrain/geographic-neighbor.ts +58 -0
  571. package/src/terrain/geographic-poles.ts +52 -0
  572. package/src/terrain/geographic-seam.ts +73 -0
  573. package/src/terrain/hydrology.ts +149 -0
  574. package/src/terrain/index.ts +160 -0
  575. package/src/terrain/lod-screen-error.ts +128 -0
  576. package/src/terrain/lod-select.ts +129 -0
  577. package/src/terrain/lod-stitch.ts +88 -0
  578. package/src/terrain/mesh-coverage.ts +215 -0
  579. package/src/terrain/mesh-cutout.ts +420 -0
  580. package/src/terrain/mesh-regions-data.ts +21 -13
  581. package/src/terrain/mesh-skirts.ts +10 -7
  582. package/src/terrain/mixed-halo-update.ts +147 -25
  583. package/src/terrain/mixed-vertex-halos.ts +125 -55
  584. package/src/terrain/regional-viewshed.ts +177 -0
  585. package/src/terrain/surface.ts +1 -1
  586. package/src/terrain/sweep-capsule.ts +148 -0
  587. package/src/terrain/sweep-cylinder.ts +64 -0
  588. package/src/terrain/sweep-plane.ts +61 -0
  589. package/src/terrain/sweep-polytope.ts +253 -0
  590. package/src/terrain/sweep-rotating-capsule.ts +139 -0
  591. package/src/terrain/sweep-rotation.ts +149 -0
  592. package/src/terrain/sweep-sphere.ts +100 -0
  593. package/src/terrain/tile-cutout-update.ts +293 -0
  594. package/src/terrain/tile-cutout.ts +123 -0
  595. package/src/terrain/valid-domain-mesh.ts +221 -0
  596. package/src/terrain/valid-domain-regions.ts +41 -0
  597. package/src/terrain/watershed-accumulation.ts +67 -0
  598. package/src/triaxial.ts +1 -1
  599. package/src/turf-expressions.ts +7 -0
  600. package/src/{turf/expressions.ts → turf-functions.ts} +121 -6
  601. package/src/turf.ts +3 -7
  602. package/src/type-utils.ts +2 -2
  603. package/src/web-mercator/assert.ts +11 -0
  604. package/src/web-mercator/fit-bounds.ts +132 -0
  605. package/src/web-mercator/fly-to-viewport.ts +157 -0
  606. package/src/web-mercator/get-bounds.ts +62 -0
  607. package/src/web-mercator/index.ts +49 -0
  608. package/src/web-mercator/math-utils.ts +35 -0
  609. package/src/web-mercator/mercator-meters.ts +83 -0
  610. package/src/web-mercator/normalize-viewport-props.ts +58 -0
  611. package/src/web-mercator/web-mercator-utils.ts +468 -0
  612. package/src/web-mercator/web-mercator-viewport.ts +406 -0
  613. package/src/web-mercator.ts +1 -1
  614. package/dist/projection/experimental/index.cjs +0 -11707
  615. package/dist/projection/experimental/index.cjs.map +0 -6
  616. package/dist/turf/expressions.cjs +0 -87
  617. package/dist/turf/expressions.cjs.map +0 -6
  618. package/dist/turf/expressions.d.ts +0 -24
  619. package/dist/turf/expressions.d.ts.map +0 -1
  620. package/dist/turf/expressions.js.map +0 -1
@@ -0,0 +1,593 @@
1
+ // math.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
4
+ import { Binary, Bool, DataType, Field, FixedSizeList, Float64, Int32, Utf8, vectorFromArray } from 'apache-arrow';
5
+ import { getGeoArrowFieldInfo, getGeoArrowBounds, getGeoArrowRowBounds, getGeoArrowColumnView, materializeGeoArrowRows, visitGeoArrowCoordinates, makeGeoArrowColumnFromArrowVector, writeWKB } from '@math.gl/core/arrow';
6
+ import { planarIntersects } from "./spatial-planar-intersects.js";
7
+ import { lineLocatePoint, lineSubstring } from "./linear-referencing.js";
8
+ import { normalizeCRSIdentifier } from "./crs/crs-identifier.js";
9
+ import { EPSG3857ToLngLat, EPSG4326ToEPSG3857 } from "./web-mercator/mercator-meters.js";
10
+ import { vertexCount, memberCount, geometryMember } from "./geometry-inspection.js";
11
+ import { reduceLineVertices } from "./line-simplification.js";
12
+ import { collectPair, makeLine } from "./geometry-constructors.js";
13
+ import { EPSG3857_HALF_CIRCUMFERENCE } from "./web-mercator/mercator-meters.js";
14
+ import { planarArea, planarBounds, planarCentroid, planarEnvelope, envelopeFromBounds, planarLength, planarPolygonPointOnSurface } from "./spatial-planar.js";
15
+ import { EXTENSION_METADATA, EXTENSION_NAME, geometryTypes, lineKinds, planarGeometry, pointCoordinates, pointInPolygon, pointKinds, polygonKinds, readActiveGeoArrowColumn, readGeometryValue, spatialFunction } from "./spatial-sql.js";
16
+ /** Constructs XY, XYZ, or XYZM points from numeric ordinates. */
17
+ export const ST_MAKEPOINT = {
18
+ kind: 'scalar',
19
+ name: 'ST_MakePoint',
20
+ prototypes: [],
21
+ /** Binds two to four numeric ordinate fields and declares a WKB result. */
22
+ resolvePrototype(fields) {
23
+ if (fields.length < 2 || fields.length > 4)
24
+ return undefined;
25
+ const arguments_ = fields.map(field => {
26
+ if (field && !DataType.isInt(field.type) && !DataType.isFloat(field.type))
27
+ throw new Error('ST_MakePoint requires numeric coordinates');
28
+ return field ?? new Field('coordinate', new Float64(), true);
29
+ });
30
+ const type = new Binary();
31
+ return {
32
+ arguments: arguments_,
33
+ result: new Field('ST_MakePoint', type, true, new Map([[EXTENSION_NAME, 'geoarrow.wkb']])),
34
+ /** Writes one point per active row, retaining nulls in all other rows. */
35
+ evaluate(vectors, { activeRows, length }) {
36
+ const values = new Array(length).fill(null);
37
+ for (let row = 0; row < length; row++) {
38
+ if (activeRows[row]) {
39
+ const coordinates = vectors.map(vector => Number(vector.get(row)));
40
+ values[row] = writeWKB({ type: 'Point', coordinates });
41
+ }
42
+ }
43
+ return vectorFromArray(values, type);
44
+ }
45
+ };
46
+ }
47
+ };
48
+ /** Computes a closed XYZ tile polygon, clipping a fractional margin to the root extent. */
49
+ function tileEnvelope(zoom, x, y, bounds, margin) {
50
+ if (!Number.isInteger(zoom) || zoom < 0 || zoom > 31)
51
+ throw new Error('ST_TileEnvelope zoom must be an integer in [0,31]');
52
+ const count = 2 ** zoom;
53
+ if (![x, y].every(index => Number.isInteger(index) && index >= 0 && index < count))
54
+ throw new Error('ST_TileEnvelope tile index outside zoom level');
55
+ if (!Number.isFinite(margin) || margin < -0.5)
56
+ throw new Error('Invalid ST_TileEnvelope margin');
57
+ const [west, south, east, north] = bounds;
58
+ const width = (east - west) / count, height = (north - south) / count;
59
+ if (!(width > 0 && height > 0 && Number.isFinite(width) && Number.isFinite(height)))
60
+ throw new Error('ST_TileEnvelope requires nondegenerate bounds');
61
+ const fullWidth = 1 + 2 * margin > count;
62
+ const left = fullWidth ? west : Math.max(west, west + (x - margin) * width);
63
+ const right = fullWidth ? east : Math.min(east, west + (x + 1 + margin) * width);
64
+ const bottom = Math.max(south, north - (y + 1 + margin) * height);
65
+ const top = Math.min(north, north - (y - margin) * height);
66
+ return writeWKB({
67
+ type: 'Polygon',
68
+ coordinates: [
69
+ [
70
+ [left, bottom],
71
+ [left, top],
72
+ [right, top],
73
+ [right, bottom],
74
+ [left, bottom]
75
+ ]
76
+ ]
77
+ }, 'xy');
78
+ }
79
+ /** Constructs an XYZ tile polygon in Web Mercator or a supplied root geometry's CRS. */
80
+ export const ST_TILEENVELOPE = {
81
+ kind: 'scalar',
82
+ name: 'ST_TileEnvelope',
83
+ prototypes: [],
84
+ /** Binds numeric tile indices and the optional GeoArrow root extent. */
85
+ resolvePrototype(fields) {
86
+ if (fields.length < 3 || fields.length > 5)
87
+ return undefined;
88
+ const custom = fields.length >= 4;
89
+ const root = fields[3];
90
+ if (custom)
91
+ ST_ENVELOPE.resolvePrototype([root]);
92
+ const args = fields.map((field, i) => {
93
+ if (i === 3)
94
+ return field ?? new Field('bounds', new Binary(), true);
95
+ if (field && !DataType.isInt(field.type) && !DataType.isFloat(field.type))
96
+ throw new Error('ST_TileEnvelope requires numeric indices and margin');
97
+ return field ?? new Field('number', new Float64(), true);
98
+ });
99
+ const metadata = new Map([[EXTENSION_NAME, 'geoarrow.wkb']]);
100
+ const crs = custom
101
+ ? root?.metadata.get(EXTENSION_METADATA)
102
+ : '{"crs_type":"authority_code","crs":"EPSG:3857"}';
103
+ if (crs)
104
+ metadata.set(EXTENSION_METADATA, crs);
105
+ const type = new Binary();
106
+ const r = EPSG3857_HALF_CIRCUMFERENCE;
107
+ const world = [-r, -r, r, r];
108
+ return {
109
+ arguments: args,
110
+ result: new Field('ST_TileEnvelope', type, true, metadata),
111
+ /** Computes bounds for active rows using the top-left XYZ origin. */
112
+ evaluate(vectors, { activeRows, length }) {
113
+ const values = new Array(length).fill(null);
114
+ const read = root
115
+ ? readGeometryValue(vectors[3], root, activeRows, planarGeometry)
116
+ : undefined;
117
+ for (let row = 0; row < length; row++) {
118
+ if (!activeRows[row])
119
+ continue;
120
+ const bounds = read ? planarBounds(read(row)) : world;
121
+ if (!bounds)
122
+ throw new Error('ST_TileEnvelope requires nonempty bounds');
123
+ values[row] = tileEnvelope(Number(vectors[0].get(row)), Number(vectors[1].get(row)), Number(vectors[2].get(row)), bounds, vectors[4] ? Number(vectors[4].get(row)) : 0);
124
+ }
125
+ return vectorFromArray(values, type);
126
+ }
127
+ };
128
+ }
129
+ };
130
+ /** Binds a point accessor while preserving the semantic distinction between Z and M. */
131
+ function pointOrdinate(ordinate) {
132
+ const name = 'ST_' + ordinate.toUpperCase();
133
+ return {
134
+ kind: 'scalar',
135
+ name,
136
+ prototypes: [],
137
+ /** Accepts native Points or WKB whose geometry kind is checked per active row. */
138
+ resolvePrototype(fields) {
139
+ if (fields.length !== 1)
140
+ return undefined;
141
+ const field = fields[0] ??
142
+ new Field('point', new Binary(), true, new Map([[EXTENSION_NAME, 'geoarrow.wkb']]));
143
+ const extension = getGeoArrowFieldInfo(field);
144
+ if (extension?.metadata['edges'] === 'spherical')
145
+ throw new Error(`${name} requires planar geometry`);
146
+ const encoding = extension?.encoding;
147
+ if (encoding !== 'geoarrow.point' &&
148
+ !(encoding === 'geoarrow.wkb' &&
149
+ (DataType.isBinary(field.type) || DataType.isLargeBinary(field.type))))
150
+ throw new Error(`${name} requires a GeoArrow Point`);
151
+ const type = new Float64();
152
+ return {
153
+ arguments: [field],
154
+ result: new Field(name, type, true),
155
+ /** Extracts ordinates using the WKB row or native field dimension. */
156
+ evaluate([vector], { length, activeRows }) {
157
+ if (encoding === 'geoarrow.point') {
158
+ const column = readActiveGeoArrowColumn(vector, field, activeRows);
159
+ const result = new Array(length).fill(null);
160
+ const index = column.dimension.indexOf(ordinate);
161
+ if (index >= 0) {
162
+ visitGeoArrowCoordinates(column, (coordinate, row) => {
163
+ if (Number.isFinite(coordinate[0]) && Number.isFinite(coordinate[1])) {
164
+ result[row] = coordinate[index] ?? null;
165
+ }
166
+ return coordinate;
167
+ });
168
+ }
169
+ return vectorFromArray(result, type);
170
+ }
171
+ const read = readGeometryValue(vector, field, activeRows, (geometry, dimension) => {
172
+ if (geometry.type !== 'Point')
173
+ throw new Error(`${name} requires a Point`);
174
+ return pointCoordinates(geometry)?.[dimension.indexOf(ordinate)] ?? null;
175
+ });
176
+ return vectorFromArray(Array.from({ length }, (_, i) => (activeRows[i] ? read(i) : null)), type);
177
+ }
178
+ };
179
+ }
180
+ };
181
+ }
182
+ /** X coordinate of a point. */
183
+ export const ST_X = /* @__PURE__ */ pointOrdinate('x');
184
+ /** Y coordinate of a point. */
185
+ export const ST_Y = /* @__PURE__ */ pointOrdinate('y');
186
+ /** Elevation of a point with a Z ordinate. */
187
+ export const ST_Z = /* @__PURE__ */ pointOrdinate('z');
188
+ /** Measure of a point with an M ordinate. */
189
+ export const ST_M = /* @__PURE__ */ pointOrdinate('m');
190
+ /** First vertex for the supported 2D geometry signature. */
191
+ export const ST_STARTPOINT = /* @__PURE__ */ spatialFunction('ST_StartPoint', [['LineString']],
192
+ /* @__PURE__ */ new Binary(), ([line]) => {
193
+ if (line?.type !== 'LineString' || !line.coordinates.length)
194
+ return null;
195
+ return writeWKB({ type: 'Point', coordinates: line.coordinates[0] }, 'xy');
196
+ });
197
+ /** Last vertex for the supported 2D geometry signature. */
198
+ export const ST_ENDPOINT = /* @__PURE__ */ spatialFunction('ST_EndPoint', [['LineString']],
199
+ /* @__PURE__ */ new Binary(), ([line]) => {
200
+ if (line?.type !== 'LineString' || !line.coordinates.length)
201
+ return null;
202
+ return writeWKB({ type: 'Point', coordinates: line.coordinates[line.coordinates.length - 1] }, 'xy');
203
+ });
204
+ /** Tests whether a point is in a polygon's interior. */
205
+ export const ST_CONTAINS = /* @__PURE__ */ spatialFunction('ST_Contains', [polygonKinds, pointKinds],
206
+ /* @__PURE__ */ new Bool(), ([polygon, point]) => pointInPolygon(point, polygon, true) ?? false);
207
+ /** Tests whether a point is in a polygon's interior or boundary. */
208
+ export const ST_COVERS = /* @__PURE__ */ spatialFunction('ST_Covers', [polygonKinds, pointKinds],
209
+ /* @__PURE__ */ new Bool(), ([polygon, point]) => pointInPolygon(point, polygon) ?? false);
210
+ /** Interior only for the supported 2D geometry signature. */
211
+ export const ST_WITHIN = /* @__PURE__ */ spatialFunction('ST_Within', [pointKinds, polygonKinds],
212
+ /* @__PURE__ */ new Bool(), ([p, polygon]) => pointInPolygon(p, polygon, true) ?? false);
213
+ /** Interior or boundary for the supported 2D geometry signature. */
214
+ export const ST_COVEREDBY = /* @__PURE__ */ spatialFunction('ST_CoveredBy', [pointKinds, polygonKinds],
215
+ /* @__PURE__ */ new Bool(), ([p, polygon]) => pointInPolygon(p, polygon) ?? false);
216
+ /** Returns a LineString vertex by signed one-based position. */
217
+ export const ST_POINTN = /* @__PURE__ */ spatialFunction('ST_PointN', [['LineString']],
218
+ /* @__PURE__ */ new Binary(), ([line], position) => {
219
+ if (!Number.isInteger(position))
220
+ throw new Error('ST_PointN requires an integer position');
221
+ if (line?.type !== 'LineString' || !position)
222
+ return null;
223
+ const index = position > 0 ? position - 1 : line.coordinates.length + position;
224
+ const coordinates = line.coordinates[index];
225
+ return coordinates ? writeWKB({ type: 'Point', coordinates }, 'xy') : null;
226
+ }, 1);
227
+ /** Constructs a closed rectangular polygon in an unspecified coordinate system. */
228
+ export const ST_MAKEENVELOPE = /* @__PURE__ */ spatialFunction('ST_MakeEnvelope', [],
229
+ /* @__PURE__ */ new Binary(), (_, xmin, ymin, xmax, ymax) => writeWKB({
230
+ type: 'Polygon',
231
+ coordinates: [
232
+ [
233
+ [xmin, ymin],
234
+ [xmin, ymax],
235
+ [xmax, ymax],
236
+ [xmax, ymin],
237
+ [xmin, ymin]
238
+ ]
239
+ ]
240
+ }, 'xy'), 4);
241
+ /** Returns 2D Cartesian point-to-point distance in coordinate units. */
242
+ export const ST_DISTANCE = /* @__PURE__ */ spatialFunction('ST_Distance', [pointKinds, pointKinds],
243
+ /* @__PURE__ */ new Float64(), ([a, b]) => {
244
+ const p = pointCoordinates(a);
245
+ const q = pointCoordinates(b);
246
+ return p && q ? Math.hypot(q[0] - p[0], q[1] - p[1]) : null;
247
+ });
248
+ /** Tests an inclusive planar radius in the coordinate units of two points. */
249
+ export const ST_DWITHIN = /* @__PURE__ */ spatialFunction('ST_DWithin', [pointKinds, pointKinds],
250
+ /* @__PURE__ */ new Bool(), ([a, b], radius) => {
251
+ if (radius < 0)
252
+ throw new Error('ST_DWithin distance must be nonnegative');
253
+ const p = pointCoordinates(a);
254
+ const q = pointCoordinates(b);
255
+ return Boolean(p && q && Math.hypot(q[0] - p[0], q[1] - p[1]) <= radius);
256
+ }, 1);
257
+ /** Tests whether two planar geometries share any point, including their boundaries. */
258
+ export const ST_INTERSECTS = /* @__PURE__ */ spatialFunction('ST_Intersects', [
259
+ [...geometryTypes, 'GeometryCollection'],
260
+ [...geometryTypes, 'GeometryCollection']
261
+ ],
262
+ /* @__PURE__ */ new Bool(), ([a, b]) => planarIntersects(a, b));
263
+ /** Interpolates a point at a fraction of the planar length. */
264
+ export const ST_LINEINTERPOLATEPOINT = /* @__PURE__ */ spatialFunction('ST_LineInterpolatePoint', [['LineString']],
265
+ /* @__PURE__ */ new Binary(), ([line], fraction) => writeWKB(lineSubstring(line, fraction, fraction) ?? { type: 'Point', coordinates: [] }, 'xy'), 1);
266
+ /** Locates the closest point along a route, measured as a fraction of total length. */
267
+ export const ST_LINELOCATEPOINT = /* @__PURE__ */ spatialFunction('ST_LineLocatePoint', [['LineString'], pointKinds],
268
+ /* @__PURE__ */ new Float64(), ([line, point]) => lineLocatePoint(line, point));
269
+ /** Extracts a route section between two inclusive fractions of the planar length. */
270
+ export const ST_LINESUBSTRING = /* @__PURE__ */ spatialFunction('ST_LineSubstring', [['LineString']],
271
+ /* @__PURE__ */ new Binary(), ([line], start, end) => {
272
+ const result = lineSubstring(line, start, end);
273
+ return result ? writeWKB(result, 'xy') : null;
274
+ }, 2);
275
+ /** Extracts an EPSG code from a GeoArrow authority identifier or a PROJJSON root ID. */
276
+ function geometrySRID(crs) {
277
+ let identifier = typeof crs === 'string' ? normalizeCRSIdentifier(crs) : '';
278
+ if (crs && typeof crs === 'object' && 'id' in crs) {
279
+ const id = crs.id;
280
+ if (id &&
281
+ typeof id === 'object' &&
282
+ 'authority' in id &&
283
+ 'code' in id &&
284
+ id.authority === 'EPSG')
285
+ identifier = 'EPSG:' + String(id.code);
286
+ }
287
+ return /^EPSG:\d+$/.test(identifier) ? Number(identifier.slice(5)) : 0;
288
+ }
289
+ /** Applies a planar coordinate conversion throughout a multipart or collection geometry. */
290
+ function projectGeometry(geometry, project) {
291
+ const path = (points) => points.map(project);
292
+ switch (geometry.type) {
293
+ case 'Point':
294
+ return {
295
+ type: 'Point',
296
+ coordinates: geometry.coordinates.length && !geometry.coordinates.every(Number.isNaN)
297
+ ? project(geometry.coordinates)
298
+ : []
299
+ };
300
+ case 'MultiPoint':
301
+ return {
302
+ type: 'MultiPoint',
303
+ coordinates: geometry.coordinates.map(p => !p.length || p.every(Number.isNaN) ? p : project(p))
304
+ };
305
+ case 'LineString':
306
+ return { type: 'LineString', coordinates: path(geometry.coordinates) };
307
+ case 'MultiLineString':
308
+ case 'Polygon':
309
+ return { type: geometry.type, coordinates: geometry.coordinates.map(path) };
310
+ case 'MultiPolygon':
311
+ return { type: 'MultiPolygon', coordinates: geometry.coordinates.map(poly => poly.map(path)) };
312
+ case 'GeometryCollection':
313
+ return {
314
+ type: 'GeometryCollection',
315
+ geometries: geometry.geometries.map(child => projectGeometry(child, project))
316
+ };
317
+ }
318
+ }
319
+ /** Binds a single output CRS for the entire Arrow field, including empty batches. */
320
+ function crsFunction(name) {
321
+ const read = name === 'ST_SRID';
322
+ return {
323
+ kind: 'scalar',
324
+ name,
325
+ prototypes: [],
326
+ /** Resolves the source from field metadata and the target from the SQL literal. */
327
+ resolvePrototype(fields, literals) {
328
+ if (fields.length !== (read ? 1 : 2))
329
+ return undefined;
330
+ const metadata = fields[0] && getGeoArrowFieldInfo(fields[0])?.metadata;
331
+ const source = geometrySRID(metadata?.['crs']);
332
+ const target = literals?.[1] ?? 0;
333
+ if (!read &&
334
+ (literals?.[1] === undefined ||
335
+ !Number.isSafeInteger(target) ||
336
+ target < 0 ||
337
+ target > 998999))
338
+ throw new Error(name + ' requires a constant integer SRID between 0 and 998999');
339
+ if (name === 'ST_Transform' &&
340
+ (![4326, 3857].includes(source) || ![4326, 3857].includes(target)))
341
+ throw new Error('ST_Transform supports EPSG:4326 and EPSG:3857 source and target CRS');
342
+ const implementation = spatialFunction(name, [[...geometryTypes, 'GeometryCollection']], read ? new Int32() : new Binary(), ([geometry]) => {
343
+ if (read)
344
+ return source;
345
+ const output = name === 'ST_Transform' && source !== target
346
+ ? projectGeometry(geometry, p => target === 3857
347
+ ? EPSG4326ToEPSG3857([...p], { clampLatitude: false })
348
+ : EPSG3857ToLngLat([...p]))
349
+ : geometry;
350
+ return writeWKB(output, 'xy');
351
+ }, read ? 0 : 1).resolvePrototype(fields);
352
+ if (!read) {
353
+ const crsMetadata = { ...metadata };
354
+ delete crsMetadata['crs_type'];
355
+ delete crsMetadata['crs'];
356
+ if (target)
357
+ Object.assign(crsMetadata, { crs_type: 'authority_code', crs: 'EPSG:' + target });
358
+ implementation.result.metadata.set(EXTENSION_METADATA, JSON.stringify(crsMetadata));
359
+ }
360
+ return implementation;
361
+ }
362
+ };
363
+ }
364
+ /** Returns the field EPSG code, or zero for an unidentified CRS. */
365
+ export const ST_SRID = /* @__PURE__ */ crsFunction('ST_SRID');
366
+ /** Assigns a CRS to a geometry column, preserving its coordinate values. */
367
+ export const ST_SETSRID = /* @__PURE__ */ crsFunction('ST_SetSRID');
368
+ /** Reprojects a planar geometry column between geographic and Web Mercator coordinates. */
369
+ export const ST_TRANSFORM = /* @__PURE__ */ crsFunction('ST_Transform');
370
+ /** Declares a geometry-valued line reduction with an optional default tolerance. */
371
+ function lineReduction(name, mode) {
372
+ return {
373
+ kind: 'scalar',
374
+ name,
375
+ prototypes: [],
376
+ /** Binds the geometry and any supplied numeric tolerance. */
377
+ resolvePrototype(fields) {
378
+ const numericArguments = mode === 'removeRepeated' && fields.length === 1 ? 0 : 1;
379
+ return spatialFunction(name, [lineKinds], new Binary(), ([line], tolerance = 0) => {
380
+ const result = reduceLineVertices(line, tolerance, mode);
381
+ return result ? writeWKB(result, 'xy') : null;
382
+ }, numericArguments).resolvePrototype(fields);
383
+ }
384
+ };
385
+ }
386
+ /** Removes consecutive duplicate or nearby vertices. */
387
+ export const ST_REMOVEREPEATEDPOINTS = /* @__PURE__ */ lineReduction('ST_RemoveRepeatedPoints', 'removeRepeated');
388
+ /** Reduces route vertices with Douglas-Peucker simplification. */
389
+ export const ST_SIMPLIFY = /* @__PURE__ */ lineReduction('ST_Simplify', 'simplify');
390
+ /** Returns clockwise azimuth from positive Y in radians. */
391
+ export const ST_AZIMUTH = /* @__PURE__ */ spatialFunction('ST_Azimuth', [pointKinds, pointKinds],
392
+ /* @__PURE__ */ new Float64(), ([a, b]) => {
393
+ const p = pointCoordinates(a);
394
+ const q = pointCoordinates(b);
395
+ if (!p || !q)
396
+ return null;
397
+ const dx = q[0] - p[0];
398
+ const dy = q[1] - p[1];
399
+ if (!dx && !dy)
400
+ return null;
401
+ const angle = Math.atan2(dx, dy);
402
+ return angle < 0 ? angle + 2 * Math.PI : angle;
403
+ });
404
+ /** Returns planar polygonal area, or zero for non-areal input. */
405
+ export const ST_AREA = /* @__PURE__ */ spatialFunction('ST_Area', [geometryTypes],
406
+ /* @__PURE__ */ new Float64(), ([geometry]) => planarArea(geometry));
407
+ /** Returns planar linear length, or zero for non-linear input. */
408
+ export const ST_LENGTH = /* @__PURE__ */ spatialFunction('ST_Length', [geometryTypes],
409
+ /* @__PURE__ */ new Float64(), ([geometry]) => planarLength(geometry));
410
+ /** Returns a geometry's 2D center of mass as GeoArrow WKB. */
411
+ export const ST_CENTROID = /* @__PURE__ */ spatialFunction('ST_Centroid', [geometryTypes],
412
+ /* @__PURE__ */ new Binary(), ([geometry]) => writeWKB(planarCentroid(geometry), 'xy'));
413
+ /** Inspection functions also accept WKB geometry collections. */
414
+ const inspectionKinds = [[...geometryTypes, 'GeometryCollection']];
415
+ /** Vertex count including polygon ring closures. */
416
+ export const ST_NPOINTS = /* @__PURE__ */ spatialFunction('ST_NPoints', inspectionKinds,
417
+ /* @__PURE__ */ new Int32(), ([g]) => vertexCount(g), 0, true);
418
+ /** Number of top-level components, or zero for empty geometry. */
419
+ export const ST_NUMGEOMETRIES = /* @__PURE__ */ spatialFunction('ST_NumGeometries', inspectionKinds,
420
+ /* @__PURE__ */ new Int32(), ([g]) => memberCount(g), 0, true);
421
+ /** Whether the geometry contains no vertices. */
422
+ export const ST_ISEMPTY = /* @__PURE__ */ spatialFunction('ST_IsEmpty', inspectionKinds,
423
+ /* @__PURE__ */ new Bool(), ([g]) => !vertexCount(g), 0, true);
424
+ /** Geometry type name with the ST_ prefix. */
425
+ export const ST_GEOMETRYTYPE = /* @__PURE__ */ spatialFunction('ST_GeometryType', inspectionKinds,
426
+ /* @__PURE__ */ new Utf8(), ([g]) => 'ST_' + g.type, 0, true);
427
+ /** WKB geometry containing only XY ordinates. */
428
+ export const ST_FORCE2D = /* @__PURE__ */ spatialFunction('ST_Force2D', inspectionKinds,
429
+ /* @__PURE__ */ new Binary(), ([g]) => writeWKB(g, 'xy'), 0, true);
430
+ /** One-based component as WKB with the input dimension. */
431
+ export const ST_GEOMETRYN = /* @__PURE__ */ spatialFunction('ST_GeometryN', inspectionKinds,
432
+ /* @__PURE__ */ new Binary(), ([g], position) => {
433
+ const part = geometryMember(g, position);
434
+ return part ? (g.members?.[position - 1] ?? writeWKB(part, g.dimension ?? 'xy')) : null;
435
+ }, 1, true);
436
+ /** Connects two point, multipoint or line inputs in their given order. */
437
+ export const ST_MAKELINE = /* @__PURE__ */ spatialFunction('ST_MakeLine', [
438
+ ['Point', 'MultiPoint', 'LineString'],
439
+ ['Point', 'MultiPoint', 'LineString']
440
+ ],
441
+ /* @__PURE__ */ new Binary(), geometries => writeWKB(makeLine(geometries), 'xy'));
442
+ /** Collects two geometries without dissolving or flattening them. */
443
+ export const ST_COLLECT = /* @__PURE__ */ spatialFunction('ST_Collect', [
444
+ [...geometryTypes, 'GeometryCollection'],
445
+ [...geometryTypes, 'GeometryCollection']
446
+ ],
447
+ /* @__PURE__ */ new Binary(), ([a, b]) => (a ? writeWKB(b ? collectPair(a, b) : a, 'xy') : null), 0, false, true);
448
+ /** Returns an interior label point for a planar polygonal surface. */
449
+ export const ST_POINTONSURFACE = /* @__PURE__ */ spatialFunction('ST_PointOnSurface', [polygonKinds],
450
+ /* @__PURE__ */ new Binary(), ([polygon]) => writeWKB(planarPolygonPointOnSurface(polygon), 'xy'));
451
+ /** Binds the WKB fallback and native row-bounds implementation. */
452
+ function makeEnvelopeFunction() {
453
+ const envelopeFunction = spatialFunction('ST_Envelope', [[...geometryTypes, 'GeometryCollection']],
454
+ /* @__PURE__ */ new Binary(), ([geometry]) => writeWKB(planarEnvelope(geometry), 'xy'));
455
+ return {
456
+ ...envelopeFunction,
457
+ /** Keeps the WKB evaluator and binds the bounds kernel for native columns. */
458
+ resolvePrototype(fields) {
459
+ const prototype = envelopeFunction.resolvePrototype(fields);
460
+ const field = fields[0];
461
+ if (!prototype ||
462
+ !field ||
463
+ DataType.isBinary(field.type) ||
464
+ DataType.isLargeBinary(field.type)) {
465
+ return prototype;
466
+ }
467
+ return {
468
+ ...prototype,
469
+ /** Evaluates active rows and preserves the type of empty geometries. */
470
+ evaluate([vector], { activeRows, length }) {
471
+ const column = readActiveGeoArrowColumn(vector, field, activeRows);
472
+ const bounds = getGeoArrowRowBounds(column);
473
+ const values = Array.from({ length }, (_, row) => {
474
+ if (!activeRows[row])
475
+ return null;
476
+ const box = bounds[row];
477
+ if (box)
478
+ return writeWKB(envelopeFromBounds(box), 'xy');
479
+ const [geometry] = materializeGeoArrowRows(getGeoArrowColumnView(column, row, row + 1));
480
+ return geometry ? writeWKB(geometry, 'xy') : null;
481
+ });
482
+ return vectorFromArray(values, new Binary());
483
+ }
484
+ };
485
+ }
486
+ };
487
+ }
488
+ /** Returns the 2D envelope as GeoArrow WKB. */
489
+ export const ST_ENVELOPE = /* @__PURE__ */ makeEnvelopeFunction();
490
+ /** Reduces a geometry column to its four planar bounds, ignoring null and empty rows. */
491
+ export const ST_EXTENT = {
492
+ kind: 'aggregate',
493
+ name: 'ST_Extent',
494
+ /** Binds the input geometry signature and the fixed-size box result. */
495
+ bind({ arguments: fields }) {
496
+ const field = fields[0];
497
+ if (!field || fields.length !== 1)
498
+ throw new Error('ST_Extent requires one geometry column');
499
+ ST_ENVELOPE.resolvePrototype([field]);
500
+ return {
501
+ outputField: new Field('ST_Extent', new FixedSizeList(4, new Field('value', new Float64(), false)), true),
502
+ /** Creates independent bounds for this group. */
503
+ createAccumulator() {
504
+ let bounds = null;
505
+ /** Includes a geometry or partial accumulator in the current bounds. */
506
+ function include(box) {
507
+ if (!bounds)
508
+ bounds = [...box];
509
+ else {
510
+ bounds[0] = Math.min(bounds[0], box[0]);
511
+ bounds[1] = Math.min(bounds[1], box[1]);
512
+ bounds[2] = Math.max(bounds[2], box[2]);
513
+ bounds[3] = Math.max(bounds[3], box[3]);
514
+ }
515
+ }
516
+ return {
517
+ /** Accumulates nonempty geometry bounds from one record batch. */
518
+ update([vector], { length }) {
519
+ if (!DataType.isBinary(field.type) && !DataType.isLargeBinary(field.type)) {
520
+ const column = makeGeoArrowColumnFromArrowVector(vector, { field });
521
+ const box = getGeoArrowBounds(column);
522
+ if (box)
523
+ include(box);
524
+ return;
525
+ }
526
+ const active = Uint8Array.from({ length }, (_, i) => Number(vector.isValid(i)));
527
+ const read = readGeometryValue(vector, field, active, planarGeometry);
528
+ for (let i = 0; i < length; i++) {
529
+ if (!active[i])
530
+ continue;
531
+ const box = planarBounds(read(i));
532
+ if (box)
533
+ include(box);
534
+ }
535
+ },
536
+ /** Combines bounds from another group partition. */
537
+ merge(partial) {
538
+ const box = partial.finalize();
539
+ if (Array.isArray(box))
540
+ include(box);
541
+ },
542
+ /** Returns a detached snapshot, or null for a group without coordinates. */
543
+ finalize: () => bounds && [...bounds]
544
+ };
545
+ }
546
+ };
547
+ }
548
+ };
549
+ /** Opt-in PostGIS-aligned 2D geometry functions for the Arrow SQL function list. */
550
+ export const POSTGIS_SPATIAL_FUNCTIONS =
551
+ /* @__PURE__ */ Object.freeze([
552
+ ST_X,
553
+ ST_Y,
554
+ ST_Z,
555
+ ST_M,
556
+ ST_STARTPOINT,
557
+ ST_ENDPOINT,
558
+ ST_CONTAINS,
559
+ ST_COVERS,
560
+ ST_WITHIN,
561
+ ST_COVEREDBY,
562
+ ST_POINTN,
563
+ ST_MAKEENVELOPE,
564
+ ST_DISTANCE,
565
+ ST_DWITHIN,
566
+ ST_INTERSECTS,
567
+ ST_SRID,
568
+ ST_SETSRID,
569
+ ST_TRANSFORM,
570
+ ST_REMOVEREPEATEDPOINTS,
571
+ ST_SIMPLIFY,
572
+ ST_AZIMUTH,
573
+ ST_MAKEPOINT,
574
+ ST_TILEENVELOPE,
575
+ ST_AREA,
576
+ ST_LENGTH,
577
+ ST_LINEINTERPOLATEPOINT,
578
+ ST_LINELOCATEPOINT,
579
+ ST_LINESUBSTRING,
580
+ ST_POINTONSURFACE,
581
+ ST_CENTROID,
582
+ ST_NPOINTS,
583
+ ST_NUMGEOMETRIES,
584
+ ST_ISEMPTY,
585
+ ST_GEOMETRYTYPE,
586
+ ST_FORCE2D,
587
+ ST_GEOMETRYN,
588
+ ST_MAKELINE,
589
+ ST_COLLECT,
590
+ ST_ENVELOPE,
591
+ ST_EXTENT
592
+ ]);
593
+ //# sourceMappingURL=st-functions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"st-functions.js","sourceRoot":"","sources":["../src/st-functions.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AAE5D,OAAO,EACL,MAAM,EACN,IAAI,EACJ,QAAQ,EACR,KAAK,EACL,aAAa,EACb,OAAO,EACP,KAAK,EACL,IAAI,EACJ,eAAe,EAChB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,oBAAoB,EACpB,qBAAqB,EACrB,uBAAuB,EACvB,wBAAwB,EACxB,iCAAiC,EACjC,QAAQ,EAET,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAC,gBAAgB,EAAC,uCAAoC;AAC7D,OAAO,EAAC,eAAe,EAAE,aAAa,EAAC,gCAA6B;AACpE,OAAO,EAAC,sBAAsB,EAAC,gCAA6B;AAC5D,OAAO,EAAC,gBAAgB,EAAE,kBAAkB,EAAC,0CAAuC;AACp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;CACF,CAAC;AAEF,oFAAoF;AACpF,MAAM,CAAC,MAAM,yBAAyB;AACpC,eAAe,CAAC,MAAM,CAAC,MAAM,CAAC;IAC5B,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,aAAa;IACb,WAAW;IACX,WAAW;IACX,SAAS;IACT,SAAS;IACT,YAAY;IACZ,SAAS;IACT,eAAe;IACf,WAAW;IACX,UAAU;IACV,aAAa;IACb,OAAO;IACP,UAAU;IACV,YAAY;IACZ,uBAAuB;IACvB,WAAW;IACX,UAAU;IACV,YAAY;IACZ,eAAe;IACf,OAAO;IACP,SAAS;IACT,uBAAuB;IACvB,kBAAkB;IAClB,gBAAgB;IAChB,iBAAiB;IACjB,WAAW;IACX,UAAU;IACV,gBAAgB;IAChB,UAAU;IACV,eAAe;IACf,UAAU;IACV,YAAY;IACZ,WAAW;IACX,UAAU;IACV,WAAW;IACX,SAAS;CACV,CAAC,CAAC"}
@@ -2,7 +2,7 @@
2
2
  // SPDX-License-Identifier: MIT
3
3
  // SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
4
4
  // SPDX-FileComment: Original adapter over math.gl subdivision and spheroid kernels. Motivation only: https://github.com/keplergl/kepler.gl/pull/3548 (closed, unmerged). No implementation copied.
5
- import { spheroidToCartesian } from '@math.gl/core';
5
+ import { spheroidToCartesian } from '@math.gl/core/matrix';
6
6
  import { subdivideTriangleMesh } from '@math.gl/geometry';
7
7
  /** Refine an already triangulated longitude/latitude(/height) mesh onto a globe.
8
8
  * Source angles are degrees, height and tolerance are in axis units. Output is