@math.gl/geospatial 5.0.0-rc.2 → 5.0.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 (356) hide show
  1. package/README.md +6 -6
  2. package/dist/coordinates.cjs +2523 -0
  3. package/dist/coordinates.cjs.map +6 -0
  4. package/dist/coordinates.d.ts +4 -0
  5. package/dist/coordinates.d.ts.map +1 -1
  6. package/dist/coordinates.js +2 -0
  7. package/dist/coordinates.js.map +1 -1
  8. package/dist/entries/ellipsoid.cjs +1209 -0
  9. package/dist/entries/ellipsoid.cjs.map +6 -0
  10. package/dist/entries/ellipsoid.d.ts +3 -19
  11. package/dist/entries/ellipsoid.d.ts.map +1 -1
  12. package/dist/entries/ellipsoid.js +1 -9
  13. package/dist/entries/ellipsoid.js.map +1 -1
  14. package/dist/expressions.cjs +726 -0
  15. package/dist/expressions.cjs.map +6 -0
  16. package/dist/geodesics.cjs +3195 -0
  17. package/dist/geodesics.cjs.map +6 -0
  18. package/dist/geodesics.d.ts +18 -0
  19. package/dist/geodesics.d.ts.map +1 -0
  20. package/dist/geodesics.js +13 -0
  21. package/dist/geodesics.js.map +1 -0
  22. package/dist/geographic-atlas/sampling.d.ts +1 -1
  23. package/dist/geographic-atlas/sampling.d.ts.map +1 -1
  24. package/dist/geographic-atlas/sampling.js +1 -1
  25. package/dist/geographic-atlas/sampling.js.map +1 -1
  26. package/dist/geographic-cuts.cjs +4160 -0
  27. package/dist/geographic-cuts.cjs.map +6 -0
  28. package/dist/geographic-cuts.d.ts +2 -0
  29. package/dist/geographic-cuts.d.ts.map +1 -1
  30. package/dist/geographic-cuts.js +1 -0
  31. package/dist/geographic-cuts.js.map +1 -1
  32. package/dist/geographic-seams/subdivide-cut.d.ts +1 -1
  33. package/dist/geographic-seams/subdivide-cut.d.ts.map +1 -1
  34. package/dist/geographic-seams/subdivide-cut.js +1 -1
  35. package/dist/geographic-seams/subdivide-cut.js.map +1 -1
  36. package/dist/geographic-seams/types.shared.cjs +32 -0
  37. package/dist/geographic-seams/types.shared.cjs.map +6 -0
  38. package/dist/globe.cjs +4223 -0
  39. package/dist/globe.cjs.map +6 -0
  40. package/dist/index.d.ts +2 -0
  41. package/dist/index.d.ts.map +1 -1
  42. package/dist/index.js +2 -0
  43. package/dist/index.js.map +1 -1
  44. package/dist/line-simplification.d.ts +7 -0
  45. package/dist/line-simplification.d.ts.map +1 -1
  46. package/dist/line-simplification.js +4 -13
  47. package/dist/line-simplification.js.map +1 -1
  48. package/dist/linear-referencing.d.ts +13 -1
  49. package/dist/linear-referencing.d.ts.map +1 -1
  50. package/dist/linear-referencing.js +29 -9
  51. package/dist/linear-referencing.js.map +1 -1
  52. package/dist/maps/map-transition.shared.cjs +364 -0
  53. package/dist/maps/map-transition.shared.cjs.map +6 -0
  54. package/dist/maps/myriahedral/unfold.d.ts +1 -1
  55. package/dist/maps/myriahedral/unfold.d.ts.map +1 -1
  56. package/dist/maps/myriahedral/unfold.js +1 -1
  57. package/dist/maps/myriahedral/unfold.js.map +1 -1
  58. package/dist/maps/presets.cjs +2 -2
  59. package/dist/maps/presets.cjs.map +2 -2
  60. package/dist/maps/transitions.cjs +3 -342
  61. package/dist/maps/transitions.cjs.map +3 -3
  62. package/dist/maps.cjs +15 -319
  63. package/dist/maps.cjs.map +3 -3
  64. package/dist/measure-referencing.d.ts +16 -0
  65. package/dist/measure-referencing.d.ts.map +1 -0
  66. package/dist/measure-referencing.js +143 -0
  67. package/dist/measure-referencing.js.map +1 -0
  68. package/dist/polygon-simplification.d.ts +6 -0
  69. package/dist/polygon-simplification.d.ts.map +1 -0
  70. package/dist/polygon-simplification.js +141 -0
  71. package/dist/polygon-simplification.js.map +1 -0
  72. package/dist/projection/experimental/core.cjs +63 -1317
  73. package/dist/projection/experimental/core.cjs.map +3 -3
  74. package/dist/projection/experimental/core.d.ts +1 -1
  75. package/dist/projection/experimental/core.d.ts.map +1 -1
  76. package/dist/projection/experimental/crs/projjson.cjs +26 -45
  77. package/dist/projection/experimental/crs/projjson.cjs.map +3 -3
  78. package/dist/projection/experimental/crs/types.shared.cjs +44 -0
  79. package/dist/projection/experimental/crs/types.shared.cjs.map +6 -0
  80. package/dist/projection/experimental/crs/wkt.cjs +36 -52
  81. package/dist/projection/experimental/crs/wkt.cjs.map +3 -3
  82. package/dist/projection/experimental/entries/projections/ob_tran.cjs +9 -23
  83. package/dist/projection/experimental/entries/projections/ob_tran.cjs.map +3 -3
  84. package/dist/projection/experimental/lazy-projections/aea.cjs +1 -1
  85. package/dist/projection/experimental/lazy-projections/aea.js +1 -1
  86. package/dist/projection/experimental/lazy-projections/aeqd.cjs +1 -1
  87. package/dist/projection/experimental/lazy-projections/aeqd.js +1 -1
  88. package/dist/projection/experimental/lazy-projections/bonne.cjs +1 -1
  89. package/dist/projection/experimental/lazy-projections/bonne.js +1 -1
  90. package/dist/projection/experimental/lazy-projections/cass.cjs +1 -1
  91. package/dist/projection/experimental/lazy-projections/cass.js +1 -1
  92. package/dist/projection/experimental/lazy-projections/cea.cjs +1 -1
  93. package/dist/projection/experimental/lazy-projections/cea.js +1 -1
  94. package/dist/projection/experimental/lazy-projections/eck6.cjs +1 -1
  95. package/dist/projection/experimental/lazy-projections/eck6.js +1 -1
  96. package/dist/projection/experimental/lazy-projections/eqc.cjs +1 -1
  97. package/dist/projection/experimental/lazy-projections/eqc.js +1 -1
  98. package/dist/projection/experimental/lazy-projections/eqdc.cjs +1 -1
  99. package/dist/projection/experimental/lazy-projections/eqdc.js +1 -1
  100. package/dist/projection/experimental/lazy-projections/eqearth.cjs +1 -1
  101. package/dist/projection/experimental/lazy-projections/eqearth.js +1 -1
  102. package/dist/projection/experimental/lazy-projections/equi.cjs +1 -1
  103. package/dist/projection/experimental/lazy-projections/equi.js +1 -1
  104. package/dist/projection/experimental/lazy-projections/etmerc.cjs +1 -1
  105. package/dist/projection/experimental/lazy-projections/etmerc.js +1 -1
  106. package/dist/projection/experimental/lazy-projections/geocent.cjs +1 -1
  107. package/dist/projection/experimental/lazy-projections/geocent.js +1 -1
  108. package/dist/projection/experimental/lazy-projections/geos.cjs +1 -1
  109. package/dist/projection/experimental/lazy-projections/geos.js +1 -1
  110. package/dist/projection/experimental/lazy-projections/gnom.cjs +1 -1
  111. package/dist/projection/experimental/lazy-projections/gnom.js +1 -1
  112. package/dist/projection/experimental/lazy-projections/gstmerc.cjs +1 -1
  113. package/dist/projection/experimental/lazy-projections/gstmerc.js +1 -1
  114. package/dist/projection/experimental/lazy-projections/index.cjs +60 -903
  115. package/dist/projection/experimental/lazy-projections/index.cjs.map +3 -3
  116. package/dist/projection/experimental/lazy-projections/krovak.cjs +1 -1
  117. package/dist/projection/experimental/lazy-projections/krovak.js +1 -1
  118. package/dist/projection/experimental/lazy-projections/laea.cjs +1 -1
  119. package/dist/projection/experimental/lazy-projections/laea.js +1 -1
  120. package/dist/projection/experimental/lazy-projections/lcc.cjs +1 -1
  121. package/dist/projection/experimental/lazy-projections/lcc.js +1 -1
  122. package/dist/projection/experimental/lazy-projections/merc.cjs +1 -1
  123. package/dist/projection/experimental/lazy-projections/merc.js +1 -1
  124. package/dist/projection/experimental/lazy-projections/mill.cjs +1 -1
  125. package/dist/projection/experimental/lazy-projections/mill.js +1 -1
  126. package/dist/projection/experimental/lazy-projections/moll.cjs +1 -1
  127. package/dist/projection/experimental/lazy-projections/moll.js +1 -1
  128. package/dist/projection/experimental/lazy-projections/nzmg.cjs +1 -1
  129. package/dist/projection/experimental/lazy-projections/nzmg.js +1 -1
  130. package/dist/projection/experimental/lazy-projections/ob_tran.cjs +1 -1
  131. package/dist/projection/experimental/lazy-projections/ob_tran.js +1 -1
  132. package/dist/projection/experimental/lazy-projections/omerc.cjs +1 -1
  133. package/dist/projection/experimental/lazy-projections/omerc.js +1 -1
  134. package/dist/projection/experimental/lazy-projections/ortho.cjs +1 -1
  135. package/dist/projection/experimental/lazy-projections/ortho.js +1 -1
  136. package/dist/projection/experimental/lazy-projections/poly.cjs +1 -1
  137. package/dist/projection/experimental/lazy-projections/poly.js +1 -1
  138. package/dist/projection/experimental/lazy-projections/qsc.cjs +1 -1
  139. package/dist/projection/experimental/lazy-projections/qsc.js +1 -1
  140. package/dist/projection/experimental/lazy-projections/robin.cjs +1 -1
  141. package/dist/projection/experimental/lazy-projections/robin.js +1 -1
  142. package/dist/projection/experimental/lazy-projections/sinu.cjs +1 -1
  143. package/dist/projection/experimental/lazy-projections/sinu.js +1 -1
  144. package/dist/projection/experimental/lazy-projections/somerc.cjs +1 -1
  145. package/dist/projection/experimental/lazy-projections/somerc.js +1 -1
  146. package/dist/projection/experimental/lazy-projections/stere.cjs +1 -1
  147. package/dist/projection/experimental/lazy-projections/stere.js +1 -1
  148. package/dist/projection/experimental/lazy-projections/sterea.cjs +1 -1
  149. package/dist/projection/experimental/lazy-projections/sterea.js +1 -1
  150. package/dist/projection/experimental/lazy-projections/tmerc.cjs +1 -1
  151. package/dist/projection/experimental/lazy-projections/tmerc.js +1 -1
  152. package/dist/projection/experimental/lazy-projections/tpers.cjs +1 -1
  153. package/dist/projection/experimental/lazy-projections/tpers.js +1 -1
  154. package/dist/projection/experimental/lazy-projections/utm.cjs +1 -1
  155. package/dist/projection/experimental/lazy-projections/utm.js +1 -1
  156. package/dist/projection/experimental/lazy-projections/vandg.cjs +1 -1
  157. package/dist/projection/experimental/lazy-projections/vandg.js +1 -1
  158. package/dist/projection/experimental/projection-engine.shared.cjs +1184 -0
  159. package/dist/projection/experimental/projection-engine.shared.cjs.map +6 -0
  160. package/dist/projection/experimental/typescript-projection.shared.cjs +1703 -0
  161. package/dist/projection/experimental/typescript-projection.shared.cjs.map +6 -0
  162. package/dist/projection/index.cjs +622 -1535
  163. package/dist/projection/index.cjs.map +3 -3
  164. package/dist/projection/pipeline.cjs +44 -58
  165. package/dist/projection/pipeline.cjs.map +3 -3
  166. package/dist/projection/transform-analysis.cjs +20 -936
  167. package/dist/projection/transform-analysis.cjs.map +3 -3
  168. package/dist/spatial-box-clipping.d.ts +9 -0
  169. package/dist/spatial-box-clipping.d.ts.map +1 -0
  170. package/dist/spatial-box-clipping.js +123 -0
  171. package/dist/spatial-box-clipping.js.map +1 -0
  172. package/dist/spatial-dwithin.d.ts +19 -0
  173. package/dist/spatial-dwithin.d.ts.map +1 -0
  174. package/dist/spatial-dwithin.js +107 -0
  175. package/dist/spatial-dwithin.js.map +1 -0
  176. package/dist/spatial-hulls.d.ts +6 -0
  177. package/dist/spatial-hulls.d.ts.map +1 -0
  178. package/dist/spatial-hulls.js +176 -0
  179. package/dist/spatial-hulls.js.map +1 -0
  180. package/dist/spatial-line-intersection-result.d.ts +4 -0
  181. package/dist/spatial-line-intersection-result.d.ts.map +1 -0
  182. package/dist/spatial-line-intersection-result.js +79 -0
  183. package/dist/spatial-line-intersection-result.js.map +1 -0
  184. package/dist/spatial-line-polygon-intersection.d.ts +4 -0
  185. package/dist/spatial-line-polygon-intersection.d.ts.map +1 -0
  186. package/dist/spatial-line-polygon-intersection.js +130 -0
  187. package/dist/spatial-line-polygon-intersection.js.map +1 -0
  188. package/dist/spatial-planar-intersects.d.ts +11 -0
  189. package/dist/spatial-planar-intersects.d.ts.map +1 -1
  190. package/dist/spatial-planar-intersects.js +20 -12
  191. package/dist/spatial-planar-intersects.js.map +1 -1
  192. package/dist/spatial-planar.d.ts +9 -0
  193. package/dist/spatial-planar.d.ts.map +1 -1
  194. package/dist/spatial-planar.js +13 -1
  195. package/dist/spatial-planar.js.map +1 -1
  196. package/dist/spatial-polygon-overlay.d.ts +5 -0
  197. package/dist/spatial-polygon-overlay.d.ts.map +1 -0
  198. package/dist/spatial-polygon-overlay.js +23 -0
  199. package/dist/spatial-polygon-overlay.js.map +1 -0
  200. package/dist/spatial-sql.d.ts +13 -2
  201. package/dist/spatial-sql.d.ts.map +1 -1
  202. package/dist/spatial-sql.js +30 -12
  203. package/dist/spatial-sql.js.map +1 -1
  204. package/dist/spatial-subdivision.d.ts +9 -0
  205. package/dist/spatial-subdivision.d.ts.map +1 -0
  206. package/dist/spatial-subdivision.js +61 -0
  207. package/dist/spatial-subdivision.js.map +1 -0
  208. package/dist/spatial-touches.d.ts +13 -0
  209. package/dist/spatial-touches.d.ts.map +1 -0
  210. package/dist/spatial-touches.js +192 -0
  211. package/dist/spatial-touches.js.map +1 -0
  212. package/dist/st-functions.cjs +2411 -112
  213. package/dist/st-functions.cjs.map +3 -3
  214. package/dist/st-functions.d.ts +67 -2
  215. package/dist/st-functions.d.ts.map +1 -1
  216. package/dist/st-functions.js +195 -12
  217. package/dist/st-functions.js.map +1 -1
  218. package/dist/st-geodesic-functions.d.ts +33 -0
  219. package/dist/st-geodesic-functions.d.ts.map +1 -0
  220. package/dist/st-geodesic-functions.js +84 -0
  221. package/dist/st-geodesic-functions.js.map +1 -0
  222. package/dist/st-hull-functions.cjs +386 -0
  223. package/dist/st-hull-functions.cjs.map +6 -0
  224. package/dist/st-hull-functions.d.ts +17 -0
  225. package/dist/st-hull-functions.d.ts.map +1 -0
  226. package/dist/st-hull-functions.js +14 -0
  227. package/dist/st-hull-functions.js.map +1 -0
  228. package/dist/st-overlay-functions.cjs +621 -0
  229. package/dist/st-overlay-functions.cjs.map +6 -0
  230. package/dist/st-overlay-functions.d.ts +36 -0
  231. package/dist/st-overlay-functions.d.ts.map +1 -0
  232. package/dist/st-overlay-functions.js +183 -0
  233. package/dist/st-overlay-functions.js.map +1 -0
  234. package/dist/st-viewport-functions.cjs +481 -0
  235. package/dist/st-viewport-functions.cjs.map +6 -0
  236. package/dist/st-viewport-functions.d.ts +13 -0
  237. package/dist/st-viewport-functions.d.ts.map +1 -0
  238. package/dist/st-viewport-functions.js +81 -0
  239. package/dist/st-viewport-functions.js.map +1 -0
  240. package/dist/subdivide-geodesic-polyline.d.ts +1 -1
  241. package/dist/subdivide-geodesic-polyline.d.ts.map +1 -1
  242. package/dist/subdivide-geodesic-polyline.js +1 -1
  243. package/dist/subdivide-geodesic-polyline.js.map +1 -1
  244. package/dist/subdivide-globe-mesh.d.ts +1 -1
  245. package/dist/subdivide-globe-mesh.d.ts.map +1 -1
  246. package/dist/subdivide-globe-mesh.js +1 -1
  247. package/dist/subdivide-globe-mesh.js.map +1 -1
  248. package/dist/subdivide-rhumb-polyline.d.ts +1 -1
  249. package/dist/subdivide-rhumb-polyline.d.ts.map +1 -1
  250. package/dist/subdivide-rhumb-polyline.js +1 -1
  251. package/dist/subdivide-rhumb-polyline.js.map +1 -1
  252. package/dist/tasks/index.cjs +808 -2993
  253. package/dist/tasks/index.cjs.map +3 -3
  254. package/dist/terrain/geometry.d.ts +1 -1
  255. package/dist/terrain/geometry.d.ts.map +1 -1
  256. package/dist/terrain/geometry.js +1 -1
  257. package/dist/terrain/geometry.js.map +1 -1
  258. package/dist/terrain/index.cjs +95 -22
  259. package/dist/terrain/index.cjs.map +3 -3
  260. package/dist/terrain/index.d.ts +1 -0
  261. package/dist/terrain/index.d.ts.map +1 -1
  262. package/dist/terrain/index.js +1 -0
  263. package/dist/terrain/index.js.map +1 -1
  264. package/dist/terrain/regional-watersheds.d.ts +44 -0
  265. package/dist/terrain/regional-watersheds.d.ts.map +1 -0
  266. package/dist/terrain/regional-watersheds.js +108 -0
  267. package/dist/terrain/regional-watersheds.js.map +1 -0
  268. package/dist/terrain/tile-cutout-update.d.ts.map +1 -1
  269. package/dist/terrain/tile-cutout-update.js +28 -22
  270. package/dist/terrain/tile-cutout-update.js.map +1 -1
  271. package/dist/tiles.cjs +354 -0
  272. package/dist/tiles.cjs.map +6 -0
  273. package/dist/turf-functions.cjs +16 -9
  274. package/dist/turf-functions.cjs.map +1 -1
  275. package/package.json +154 -117
  276. package/src/coordinates.ts +5 -0
  277. package/src/entries/ellipsoid.ts +7 -32
  278. package/src/geodesics.ts +40 -0
  279. package/src/geographic-atlas/sampling.ts +1 -1
  280. package/src/geographic-cuts.ts +21 -0
  281. package/src/geographic-seams/subdivide-cut.ts +1 -1
  282. package/src/index.ts +2 -0
  283. package/src/line-simplification.ts +4 -16
  284. package/src/linear-referencing.ts +44 -16
  285. package/src/maps/myriahedral/unfold.ts +1 -1
  286. package/src/measure-referencing.ts +165 -0
  287. package/src/polygon-simplification.ts +185 -0
  288. package/src/projection/experimental/core.ts +1 -1
  289. package/src/projection/experimental/lazy-projections/aea.ts +1 -1
  290. package/src/projection/experimental/lazy-projections/aeqd.ts +1 -1
  291. package/src/projection/experimental/lazy-projections/bonne.ts +1 -1
  292. package/src/projection/experimental/lazy-projections/cass.ts +1 -1
  293. package/src/projection/experimental/lazy-projections/cea.ts +1 -1
  294. package/src/projection/experimental/lazy-projections/eck6.ts +1 -1
  295. package/src/projection/experimental/lazy-projections/eqc.ts +1 -1
  296. package/src/projection/experimental/lazy-projections/eqdc.ts +1 -1
  297. package/src/projection/experimental/lazy-projections/eqearth.ts +1 -1
  298. package/src/projection/experimental/lazy-projections/equi.ts +1 -1
  299. package/src/projection/experimental/lazy-projections/etmerc.ts +1 -1
  300. package/src/projection/experimental/lazy-projections/geocent.ts +1 -1
  301. package/src/projection/experimental/lazy-projections/geos.ts +1 -1
  302. package/src/projection/experimental/lazy-projections/gnom.ts +1 -1
  303. package/src/projection/experimental/lazy-projections/gstmerc.ts +1 -1
  304. package/src/projection/experimental/lazy-projections/krovak.ts +1 -1
  305. package/src/projection/experimental/lazy-projections/laea.ts +1 -1
  306. package/src/projection/experimental/lazy-projections/lcc.ts +1 -1
  307. package/src/projection/experimental/lazy-projections/merc.ts +1 -1
  308. package/src/projection/experimental/lazy-projections/mill.ts +1 -1
  309. package/src/projection/experimental/lazy-projections/moll.ts +1 -1
  310. package/src/projection/experimental/lazy-projections/nzmg.ts +1 -1
  311. package/src/projection/experimental/lazy-projections/ob_tran.ts +1 -1
  312. package/src/projection/experimental/lazy-projections/omerc.ts +1 -1
  313. package/src/projection/experimental/lazy-projections/ortho.ts +1 -1
  314. package/src/projection/experimental/lazy-projections/poly.ts +1 -1
  315. package/src/projection/experimental/lazy-projections/qsc.ts +1 -1
  316. package/src/projection/experimental/lazy-projections/robin.ts +1 -1
  317. package/src/projection/experimental/lazy-projections/sinu.ts +1 -1
  318. package/src/projection/experimental/lazy-projections/somerc.ts +1 -1
  319. package/src/projection/experimental/lazy-projections/stere.ts +1 -1
  320. package/src/projection/experimental/lazy-projections/sterea.ts +1 -1
  321. package/src/projection/experimental/lazy-projections/tmerc.ts +1 -1
  322. package/src/projection/experimental/lazy-projections/tpers.ts +1 -1
  323. package/src/projection/experimental/lazy-projections/utm.ts +1 -1
  324. package/src/projection/experimental/lazy-projections/vandg.ts +1 -1
  325. package/src/spatial-box-clipping.ts +140 -0
  326. package/src/spatial-dwithin.ts +135 -0
  327. package/src/spatial-hulls.ts +203 -0
  328. package/src/spatial-line-intersection-result.ts +93 -0
  329. package/src/spatial-line-polygon-intersection.ts +147 -0
  330. package/src/spatial-planar-intersects.ts +21 -15
  331. package/src/spatial-planar.ts +20 -1
  332. package/src/spatial-polygon-overlay.ts +30 -0
  333. package/src/spatial-sql.ts +47 -12
  334. package/src/spatial-subdivision.ts +75 -0
  335. package/src/spatial-touches.ts +218 -0
  336. package/src/st-functions.ts +283 -15
  337. package/src/st-geodesic-functions.ts +121 -0
  338. package/src/st-hull-functions.ts +25 -0
  339. package/src/st-overlay-functions.ts +244 -0
  340. package/src/st-viewport-functions.ts +98 -0
  341. package/src/subdivide-geodesic-polyline.ts +2 -2
  342. package/src/subdivide-globe-mesh.ts +2 -2
  343. package/src/subdivide-rhumb-polyline.ts +2 -2
  344. package/src/terrain/geometry.ts +1 -1
  345. package/src/terrain/index.ts +7 -0
  346. package/src/terrain/regional-watersheds.ts +153 -0
  347. package/src/terrain/tile-cutout-update.ts +32 -26
  348. package/dist/index.cjs +0 -18674
  349. package/dist/index.cjs.map +0 -6
  350. package/dist/turf-expressions.cjs +0 -1997
  351. package/dist/turf-expressions.cjs.map +0 -6
  352. package/dist/turf-expressions.d.ts +0 -3
  353. package/dist/turf-expressions.d.ts.map +0 -1
  354. package/dist/turf-expressions.js +0 -7
  355. package/dist/turf-expressions.js.map +0 -1
  356. package/src/turf-expressions.ts +0 -7
@@ -0,0 +1,36 @@
1
+ import type { ScalarFunction } from '@math.gl/sql/arrow';
2
+ /** Buffers planar points and native lines with round caps and joins. */
3
+ export declare const ST_BUFFER: ScalarFunction;
4
+ /** Intersects two areal geometries or clips a native line by a polygon. */
5
+ export declare const ST_INTERSECTION: Readonly<{
6
+ name: string;
7
+ prototypes: readonly import("@math.gl/sql/arrow").ArrowTableFunctionPrototype[];
8
+ resolvePrototype?(fields: readonly (import("apache-arrow").Field | undefined)[], numericLiterals?: readonly (number | undefined)[]): import("@math.gl/sql/arrow").ArrowTableFunctionPrototype | undefined;
9
+ }> & {
10
+ readonly kind: "scalar";
11
+ };
12
+ /** Returns the portion of the first polygonal geometry outside the second. */
13
+ export declare const ST_DIFFERENCE: Readonly<{
14
+ name: string;
15
+ prototypes: readonly import("@math.gl/sql/arrow").ArrowTableFunctionPrototype[];
16
+ resolvePrototype?(fields: readonly (import("apache-arrow").Field | undefined)[], numericLiterals?: readonly (number | undefined)[]): import("@math.gl/sql/arrow").ArrowTableFunctionPrototype | undefined;
17
+ }> & {
18
+ readonly kind: "scalar";
19
+ };
20
+ /** Returns the combined polygon area as a native GeoArrow MultiPolygon. */
21
+ export declare const ST_UNION: Readonly<{
22
+ name: string;
23
+ prototypes: readonly import("@math.gl/sql/arrow").ArrowTableFunctionPrototype[];
24
+ resolvePrototype?(fields: readonly (import("apache-arrow").Field | undefined)[], numericLiterals?: readonly (number | undefined)[]): import("@math.gl/sql/arrow").ArrowTableFunctionPrototype | undefined;
25
+ }> & {
26
+ readonly kind: "scalar";
27
+ };
28
+ /** Returns the area covered by exactly one input as a native GeoArrow MultiPolygon. */
29
+ export declare const ST_SYMDIFFERENCE: Readonly<{
30
+ name: string;
31
+ prototypes: readonly import("@math.gl/sql/arrow").ArrowTableFunctionPrototype[];
32
+ resolvePrototype?(fields: readonly (import("apache-arrow").Field | undefined)[], numericLiterals?: readonly (number | undefined)[]): import("@math.gl/sql/arrow").ArrowTableFunctionPrototype | undefined;
33
+ }> & {
34
+ readonly kind: "scalar";
35
+ };
36
+ //# sourceMappingURL=st-overlay-functions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"st-overlay-functions.d.ts","sourceRoot":"","sources":["../src/st-overlay-functions.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,oBAAoB,CAAC;AAoJvD,wEAAwE;AACxE,eAAO,MAAM,SAAS,EAAE,cAWvB,CAAC;AA+DF,2EAA2E;AAC3E,eAAO,MAAM,eAAe;;;;;;CAAiC,CAAC;AAC9D,8EAA8E;AAC9E,eAAO,MAAM,aAAa;;;;;;CAGzB,CAAC;AAEF,2EAA2E;AAC3E,eAAO,MAAM,QAAQ;;;;;;CAAoE,CAAC;AAE1F,uFAAuF;AACvF,eAAO,MAAM,gBAAgB;;;;;;CAG5B,CAAC"}
@@ -0,0 +1,183 @@
1
+ // math.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
4
+ import { lineIntersectionResult } from "./spatial-line-intersection-result.js";
5
+ import { intersectLinePolygon } from "./spatial-line-polygon-intersection.js";
6
+ import polygonClipping from 'polygon-clipping';
7
+ import { polygonSet } from "./spatial-polygon-overlay.js";
8
+ import { EXTENSION_METADATA, EXTENSION_NAME, lineKinds, nativePolygonResult, pointCoordinates, pointKinds, polygonKinds, spatialFunction } from "./spatial-sql.js";
9
+ /** Eight unit directions per quadrant with exact cardinal axes. */
10
+ const unitCircle = /* @__PURE__ */ Array.from({ length: 32 }, (_, index) => {
11
+ const angle = ((index % 8) * Math.PI) / 16;
12
+ const x = Math.cos(angle);
13
+ const y = Math.sin(angle);
14
+ switch (index >>> 3) {
15
+ case 0:
16
+ return [x, y];
17
+ case 1:
18
+ return [-y, x];
19
+ case 2:
20
+ return [-x, -y];
21
+ default:
22
+ return [y, -x];
23
+ }
24
+ });
25
+ /** Bounds the number of pieces passed to one polygon union. */
26
+ const corridorUnionFanout = 64;
27
+ /** Checks the radius for point and line buffers. */
28
+ function checkBufferRadius(radius) {
29
+ if (!Number.isFinite(radius))
30
+ throw new Error('ST_Buffer requires a finite radius');
31
+ }
32
+ /** Checks a generated ring before passing it to the polygon kernel. */
33
+ function checkedRing(ring) {
34
+ if (ring.some(point => !point.every(Number.isFinite))) {
35
+ throw new Error('ST_Buffer produced a nonfinite coordinate');
36
+ }
37
+ return ring;
38
+ }
39
+ /** Returns a circle approximation with eight segments per quadrant. */
40
+ function circleRing(x, y, radius) {
41
+ const ring = unitCircle.map(([dx, dy]) => [
42
+ x + radius * dx,
43
+ y + radius * dy
44
+ ]);
45
+ ring.push(ring[0]);
46
+ return checkedRing(ring);
47
+ }
48
+ /** Buffers a point without changing its established output schema. */
49
+ function bufferPoint(point, radius) {
50
+ checkBufferRadius(radius);
51
+ const location = pointCoordinates(point);
52
+ if (!location || radius <= 0)
53
+ return { type: 'Polygon', coordinates: [] };
54
+ return { type: 'Polygon', coordinates: [circleRing(location[0], location[1], radius)] };
55
+ }
56
+ /** Unions a bounded group of pieces at a time, then combines groups at each level. */
57
+ function unionCorridorPieces(pieces) {
58
+ if (!pieces.length)
59
+ return [];
60
+ while (pieces.length > 1) {
61
+ const groups = [];
62
+ for (let first = 0; first < pieces.length; first += corridorUnionFanout) {
63
+ groups.push(polygonClipping.union(pieces[first], ...pieces.slice(first + 1, first + corridorUnionFanout)));
64
+ }
65
+ pieces = groups;
66
+ }
67
+ return pieces[0];
68
+ }
69
+ /** Buffers line segments with rectangles and adds disks for round joins and caps. */
70
+ function bufferLine(geometry, radius) {
71
+ checkBufferRadius(radius);
72
+ if (radius <= 0)
73
+ return { type: 'MultiPolygon', coordinates: [] };
74
+ const lines = geometry.type === 'MultiLineString'
75
+ ? geometry.coordinates
76
+ : geometry.type === 'LineString'
77
+ ? [geometry.coordinates]
78
+ : [];
79
+ const pieces = [];
80
+ for (const line of lines) {
81
+ let previous;
82
+ for (const coordinate of line) {
83
+ const [x, y] = coordinate;
84
+ if (previous && x === previous[0] && y === previous[1])
85
+ continue;
86
+ pieces.push([[circleRing(x, y, radius)]]);
87
+ if (previous) {
88
+ const x0 = previous[0];
89
+ const y0 = previous[1];
90
+ const dx = x - x0;
91
+ const dy = y - y0;
92
+ const length = Math.hypot(dx, dy);
93
+ if (!Number.isFinite(length))
94
+ throw new Error('ST_Buffer produced a nonfinite segment length');
95
+ const nx = (-dy / length) * radius;
96
+ const ny = (dx / length) * radius;
97
+ pieces.push([
98
+ [
99
+ checkedRing([
100
+ [x0 + nx, y0 + ny],
101
+ [x + nx, y + ny],
102
+ [x - nx, y - ny],
103
+ [x0 - nx, y0 - ny],
104
+ [x0 + nx, y0 + ny]
105
+ ])
106
+ ]
107
+ ]);
108
+ }
109
+ previous = coordinate;
110
+ }
111
+ }
112
+ return { type: 'MultiPolygon', coordinates: unionCorridorPieces(pieces) };
113
+ }
114
+ /** Implements the existing planar point overload. */
115
+ const pointBuffer = /* @__PURE__ */ spatialFunction('ST_Buffer', [pointKinds],
116
+ /* @__PURE__ */ nativePolygonResult('geoarrow.polygon'), ([geometry], radius) => bufferPoint(geometry, radius), 1);
117
+ /** Implements native planar line and multiline buffers with multipart output. */
118
+ const lineBuffer = /* @__PURE__ */ spatialFunction('ST_Buffer', [lineKinds],
119
+ /* @__PURE__ */ nativePolygonResult('geoarrow.multipolygon'), ([geometry], radius) => bufferLine(geometry, radius), 1);
120
+ /** Buffers planar points and native lines with round caps and joins. */
121
+ export const ST_BUFFER = {
122
+ ...pointBuffer,
123
+ /** Selects the result schema from the input column's GeoArrow encoding. */
124
+ resolvePrototype(fields) {
125
+ const encoding = fields[0]?.metadata.get(EXTENSION_NAME);
126
+ const buffer = encoding === 'geoarrow.linestring' || encoding === 'geoarrow.multilinestring'
127
+ ? lineBuffer
128
+ : pointBuffer;
129
+ return buffer.resolvePrototype(fields);
130
+ }
131
+ };
132
+ /** Creates a row-preserving areal overlay with the first geometry's metadata. */
133
+ function polygonOverlay(name, operation) {
134
+ const spatial = spatialFunction(name, [polygonKinds, polygonKinds], nativePolygonResult('geoarrow.multipolygon'), ([left, right]) => {
135
+ const a = polygonSet(left);
136
+ const b = polygonSet(right);
137
+ return { type: 'MultiPolygon', coordinates: operation(a, b) };
138
+ });
139
+ return withFirstInputMetadata(spatial);
140
+ }
141
+ /** Keeps overlay metadata tied to the first argument in either operand order. */
142
+ function withFirstInputMetadata(spatial) {
143
+ return {
144
+ ...spatial,
145
+ /** Preserves the first input's metadata. Overlay does not assign a missing CRS. */
146
+ resolvePrototype(fields) {
147
+ const result = spatial.resolvePrototype(fields);
148
+ if (!fields[0]?.metadata.has(EXTENSION_METADATA)) {
149
+ result?.result.metadata.delete(EXTENSION_METADATA);
150
+ }
151
+ return result;
152
+ }
153
+ };
154
+ }
155
+ /** Binds polygon overlays or mixed-dimensional line clipping from the Arrow schema. */
156
+ function intersection() {
157
+ const polygons = polygonOverlay('ST_Intersection', polygonClipping.intersection);
158
+ const output = lineIntersectionResult();
159
+ const linearFirst = spatialFunction('ST_Intersection', [lineKinds, polygonKinds], output, ([line, area]) => intersectLinePolygon(line, area));
160
+ const linearSecond = spatialFunction('ST_Intersection', [polygonKinds, lineKinds], output, ([area, line]) => intersectLinePolygon(line, area));
161
+ return withFirstInputMetadata({
162
+ ...polygons,
163
+ /** A specialized line argument selects a mixed native GeoArrow result before evaluation. */
164
+ resolvePrototype(fields) {
165
+ const a = fields[0]?.metadata.get(EXTENSION_NAME);
166
+ const b = fields[1]?.metadata.get(EXTENSION_NAME);
167
+ if (a === 'geoarrow.linestring' || a === 'geoarrow.multilinestring')
168
+ return linearFirst.resolvePrototype(fields);
169
+ if (b === 'geoarrow.linestring' || b === 'geoarrow.multilinestring')
170
+ return linearSecond.resolvePrototype(fields);
171
+ return polygons.resolvePrototype(fields);
172
+ }
173
+ });
174
+ }
175
+ /** Intersects two areal geometries or clips a native line by a polygon. */
176
+ export const ST_INTERSECTION = /* @__PURE__ */ intersection();
177
+ /** Returns the portion of the first polygonal geometry outside the second. */
178
+ export const ST_DIFFERENCE = /* @__PURE__ */ polygonOverlay('ST_Difference', polygonClipping.difference);
179
+ /** Returns the combined polygon area as a native GeoArrow MultiPolygon. */
180
+ export const ST_UNION = /* @__PURE__ */ polygonOverlay('ST_Union', polygonClipping.union);
181
+ /** Returns the area covered by exactly one input as a native GeoArrow MultiPolygon. */
182
+ export const ST_SYMDIFFERENCE = /* @__PURE__ */ polygonOverlay('ST_SymDifference', polygonClipping.xor);
183
+ //# sourceMappingURL=st-overlay-functions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"st-overlay-functions.js","sourceRoot":"","sources":["../src/st-overlay-functions.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AAI5D,OAAO,EAAC,sBAAsB,EAAC,8CAA2C;AAC1E,OAAO,EAAC,oBAAoB,EAAC,+CAA4C;AACzE,OAAO,eAAe,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAC,UAAU,EAAC,qCAAkC;AACrD,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,SAAS,EACT,mBAAmB,EACnB,gBAAgB,EAChB,UAAU,EACV,YAAY,EACZ,eAAe,EAChB,yBAAsB;AAEvB,mEAAmE;AACnE,MAAM,UAAU,GAAG,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,EAAC,MAAM,EAAE,EAAE,EAAC,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE;IACvE,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC;IAC3C,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAC1B,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAC1B,QAAQ,KAAK,KAAK,CAAC,EAAE,CAAC;QACpB,KAAK,CAAC;YACJ,OAAO,CAAC,CAAC,EAAE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