@math.gl/geospatial 5.0.0-alpha.18 → 5.0.0-alpha.19

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 (1666) hide show
  1. package/README.md +12 -0
  2. package/crs/README.md +84 -0
  3. package/crs/schemas/README.md +9 -0
  4. package/crs/schemas/projjson.schema.json +1174 -0
  5. package/dist/crs/crs-metadata.cjs +67 -0
  6. package/dist/crs/crs-metadata.cjs.map +6 -0
  7. package/dist/crs/crs-metadata.d.ts +43 -0
  8. package/dist/crs/crs-metadata.d.ts.map +1 -0
  9. package/dist/crs/crs-metadata.js +26 -0
  10. package/dist/crs/crs-metadata.js.map +1 -0
  11. package/dist/crs/crs.d.ts +22 -0
  12. package/dist/crs/crs.d.ts.map +1 -0
  13. package/dist/crs/crs.js +5 -0
  14. package/dist/crs/crs.js.map +1 -0
  15. package/dist/crs/index.cjs +916 -0
  16. package/dist/crs/index.cjs.map +6 -0
  17. package/dist/crs/index.d.ts +12 -0
  18. package/dist/crs/index.d.ts.map +1 -0
  19. package/dist/crs/index.js +10 -0
  20. package/dist/crs/index.js.map +1 -0
  21. package/dist/crs/proj-string.cjs +219 -0
  22. package/dist/crs/proj-string.cjs.map +6 -0
  23. package/dist/crs/proj-string.d.ts +32 -0
  24. package/dist/crs/proj-string.d.ts.map +1 -0
  25. package/dist/crs/proj-string.js +204 -0
  26. package/dist/crs/proj-string.js.map +1 -0
  27. package/dist/crs/projjson-schema-constants.d.ts +5 -0
  28. package/dist/crs/projjson-schema-constants.d.ts.map +1 -0
  29. package/dist/crs/projjson-schema-constants.js +8 -0
  30. package/dist/crs/projjson-schema-constants.js.map +1 -0
  31. package/dist/crs/projjson-types.d.ts +557 -0
  32. package/dist/crs/projjson-types.d.ts.map +1 -0
  33. package/dist/crs/projjson-types.js +5 -0
  34. package/dist/crs/projjson-types.js.map +1 -0
  35. package/dist/crs/spatial-reference.cjs +80 -0
  36. package/dist/crs/spatial-reference.cjs.map +6 -0
  37. package/dist/crs/spatial-reference.d.ts +104 -0
  38. package/dist/crs/spatial-reference.d.ts.map +1 -0
  39. package/dist/crs/spatial-reference.js +86 -0
  40. package/dist/crs/spatial-reference.js.map +1 -0
  41. package/dist/crs/units-table.d.ts +4 -0
  42. package/dist/crs/units-table.d.ts.map +1 -0
  43. package/dist/crs/units-table.js +29 -0
  44. package/dist/crs/units-table.js.map +1 -0
  45. package/dist/crs/wkt-crs.cjs +610 -0
  46. package/dist/crs/wkt-crs.cjs.map +6 -0
  47. package/dist/crs/wkt-crs.d.ts +86 -0
  48. package/dist/crs/wkt-crs.d.ts.map +1 -0
  49. package/dist/crs/wkt-crs.js +613 -0
  50. package/dist/crs/wkt-crs.js.map +1 -0
  51. package/dist/ellipsoid-helpers/ellipsoid-transform.d.ts +1 -1
  52. package/dist/ellipsoid-helpers/ellipsoid-transform.d.ts.map +1 -1
  53. package/dist/ellipsoid-tangent-plane.d.ts +1 -1
  54. package/dist/ellipsoid-tangent-plane.d.ts.map +1 -1
  55. package/dist/ellipsoid-tangent-plane.js +1 -1
  56. package/dist/ellipsoid-tangent-plane.js.map +1 -1
  57. package/dist/ellipsoid.d.ts +1 -1
  58. package/dist/ellipsoid.d.ts.map +1 -1
  59. package/dist/entries/ellipsoid.cjs +572 -0
  60. package/dist/entries/ellipsoid.cjs.map +6 -0
  61. package/dist/entries/ellipsoid.d.ts +5 -0
  62. package/dist/entries/ellipsoid.d.ts.map +1 -0
  63. package/dist/entries/ellipsoid.js +7 -0
  64. package/dist/entries/ellipsoid.js.map +1 -0
  65. package/dist/expressions.cjs +528 -0
  66. package/dist/expressions.cjs.map +6 -0
  67. package/dist/expressions.d.ts +4 -0
  68. package/dist/expressions.d.ts.map +1 -0
  69. package/dist/expressions.js +23 -0
  70. package/dist/expressions.js.map +1 -0
  71. package/dist/geoarrow/builder-entry.cjs +699 -0
  72. package/dist/geoarrow/builder-entry.cjs.map +6 -0
  73. package/dist/geoarrow/builder-entry.d.ts +4 -0
  74. package/dist/geoarrow/builder-entry.d.ts.map +1 -0
  75. package/dist/geoarrow/builder-entry.js +5 -0
  76. package/dist/geoarrow/builder-entry.js.map +1 -0
  77. package/dist/geoarrow/builder.d.ts +106 -0
  78. package/dist/geoarrow/builder.d.ts.map +1 -0
  79. package/dist/geoarrow/builder.js +668 -0
  80. package/dist/geoarrow/builder.js.map +1 -0
  81. package/dist/geoarrow/codecs.d.ts +24 -0
  82. package/dist/geoarrow/codecs.d.ts.map +1 -0
  83. package/dist/geoarrow/codecs.js +921 -0
  84. package/dist/geoarrow/codecs.js.map +1 -0
  85. package/dist/geoarrow/index.cjs +4089 -0
  86. package/dist/geoarrow/index.cjs.map +6 -0
  87. package/dist/geoarrow/index.d.ts +15 -0
  88. package/dist/geoarrow/index.d.ts.map +1 -0
  89. package/dist/geoarrow/index.js +11 -0
  90. package/dist/geoarrow/index.js.map +1 -0
  91. package/dist/geoarrow/kernels.d.ts +56 -0
  92. package/dist/geoarrow/kernels.d.ts.map +1 -0
  93. package/dist/geoarrow/kernels.js +982 -0
  94. package/dist/geoarrow/kernels.js.map +1 -0
  95. package/dist/geoarrow/layout.d.ts +64 -0
  96. package/dist/geoarrow/layout.d.ts.map +1 -0
  97. package/dist/geoarrow/layout.js +722 -0
  98. package/dist/geoarrow/layout.js.map +1 -0
  99. package/dist/geoarrow/tessellate.d.ts +31 -0
  100. package/dist/geoarrow/tessellate.d.ts.map +1 -0
  101. package/dist/geoarrow/tessellate.js +102 -0
  102. package/dist/geoarrow/tessellate.js.map +1 -0
  103. package/dist/geoarrow/tessellation-entry.cjs +431 -0
  104. package/dist/geoarrow/tessellation-entry.cjs.map +6 -0
  105. package/dist/geoarrow/tessellation-entry.d.ts +4 -0
  106. package/dist/geoarrow/tessellation-entry.d.ts.map +1 -0
  107. package/dist/geoarrow/tessellation-entry.js +5 -0
  108. package/dist/geoarrow/tessellation-entry.js.map +1 -0
  109. package/dist/geoarrow/types.d.ts +147 -0
  110. package/dist/geoarrow/types.d.ts.map +1 -0
  111. package/dist/geoarrow/types.js +41 -0
  112. package/dist/geoarrow/types.js.map +1 -0
  113. package/dist/geoarrow/views.d.ts +45 -0
  114. package/dist/geoarrow/views.d.ts.map +1 -0
  115. package/dist/geoarrow/views.js +114 -0
  116. package/dist/geoarrow/views.js.map +1 -0
  117. package/dist/geoarrow/wkb-entry.cjs +2467 -0
  118. package/dist/geoarrow/wkb-entry.cjs.map +6 -0
  119. package/dist/geoarrow/wkb-entry.d.ts +4 -0
  120. package/dist/geoarrow/wkb-entry.d.ts.map +1 -0
  121. package/dist/geoarrow/wkb-entry.js +6 -0
  122. package/dist/geoarrow/wkb-entry.js.map +1 -0
  123. package/dist/geoarrow/worker.cjs +77 -0
  124. package/dist/geoarrow/worker.cjs.map +6 -0
  125. package/dist/geoarrow/worker.d.ts +11 -0
  126. package/dist/geoarrow/worker.d.ts.map +1 -0
  127. package/dist/geoarrow/worker.js +10 -0
  128. package/dist/geoarrow/worker.js.map +1 -0
  129. package/dist/globe.cjs +1002 -0
  130. package/dist/globe.cjs.map +6 -0
  131. package/dist/globe.d.ts +10 -0
  132. package/dist/globe.d.ts.map +1 -0
  133. package/dist/globe.js +9 -0
  134. package/dist/globe.js.map +1 -0
  135. package/dist/index.cjs +154 -261
  136. package/dist/index.cjs.map +3 -3
  137. package/dist/index.d.ts +3 -15
  138. package/dist/index.d.ts.map +1 -1
  139. package/dist/index.js +3 -9
  140. package/dist/index.js.map +1 -1
  141. package/dist/make-obb-from-region.d.ts +1 -1
  142. package/dist/make-obb-from-region.d.ts.map +1 -1
  143. package/dist/make-obb-from-region.js +1 -1
  144. package/dist/make-obb-from-region.js.map +1 -1
  145. package/dist/projection/analysis.cjs +239 -0
  146. package/dist/projection/analysis.cjs.map +6 -0
  147. package/dist/projection/analysis.d.ts +72 -0
  148. package/dist/projection/analysis.d.ts.map +1 -0
  149. package/dist/projection/analysis.js +221 -0
  150. package/dist/projection/analysis.js.map +1 -0
  151. package/dist/projection/bulk.cjs +203 -0
  152. package/dist/projection/bulk.cjs.map +6 -0
  153. package/dist/projection/bulk.d.ts +51 -0
  154. package/dist/projection/bulk.d.ts.map +1 -0
  155. package/dist/projection/bulk.js +215 -0
  156. package/dist/projection/bulk.js.map +1 -0
  157. package/dist/projection/datums.cjs +1383 -0
  158. package/dist/projection/datums.cjs.map +6 -0
  159. package/dist/projection/datums.d.ts +5 -0
  160. package/dist/projection/datums.d.ts.map +1 -0
  161. package/dist/projection/datums.js +10 -0
  162. package/dist/projection/datums.js.map +1 -0
  163. package/dist/projection/deformation.cjs +134 -0
  164. package/dist/projection/deformation.cjs.map +6 -0
  165. package/dist/projection/deformation.d.ts +3 -0
  166. package/dist/projection/deformation.d.ts.map +1 -0
  167. package/dist/projection/deformation.js +5 -0
  168. package/dist/projection/deformation.js.map +1 -0
  169. package/dist/projection/experimental/catalogue-kernel.d.ts +9 -0
  170. package/dist/projection/experimental/catalogue-kernel.d.ts.map +1 -0
  171. package/dist/projection/experimental/catalogue-kernel.js +44 -0
  172. package/dist/projection/experimental/catalogue-kernel.js.map +1 -0
  173. package/dist/projection/experimental/common/adjust_lat.d.ts +2 -0
  174. package/dist/projection/experimental/common/adjust_lat.d.ts.map +1 -0
  175. package/dist/projection/experimental/common/adjust_lat.js +10 -0
  176. package/dist/projection/experimental/common/adjust_lat.js.map +1 -0
  177. package/dist/projection/experimental/common/adjust_lon.d.ts +2 -0
  178. package/dist/projection/experimental/common/adjust_lon.d.ts.map +1 -0
  179. package/dist/projection/experimental/common/adjust_lon.js +13 -0
  180. package/dist/projection/experimental/common/adjust_lon.js.map +1 -0
  181. package/dist/projection/experimental/common/asinhy.d.ts +2 -0
  182. package/dist/projection/experimental/common/asinhy.d.ts.map +1 -0
  183. package/dist/projection/experimental/common/asinhy.js +12 -0
  184. package/dist/projection/experimental/common/asinhy.js.map +1 -0
  185. package/dist/projection/experimental/common/asinz.d.ts +2 -0
  186. package/dist/projection/experimental/common/asinz.d.ts.map +1 -0
  187. package/dist/projection/experimental/common/asinz.js +11 -0
  188. package/dist/projection/experimental/common/asinz.js.map +1 -0
  189. package/dist/projection/experimental/common/authlat.d.ts +2 -0
  190. package/dist/projection/experimental/common/authlat.d.ts.map +1 -0
  191. package/dist/projection/experimental/common/authlat.js +9 -0
  192. package/dist/projection/experimental/common/authlat.js.map +1 -0
  193. package/dist/projection/experimental/common/authset.d.ts +2 -0
  194. package/dist/projection/experimental/common/authset.d.ts.map +1 -0
  195. package/dist/projection/experimental/common/authset.js +24 -0
  196. package/dist/projection/experimental/common/authset.js.map +1 -0
  197. package/dist/projection/experimental/common/clens.d.ts +2 -0
  198. package/dist/projection/experimental/common/clens.d.ts.map +1 -0
  199. package/dist/projection/experimental/common/clens.js +18 -0
  200. package/dist/projection/experimental/common/clens.js.map +1 -0
  201. package/dist/projection/experimental/common/clens_cmplx.d.ts +5 -0
  202. package/dist/projection/experimental/common/clens_cmplx.d.ts.map +1 -0
  203. package/dist/projection/experimental/common/clens_cmplx.js +34 -0
  204. package/dist/projection/experimental/common/clens_cmplx.js.map +1 -0
  205. package/dist/projection/experimental/common/constants.d.ts +9 -0
  206. package/dist/projection/experimental/common/constants.d.ts.map +1 -0
  207. package/dist/projection/experimental/common/constants.js +14 -0
  208. package/dist/projection/experimental/common/constants.js.map +1 -0
  209. package/dist/projection/experimental/common/cosh.d.ts +2 -0
  210. package/dist/projection/experimental/common/cosh.d.ts.map +1 -0
  211. package/dist/projection/experimental/common/cosh.js +10 -0
  212. package/dist/projection/experimental/common/cosh.js.map +1 -0
  213. package/dist/projection/experimental/common/e0fn.d.ts +2 -0
  214. package/dist/projection/experimental/common/e0fn.d.ts.map +1 -0
  215. package/dist/projection/experimental/common/e0fn.js +8 -0
  216. package/dist/projection/experimental/common/e0fn.js.map +1 -0
  217. package/dist/projection/experimental/common/e1fn.d.ts +2 -0
  218. package/dist/projection/experimental/common/e1fn.d.ts.map +1 -0
  219. package/dist/projection/experimental/common/e1fn.js +8 -0
  220. package/dist/projection/experimental/common/e1fn.js.map +1 -0
  221. package/dist/projection/experimental/common/e2fn.d.ts +2 -0
  222. package/dist/projection/experimental/common/e2fn.d.ts.map +1 -0
  223. package/dist/projection/experimental/common/e2fn.js +8 -0
  224. package/dist/projection/experimental/common/e2fn.js.map +1 -0
  225. package/dist/projection/experimental/common/e3fn.d.ts +2 -0
  226. package/dist/projection/experimental/common/e3fn.d.ts.map +1 -0
  227. package/dist/projection/experimental/common/e3fn.js +8 -0
  228. package/dist/projection/experimental/common/e3fn.js.map +1 -0
  229. package/dist/projection/experimental/common/fL.d.ts +2 -0
  230. package/dist/projection/experimental/common/fL.d.ts.map +1 -0
  231. package/dist/projection/experimental/common/fL.js +9 -0
  232. package/dist/projection/experimental/common/fL.js.map +1 -0
  233. package/dist/projection/experimental/common/gN.d.ts +2 -0
  234. package/dist/projection/experimental/common/gN.d.ts.map +1 -0
  235. package/dist/projection/experimental/common/gN.js +9 -0
  236. package/dist/projection/experimental/common/gN.js.map +1 -0
  237. package/dist/projection/experimental/common/gatg.d.ts +2 -0
  238. package/dist/projection/experimental/common/gatg.d.ts.map +1 -0
  239. package/dist/projection/experimental/common/gatg.js +18 -0
  240. package/dist/projection/experimental/common/gatg.js.map +1 -0
  241. package/dist/projection/experimental/common/hypot.d.ts +2 -0
  242. package/dist/projection/experimental/common/hypot.d.ts.map +1 -0
  243. package/dist/projection/experimental/common/hypot.js +12 -0
  244. package/dist/projection/experimental/common/hypot.js.map +1 -0
  245. package/dist/projection/experimental/common/imlfn.d.ts +2 -0
  246. package/dist/projection/experimental/common/imlfn.d.ts.map +1 -0
  247. package/dist/projection/experimental/common/imlfn.js +21 -0
  248. package/dist/projection/experimental/common/imlfn.js.map +1 -0
  249. package/dist/projection/experimental/common/invlatiso.d.ts +2 -0
  250. package/dist/projection/experimental/common/invlatiso.d.ts.map +1 -0
  251. package/dist/projection/experimental/common/invlatiso.js +20 -0
  252. package/dist/projection/experimental/common/invlatiso.js.map +1 -0
  253. package/dist/projection/experimental/common/iqsfnz.d.ts +2 -0
  254. package/dist/projection/experimental/common/iqsfnz.d.ts.map +1 -0
  255. package/dist/projection/experimental/common/iqsfnz.js +44 -0
  256. package/dist/projection/experimental/common/iqsfnz.js.map +1 -0
  257. package/dist/projection/experimental/common/latiso.d.ts +2 -0
  258. package/dist/projection/experimental/common/latiso.d.ts.map +1 -0
  259. package/dist/projection/experimental/common/latiso.js +19 -0
  260. package/dist/projection/experimental/common/latiso.js.map +1 -0
  261. package/dist/projection/experimental/common/log1py.d.ts +2 -0
  262. package/dist/projection/experimental/common/log1py.d.ts.map +1 -0
  263. package/dist/projection/experimental/common/log1py.js +10 -0
  264. package/dist/projection/experimental/common/log1py.js.map +1 -0
  265. package/dist/projection/experimental/common/meridian-distance.d.ts +5 -0
  266. package/dist/projection/experimental/common/meridian-distance.d.ts.map +1 -0
  267. package/dist/projection/experimental/common/meridian-distance.js +47 -0
  268. package/dist/projection/experimental/common/meridian-distance.js.map +1 -0
  269. package/dist/projection/experimental/common/mlfn.d.ts +2 -0
  270. package/dist/projection/experimental/common/mlfn.d.ts.map +1 -0
  271. package/dist/projection/experimental/common/mlfn.js +8 -0
  272. package/dist/projection/experimental/common/mlfn.js.map +1 -0
  273. package/dist/projection/experimental/common/msfnz.d.ts +2 -0
  274. package/dist/projection/experimental/common/msfnz.d.ts.map +1 -0
  275. package/dist/projection/experimental/common/msfnz.js +9 -0
  276. package/dist/projection/experimental/common/msfnz.js.map +1 -0
  277. package/dist/projection/experimental/common/phi2z.d.ts +2 -0
  278. package/dist/projection/experimental/common/phi2z.d.ts.map +1 -0
  279. package/dist/projection/experimental/common/phi2z.js +21 -0
  280. package/dist/projection/experimental/common/phi2z.js.map +1 -0
  281. package/dist/projection/experimental/common/pj_enfn.d.ts +2 -0
  282. package/dist/projection/experimental/common/pj_enfn.d.ts.map +1 -0
  283. package/dist/projection/experimental/common/pj_enfn.js +28 -0
  284. package/dist/projection/experimental/common/pj_enfn.js.map +1 -0
  285. package/dist/projection/experimental/common/pj_inv_mlfn.d.ts +2 -0
  286. package/dist/projection/experimental/common/pj_inv_mlfn.d.ts.map +1 -0
  287. package/dist/projection/experimental/common/pj_inv_mlfn.js +26 -0
  288. package/dist/projection/experimental/common/pj_inv_mlfn.js.map +1 -0
  289. package/dist/projection/experimental/common/pj_mlfn.d.ts +2 -0
  290. package/dist/projection/experimental/common/pj_mlfn.d.ts.map +1 -0
  291. package/dist/projection/experimental/common/pj_mlfn.js +10 -0
  292. package/dist/projection/experimental/common/pj_mlfn.js.map +1 -0
  293. package/dist/projection/experimental/common/qsfnz.d.ts +2 -0
  294. package/dist/projection/experimental/common/qsfnz.d.ts.map +1 -0
  295. package/dist/projection/experimental/common/qsfnz.js +16 -0
  296. package/dist/projection/experimental/common/qsfnz.js.map +1 -0
  297. package/dist/projection/experimental/common/sign.d.ts +2 -0
  298. package/dist/projection/experimental/common/sign.d.ts.map +1 -0
  299. package/dist/projection/experimental/common/sign.js +8 -0
  300. package/dist/projection/experimental/common/sign.js.map +1 -0
  301. package/dist/projection/experimental/common/sinh.d.ts +2 -0
  302. package/dist/projection/experimental/common/sinh.d.ts.map +1 -0
  303. package/dist/projection/experimental/common/sinh.js +10 -0
  304. package/dist/projection/experimental/common/sinh.js.map +1 -0
  305. package/dist/projection/experimental/common/srat.d.ts +2 -0
  306. package/dist/projection/experimental/common/srat.d.ts.map +1 -0
  307. package/dist/projection/experimental/common/srat.js +8 -0
  308. package/dist/projection/experimental/common/srat.js.map +1 -0
  309. package/dist/projection/experimental/common/tsfnz.d.ts +2 -0
  310. package/dist/projection/experimental/common/tsfnz.d.ts.map +1 -0
  311. package/dist/projection/experimental/common/tsfnz.js +12 -0
  312. package/dist/projection/experimental/common/tsfnz.js.map +1 -0
  313. package/dist/projection/experimental/common/vincenty.d.ts +29 -0
  314. package/dist/projection/experimental/common/vincenty.d.ts.map +1 -0
  315. package/dist/projection/experimental/common/vincenty.js +134 -0
  316. package/dist/projection/experimental/common/vincenty.js.map +1 -0
  317. package/dist/projection/experimental/core.cjs +1940 -0
  318. package/dist/projection/experimental/core.cjs.map +6 -0
  319. package/dist/projection/experimental/core.d.ts +16 -0
  320. package/dist/projection/experimental/core.d.ts.map +1 -0
  321. package/dist/projection/experimental/core.js +10 -0
  322. package/dist/projection/experimental/core.js.map +1 -0
  323. package/dist/projection/experimental/crs/datum-catalog.d.ts +5 -0
  324. package/dist/projection/experimental/crs/datum-catalog.d.ts.map +1 -0
  325. package/dist/projection/experimental/crs/datum-catalog.js +47 -0
  326. package/dist/projection/experimental/crs/datum-catalog.js.map +1 -0
  327. package/dist/projection/experimental/crs/datum-table.d.ts +8 -0
  328. package/dist/projection/experimental/crs/datum-table.d.ts.map +1 -0
  329. package/dist/projection/experimental/crs/datum-table.js +1355 -0
  330. package/dist/projection/experimental/crs/datum-table.js.map +1 -0
  331. package/dist/projection/experimental/crs/ellipsoid-table.d.ts +8 -0
  332. package/dist/projection/experimental/crs/ellipsoid-table.d.ts.map +1 -0
  333. package/dist/projection/experimental/crs/ellipsoid-table.js +229 -0
  334. package/dist/projection/experimental/crs/ellipsoid-table.js.map +1 -0
  335. package/dist/projection/experimental/crs/normalize.d.ts +8 -0
  336. package/dist/projection/experimental/crs/normalize.d.ts.map +1 -0
  337. package/dist/projection/experimental/crs/normalize.js +279 -0
  338. package/dist/projection/experimental/crs/normalize.js.map +1 -0
  339. package/dist/projection/experimental/crs/primemeridian-table.d.ts +3 -0
  340. package/dist/projection/experimental/crs/primemeridian-table.d.ts.map +1 -0
  341. package/dist/projection/experimental/crs/primemeridian-table.js +20 -0
  342. package/dist/projection/experimental/crs/primemeridian-table.js.map +1 -0
  343. package/dist/projection/experimental/crs/projjson.cjs +564 -0
  344. package/dist/projection/experimental/crs/projjson.cjs.map +6 -0
  345. package/dist/projection/experimental/crs/projjson.d.ts +4 -0
  346. package/dist/projection/experimental/crs/projjson.d.ts.map +1 -0
  347. package/dist/projection/experimental/crs/projjson.js +12 -0
  348. package/dist/projection/experimental/crs/projjson.js.map +1 -0
  349. package/dist/projection/experimental/crs/spatial-reference.d.ts +11 -0
  350. package/dist/projection/experimental/crs/spatial-reference.d.ts.map +1 -0
  351. package/dist/projection/experimental/crs/spatial-reference.js +91 -0
  352. package/dist/projection/experimental/crs/spatial-reference.js.map +1 -0
  353. package/dist/projection/experimental/crs/structured.d.ts +8 -0
  354. package/dist/projection/experimental/crs/structured.d.ts.map +1 -0
  355. package/dist/projection/experimental/crs/structured.js +534 -0
  356. package/dist/projection/experimental/crs/structured.js.map +1 -0
  357. package/dist/projection/experimental/crs/types.d.ts +73 -0
  358. package/dist/projection/experimental/crs/types.d.ts.map +1 -0
  359. package/dist/projection/experimental/crs/types.js +21 -0
  360. package/dist/projection/experimental/crs/types.js.map +1 -0
  361. package/dist/projection/experimental/crs/wkt.cjs +1229 -0
  362. package/dist/projection/experimental/crs/wkt.cjs.map +6 -0
  363. package/dist/projection/experimental/crs/wkt.d.ts +3 -0
  364. package/dist/projection/experimental/crs/wkt.d.ts.map +1 -0
  365. package/dist/projection/experimental/crs/wkt.js +190 -0
  366. package/dist/projection/experimental/crs/wkt.js.map +1 -0
  367. package/dist/projection/experimental/crs-descriptor.d.ts +10 -0
  368. package/dist/projection/experimental/crs-descriptor.d.ts.map +1 -0
  369. package/dist/projection/experimental/crs-descriptor.js +171 -0
  370. package/dist/projection/experimental/crs-descriptor.js.map +1 -0
  371. package/dist/projection/experimental/crs-rendering-scale.d.ts +5 -0
  372. package/dist/projection/experimental/crs-rendering-scale.d.ts.map +1 -0
  373. package/dist/projection/experimental/crs-rendering-scale.js +97 -0
  374. package/dist/projection/experimental/crs-rendering-scale.js.map +1 -0
  375. package/dist/projection/experimental/datum.d.ts +17 -0
  376. package/dist/projection/experimental/datum.d.ts.map +1 -0
  377. package/dist/projection/experimental/datum.js +160 -0
  378. package/dist/projection/experimental/datum.js.map +1 -0
  379. package/dist/projection/experimental/deformation-inverse.d.ts +5 -0
  380. package/dist/projection/experimental/deformation-inverse.d.ts.map +1 -0
  381. package/dist/projection/experimental/deformation-inverse.js +89 -0
  382. package/dist/projection/experimental/deformation-inverse.js.map +1 -0
  383. package/dist/projection/experimental/deformation.d.ts +23 -0
  384. package/dist/projection/experimental/deformation.d.ts.map +1 -0
  385. package/dist/projection/experimental/deformation.js +13 -0
  386. package/dist/projection/experimental/deformation.js.map +1 -0
  387. package/dist/projection/experimental/entries/projections/aea.cjs +642 -0
  388. package/dist/projection/experimental/entries/projections/aea.cjs.map +6 -0
  389. package/dist/projection/experimental/entries/projections/aea.d.ts +2 -0
  390. package/dist/projection/experimental/entries/projections/aea.d.ts.map +1 -0
  391. package/dist/projection/experimental/entries/projections/aea.js +5 -0
  392. package/dist/projection/experimental/entries/projections/aea.js.map +1 -0
  393. package/dist/projection/experimental/entries/projections/aeqd.cjs +718 -0
  394. package/dist/projection/experimental/entries/projections/aeqd.cjs.map +6 -0
  395. package/dist/projection/experimental/entries/projections/aeqd.d.ts +2 -0
  396. package/dist/projection/experimental/entries/projections/aeqd.d.ts.map +1 -0
  397. package/dist/projection/experimental/entries/projections/aeqd.js +5 -0
  398. package/dist/projection/experimental/entries/projections/aeqd.js.map +1 -0
  399. package/dist/projection/experimental/entries/projections/bonne.cjs +621 -0
  400. package/dist/projection/experimental/entries/projections/bonne.cjs.map +6 -0
  401. package/dist/projection/experimental/entries/projections/bonne.d.ts +2 -0
  402. package/dist/projection/experimental/entries/projections/bonne.d.ts.map +1 -0
  403. package/dist/projection/experimental/entries/projections/bonne.js +5 -0
  404. package/dist/projection/experimental/entries/projections/bonne.js.map +1 -0
  405. package/dist/projection/experimental/entries/projections/cass.cjs +610 -0
  406. package/dist/projection/experimental/entries/projections/cass.cjs.map +6 -0
  407. package/dist/projection/experimental/entries/projections/cass.d.ts +2 -0
  408. package/dist/projection/experimental/entries/projections/cass.d.ts.map +1 -0
  409. package/dist/projection/experimental/entries/projections/cass.js +5 -0
  410. package/dist/projection/experimental/entries/projections/cass.js.map +1 -0
  411. package/dist/projection/experimental/entries/projections/cea.cjs +536 -0
  412. package/dist/projection/experimental/entries/projections/cea.cjs.map +6 -0
  413. package/dist/projection/experimental/entries/projections/cea.d.ts +2 -0
  414. package/dist/projection/experimental/entries/projections/cea.d.ts.map +1 -0
  415. package/dist/projection/experimental/entries/projections/cea.js +5 -0
  416. package/dist/projection/experimental/entries/projections/cea.js.map +1 -0
  417. package/dist/projection/experimental/entries/projections/eck6.cjs +559 -0
  418. package/dist/projection/experimental/entries/projections/eck6.cjs.map +6 -0
  419. package/dist/projection/experimental/entries/projections/eck6.d.ts +2 -0
  420. package/dist/projection/experimental/entries/projections/eck6.d.ts.map +1 -0
  421. package/dist/projection/experimental/entries/projections/eck6.js +5 -0
  422. package/dist/projection/experimental/entries/projections/eck6.js.map +1 -0
  423. package/dist/projection/experimental/entries/projections/eqc.cjs +256 -0
  424. package/dist/projection/experimental/entries/projections/eqc.cjs.map +6 -0
  425. package/dist/projection/experimental/entries/projections/eqc.d.ts +2 -0
  426. package/dist/projection/experimental/entries/projections/eqc.d.ts.map +1 -0
  427. package/dist/projection/experimental/entries/projections/eqc.js +5 -0
  428. package/dist/projection/experimental/entries/projections/eqc.js.map +1 -0
  429. package/dist/projection/experimental/entries/projections/eqdc.cjs +650 -0
  430. package/dist/projection/experimental/entries/projections/eqdc.cjs.map +6 -0
  431. package/dist/projection/experimental/entries/projections/eqdc.d.ts +2 -0
  432. package/dist/projection/experimental/entries/projections/eqdc.d.ts.map +1 -0
  433. package/dist/projection/experimental/entries/projections/eqdc.js +5 -0
  434. package/dist/projection/experimental/entries/projections/eqdc.js.map +1 -0
  435. package/dist/projection/experimental/entries/projections/eqearth.cjs +451 -0
  436. package/dist/projection/experimental/entries/projections/eqearth.cjs.map +6 -0
  437. package/dist/projection/experimental/entries/projections/eqearth.d.ts +2 -0
  438. package/dist/projection/experimental/entries/projections/eqearth.d.ts.map +1 -0
  439. package/dist/projection/experimental/entries/projections/eqearth.js +5 -0
  440. package/dist/projection/experimental/entries/projections/eqearth.js.map +1 -0
  441. package/dist/projection/experimental/entries/projections/equi.cjs +475 -0
  442. package/dist/projection/experimental/entries/projections/equi.cjs.map +6 -0
  443. package/dist/projection/experimental/entries/projections/equi.d.ts +2 -0
  444. package/dist/projection/experimental/entries/projections/equi.d.ts.map +1 -0
  445. package/dist/projection/experimental/entries/projections/equi.js +5 -0
  446. package/dist/projection/experimental/entries/projections/equi.js.map +1 -0
  447. package/dist/projection/experimental/entries/projections/etmerc.cjs +887 -0
  448. package/dist/projection/experimental/entries/projections/etmerc.cjs.map +6 -0
  449. package/dist/projection/experimental/entries/projections/etmerc.d.ts +2 -0
  450. package/dist/projection/experimental/entries/projections/etmerc.d.ts.map +1 -0
  451. package/dist/projection/experimental/entries/projections/etmerc.js +5 -0
  452. package/dist/projection/experimental/entries/projections/etmerc.js.map +1 -0
  453. package/dist/projection/experimental/entries/projections/geocent.cjs +215 -0
  454. package/dist/projection/experimental/entries/projections/geocent.cjs.map +6 -0
  455. package/dist/projection/experimental/entries/projections/geocent.d.ts +2 -0
  456. package/dist/projection/experimental/entries/projections/geocent.d.ts.map +1 -0
  457. package/dist/projection/experimental/entries/projections/geocent.js +5 -0
  458. package/dist/projection/experimental/entries/projections/geocent.js.map +1 -0
  459. package/dist/projection/experimental/entries/projections/geos.cjs +703 -0
  460. package/dist/projection/experimental/entries/projections/geos.cjs.map +6 -0
  461. package/dist/projection/experimental/entries/projections/geos.d.ts +2 -0
  462. package/dist/projection/experimental/entries/projections/geos.d.ts.map +1 -0
  463. package/dist/projection/experimental/entries/projections/geos.js +5 -0
  464. package/dist/projection/experimental/entries/projections/geos.js.map +1 -0
  465. package/dist/projection/experimental/entries/projections/gnom.cjs +571 -0
  466. package/dist/projection/experimental/entries/projections/gnom.cjs.map +6 -0
  467. package/dist/projection/experimental/entries/projections/gnom.d.ts +2 -0
  468. package/dist/projection/experimental/entries/projections/gnom.d.ts.map +1 -0
  469. package/dist/projection/experimental/entries/projections/gnom.js +5 -0
  470. package/dist/projection/experimental/entries/projections/gnom.js.map +1 -0
  471. package/dist/projection/experimental/entries/projections/gstmerc.cjs +526 -0
  472. package/dist/projection/experimental/entries/projections/gstmerc.cjs.map +6 -0
  473. package/dist/projection/experimental/entries/projections/gstmerc.d.ts +2 -0
  474. package/dist/projection/experimental/entries/projections/gstmerc.d.ts.map +1 -0
  475. package/dist/projection/experimental/entries/projections/gstmerc.js +5 -0
  476. package/dist/projection/experimental/entries/projections/gstmerc.js.map +1 -0
  477. package/dist/projection/experimental/entries/projections/krovak.cjs +683 -0
  478. package/dist/projection/experimental/entries/projections/krovak.cjs.map +6 -0
  479. package/dist/projection/experimental/entries/projections/krovak.d.ts +2 -0
  480. package/dist/projection/experimental/entries/projections/krovak.d.ts.map +1 -0
  481. package/dist/projection/experimental/entries/projections/krovak.js +5 -0
  482. package/dist/projection/experimental/entries/projections/krovak.js.map +1 -0
  483. package/dist/projection/experimental/entries/projections/laea.cjs +761 -0
  484. package/dist/projection/experimental/entries/projections/laea.cjs.map +6 -0
  485. package/dist/projection/experimental/entries/projections/laea.d.ts +2 -0
  486. package/dist/projection/experimental/entries/projections/laea.d.ts.map +1 -0
  487. package/dist/projection/experimental/entries/projections/laea.js +5 -0
  488. package/dist/projection/experimental/entries/projections/laea.js.map +1 -0
  489. package/dist/projection/experimental/entries/projections/lcc.cjs +642 -0
  490. package/dist/projection/experimental/entries/projections/lcc.cjs.map +6 -0
  491. package/dist/projection/experimental/entries/projections/lcc.d.ts +2 -0
  492. package/dist/projection/experimental/entries/projections/lcc.d.ts.map +1 -0
  493. package/dist/projection/experimental/entries/projections/lcc.js +5 -0
  494. package/dist/projection/experimental/entries/projections/lcc.js.map +1 -0
  495. package/dist/projection/experimental/entries/projections/merc.cjs +354 -0
  496. package/dist/projection/experimental/entries/projections/merc.cjs.map +6 -0
  497. package/dist/projection/experimental/entries/projections/merc.d.ts +2 -0
  498. package/dist/projection/experimental/entries/projections/merc.d.ts.map +1 -0
  499. package/dist/projection/experimental/entries/projections/merc.js +5 -0
  500. package/dist/projection/experimental/entries/projections/merc.js.map +1 -0
  501. package/dist/projection/experimental/entries/projections/mill.cjs +470 -0
  502. package/dist/projection/experimental/entries/projections/mill.cjs.map +6 -0
  503. package/dist/projection/experimental/entries/projections/mill.d.ts +2 -0
  504. package/dist/projection/experimental/entries/projections/mill.d.ts.map +1 -0
  505. package/dist/projection/experimental/entries/projections/mill.js +5 -0
  506. package/dist/projection/experimental/entries/projections/mill.js.map +1 -0
  507. package/dist/projection/experimental/entries/projections/moll.cjs +510 -0
  508. package/dist/projection/experimental/entries/projections/moll.cjs.map +6 -0
  509. package/dist/projection/experimental/entries/projections/moll.d.ts +2 -0
  510. package/dist/projection/experimental/entries/projections/moll.d.ts.map +1 -0
  511. package/dist/projection/experimental/entries/projections/moll.js +5 -0
  512. package/dist/projection/experimental/entries/projections/moll.js.map +1 -0
  513. package/dist/projection/experimental/entries/projections/nzmg.cjs +623 -0
  514. package/dist/projection/experimental/entries/projections/nzmg.cjs.map +6 -0
  515. package/dist/projection/experimental/entries/projections/nzmg.d.ts +2 -0
  516. package/dist/projection/experimental/entries/projections/nzmg.d.ts.map +1 -0
  517. package/dist/projection/experimental/entries/projections/nzmg.js +5 -0
  518. package/dist/projection/experimental/entries/projections/nzmg.js.map +1 -0
  519. package/dist/projection/experimental/entries/projections/ob_tran.cjs +540 -0
  520. package/dist/projection/experimental/entries/projections/ob_tran.cjs.map +6 -0
  521. package/dist/projection/experimental/entries/projections/ob_tran.d.ts +2 -0
  522. package/dist/projection/experimental/entries/projections/ob_tran.d.ts.map +1 -0
  523. package/dist/projection/experimental/entries/projections/ob_tran.js +5 -0
  524. package/dist/projection/experimental/entries/projections/ob_tran.js.map +1 -0
  525. package/dist/projection/experimental/entries/projections/omerc.cjs +852 -0
  526. package/dist/projection/experimental/entries/projections/omerc.cjs.map +6 -0
  527. package/dist/projection/experimental/entries/projections/omerc.d.ts +2 -0
  528. package/dist/projection/experimental/entries/projections/omerc.d.ts.map +1 -0
  529. package/dist/projection/experimental/entries/projections/omerc.js +5 -0
  530. package/dist/projection/experimental/entries/projections/omerc.js.map +1 -0
  531. package/dist/projection/experimental/entries/projections/ortho.cjs +573 -0
  532. package/dist/projection/experimental/entries/projections/ortho.cjs.map +6 -0
  533. package/dist/projection/experimental/entries/projections/ortho.d.ts +2 -0
  534. package/dist/projection/experimental/entries/projections/ortho.d.ts.map +1 -0
  535. package/dist/projection/experimental/entries/projections/ortho.js +5 -0
  536. package/dist/projection/experimental/entries/projections/ortho.js.map +1 -0
  537. package/dist/projection/experimental/entries/projections/poly.cjs +588 -0
  538. package/dist/projection/experimental/entries/projections/poly.cjs.map +6 -0
  539. package/dist/projection/experimental/entries/projections/poly.d.ts +2 -0
  540. package/dist/projection/experimental/entries/projections/poly.d.ts.map +1 -0
  541. package/dist/projection/experimental/entries/projections/poly.js +5 -0
  542. package/dist/projection/experimental/entries/projections/poly.js.map +1 -0
  543. package/dist/projection/experimental/entries/projections/qsc.cjs +714 -0
  544. package/dist/projection/experimental/entries/projections/qsc.cjs.map +6 -0
  545. package/dist/projection/experimental/entries/projections/qsc.d.ts +2 -0
  546. package/dist/projection/experimental/entries/projections/qsc.d.ts.map +1 -0
  547. package/dist/projection/experimental/entries/projections/qsc.js +5 -0
  548. package/dist/projection/experimental/entries/projections/qsc.js.map +1 -0
  549. package/dist/projection/experimental/entries/projections/robin.cjs +584 -0
  550. package/dist/projection/experimental/entries/projections/robin.cjs.map +6 -0
  551. package/dist/projection/experimental/entries/projections/robin.d.ts +2 -0
  552. package/dist/projection/experimental/entries/projections/robin.d.ts.map +1 -0
  553. package/dist/projection/experimental/entries/projections/robin.js +5 -0
  554. package/dist/projection/experimental/entries/projections/robin.js.map +1 -0
  555. package/dist/projection/experimental/entries/projections/sinu.cjs +583 -0
  556. package/dist/projection/experimental/entries/projections/sinu.cjs.map +6 -0
  557. package/dist/projection/experimental/entries/projections/sinu.d.ts +2 -0
  558. package/dist/projection/experimental/entries/projections/sinu.d.ts.map +1 -0
  559. package/dist/projection/experimental/entries/projections/sinu.js +5 -0
  560. package/dist/projection/experimental/entries/projections/sinu.js.map +1 -0
  561. package/dist/projection/experimental/entries/projections/somerc.cjs +582 -0
  562. package/dist/projection/experimental/entries/projections/somerc.cjs.map +6 -0
  563. package/dist/projection/experimental/entries/projections/somerc.d.ts +2 -0
  564. package/dist/projection/experimental/entries/projections/somerc.d.ts.map +1 -0
  565. package/dist/projection/experimental/entries/projections/somerc.js +5 -0
  566. package/dist/projection/experimental/entries/projections/somerc.js.map +1 -0
  567. package/dist/projection/experimental/entries/projections/stere.cjs +684 -0
  568. package/dist/projection/experimental/entries/projections/stere.cjs.map +6 -0
  569. package/dist/projection/experimental/entries/projections/stere.d.ts +2 -0
  570. package/dist/projection/experimental/entries/projections/stere.d.ts.map +1 -0
  571. package/dist/projection/experimental/entries/projections/stere.js +5 -0
  572. package/dist/projection/experimental/entries/projections/stere.js.map +1 -0
  573. package/dist/projection/experimental/entries/projections/sterea.cjs +623 -0
  574. package/dist/projection/experimental/entries/projections/sterea.cjs.map +6 -0
  575. package/dist/projection/experimental/entries/projections/sterea.d.ts +2 -0
  576. package/dist/projection/experimental/entries/projections/sterea.d.ts.map +1 -0
  577. package/dist/projection/experimental/entries/projections/sterea.js +5 -0
  578. package/dist/projection/experimental/entries/projections/sterea.js.map +1 -0
  579. package/dist/projection/experimental/entries/projections/tmerc.cjs +887 -0
  580. package/dist/projection/experimental/entries/projections/tmerc.cjs.map +6 -0
  581. package/dist/projection/experimental/entries/projections/tmerc.d.ts +2 -0
  582. package/dist/projection/experimental/entries/projections/tmerc.d.ts.map +1 -0
  583. package/dist/projection/experimental/entries/projections/tmerc.js +5 -0
  584. package/dist/projection/experimental/entries/projections/tmerc.js.map +1 -0
  585. package/dist/projection/experimental/entries/projections/tpers.cjs +645 -0
  586. package/dist/projection/experimental/entries/projections/tpers.cjs.map +6 -0
  587. package/dist/projection/experimental/entries/projections/tpers.d.ts +2 -0
  588. package/dist/projection/experimental/entries/projections/tpers.d.ts.map +1 -0
  589. package/dist/projection/experimental/entries/projections/tpers.js +5 -0
  590. package/dist/projection/experimental/entries/projections/tpers.js.map +1 -0
  591. package/dist/projection/experimental/entries/projections/utm.cjs +915 -0
  592. package/dist/projection/experimental/entries/projections/utm.cjs.map +6 -0
  593. package/dist/projection/experimental/entries/projections/utm.d.ts +2 -0
  594. package/dist/projection/experimental/entries/projections/utm.d.ts.map +1 -0
  595. package/dist/projection/experimental/entries/projections/utm.js +5 -0
  596. package/dist/projection/experimental/entries/projections/utm.js.map +1 -0
  597. package/dist/projection/experimental/entries/projections/vandg.cjs +560 -0
  598. package/dist/projection/experimental/entries/projections/vandg.cjs.map +6 -0
  599. package/dist/projection/experimental/entries/projections/vandg.d.ts +2 -0
  600. package/dist/projection/experimental/entries/projections/vandg.d.ts.map +1 -0
  601. package/dist/projection/experimental/entries/projections/vandg.js +5 -0
  602. package/dist/projection/experimental/entries/projections/vandg.js.map +1 -0
  603. package/dist/projection/experimental/exact-helmert.d.ts +9 -0
  604. package/dist/projection/experimental/exact-helmert.d.ts.map +1 -0
  605. package/dist/projection/experimental/exact-helmert.js +32 -0
  606. package/dist/projection/experimental/exact-helmert.js.map +1 -0
  607. package/dist/projection/experimental/flat-projection.d.ts +15 -0
  608. package/dist/projection/experimental/flat-projection.d.ts.map +1 -0
  609. package/dist/projection/experimental/flat-projection.js +70 -0
  610. package/dist/projection/experimental/flat-projection.js.map +1 -0
  611. package/dist/projection/experimental/grids/geotiff.cjs +180 -0
  612. package/dist/projection/experimental/grids/geotiff.cjs.map +6 -0
  613. package/dist/projection/experimental/grids/geotiff.d.ts +23 -0
  614. package/dist/projection/experimental/grids/geotiff.d.ts.map +1 -0
  615. package/dist/projection/experimental/grids/geotiff.js +59 -0
  616. package/dist/projection/experimental/grids/geotiff.js.map +1 -0
  617. package/dist/projection/experimental/grids/grid.d.ts +4 -0
  618. package/dist/projection/experimental/grids/grid.d.ts.map +1 -0
  619. package/dist/projection/experimental/grids/grid.js +111 -0
  620. package/dist/projection/experimental/grids/grid.js.map +1 -0
  621. package/dist/projection/experimental/grids/gtx.cjs +91 -0
  622. package/dist/projection/experimental/grids/gtx.cjs.map +6 -0
  623. package/dist/projection/experimental/grids/gtx.d.ts +7 -0
  624. package/dist/projection/experimental/grids/gtx.d.ts.map +1 -0
  625. package/dist/projection/experimental/grids/gtx.js +30 -0
  626. package/dist/projection/experimental/grids/gtx.js.map +1 -0
  627. package/dist/projection/experimental/grids/ntv2.cjs +181 -0
  628. package/dist/projection/experimental/grids/ntv2.cjs.map +6 -0
  629. package/dist/projection/experimental/grids/ntv2.d.ts +8 -0
  630. package/dist/projection/experimental/grids/ntv2.d.ts.map +1 -0
  631. package/dist/projection/experimental/grids/ntv2.js +56 -0
  632. package/dist/projection/experimental/grids/ntv2.js.map +1 -0
  633. package/dist/projection/experimental/grids/scalar-geotiff.d.ts +58 -0
  634. package/dist/projection/experimental/grids/scalar-geotiff.d.ts.map +1 -0
  635. package/dist/projection/experimental/grids/scalar-geotiff.js +147 -0
  636. package/dist/projection/experimental/grids/scalar-geotiff.js.map +1 -0
  637. package/dist/projection/experimental/grids/types.d.ts +35 -0
  638. package/dist/projection/experimental/grids/types.d.ts.map +1 -0
  639. package/dist/projection/experimental/grids/types.js +2 -0
  640. package/dist/projection/experimental/grids/types.js.map +1 -0
  641. package/dist/projection/experimental/grids/velocity-geotiff.cjs +247 -0
  642. package/dist/projection/experimental/grids/velocity-geotiff.cjs.map +6 -0
  643. package/dist/projection/experimental/grids/velocity-geotiff.d.ts +11 -0
  644. package/dist/projection/experimental/grids/velocity-geotiff.d.ts.map +1 -0
  645. package/dist/projection/experimental/grids/velocity-geotiff.js +61 -0
  646. package/dist/projection/experimental/grids/velocity-geotiff.js.map +1 -0
  647. package/dist/projection/experimental/grids/velocity.d.ts +21 -0
  648. package/dist/projection/experimental/grids/velocity.d.ts.map +1 -0
  649. package/dist/projection/experimental/grids/velocity.js +29 -0
  650. package/dist/projection/experimental/grids/velocity.js.map +1 -0
  651. package/dist/projection/experimental/grids/vertical-geotiff.cjs +195 -0
  652. package/dist/projection/experimental/grids/vertical-geotiff.cjs.map +6 -0
  653. package/dist/projection/experimental/grids/vertical-geotiff.d.ts +6 -0
  654. package/dist/projection/experimental/grids/vertical-geotiff.d.ts.map +1 -0
  655. package/dist/projection/experimental/grids/vertical-geotiff.js +20 -0
  656. package/dist/projection/experimental/grids/vertical-geotiff.js.map +1 -0
  657. package/dist/projection/experimental/grids/vertical.cjs +80 -0
  658. package/dist/projection/experimental/grids/vertical.cjs.map +6 -0
  659. package/dist/projection/experimental/grids/vertical.d.ts +22 -0
  660. package/dist/projection/experimental/grids/vertical.d.ts.map +1 -0
  661. package/dist/projection/experimental/grids/vertical.js +73 -0
  662. package/dist/projection/experimental/grids/vertical.js.map +1 -0
  663. package/dist/projection/experimental/helmert-flat.d.ts +4 -0
  664. package/dist/projection/experimental/helmert-flat.d.ts.map +1 -0
  665. package/dist/projection/experimental/helmert-flat.js +53 -0
  666. package/dist/projection/experimental/helmert-flat.js.map +1 -0
  667. package/dist/projection/experimental/index.cjs +10047 -0
  668. package/dist/projection/experimental/index.cjs.map +6 -0
  669. package/dist/projection/experimental/index.d.ts +49 -0
  670. package/dist/projection/experimental/index.d.ts.map +1 -0
  671. package/dist/projection/experimental/index.js +48 -0
  672. package/dist/projection/experimental/index.js.map +1 -0
  673. package/dist/projection/experimental/kernel.d.ts +37 -0
  674. package/dist/projection/experimental/kernel.d.ts.map +1 -0
  675. package/dist/projection/experimental/kernel.js +81 -0
  676. package/dist/projection/experimental/kernel.js.map +1 -0
  677. package/dist/projection/experimental/kernels/aea.d.ts +25 -0
  678. package/dist/projection/experimental/kernels/aea.d.ts.map +1 -0
  679. package/dist/projection/experimental/kernels/aea.js +136 -0
  680. package/dist/projection/experimental/kernels/aea.js.map +1 -0
  681. package/dist/projection/experimental/kernels/aeqd.d.ts +10 -0
  682. package/dist/projection/experimental/kernels/aeqd.d.ts.map +1 -0
  683. package/dist/projection/experimental/kernels/aeqd.js +168 -0
  684. package/dist/projection/experimental/kernels/aeqd.js.map +1 -0
  685. package/dist/projection/experimental/kernels/bonne.d.ts +12 -0
  686. package/dist/projection/experimental/kernels/bonne.d.ts.map +1 -0
  687. package/dist/projection/experimental/kernels/bonne.js +128 -0
  688. package/dist/projection/experimental/kernels/bonne.js.map +1 -0
  689. package/dist/projection/experimental/kernels/cass.d.ts +10 -0
  690. package/dist/projection/experimental/kernels/cass.d.ts.map +1 -0
  691. package/dist/projection/experimental/kernels/cass.js +122 -0
  692. package/dist/projection/experimental/kernels/cass.js.map +1 -0
  693. package/dist/projection/experimental/kernels/cea.d.ts +6 -0
  694. package/dist/projection/experimental/kernels/cea.d.ts.map +1 -0
  695. package/dist/projection/experimental/kernels/cea.js +63 -0
  696. package/dist/projection/experimental/kernels/cea.js.map +1 -0
  697. package/dist/projection/experimental/kernels/eck6.d.ts +13 -0
  698. package/dist/projection/experimental/kernels/eck6.d.ts.map +1 -0
  699. package/dist/projection/experimental/kernels/eck6.js +23 -0
  700. package/dist/projection/experimental/kernels/eck6.js.map +1 -0
  701. package/dist/projection/experimental/kernels/eqdc.d.ts +19 -0
  702. package/dist/projection/experimental/kernels/eqdc.d.ts.map +1 -0
  703. package/dist/projection/experimental/kernels/eqdc.js +117 -0
  704. package/dist/projection/experimental/kernels/eqdc.js.map +1 -0
  705. package/dist/projection/experimental/kernels/eqearth.d.ts +10 -0
  706. package/dist/projection/experimental/kernels/eqearth.d.ts.map +1 -0
  707. package/dist/projection/experimental/kernels/eqearth.js +103 -0
  708. package/dist/projection/experimental/kernels/eqearth.js.map +1 -0
  709. package/dist/projection/experimental/kernels/equi.d.ts +9 -0
  710. package/dist/projection/experimental/kernels/equi.d.ts.map +1 -0
  711. package/dist/projection/experimental/kernels/equi.js +41 -0
  712. package/dist/projection/experimental/kernels/equi.js.map +1 -0
  713. package/dist/projection/experimental/kernels/etmerc.d.ts +13 -0
  714. package/dist/projection/experimental/kernels/etmerc.d.ts.map +1 -0
  715. package/dist/projection/experimental/kernels/etmerc.js +145 -0
  716. package/dist/projection/experimental/kernels/etmerc.js.map +1 -0
  717. package/dist/projection/experimental/kernels/gauss.d.ts +12 -0
  718. package/dist/projection/experimental/kernels/gauss.d.ts.map +1 -0
  719. package/dist/projection/experimental/kernels/gauss.js +64 -0
  720. package/dist/projection/experimental/kernels/gauss.js.map +1 -0
  721. package/dist/projection/experimental/kernels/geos.d.ts +17 -0
  722. package/dist/projection/experimental/kernels/geos.d.ts.map +1 -0
  723. package/dist/projection/experimental/kernels/geos.js +153 -0
  724. package/dist/projection/experimental/kernels/geos.js.map +1 -0
  725. package/dist/projection/experimental/kernels/gnom.d.ts +12 -0
  726. package/dist/projection/experimental/kernels/gnom.d.ts.map +1 -0
  727. package/dist/projection/experimental/kernels/gnom.js +95 -0
  728. package/dist/projection/experimental/kernels/gnom.js.map +1 -0
  729. package/dist/projection/experimental/kernels/gstmerc.d.ts +13 -0
  730. package/dist/projection/experimental/kernels/gstmerc.d.ts.map +1 -0
  731. package/dist/projection/experimental/kernels/gstmerc.js +57 -0
  732. package/dist/projection/experimental/kernels/gstmerc.js.map +1 -0
  733. package/dist/projection/experimental/kernels/krovak.d.ts +23 -0
  734. package/dist/projection/experimental/kernels/krovak.d.ts.map +1 -0
  735. package/dist/projection/experimental/kernels/krovak.js +128 -0
  736. package/dist/projection/experimental/kernels/krovak.js.map +1 -0
  737. package/dist/projection/experimental/kernels/laea.d.ts +23 -0
  738. package/dist/projection/experimental/kernels/laea.d.ts.map +1 -0
  739. package/dist/projection/experimental/kernels/laea.js +278 -0
  740. package/dist/projection/experimental/kernels/laea.js.map +1 -0
  741. package/dist/projection/experimental/kernels/lcc.d.ts +10 -0
  742. package/dist/projection/experimental/kernels/lcc.d.ts.map +1 -0
  743. package/dist/projection/experimental/kernels/lcc.js +131 -0
  744. package/dist/projection/experimental/kernels/lcc.js.map +1 -0
  745. package/dist/projection/experimental/kernels/mill.d.ts +6 -0
  746. package/dist/projection/experimental/kernels/mill.d.ts.map +1 -0
  747. package/dist/projection/experimental/kernels/mill.js +49 -0
  748. package/dist/projection/experimental/kernels/mill.js.map +1 -0
  749. package/dist/projection/experimental/kernels/moll.d.ts +6 -0
  750. package/dist/projection/experimental/kernels/moll.d.ts.map +1 -0
  751. package/dist/projection/experimental/kernels/moll.js +89 -0
  752. package/dist/projection/experimental/kernels/moll.js.map +1 -0
  753. package/dist/projection/experimental/kernels/nzmg.d.ts +28 -0
  754. package/dist/projection/experimental/kernels/nzmg.d.ts.map +1 -0
  755. package/dist/projection/experimental/kernels/nzmg.js +209 -0
  756. package/dist/projection/experimental/kernels/nzmg.js.map +1 -0
  757. package/dist/projection/experimental/kernels/omerc.d.ts +30 -0
  758. package/dist/projection/experimental/kernels/omerc.d.ts.map +1 -0
  759. package/dist/projection/experimental/kernels/omerc.js +260 -0
  760. package/dist/projection/experimental/kernels/omerc.js.map +1 -0
  761. package/dist/projection/experimental/kernels/ortho.d.ts +9 -0
  762. package/dist/projection/experimental/kernels/ortho.d.ts.map +1 -0
  763. package/dist/projection/experimental/kernels/ortho.js +91 -0
  764. package/dist/projection/experimental/kernels/ortho.js.map +1 -0
  765. package/dist/projection/experimental/kernels/poly.d.ts +13 -0
  766. package/dist/projection/experimental/kernels/poly.d.ts.map +1 -0
  767. package/dist/projection/experimental/kernels/poly.js +141 -0
  768. package/dist/projection/experimental/kernels/poly.js.map +1 -0
  769. package/dist/projection/experimental/kernels/qsc.d.ts +10 -0
  770. package/dist/projection/experimental/kernels/qsc.d.ts.map +1 -0
  771. package/dist/projection/experimental/kernels/qsc.js +379 -0
  772. package/dist/projection/experimental/kernels/qsc.js.map +1 -0
  773. package/dist/projection/experimental/kernels/robin.d.ts +6 -0
  774. package/dist/projection/experimental/kernels/robin.d.ts.map +1 -0
  775. package/dist/projection/experimental/kernels/robin.js +166 -0
  776. package/dist/projection/experimental/kernels/robin.js.map +1 -0
  777. package/dist/projection/experimental/kernels/sinu.d.ts +12 -0
  778. package/dist/projection/experimental/kernels/sinu.d.ts.map +1 -0
  779. package/dist/projection/experimental/kernels/sinu.js +104 -0
  780. package/dist/projection/experimental/kernels/sinu.js.map +1 -0
  781. package/dist/projection/experimental/kernels/somerc.d.ts +13 -0
  782. package/dist/projection/experimental/kernels/somerc.d.ts.map +1 -0
  783. package/dist/projection/experimental/kernels/somerc.js +81 -0
  784. package/dist/projection/experimental/kernels/somerc.js.map +1 -0
  785. package/dist/projection/experimental/kernels/stere.d.ts +15 -0
  786. package/dist/projection/experimental/kernels/stere.d.ts.map +1 -0
  787. package/dist/projection/experimental/kernels/stere.js +195 -0
  788. package/dist/projection/experimental/kernels/stere.js.map +1 -0
  789. package/dist/projection/experimental/kernels/sterea.d.ts +11 -0
  790. package/dist/projection/experimental/kernels/sterea.d.ts.map +1 -0
  791. package/dist/projection/experimental/kernels/sterea.js +65 -0
  792. package/dist/projection/experimental/kernels/sterea.js.map +1 -0
  793. package/dist/projection/experimental/kernels/tmerc.d.ts +9 -0
  794. package/dist/projection/experimental/kernels/tmerc.d.ts.map +1 -0
  795. package/dist/projection/experimental/kernels/tmerc.js +201 -0
  796. package/dist/projection/experimental/kernels/tmerc.js.map +1 -0
  797. package/dist/projection/experimental/kernels/tpers.d.ts +22 -0
  798. package/dist/projection/experimental/kernels/tpers.d.ts.map +1 -0
  799. package/dist/projection/experimental/kernels/tpers.js +156 -0
  800. package/dist/projection/experimental/kernels/tpers.js.map +1 -0
  801. package/dist/projection/experimental/kernels/vandg.d.ts +8 -0
  802. package/dist/projection/experimental/kernels/vandg.d.ts.map +1 -0
  803. package/dist/projection/experimental/kernels/vandg.js +133 -0
  804. package/dist/projection/experimental/kernels/vandg.js.map +1 -0
  805. package/dist/projection/experimental/kinematic-helmert-flat.d.ts +4 -0
  806. package/dist/projection/experimental/kinematic-helmert-flat.d.ts.map +1 -0
  807. package/dist/projection/experimental/kinematic-helmert-flat.js +60 -0
  808. package/dist/projection/experimental/kinematic-helmert-flat.js.map +1 -0
  809. package/dist/projection/experimental/kinematic-helmert.d.ts +11 -0
  810. package/dist/projection/experimental/kinematic-helmert.d.ts.map +1 -0
  811. package/dist/projection/experimental/kinematic-helmert.js +103 -0
  812. package/dist/projection/experimental/kinematic-helmert.js.map +1 -0
  813. package/dist/projection/experimental/lazy-projection.d.ts +17 -0
  814. package/dist/projection/experimental/lazy-projection.d.ts.map +1 -0
  815. package/dist/projection/experimental/lazy-projection.js +156 -0
  816. package/dist/projection/experimental/lazy-projection.js.map +1 -0
  817. package/dist/projection/experimental/lazy-projections/aea.cjs +79 -0
  818. package/dist/projection/experimental/lazy-projections/aea.cjs.map +6 -0
  819. package/dist/projection/experimental/lazy-projections/aea.d.ts +3 -0
  820. package/dist/projection/experimental/lazy-projections/aea.d.ts.map +1 -0
  821. package/dist/projection/experimental/lazy-projections/aea.js +7 -0
  822. package/dist/projection/experimental/lazy-projections/aea.js.map +1 -0
  823. package/dist/projection/experimental/lazy-projections/aeqd.cjs +79 -0
  824. package/dist/projection/experimental/lazy-projections/aeqd.cjs.map +6 -0
  825. package/dist/projection/experimental/lazy-projections/aeqd.d.ts +3 -0
  826. package/dist/projection/experimental/lazy-projections/aeqd.d.ts.map +1 -0
  827. package/dist/projection/experimental/lazy-projections/aeqd.js +8 -0
  828. package/dist/projection/experimental/lazy-projections/aeqd.js.map +1 -0
  829. package/dist/projection/experimental/lazy-projections/bonne.cjs +79 -0
  830. package/dist/projection/experimental/lazy-projections/bonne.cjs.map +6 -0
  831. package/dist/projection/experimental/lazy-projections/bonne.d.ts +3 -0
  832. package/dist/projection/experimental/lazy-projections/bonne.d.ts.map +1 -0
  833. package/dist/projection/experimental/lazy-projections/bonne.js +7 -0
  834. package/dist/projection/experimental/lazy-projections/bonne.js.map +1 -0
  835. package/dist/projection/experimental/lazy-projections/cass.cjs +79 -0
  836. package/dist/projection/experimental/lazy-projections/cass.cjs.map +6 -0
  837. package/dist/projection/experimental/lazy-projections/cass.d.ts +3 -0
  838. package/dist/projection/experimental/lazy-projections/cass.d.ts.map +1 -0
  839. package/dist/projection/experimental/lazy-projections/cass.js +7 -0
  840. package/dist/projection/experimental/lazy-projections/cass.js.map +1 -0
  841. package/dist/projection/experimental/lazy-projections/cea.cjs +79 -0
  842. package/dist/projection/experimental/lazy-projections/cea.cjs.map +6 -0
  843. package/dist/projection/experimental/lazy-projections/cea.d.ts +3 -0
  844. package/dist/projection/experimental/lazy-projections/cea.d.ts.map +1 -0
  845. package/dist/projection/experimental/lazy-projections/cea.js +8 -0
  846. package/dist/projection/experimental/lazy-projections/cea.js.map +1 -0
  847. package/dist/projection/experimental/lazy-projections/eck6.cjs +79 -0
  848. package/dist/projection/experimental/lazy-projections/eck6.cjs.map +6 -0
  849. package/dist/projection/experimental/lazy-projections/eck6.d.ts +3 -0
  850. package/dist/projection/experimental/lazy-projections/eck6.d.ts.map +1 -0
  851. package/dist/projection/experimental/lazy-projections/eck6.js +7 -0
  852. package/dist/projection/experimental/lazy-projections/eck6.js.map +1 -0
  853. package/dist/projection/experimental/lazy-projections/eqc.cjs +82 -0
  854. package/dist/projection/experimental/lazy-projections/eqc.cjs.map +6 -0
  855. package/dist/projection/experimental/lazy-projections/eqc.d.ts +3 -0
  856. package/dist/projection/experimental/lazy-projections/eqc.d.ts.map +1 -0
  857. package/dist/projection/experimental/lazy-projections/eqc.js +11 -0
  858. package/dist/projection/experimental/lazy-projections/eqc.js.map +1 -0
  859. package/dist/projection/experimental/lazy-projections/eqdc.cjs +79 -0
  860. package/dist/projection/experimental/lazy-projections/eqdc.cjs.map +6 -0
  861. package/dist/projection/experimental/lazy-projections/eqdc.d.ts +3 -0
  862. package/dist/projection/experimental/lazy-projections/eqdc.d.ts.map +1 -0
  863. package/dist/projection/experimental/lazy-projections/eqdc.js +8 -0
  864. package/dist/projection/experimental/lazy-projections/eqdc.js.map +1 -0
  865. package/dist/projection/experimental/lazy-projections/eqearth.cjs +79 -0
  866. package/dist/projection/experimental/lazy-projections/eqearth.cjs.map +6 -0
  867. package/dist/projection/experimental/lazy-projections/eqearth.d.ts +3 -0
  868. package/dist/projection/experimental/lazy-projections/eqearth.d.ts.map +1 -0
  869. package/dist/projection/experimental/lazy-projections/eqearth.js +7 -0
  870. package/dist/projection/experimental/lazy-projections/eqearth.js.map +1 -0
  871. package/dist/projection/experimental/lazy-projections/equi.cjs +79 -0
  872. package/dist/projection/experimental/lazy-projections/equi.cjs.map +6 -0
  873. package/dist/projection/experimental/lazy-projections/equi.d.ts +3 -0
  874. package/dist/projection/experimental/lazy-projections/equi.d.ts.map +1 -0
  875. package/dist/projection/experimental/lazy-projections/equi.js +7 -0
  876. package/dist/projection/experimental/lazy-projections/equi.js.map +1 -0
  877. package/dist/projection/experimental/lazy-projections/etmerc.cjs +79 -0
  878. package/dist/projection/experimental/lazy-projections/etmerc.cjs.map +6 -0
  879. package/dist/projection/experimental/lazy-projections/etmerc.d.ts +3 -0
  880. package/dist/projection/experimental/lazy-projections/etmerc.d.ts.map +1 -0
  881. package/dist/projection/experimental/lazy-projections/etmerc.js +8 -0
  882. package/dist/projection/experimental/lazy-projections/etmerc.js.map +1 -0
  883. package/dist/projection/experimental/lazy-projections/geocent.cjs +79 -0
  884. package/dist/projection/experimental/lazy-projections/geocent.cjs.map +6 -0
  885. package/dist/projection/experimental/lazy-projections/geocent.d.ts +3 -0
  886. package/dist/projection/experimental/lazy-projections/geocent.d.ts.map +1 -0
  887. package/dist/projection/experimental/lazy-projections/geocent.js +7 -0
  888. package/dist/projection/experimental/lazy-projections/geocent.js.map +1 -0
  889. package/dist/projection/experimental/lazy-projections/geos.cjs +79 -0
  890. package/dist/projection/experimental/lazy-projections/geos.cjs.map +6 -0
  891. package/dist/projection/experimental/lazy-projections/geos.d.ts +3 -0
  892. package/dist/projection/experimental/lazy-projections/geos.d.ts.map +1 -0
  893. package/dist/projection/experimental/lazy-projections/geos.js +7 -0
  894. package/dist/projection/experimental/lazy-projections/geos.js.map +1 -0
  895. package/dist/projection/experimental/lazy-projections/gnom.cjs +79 -0
  896. package/dist/projection/experimental/lazy-projections/gnom.cjs.map +6 -0
  897. package/dist/projection/experimental/lazy-projections/gnom.d.ts +3 -0
  898. package/dist/projection/experimental/lazy-projections/gnom.d.ts.map +1 -0
  899. package/dist/projection/experimental/lazy-projections/gnom.js +7 -0
  900. package/dist/projection/experimental/lazy-projections/gnom.js.map +1 -0
  901. package/dist/projection/experimental/lazy-projections/gstmerc.cjs +79 -0
  902. package/dist/projection/experimental/lazy-projections/gstmerc.cjs.map +6 -0
  903. package/dist/projection/experimental/lazy-projections/gstmerc.d.ts +3 -0
  904. package/dist/projection/experimental/lazy-projections/gstmerc.d.ts.map +1 -0
  905. package/dist/projection/experimental/lazy-projections/gstmerc.js +9 -0
  906. package/dist/projection/experimental/lazy-projections/gstmerc.js.map +1 -0
  907. package/dist/projection/experimental/lazy-projections/index.cjs +2243 -0
  908. package/dist/projection/experimental/lazy-projections/index.cjs.map +6 -0
  909. package/dist/projection/experimental/lazy-projections/index.d.ts +38 -0
  910. package/dist/projection/experimental/lazy-projections/index.d.ts.map +1 -0
  911. package/dist/projection/experimental/lazy-projections/index.js +41 -0
  912. package/dist/projection/experimental/lazy-projections/index.js.map +1 -0
  913. package/dist/projection/experimental/lazy-projections/krovak.cjs +87 -0
  914. package/dist/projection/experimental/lazy-projections/krovak.cjs.map +6 -0
  915. package/dist/projection/experimental/lazy-projections/krovak.d.ts +3 -0
  916. package/dist/projection/experimental/lazy-projections/krovak.d.ts.map +1 -0
  917. package/dist/projection/experimental/lazy-projections/krovak.js +15 -0
  918. package/dist/projection/experimental/lazy-projections/krovak.js.map +1 -0
  919. package/dist/projection/experimental/lazy-projections/laea.cjs +79 -0
  920. package/dist/projection/experimental/lazy-projections/laea.cjs.map +6 -0
  921. package/dist/projection/experimental/lazy-projections/laea.d.ts +3 -0
  922. package/dist/projection/experimental/lazy-projections/laea.d.ts.map +1 -0
  923. package/dist/projection/experimental/lazy-projections/laea.js +8 -0
  924. package/dist/projection/experimental/lazy-projections/laea.js.map +1 -0
  925. package/dist/projection/experimental/lazy-projections/lcc.cjs +89 -0
  926. package/dist/projection/experimental/lazy-projections/lcc.cjs.map +6 -0
  927. package/dist/projection/experimental/lazy-projections/lcc.d.ts +3 -0
  928. package/dist/projection/experimental/lazy-projections/lcc.d.ts.map +1 -0
  929. package/dist/projection/experimental/lazy-projections/lcc.js +18 -0
  930. package/dist/projection/experimental/lazy-projections/lcc.js.map +1 -0
  931. package/dist/projection/experimental/lazy-projections/merc.cjs +88 -0
  932. package/dist/projection/experimental/lazy-projections/merc.cjs.map +6 -0
  933. package/dist/projection/experimental/lazy-projections/merc.d.ts +3 -0
  934. package/dist/projection/experimental/lazy-projections/merc.d.ts.map +1 -0
  935. package/dist/projection/experimental/lazy-projections/merc.js +16 -0
  936. package/dist/projection/experimental/lazy-projections/merc.js.map +1 -0
  937. package/dist/projection/experimental/lazy-projections/mill.cjs +79 -0
  938. package/dist/projection/experimental/lazy-projections/mill.cjs.map +6 -0
  939. package/dist/projection/experimental/lazy-projections/mill.d.ts +3 -0
  940. package/dist/projection/experimental/lazy-projections/mill.d.ts.map +1 -0
  941. package/dist/projection/experimental/lazy-projections/mill.js +8 -0
  942. package/dist/projection/experimental/lazy-projections/mill.js.map +1 -0
  943. package/dist/projection/experimental/lazy-projections/moll.cjs +79 -0
  944. package/dist/projection/experimental/lazy-projections/moll.cjs.map +6 -0
  945. package/dist/projection/experimental/lazy-projections/moll.d.ts +3 -0
  946. package/dist/projection/experimental/lazy-projections/moll.d.ts.map +1 -0
  947. package/dist/projection/experimental/lazy-projections/moll.js +7 -0
  948. package/dist/projection/experimental/lazy-projections/moll.js.map +1 -0
  949. package/dist/projection/experimental/lazy-projections/nzmg.cjs +79 -0
  950. package/dist/projection/experimental/lazy-projections/nzmg.cjs.map +6 -0
  951. package/dist/projection/experimental/lazy-projections/nzmg.d.ts +3 -0
  952. package/dist/projection/experimental/lazy-projections/nzmg.d.ts.map +1 -0
  953. package/dist/projection/experimental/lazy-projections/nzmg.js +8 -0
  954. package/dist/projection/experimental/lazy-projections/nzmg.js.map +1 -0
  955. package/dist/projection/experimental/lazy-projections/ob_tran.cjs +90 -0
  956. package/dist/projection/experimental/lazy-projections/ob_tran.cjs.map +6 -0
  957. package/dist/projection/experimental/lazy-projections/ob_tran.d.ts +5 -0
  958. package/dist/projection/experimental/lazy-projections/ob_tran.d.ts.map +1 -0
  959. package/dist/projection/experimental/lazy-projections/ob_tran.js +18 -0
  960. package/dist/projection/experimental/lazy-projections/ob_tran.js.map +1 -0
  961. package/dist/projection/experimental/lazy-projections/omerc.cjs +91 -0
  962. package/dist/projection/experimental/lazy-projections/omerc.cjs.map +6 -0
  963. package/dist/projection/experimental/lazy-projections/omerc.d.ts +3 -0
  964. package/dist/projection/experimental/lazy-projections/omerc.d.ts.map +1 -0
  965. package/dist/projection/experimental/lazy-projections/omerc.js +19 -0
  966. package/dist/projection/experimental/lazy-projections/omerc.js.map +1 -0
  967. package/dist/projection/experimental/lazy-projections/ortho.cjs +79 -0
  968. package/dist/projection/experimental/lazy-projections/ortho.cjs.map +6 -0
  969. package/dist/projection/experimental/lazy-projections/ortho.d.ts +3 -0
  970. package/dist/projection/experimental/lazy-projections/ortho.d.ts.map +1 -0
  971. package/dist/projection/experimental/lazy-projections/ortho.js +7 -0
  972. package/dist/projection/experimental/lazy-projections/ortho.js.map +1 -0
  973. package/dist/projection/experimental/lazy-projections/poly.cjs +79 -0
  974. package/dist/projection/experimental/lazy-projections/poly.cjs.map +6 -0
  975. package/dist/projection/experimental/lazy-projections/poly.d.ts +3 -0
  976. package/dist/projection/experimental/lazy-projections/poly.d.ts.map +1 -0
  977. package/dist/projection/experimental/lazy-projections/poly.js +7 -0
  978. package/dist/projection/experimental/lazy-projections/poly.js.map +1 -0
  979. package/dist/projection/experimental/lazy-projections/qsc.cjs +82 -0
  980. package/dist/projection/experimental/lazy-projections/qsc.cjs.map +6 -0
  981. package/dist/projection/experimental/lazy-projections/qsc.d.ts +3 -0
  982. package/dist/projection/experimental/lazy-projections/qsc.d.ts.map +1 -0
  983. package/dist/projection/experimental/lazy-projections/qsc.js +12 -0
  984. package/dist/projection/experimental/lazy-projections/qsc.js.map +1 -0
  985. package/dist/projection/experimental/lazy-projections/robin.cjs +79 -0
  986. package/dist/projection/experimental/lazy-projections/robin.cjs.map +6 -0
  987. package/dist/projection/experimental/lazy-projections/robin.d.ts +3 -0
  988. package/dist/projection/experimental/lazy-projections/robin.d.ts.map +1 -0
  989. package/dist/projection/experimental/lazy-projections/robin.js +7 -0
  990. package/dist/projection/experimental/lazy-projections/robin.js.map +1 -0
  991. package/dist/projection/experimental/lazy-projections/sinu.cjs +79 -0
  992. package/dist/projection/experimental/lazy-projections/sinu.cjs.map +6 -0
  993. package/dist/projection/experimental/lazy-projections/sinu.d.ts +3 -0
  994. package/dist/projection/experimental/lazy-projections/sinu.d.ts.map +1 -0
  995. package/dist/projection/experimental/lazy-projections/sinu.js +7 -0
  996. package/dist/projection/experimental/lazy-projections/sinu.js.map +1 -0
  997. package/dist/projection/experimental/lazy-projections/somerc.cjs +79 -0
  998. package/dist/projection/experimental/lazy-projections/somerc.cjs.map +6 -0
  999. package/dist/projection/experimental/lazy-projections/somerc.d.ts +3 -0
  1000. package/dist/projection/experimental/lazy-projections/somerc.d.ts.map +1 -0
  1001. package/dist/projection/experimental/lazy-projections/somerc.js +8 -0
  1002. package/dist/projection/experimental/lazy-projections/somerc.js.map +1 -0
  1003. package/dist/projection/experimental/lazy-projections/stere.cjs +87 -0
  1004. package/dist/projection/experimental/lazy-projections/stere.cjs.map +6 -0
  1005. package/dist/projection/experimental/lazy-projections/stere.d.ts +3 -0
  1006. package/dist/projection/experimental/lazy-projections/stere.d.ts.map +1 -0
  1007. package/dist/projection/experimental/lazy-projections/stere.js +15 -0
  1008. package/dist/projection/experimental/lazy-projections/stere.js.map +1 -0
  1009. package/dist/projection/experimental/lazy-projections/sterea.cjs +87 -0
  1010. package/dist/projection/experimental/lazy-projections/sterea.cjs.map +6 -0
  1011. package/dist/projection/experimental/lazy-projections/sterea.d.ts +3 -0
  1012. package/dist/projection/experimental/lazy-projections/sterea.d.ts.map +1 -0
  1013. package/dist/projection/experimental/lazy-projections/sterea.js +16 -0
  1014. package/dist/projection/experimental/lazy-projections/sterea.js.map +1 -0
  1015. package/dist/projection/experimental/lazy-projections/tmerc.cjs +89 -0
  1016. package/dist/projection/experimental/lazy-projections/tmerc.cjs.map +6 -0
  1017. package/dist/projection/experimental/lazy-projections/tmerc.d.ts +3 -0
  1018. package/dist/projection/experimental/lazy-projections/tmerc.d.ts.map +1 -0
  1019. package/dist/projection/experimental/lazy-projections/tmerc.js +18 -0
  1020. package/dist/projection/experimental/lazy-projections/tmerc.js.map +1 -0
  1021. package/dist/projection/experimental/lazy-projections/tpers.cjs +79 -0
  1022. package/dist/projection/experimental/lazy-projections/tpers.cjs.map +6 -0
  1023. package/dist/projection/experimental/lazy-projections/tpers.d.ts +3 -0
  1024. package/dist/projection/experimental/lazy-projections/tpers.d.ts.map +1 -0
  1025. package/dist/projection/experimental/lazy-projections/tpers.js +8 -0
  1026. package/dist/projection/experimental/lazy-projections/tpers.js.map +1 -0
  1027. package/dist/projection/experimental/lazy-projections/utm.cjs +79 -0
  1028. package/dist/projection/experimental/lazy-projections/utm.cjs.map +6 -0
  1029. package/dist/projection/experimental/lazy-projections/utm.d.ts +3 -0
  1030. package/dist/projection/experimental/lazy-projections/utm.d.ts.map +1 -0
  1031. package/dist/projection/experimental/lazy-projections/utm.js +8 -0
  1032. package/dist/projection/experimental/lazy-projections/utm.js.map +1 -0
  1033. package/dist/projection/experimental/lazy-projections/vandg.cjs +79 -0
  1034. package/dist/projection/experimental/lazy-projections/vandg.cjs.map +6 -0
  1035. package/dist/projection/experimental/lazy-projections/vandg.d.ts +3 -0
  1036. package/dist/projection/experimental/lazy-projections/vandg.d.ts.map +1 -0
  1037. package/dist/projection/experimental/lazy-projections/vandg.js +7 -0
  1038. package/dist/projection/experimental/lazy-projections/vandg.js.map +1 -0
  1039. package/dist/projection/experimental/mutable-projection.d.ts +6 -0
  1040. package/dist/projection/experimental/mutable-projection.d.ts.map +1 -0
  1041. package/dist/projection/experimental/mutable-projection.js +53 -0
  1042. package/dist/projection/experimental/mutable-projection.js.map +1 -0
  1043. package/dist/projection/experimental/numeric-flat.d.ts +8 -0
  1044. package/dist/projection/experimental/numeric-flat.d.ts.map +1 -0
  1045. package/dist/projection/experimental/numeric-flat.js +54 -0
  1046. package/dist/projection/experimental/numeric-flat.js.map +1 -0
  1047. package/dist/projection/experimental/parameters.d.ts +8 -0
  1048. package/dist/projection/experimental/parameters.d.ts.map +1 -0
  1049. package/dist/projection/experimental/parameters.js +31 -0
  1050. package/dist/projection/experimental/parameters.js.map +1 -0
  1051. package/dist/projection/experimental/projection-descriptor.d.ts +13 -0
  1052. package/dist/projection/experimental/projection-descriptor.d.ts.map +1 -0
  1053. package/dist/projection/experimental/projection-descriptor.js +52 -0
  1054. package/dist/projection/experimental/projection-descriptor.js.map +1 -0
  1055. package/dist/projection/experimental/projection-engine.d.ts +27 -0
  1056. package/dist/projection/experimental/projection-engine.d.ts.map +1 -0
  1057. package/dist/projection/experimental/projection-engine.js +50 -0
  1058. package/dist/projection/experimental/projection-engine.js.map +1 -0
  1059. package/dist/projection/experimental/projection-pipeline.d.ts +142 -0
  1060. package/dist/projection/experimental/projection-pipeline.d.ts.map +1 -0
  1061. package/dist/projection/experimental/projection-pipeline.js +740 -0
  1062. package/dist/projection/experimental/projection-pipeline.js.map +1 -0
  1063. package/dist/projection/experimental/projection-scratch.d.ts +11 -0
  1064. package/dist/projection/experimental/projection-scratch.d.ts.map +1 -0
  1065. package/dist/projection/experimental/projection-scratch.js +25 -0
  1066. package/dist/projection/experimental/projection-scratch.js.map +1 -0
  1067. package/dist/projection/experimental/projections/aea.d.ts +3 -0
  1068. package/dist/projection/experimental/projections/aea.d.ts.map +1 -0
  1069. package/dist/projection/experimental/projections/aea.js +24 -0
  1070. package/dist/projection/experimental/projections/aea.js.map +1 -0
  1071. package/dist/projection/experimental/projections/aeqd.d.ts +3 -0
  1072. package/dist/projection/experimental/projections/aeqd.d.ts.map +1 -0
  1073. package/dist/projection/experimental/projections/aeqd.js +19 -0
  1074. package/dist/projection/experimental/projections/aeqd.js.map +1 -0
  1075. package/dist/projection/experimental/projections/bonne.d.ts +3 -0
  1076. package/dist/projection/experimental/projections/bonne.d.ts.map +1 -0
  1077. package/dist/projection/experimental/projections/bonne.js +25 -0
  1078. package/dist/projection/experimental/projections/bonne.js.map +1 -0
  1079. package/dist/projection/experimental/projections/cass.d.ts +3 -0
  1080. package/dist/projection/experimental/projections/cass.d.ts.map +1 -0
  1081. package/dist/projection/experimental/projections/cass.js +22 -0
  1082. package/dist/projection/experimental/projections/cass.js.map +1 -0
  1083. package/dist/projection/experimental/projections/cea.d.ts +3 -0
  1084. package/dist/projection/experimental/projections/cea.d.ts.map +1 -0
  1085. package/dist/projection/experimental/projections/cea.js +24 -0
  1086. package/dist/projection/experimental/projections/cea.js.map +1 -0
  1087. package/dist/projection/experimental/projections/eck6.d.ts +3 -0
  1088. package/dist/projection/experimental/projections/eck6.d.ts.map +1 -0
  1089. package/dist/projection/experimental/projections/eck6.js +22 -0
  1090. package/dist/projection/experimental/projections/eck6.js.map +1 -0
  1091. package/dist/projection/experimental/projections/eqdc.d.ts +3 -0
  1092. package/dist/projection/experimental/projections/eqdc.d.ts.map +1 -0
  1093. package/dist/projection/experimental/projections/eqdc.js +23 -0
  1094. package/dist/projection/experimental/projections/eqdc.js.map +1 -0
  1095. package/dist/projection/experimental/projections/eqearth.d.ts +3 -0
  1096. package/dist/projection/experimental/projections/eqearth.d.ts.map +1 -0
  1097. package/dist/projection/experimental/projections/eqearth.js +47 -0
  1098. package/dist/projection/experimental/projections/eqearth.js.map +1 -0
  1099. package/dist/projection/experimental/projections/equi.d.ts +3 -0
  1100. package/dist/projection/experimental/projections/equi.d.ts.map +1 -0
  1101. package/dist/projection/experimental/projections/equi.js +24 -0
  1102. package/dist/projection/experimental/projections/equi.js.map +1 -0
  1103. package/dist/projection/experimental/projections/equidistant-cylindrical.d.ts +4 -0
  1104. package/dist/projection/experimental/projections/equidistant-cylindrical.d.ts.map +1 -0
  1105. package/dist/projection/experimental/projections/equidistant-cylindrical.js +47 -0
  1106. package/dist/projection/experimental/projections/equidistant-cylindrical.js.map +1 -0
  1107. package/dist/projection/experimental/projections/geocentric.d.ts +3 -0
  1108. package/dist/projection/experimental/projections/geocentric.d.ts.map +1 -0
  1109. package/dist/projection/experimental/projections/geocentric.js +34 -0
  1110. package/dist/projection/experimental/projections/geocentric.js.map +1 -0
  1111. package/dist/projection/experimental/projections/geos.d.ts +3 -0
  1112. package/dist/projection/experimental/projections/geos.d.ts.map +1 -0
  1113. package/dist/projection/experimental/projections/geos.js +30 -0
  1114. package/dist/projection/experimental/projections/geos.js.map +1 -0
  1115. package/dist/projection/experimental/projections/gnom.d.ts +3 -0
  1116. package/dist/projection/experimental/projections/gnom.d.ts.map +1 -0
  1117. package/dist/projection/experimental/projections/gnom.js +20 -0
  1118. package/dist/projection/experimental/projections/gnom.js.map +1 -0
  1119. package/dist/projection/experimental/projections/gstmerc.d.ts +3 -0
  1120. package/dist/projection/experimental/projections/gstmerc.d.ts.map +1 -0
  1121. package/dist/projection/experimental/projections/gstmerc.js +23 -0
  1122. package/dist/projection/experimental/projections/gstmerc.js.map +1 -0
  1123. package/dist/projection/experimental/projections/krovak.d.ts +3 -0
  1124. package/dist/projection/experimental/projections/krovak.d.ts.map +1 -0
  1125. package/dist/projection/experimental/projections/krovak.js +41 -0
  1126. package/dist/projection/experimental/projections/krovak.js.map +1 -0
  1127. package/dist/projection/experimental/projections/laea.d.ts +3 -0
  1128. package/dist/projection/experimental/projections/laea.d.ts.map +1 -0
  1129. package/dist/projection/experimental/projections/laea.js +22 -0
  1130. package/dist/projection/experimental/projections/laea.js.map +1 -0
  1131. package/dist/projection/experimental/projections/lcc.d.ts +3 -0
  1132. package/dist/projection/experimental/projections/lcc.d.ts.map +1 -0
  1133. package/dist/projection/experimental/projections/lcc.js +39 -0
  1134. package/dist/projection/experimental/projections/lcc.js.map +1 -0
  1135. package/dist/projection/experimental/projections/mercator.d.ts +4 -0
  1136. package/dist/projection/experimental/projections/mercator.d.ts.map +1 -0
  1137. package/dist/projection/experimental/projections/mercator.js +106 -0
  1138. package/dist/projection/experimental/projections/mercator.js.map +1 -0
  1139. package/dist/projection/experimental/projections/mill.d.ts +3 -0
  1140. package/dist/projection/experimental/projections/mill.d.ts.map +1 -0
  1141. package/dist/projection/experimental/projections/mill.js +22 -0
  1142. package/dist/projection/experimental/projections/mill.js.map +1 -0
  1143. package/dist/projection/experimental/projections/moll.d.ts +3 -0
  1144. package/dist/projection/experimental/projections/moll.d.ts.map +1 -0
  1145. package/dist/projection/experimental/projections/moll.js +22 -0
  1146. package/dist/projection/experimental/projections/moll.js.map +1 -0
  1147. package/dist/projection/experimental/projections/nzmg.d.ts +3 -0
  1148. package/dist/projection/experimental/projections/nzmg.d.ts.map +1 -0
  1149. package/dist/projection/experimental/projections/nzmg.js +29 -0
  1150. package/dist/projection/experimental/projections/nzmg.js.map +1 -0
  1151. package/dist/projection/experimental/projections/ob-tran.d.ts +4 -0
  1152. package/dist/projection/experimental/projections/ob-tran.d.ts.map +1 -0
  1153. package/dist/projection/experimental/projections/ob-tran.js +194 -0
  1154. package/dist/projection/experimental/projections/ob-tran.js.map +1 -0
  1155. package/dist/projection/experimental/projections/omerc.d.ts +3 -0
  1156. package/dist/projection/experimental/projections/omerc.d.ts.map +1 -0
  1157. package/dist/projection/experimental/projections/omerc.js +69 -0
  1158. package/dist/projection/experimental/projections/omerc.js.map +1 -0
  1159. package/dist/projection/experimental/projections/ortho.d.ts +3 -0
  1160. package/dist/projection/experimental/projections/ortho.d.ts.map +1 -0
  1161. package/dist/projection/experimental/projections/ortho.js +20 -0
  1162. package/dist/projection/experimental/projections/ortho.js.map +1 -0
  1163. package/dist/projection/experimental/projections/poly.d.ts +3 -0
  1164. package/dist/projection/experimental/projections/poly.d.ts.map +1 -0
  1165. package/dist/projection/experimental/projections/poly.js +22 -0
  1166. package/dist/projection/experimental/projections/poly.js.map +1 -0
  1167. package/dist/projection/experimental/projections/qsc.d.ts +3 -0
  1168. package/dist/projection/experimental/projections/qsc.d.ts.map +1 -0
  1169. package/dist/projection/experimental/projections/qsc.js +64 -0
  1170. package/dist/projection/experimental/projections/qsc.js.map +1 -0
  1171. package/dist/projection/experimental/projections/robin.d.ts +3 -0
  1172. package/dist/projection/experimental/projections/robin.d.ts.map +1 -0
  1173. package/dist/projection/experimental/projections/robin.js +22 -0
  1174. package/dist/projection/experimental/projections/robin.js.map +1 -0
  1175. package/dist/projection/experimental/projections/sinu.d.ts +3 -0
  1176. package/dist/projection/experimental/projections/sinu.d.ts.map +1 -0
  1177. package/dist/projection/experimental/projections/sinu.js +22 -0
  1178. package/dist/projection/experimental/projections/sinu.js.map +1 -0
  1179. package/dist/projection/experimental/projections/somerc.d.ts +3 -0
  1180. package/dist/projection/experimental/projections/somerc.d.ts.map +1 -0
  1181. package/dist/projection/experimental/projections/somerc.js +22 -0
  1182. package/dist/projection/experimental/projections/somerc.js.map +1 -0
  1183. package/dist/projection/experimental/projections/stere.d.ts +3 -0
  1184. package/dist/projection/experimental/projections/stere.d.ts.map +1 -0
  1185. package/dist/projection/experimental/projections/stere.js +32 -0
  1186. package/dist/projection/experimental/projections/stere.js.map +1 -0
  1187. package/dist/projection/experimental/projections/sterea.d.ts +3 -0
  1188. package/dist/projection/experimental/projections/sterea.d.ts.map +1 -0
  1189. package/dist/projection/experimental/projections/sterea.js +32 -0
  1190. package/dist/projection/experimental/projections/sterea.js.map +1 -0
  1191. package/dist/projection/experimental/projections/tpers.d.ts +3 -0
  1192. package/dist/projection/experimental/projections/tpers.d.ts.map +1 -0
  1193. package/dist/projection/experimental/projections/tpers.js +31 -0
  1194. package/dist/projection/experimental/projections/tpers.js.map +1 -0
  1195. package/dist/projection/experimental/projections/transverse-mercator.d.ts +6 -0
  1196. package/dist/projection/experimental/projections/transverse-mercator.d.ts.map +1 -0
  1197. package/dist/projection/experimental/projections/transverse-mercator.js +48 -0
  1198. package/dist/projection/experimental/projections/transverse-mercator.js.map +1 -0
  1199. package/dist/projection/experimental/projections/utm.d.ts +3 -0
  1200. package/dist/projection/experimental/projections/utm.d.ts.map +1 -0
  1201. package/dist/projection/experimental/projections/utm.js +37 -0
  1202. package/dist/projection/experimental/projections/utm.js.map +1 -0
  1203. package/dist/projection/experimental/projections/vandg.d.ts +3 -0
  1204. package/dist/projection/experimental/projections/vandg.d.ts.map +1 -0
  1205. package/dist/projection/experimental/projections/vandg.js +22 -0
  1206. package/dist/projection/experimental/projections/vandg.js.map +1 -0
  1207. package/dist/projection/experimental/rendering-profile/angular-rendering-profile.d.ts +9 -0
  1208. package/dist/projection/experimental/rendering-profile/angular-rendering-profile.d.ts.map +1 -0
  1209. package/dist/projection/experimental/rendering-profile/angular-rendering-profile.js +79 -0
  1210. package/dist/projection/experimental/rendering-profile/angular-rendering-profile.js.map +1 -0
  1211. package/dist/projection/experimental/rendering-profile/azimuthal-rendering-bounds.d.ts +16 -0
  1212. package/dist/projection/experimental/rendering-profile/azimuthal-rendering-bounds.d.ts.map +1 -0
  1213. package/dist/projection/experimental/rendering-profile/azimuthal-rendering-bounds.js +91 -0
  1214. package/dist/projection/experimental/rendering-profile/azimuthal-rendering-bounds.js.map +1 -0
  1215. package/dist/projection/experimental/rendering-profile/geographic-bounds.d.ts +29 -0
  1216. package/dist/projection/experimental/rendering-profile/geographic-bounds.d.ts.map +1 -0
  1217. package/dist/projection/experimental/rendering-profile/geographic-bounds.js +127 -0
  1218. package/dist/projection/experimental/rendering-profile/geographic-bounds.js.map +1 -0
  1219. package/dist/projection/experimental/rendering-profile/geographic-rendering-profile.d.ts +4 -0
  1220. package/dist/projection/experimental/rendering-profile/geographic-rendering-profile.d.ts.map +1 -0
  1221. package/dist/projection/experimental/rendering-profile/geographic-rendering-profile.js +18 -0
  1222. package/dist/projection/experimental/rendering-profile/geographic-rendering-profile.js.map +1 -0
  1223. package/dist/projection/experimental/rendering-profile/geostationary-rendering-profile.d.ts +7 -0
  1224. package/dist/projection/experimental/rendering-profile/geostationary-rendering-profile.d.ts.map +1 -0
  1225. package/dist/projection/experimental/rendering-profile/geostationary-rendering-profile.js +86 -0
  1226. package/dist/projection/experimental/rendering-profile/geostationary-rendering-profile.js.map +1 -0
  1227. package/dist/projection/experimental/rendering-profile/identity-rendering-profile.d.ts +4 -0
  1228. package/dist/projection/experimental/rendering-profile/identity-rendering-profile.d.ts.map +1 -0
  1229. package/dist/projection/experimental/rendering-profile/identity-rendering-profile.js +13 -0
  1230. package/dist/projection/experimental/rendering-profile/identity-rendering-profile.js.map +1 -0
  1231. package/dist/projection/experimental/rendering-profile/rectangular-rendering-profile.d.ts +13 -0
  1232. package/dist/projection/experimental/rendering-profile/rectangular-rendering-profile.d.ts.map +1 -0
  1233. package/dist/projection/experimental/rendering-profile/rectangular-rendering-profile.js +76 -0
  1234. package/dist/projection/experimental/rendering-profile/rectangular-rendering-profile.js.map +1 -0
  1235. package/dist/projection/experimental/rendering-profile/regional-rendering-bounds.d.ts +29 -0
  1236. package/dist/projection/experimental/rendering-profile/regional-rendering-bounds.d.ts.map +1 -0
  1237. package/dist/projection/experimental/rendering-profile/regional-rendering-bounds.js +143 -0
  1238. package/dist/projection/experimental/rendering-profile/regional-rendering-bounds.js.map +1 -0
  1239. package/dist/projection/experimental/rendering-profile/rendering-bounds.d.ts +28 -0
  1240. package/dist/projection/experimental/rendering-profile/rendering-bounds.d.ts.map +1 -0
  1241. package/dist/projection/experimental/rendering-profile/rendering-bounds.js +111 -0
  1242. package/dist/projection/experimental/rendering-profile/rendering-bounds.js.map +1 -0
  1243. package/dist/projection/experimental/rendering-profile/rendering-profile.d.ts +11 -0
  1244. package/dist/projection/experimental/rendering-profile/rendering-profile.d.ts.map +1 -0
  1245. package/dist/projection/experimental/rendering-profile/rendering-profile.js +81 -0
  1246. package/dist/projection/experimental/rendering-profile/rendering-profile.js.map +1 -0
  1247. package/dist/projection/experimental/rendering-profile/spherical-rendering-domain.d.ts +24 -0
  1248. package/dist/projection/experimental/rendering-profile/spherical-rendering-domain.d.ts.map +1 -0
  1249. package/dist/projection/experimental/rendering-profile/spherical-rendering-domain.js +129 -0
  1250. package/dist/projection/experimental/rendering-profile/spherical-rendering-domain.js.map +1 -0
  1251. package/dist/projection/experimental/scalar-output.d.ts +8 -0
  1252. package/dist/projection/experimental/scalar-output.d.ts.map +1 -0
  1253. package/dist/projection/experimental/scalar-output.js +46 -0
  1254. package/dist/projection/experimental/scalar-output.js.map +1 -0
  1255. package/dist/projection/experimental/spatial-deformation.d.ts +6 -0
  1256. package/dist/projection/experimental/spatial-deformation.d.ts.map +1 -0
  1257. package/dist/projection/experimental/spatial-deformation.js +85 -0
  1258. package/dist/projection/experimental/spatial-deformation.js.map +1 -0
  1259. package/dist/projection/experimental/types.d.ts +156 -0
  1260. package/dist/projection/experimental/types.d.ts.map +1 -0
  1261. package/dist/projection/experimental/types.js +5 -0
  1262. package/dist/projection/experimental/types.js.map +1 -0
  1263. package/dist/projection/experimental/typescript-projection.d.ts +76 -0
  1264. package/dist/projection/experimental/typescript-projection.d.ts.map +1 -0
  1265. package/dist/projection/experimental/typescript-projection.js +459 -0
  1266. package/dist/projection/experimental/typescript-projection.js.map +1 -0
  1267. package/dist/projection/experimental/vertical-datum.d.ts +4 -0
  1268. package/dist/projection/experimental/vertical-datum.d.ts.map +1 -0
  1269. package/dist/projection/experimental/vertical-datum.js +43 -0
  1270. package/dist/projection/experimental/vertical-datum.js.map +1 -0
  1271. package/dist/projection/grids/velocity.cjs +92 -0
  1272. package/dist/projection/grids/velocity.cjs.map +6 -0
  1273. package/dist/projection/grids/velocity.d.ts +3 -0
  1274. package/dist/projection/grids/velocity.d.ts.map +1 -0
  1275. package/dist/projection/grids/velocity.js +5 -0
  1276. package/dist/projection/grids/velocity.js.map +1 -0
  1277. package/dist/projection/index.cjs +11504 -0
  1278. package/dist/projection/index.cjs.map +6 -0
  1279. package/dist/projection/index.d.ts +3 -0
  1280. package/dist/projection/index.d.ts.map +1 -0
  1281. package/dist/projection/index.js +6 -0
  1282. package/dist/projection/index.js.map +1 -0
  1283. package/dist/projection/lib/projection.d.ts +8 -0
  1284. package/dist/projection/lib/projection.d.ts.map +1 -0
  1285. package/dist/projection/lib/projection.js +115 -0
  1286. package/dist/projection/lib/projection.js.map +1 -0
  1287. package/dist/projection/numerical-derivative.d.ts +15 -0
  1288. package/dist/projection/numerical-derivative.d.ts.map +1 -0
  1289. package/dist/projection/numerical-derivative.js +47 -0
  1290. package/dist/projection/numerical-derivative.js.map +1 -0
  1291. package/dist/projection/operations.cjs +322 -0
  1292. package/dist/projection/operations.cjs.map +6 -0
  1293. package/dist/projection/operations.d.ts +89 -0
  1294. package/dist/projection/operations.d.ts.map +1 -0
  1295. package/dist/projection/operations.js +344 -0
  1296. package/dist/projection/operations.js.map +1 -0
  1297. package/dist/projection/pipeline.cjs +1961 -0
  1298. package/dist/projection/pipeline.cjs.map +6 -0
  1299. package/dist/projection/pipeline.d.ts +2 -0
  1300. package/dist/projection/pipeline.d.ts.map +1 -0
  1301. package/dist/projection/pipeline.js +5 -0
  1302. package/dist/projection/pipeline.js.map +1 -0
  1303. package/dist/projection/temporal.cjs +290 -0
  1304. package/dist/projection/temporal.cjs.map +6 -0
  1305. package/dist/projection/temporal.d.ts +31 -0
  1306. package/dist/projection/temporal.d.ts.map +1 -0
  1307. package/dist/projection/temporal.js +91 -0
  1308. package/dist/projection/temporal.js.map +1 -0
  1309. package/dist/projection/transform-analysis.cjs +1889 -0
  1310. package/dist/projection/transform-analysis.cjs.map +6 -0
  1311. package/dist/projection/transform-analysis.d.ts +43 -0
  1312. package/dist/projection/transform-analysis.d.ts.map +1 -0
  1313. package/dist/projection/transform-analysis.js +110 -0
  1314. package/dist/projection/transform-analysis.js.map +1 -0
  1315. package/dist/projection/types.cjs +18 -0
  1316. package/dist/projection/types.cjs.map +6 -0
  1317. package/dist/projection/types.d.ts +47 -0
  1318. package/dist/projection/types.d.ts.map +1 -0
  1319. package/dist/projection/types.js +5 -0
  1320. package/dist/projection/types.js.map +1 -0
  1321. package/dist/projection/web-mercator.cjs +171 -0
  1322. package/dist/projection/web-mercator.cjs.map +6 -0
  1323. package/dist/projection/web-mercator.d.ts +7 -0
  1324. package/dist/projection/web-mercator.d.ts.map +1 -0
  1325. package/dist/projection/web-mercator.js +113 -0
  1326. package/dist/projection/web-mercator.js.map +1 -0
  1327. package/dist/subdivide-globe-mesh.d.ts +20 -0
  1328. package/dist/subdivide-globe-mesh.d.ts.map +1 -0
  1329. package/dist/subdivide-globe-mesh.js +54 -0
  1330. package/dist/subdivide-globe-mesh.js.map +1 -0
  1331. package/dist/tile-matrix.cjs +94 -20
  1332. package/dist/tile-matrix.cjs.map +1 -1
  1333. package/dist/tile-matrix.d.ts +30 -8
  1334. package/dist/tile-matrix.d.ts.map +1 -1
  1335. package/dist/tile-matrix.js +125 -25
  1336. package/dist/tile-matrix.js.map +1 -1
  1337. package/dist/tiles.cjs +303 -0
  1338. package/dist/tiles.cjs.map +6 -0
  1339. package/dist/tiles.d.ts +5 -0
  1340. package/dist/tiles.d.ts.map +1 -0
  1341. package/dist/tiles.js +6 -0
  1342. package/dist/tiles.js.map +1 -0
  1343. package/dist/web-mercator.cjs +20 -0
  1344. package/dist/web-mercator.cjs.map +6 -0
  1345. package/dist/web-mercator.d.ts +2 -0
  1346. package/dist/web-mercator.d.ts.map +1 -0
  1347. package/dist/web-mercator.js +5 -0
  1348. package/dist/web-mercator.js.map +1 -0
  1349. package/dist/wkb/index.cjs +1050 -0
  1350. package/dist/wkb/index.cjs.map +6 -0
  1351. package/dist/wkb/index.d.ts +11 -0
  1352. package/dist/wkb/index.d.ts.map +1 -0
  1353. package/dist/wkb/index.js +9 -0
  1354. package/dist/wkb/index.js.map +1 -0
  1355. package/dist/wkb/types.d.ts +30 -0
  1356. package/dist/wkb/types.d.ts.map +1 -0
  1357. package/dist/wkb/types.js +34 -0
  1358. package/dist/wkb/types.js.map +1 -0
  1359. package/dist/wkb/wkb-builder.d.ts +91 -0
  1360. package/dist/wkb/wkb-builder.d.ts.map +1 -0
  1361. package/dist/wkb/wkb-builder.js +276 -0
  1362. package/dist/wkb/wkb-builder.js.map +1 -0
  1363. package/dist/wkb/wkb-reader.d.ts +74 -0
  1364. package/dist/wkb/wkb-reader.d.ts.map +1 -0
  1365. package/dist/wkb/wkb-reader.js +251 -0
  1366. package/dist/wkb/wkb-reader.js.map +1 -0
  1367. package/dist/wkb/wkb.d.ts +21 -0
  1368. package/dist/wkb/wkb.d.ts.map +1 -0
  1369. package/dist/wkb/wkb.js +204 -0
  1370. package/dist/wkb/wkb.js.map +1 -0
  1371. package/dist/wkb/wkt.d.ts +19 -0
  1372. package/dist/wkb/wkt.d.ts.map +1 -0
  1373. package/dist/wkb/wkt.js +321 -0
  1374. package/dist/wkb/wkt.js.map +1 -0
  1375. package/package.json +1053 -6
  1376. package/projection/APACHE-2.0-LICENSE.txt +55 -0
  1377. package/projection/PROJ-LICENSE.txt +37 -0
  1378. package/projection/PROJ4-LICENSE.md +29 -0
  1379. package/projection/THIRD-PARTY-NOTICES.md +163 -0
  1380. package/src/crs/crs-metadata.ts +63 -0
  1381. package/src/crs/crs.ts +36 -0
  1382. package/src/crs/index.ts +65 -0
  1383. package/src/crs/proj-string.ts +239 -0
  1384. package/src/crs/projjson-schema-constants.ts +9 -0
  1385. package/src/crs/projjson-types.ts +665 -0
  1386. package/src/crs/spatial-reference.ts +221 -0
  1387. package/src/crs/units-table.ts +51 -0
  1388. package/src/crs/wkt-crs.ts +790 -0
  1389. package/src/ellipsoid-helpers/ellipsoid-transform.ts +1 -1
  1390. package/src/ellipsoid-tangent-plane.ts +1 -1
  1391. package/src/ellipsoid.ts +1 -1
  1392. package/src/entries/ellipsoid.ts +8 -0
  1393. package/src/expressions.ts +34 -0
  1394. package/src/geoarrow/builder-entry.ts +18 -0
  1395. package/src/geoarrow/builder.ts +860 -0
  1396. package/src/geoarrow/codecs.ts +1274 -0
  1397. package/src/geoarrow/index.ts +100 -0
  1398. package/src/geoarrow/kernels.ts +1290 -0
  1399. package/src/geoarrow/layout.ts +899 -0
  1400. package/src/geoarrow/tessellate.ts +133 -0
  1401. package/src/geoarrow/tessellation-entry.ts +7 -0
  1402. package/src/geoarrow/types.ts +219 -0
  1403. package/src/geoarrow/views.ts +150 -0
  1404. package/src/geoarrow/wkb-entry.ts +13 -0
  1405. package/src/geoarrow/worker.ts +20 -0
  1406. package/src/globe.ts +14 -0
  1407. package/src/index.ts +3 -30
  1408. package/src/make-obb-from-region.ts +1 -1
  1409. package/src/projection/analysis.ts +284 -0
  1410. package/src/projection/bulk.ts +343 -0
  1411. package/src/projection/datums.ts +13 -0
  1412. package/src/projection/deformation.ts +5 -0
  1413. package/src/projection/experimental/catalogue-kernel.ts +65 -0
  1414. package/src/projection/experimental/common/adjust_lat.ts +11 -0
  1415. package/src/projection/experimental/common/adjust_lon.ts +14 -0
  1416. package/src/projection/experimental/common/asinhy.ts +14 -0
  1417. package/src/projection/experimental/common/asinz.ts +11 -0
  1418. package/src/projection/experimental/common/authlat.ts +9 -0
  1419. package/src/projection/experimental/common/authset.ts +25 -0
  1420. package/src/projection/experimental/common/clens.ts +20 -0
  1421. package/src/projection/experimental/common/clens_cmplx.ts +43 -0
  1422. package/src/projection/experimental/common/constants.ts +15 -0
  1423. package/src/projection/experimental/common/cosh.ts +10 -0
  1424. package/src/projection/experimental/common/e0fn.ts +8 -0
  1425. package/src/projection/experimental/common/e1fn.ts +8 -0
  1426. package/src/projection/experimental/common/e2fn.ts +8 -0
  1427. package/src/projection/experimental/common/e3fn.ts +8 -0
  1428. package/src/projection/experimental/common/fL.ts +10 -0
  1429. package/src/projection/experimental/common/gN.ts +9 -0
  1430. package/src/projection/experimental/common/gatg.ts +20 -0
  1431. package/src/projection/experimental/common/hypot.ts +13 -0
  1432. package/src/projection/experimental/common/imlfn.ts +23 -0
  1433. package/src/projection/experimental/common/invlatiso.ts +20 -0
  1434. package/src/projection/experimental/common/iqsfnz.ts +45 -0
  1435. package/src/projection/experimental/common/latiso.ts +21 -0
  1436. package/src/projection/experimental/common/log1py.ts +11 -0
  1437. package/src/projection/experimental/common/meridian-distance.ts +45 -0
  1438. package/src/projection/experimental/common/mlfn.ts +8 -0
  1439. package/src/projection/experimental/common/msfnz.ts +9 -0
  1440. package/src/projection/experimental/common/phi2z.ts +22 -0
  1441. package/src/projection/experimental/common/pj_enfn.ts +29 -0
  1442. package/src/projection/experimental/common/pj_inv_mlfn.ts +28 -0
  1443. package/src/projection/experimental/common/pj_mlfn.ts +10 -0
  1444. package/src/projection/experimental/common/qsfnz.ts +17 -0
  1445. package/src/projection/experimental/common/sign.ts +8 -0
  1446. package/src/projection/experimental/common/sinh.ts +10 -0
  1447. package/src/projection/experimental/common/srat.ts +8 -0
  1448. package/src/projection/experimental/common/tsfnz.ts +13 -0
  1449. package/src/projection/experimental/common/vincenty.ts +180 -0
  1450. package/src/projection/experimental/core.ts +77 -0
  1451. package/src/projection/experimental/crs/datum-catalog.ts +65 -0
  1452. package/src/projection/experimental/crs/datum-table.ts +1360 -0
  1453. package/src/projection/experimental/crs/ellipsoid-table.ts +230 -0
  1454. package/src/projection/experimental/crs/normalize.ts +306 -0
  1455. package/src/projection/experimental/crs/primemeridian-table.ts +22 -0
  1456. package/src/projection/experimental/crs/projjson.ts +12 -0
  1457. package/src/projection/experimental/crs/spatial-reference.ts +115 -0
  1458. package/src/projection/experimental/crs/structured.ts +580 -0
  1459. package/src/projection/experimental/crs/types.ts +97 -0
  1460. package/src/projection/experimental/crs/wkt.ts +201 -0
  1461. package/src/projection/experimental/crs-descriptor.ts +250 -0
  1462. package/src/projection/experimental/crs-rendering-scale.ts +115 -0
  1463. package/src/projection/experimental/datum.ts +185 -0
  1464. package/src/projection/experimental/deformation-inverse.ts +125 -0
  1465. package/src/projection/experimental/deformation.ts +30 -0
  1466. package/src/projection/experimental/entries/projections/aea.ts +5 -0
  1467. package/src/projection/experimental/entries/projections/aeqd.ts +5 -0
  1468. package/src/projection/experimental/entries/projections/bonne.ts +5 -0
  1469. package/src/projection/experimental/entries/projections/cass.ts +5 -0
  1470. package/src/projection/experimental/entries/projections/cea.ts +5 -0
  1471. package/src/projection/experimental/entries/projections/eck6.ts +5 -0
  1472. package/src/projection/experimental/entries/projections/eqc.ts +5 -0
  1473. package/src/projection/experimental/entries/projections/eqdc.ts +5 -0
  1474. package/src/projection/experimental/entries/projections/eqearth.ts +5 -0
  1475. package/src/projection/experimental/entries/projections/equi.ts +5 -0
  1476. package/src/projection/experimental/entries/projections/etmerc.ts +5 -0
  1477. package/src/projection/experimental/entries/projections/geocent.ts +5 -0
  1478. package/src/projection/experimental/entries/projections/geos.ts +5 -0
  1479. package/src/projection/experimental/entries/projections/gnom.ts +5 -0
  1480. package/src/projection/experimental/entries/projections/gstmerc.ts +5 -0
  1481. package/src/projection/experimental/entries/projections/krovak.ts +5 -0
  1482. package/src/projection/experimental/entries/projections/laea.ts +5 -0
  1483. package/src/projection/experimental/entries/projections/lcc.ts +5 -0
  1484. package/src/projection/experimental/entries/projections/merc.ts +5 -0
  1485. package/src/projection/experimental/entries/projections/mill.ts +5 -0
  1486. package/src/projection/experimental/entries/projections/moll.ts +5 -0
  1487. package/src/projection/experimental/entries/projections/nzmg.ts +5 -0
  1488. package/src/projection/experimental/entries/projections/ob_tran.ts +5 -0
  1489. package/src/projection/experimental/entries/projections/omerc.ts +5 -0
  1490. package/src/projection/experimental/entries/projections/ortho.ts +5 -0
  1491. package/src/projection/experimental/entries/projections/poly.ts +5 -0
  1492. package/src/projection/experimental/entries/projections/qsc.ts +5 -0
  1493. package/src/projection/experimental/entries/projections/robin.ts +5 -0
  1494. package/src/projection/experimental/entries/projections/sinu.ts +5 -0
  1495. package/src/projection/experimental/entries/projections/somerc.ts +5 -0
  1496. package/src/projection/experimental/entries/projections/stere.ts +5 -0
  1497. package/src/projection/experimental/entries/projections/sterea.ts +5 -0
  1498. package/src/projection/experimental/entries/projections/tmerc.ts +5 -0
  1499. package/src/projection/experimental/entries/projections/tpers.ts +5 -0
  1500. package/src/projection/experimental/entries/projections/utm.ts +5 -0
  1501. package/src/projection/experimental/entries/projections/vandg.ts +5 -0
  1502. package/src/projection/experimental/exact-helmert.ts +58 -0
  1503. package/src/projection/experimental/flat-projection.ts +80 -0
  1504. package/src/projection/experimental/grids/geotiff.ts +88 -0
  1505. package/src/projection/experimental/grids/grid.ts +141 -0
  1506. package/src/projection/experimental/grids/gtx.ts +31 -0
  1507. package/src/projection/experimental/grids/ntv2.ts +71 -0
  1508. package/src/projection/experimental/grids/scalar-geotiff.ts +231 -0
  1509. package/src/projection/experimental/grids/types.ts +35 -0
  1510. package/src/projection/experimental/grids/velocity-geotiff.ts +82 -0
  1511. package/src/projection/experimental/grids/velocity.ts +58 -0
  1512. package/src/projection/experimental/grids/vertical-geotiff.ts +28 -0
  1513. package/src/projection/experimental/grids/vertical.ts +99 -0
  1514. package/src/projection/experimental/helmert-flat.ts +76 -0
  1515. package/src/projection/experimental/index.ts +59 -0
  1516. package/src/projection/experimental/kernel.ts +142 -0
  1517. package/src/projection/experimental/kernels/aea.ts +170 -0
  1518. package/src/projection/experimental/kernels/aeqd.ts +171 -0
  1519. package/src/projection/experimental/kernels/bonne.ts +141 -0
  1520. package/src/projection/experimental/kernels/cass.ts +140 -0
  1521. package/src/projection/experimental/kernels/cea.ts +71 -0
  1522. package/src/projection/experimental/kernels/eck6.ts +36 -0
  1523. package/src/projection/experimental/kernels/eqdc.ts +137 -0
  1524. package/src/projection/experimental/kernels/eqearth.ts +136 -0
  1525. package/src/projection/experimental/kernels/equi.ts +53 -0
  1526. package/src/projection/experimental/kernels/etmerc.ts +190 -0
  1527. package/src/projection/experimental/kernels/gauss.ts +79 -0
  1528. package/src/projection/experimental/kernels/geos.ts +183 -0
  1529. package/src/projection/experimental/kernels/gnom.ts +113 -0
  1530. package/src/projection/experimental/kernels/gstmerc.ts +74 -0
  1531. package/src/projection/experimental/kernels/krovak.ts +166 -0
  1532. package/src/projection/experimental/kernels/laea.ts +297 -0
  1533. package/src/projection/experimental/kernels/lcc.ts +147 -0
  1534. package/src/projection/experimental/kernels/mill.ts +60 -0
  1535. package/src/projection/experimental/kernels/moll.ts +105 -0
  1536. package/src/projection/experimental/kernels/nzmg.ts +249 -0
  1537. package/src/projection/experimental/kernels/omerc.ts +343 -0
  1538. package/src/projection/experimental/kernels/ortho.ts +106 -0
  1539. package/src/projection/experimental/kernels/poly.ts +156 -0
  1540. package/src/projection/experimental/kernels/qsc.ts +369 -0
  1541. package/src/projection/experimental/kernels/robin.ts +189 -0
  1542. package/src/projection/experimental/kernels/sinu.ts +116 -0
  1543. package/src/projection/experimental/kernels/somerc.ts +112 -0
  1544. package/src/projection/experimental/kernels/stere.ts +221 -0
  1545. package/src/projection/experimental/kernels/sterea.ts +80 -0
  1546. package/src/projection/experimental/kernels/tmerc.ts +227 -0
  1547. package/src/projection/experimental/kernels/tpers.ts +187 -0
  1548. package/src/projection/experimental/kernels/vandg.ts +147 -0
  1549. package/src/projection/experimental/kinematic-helmert-flat.ts +85 -0
  1550. package/src/projection/experimental/kinematic-helmert.ts +132 -0
  1551. package/src/projection/experimental/lazy-projection.ts +179 -0
  1552. package/src/projection/experimental/lazy-projections/aea.ts +10 -0
  1553. package/src/projection/experimental/lazy-projections/aeqd.ts +12 -0
  1554. package/src/projection/experimental/lazy-projections/bonne.ts +10 -0
  1555. package/src/projection/experimental/lazy-projections/cass.ts +10 -0
  1556. package/src/projection/experimental/lazy-projections/cea.ts +12 -0
  1557. package/src/projection/experimental/lazy-projections/eck6.ts +10 -0
  1558. package/src/projection/experimental/lazy-projections/eqc.ts +15 -0
  1559. package/src/projection/experimental/lazy-projections/eqdc.ts +11 -0
  1560. package/src/projection/experimental/lazy-projections/eqearth.ts +10 -0
  1561. package/src/projection/experimental/lazy-projections/equi.ts +10 -0
  1562. package/src/projection/experimental/lazy-projections/etmerc.ts +12 -0
  1563. package/src/projection/experimental/lazy-projections/geocent.ts +10 -0
  1564. package/src/projection/experimental/lazy-projections/geos.ts +10 -0
  1565. package/src/projection/experimental/lazy-projections/gnom.ts +10 -0
  1566. package/src/projection/experimental/lazy-projections/gstmerc.ts +13 -0
  1567. package/src/projection/experimental/lazy-projections/index.ts +41 -0
  1568. package/src/projection/experimental/lazy-projections/krovak.ts +18 -0
  1569. package/src/projection/experimental/lazy-projections/laea.ts +12 -0
  1570. package/src/projection/experimental/lazy-projections/lcc.ts +22 -0
  1571. package/src/projection/experimental/lazy-projections/merc.ts +19 -0
  1572. package/src/projection/experimental/lazy-projections/mill.ts +11 -0
  1573. package/src/projection/experimental/lazy-projections/moll.ts +10 -0
  1574. package/src/projection/experimental/lazy-projections/nzmg.ts +11 -0
  1575. package/src/projection/experimental/lazy-projections/ob_tran.ts +25 -0
  1576. package/src/projection/experimental/lazy-projections/omerc.ts +22 -0
  1577. package/src/projection/experimental/lazy-projections/ortho.ts +10 -0
  1578. package/src/projection/experimental/lazy-projections/poly.ts +10 -0
  1579. package/src/projection/experimental/lazy-projections/qsc.ts +16 -0
  1580. package/src/projection/experimental/lazy-projections/robin.ts +10 -0
  1581. package/src/projection/experimental/lazy-projections/sinu.ts +10 -0
  1582. package/src/projection/experimental/lazy-projections/somerc.ts +12 -0
  1583. package/src/projection/experimental/lazy-projections/stere.ts +18 -0
  1584. package/src/projection/experimental/lazy-projections/sterea.ts +20 -0
  1585. package/src/projection/experimental/lazy-projections/tmerc.ts +22 -0
  1586. package/src/projection/experimental/lazy-projections/tpers.ts +11 -0
  1587. package/src/projection/experimental/lazy-projections/utm.ts +12 -0
  1588. package/src/projection/experimental/lazy-projections/vandg.ts +10 -0
  1589. package/src/projection/experimental/mutable-projection.ts +63 -0
  1590. package/src/projection/experimental/numeric-flat.ts +73 -0
  1591. package/src/projection/experimental/parameters.ts +36 -0
  1592. package/src/projection/experimental/projection-descriptor.ts +79 -0
  1593. package/src/projection/experimental/projection-engine.ts +81 -0
  1594. package/src/projection/experimental/projection-pipeline.ts +1047 -0
  1595. package/src/projection/experimental/projection-scratch.ts +26 -0
  1596. package/src/projection/experimental/projections/aea.ts +41 -0
  1597. package/src/projection/experimental/projections/aeqd.ts +27 -0
  1598. package/src/projection/experimental/projections/bonne.ts +38 -0
  1599. package/src/projection/experimental/projections/cass.ts +39 -0
  1600. package/src/projection/experimental/projections/cea.ts +31 -0
  1601. package/src/projection/experimental/projections/eck6.ts +30 -0
  1602. package/src/projection/experimental/projections/eqdc.ts +40 -0
  1603. package/src/projection/experimental/projections/eqearth.ts +72 -0
  1604. package/src/projection/experimental/projections/equi.ts +31 -0
  1605. package/src/projection/experimental/projections/equidistant-cylindrical.ts +79 -0
  1606. package/src/projection/experimental/projections/geocentric.ts +42 -0
  1607. package/src/projection/experimental/projections/geos.ts +46 -0
  1608. package/src/projection/experimental/projections/gnom.ts +34 -0
  1609. package/src/projection/experimental/projections/gstmerc.ts +43 -0
  1610. package/src/projection/experimental/projections/krovak.ts +61 -0
  1611. package/src/projection/experimental/projections/laea.ts +39 -0
  1612. package/src/projection/experimental/projections/lcc.ts +67 -0
  1613. package/src/projection/experimental/projections/mercator.ts +150 -0
  1614. package/src/projection/experimental/projections/mill.ts +30 -0
  1615. package/src/projection/experimental/projections/moll.ts +30 -0
  1616. package/src/projection/experimental/projections/nzmg.ts +47 -0
  1617. package/src/projection/experimental/projections/ob-tran.ts +279 -0
  1618. package/src/projection/experimental/projections/omerc.ts +86 -0
  1619. package/src/projection/experimental/projections/ortho.ts +34 -0
  1620. package/src/projection/experimental/projections/poly.ts +40 -0
  1621. package/src/projection/experimental/projections/qsc.ts +84 -0
  1622. package/src/projection/experimental/projections/robin.ts +30 -0
  1623. package/src/projection/experimental/projections/sinu.ts +30 -0
  1624. package/src/projection/experimental/projections/somerc.ts +39 -0
  1625. package/src/projection/experimental/projections/stere.ts +59 -0
  1626. package/src/projection/experimental/projections/sterea.ts +61 -0
  1627. package/src/projection/experimental/projections/tpers.ts +59 -0
  1628. package/src/projection/experimental/projections/transverse-mercator.ts +89 -0
  1629. package/src/projection/experimental/projections/utm.ts +50 -0
  1630. package/src/projection/experimental/projections/vandg.ts +30 -0
  1631. package/src/projection/experimental/rendering-profile/angular-rendering-profile.ts +117 -0
  1632. package/src/projection/experimental/rendering-profile/azimuthal-rendering-bounds.ts +181 -0
  1633. package/src/projection/experimental/rendering-profile/geographic-bounds.ts +190 -0
  1634. package/src/projection/experimental/rendering-profile/geographic-rendering-profile.ts +29 -0
  1635. package/src/projection/experimental/rendering-profile/geostationary-rendering-profile.ts +128 -0
  1636. package/src/projection/experimental/rendering-profile/identity-rendering-profile.ts +15 -0
  1637. package/src/projection/experimental/rendering-profile/rectangular-rendering-profile.ts +133 -0
  1638. package/src/projection/experimental/rendering-profile/regional-rendering-bounds.ts +252 -0
  1639. package/src/projection/experimental/rendering-profile/rendering-bounds.ts +163 -0
  1640. package/src/projection/experimental/rendering-profile/rendering-profile.ts +96 -0
  1641. package/src/projection/experimental/rendering-profile/spherical-rendering-domain.ts +175 -0
  1642. package/src/projection/experimental/scalar-output.ts +74 -0
  1643. package/src/projection/experimental/spatial-deformation.ts +115 -0
  1644. package/src/projection/experimental/types.ts +181 -0
  1645. package/src/projection/experimental/typescript-projection.ts +581 -0
  1646. package/src/projection/experimental/vertical-datum.ts +39 -0
  1647. package/src/projection/grids/velocity.ts +5 -0
  1648. package/src/projection/index.ts +6 -0
  1649. package/src/projection/lib/projection.ts +161 -0
  1650. package/src/projection/numerical-derivative.ts +50 -0
  1651. package/src/projection/operations.ts +479 -0
  1652. package/src/projection/pipeline.ts +4 -0
  1653. package/src/projection/temporal.ts +133 -0
  1654. package/src/projection/transform-analysis.ts +169 -0
  1655. package/src/projection/types.ts +79 -0
  1656. package/src/projection/web-mercator.ts +148 -0
  1657. package/src/subdivide-globe-mesh.ts +75 -0
  1658. package/src/tile-matrix.ts +205 -34
  1659. package/src/tiles.ts +28 -0
  1660. package/src/web-mercator.ts +5 -0
  1661. package/src/wkb/index.ts +38 -0
  1662. package/src/wkb/types.ts +54 -0
  1663. package/src/wkb/wkb-builder.ts +386 -0
  1664. package/src/wkb/wkb-reader.ts +401 -0
  1665. package/src/wkb/wkb.ts +255 -0
  1666. package/src/wkb/wkt.ts +375 -0
@@ -0,0 +1,2467 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // dist/geoarrow/wkb-entry.js
20
+ var wkb_entry_exports = {};
21
+ __export(wkb_entry_exports, {
22
+ decodeGeoArrowWKB: () => decodeGeoArrowWKB,
23
+ decodeGeoArrowWKT: () => decodeGeoArrowWKT,
24
+ encodeGeoArrowWKB: () => encodeGeoArrowWKB,
25
+ encodeGeoArrowWKT: () => encodeGeoArrowWKT,
26
+ getGeoArrowWKBVertexCount: () => getGeoArrowWKBVertexCount
27
+ });
28
+ module.exports = __toCommonJS(wkb_entry_exports);
29
+
30
+ // dist/wkb/types.js
31
+ function getWellKnownDimensionSize(dimension) {
32
+ switch (dimension) {
33
+ case "xy":
34
+ return 2;
35
+ case "xyz":
36
+ case "xym":
37
+ return 3;
38
+ case "xyzm":
39
+ return 4;
40
+ }
41
+ }
42
+ function inferWellKnownGeometryDimension(geometry) {
43
+ const size = getGeometryDimensionSize(geometry);
44
+ return size >= 4 ? "xyzm" : size === 3 ? "xyz" : "xy";
45
+ }
46
+ function getGeometryDimensionSize(geometry) {
47
+ if (geometry.type === "GeometryCollection") {
48
+ return Math.max(2, ...geometry.geometries.map(getGeometryDimensionSize));
49
+ }
50
+ return getCoordinateDimension(geometry.coordinates);
51
+ }
52
+ function getCoordinateDimension(value) {
53
+ if (value.length === 0)
54
+ return 2;
55
+ if (typeof value[0] === "number")
56
+ return value.length;
57
+ return Math.max(2, ...value.map((child) => getCoordinateDimension(child)));
58
+ }
59
+
60
+ // dist/wkb/wkb-reader.js
61
+ var GEOMETRY_TYPES = [
62
+ "Point",
63
+ "LineString",
64
+ "Polygon",
65
+ "MultiPoint",
66
+ "MultiLineString",
67
+ "MultiPolygon",
68
+ "GeometryCollection"
69
+ ];
70
+ function inspectWKBHeader(input, byteOffset = 0) {
71
+ return inspectWKBHeaderView(getDataView(input), byteOffset);
72
+ }
73
+ function visitWKB(input, visitor, options = {}) {
74
+ const view = getDataView(input);
75
+ const state = {
76
+ maximumDepth: validateLimit(options.maximumDepth, 64, "maximumDepth"),
77
+ maximumElements: validateLimit(options.maximumElements, 1e8, "maximumElements"),
78
+ elementCount: 0,
79
+ visitor
80
+ };
81
+ const byteLength = visitGeometry(view, 0, state, 0).byteOffset;
82
+ if (byteLength !== view.byteLength)
83
+ throw new Error("WKB contains trailing bytes");
84
+ return byteLength;
85
+ }
86
+ function visitGeometry(view, byteOffset, state, depth, expectedType) {
87
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
88
+ if (depth > state.maximumDepth)
89
+ throw new Error("WKB geometry nesting exceeds maximumDepth");
90
+ const header = inspectWKBHeaderView(view, byteOffset);
91
+ if (expectedType && header.geometryType !== expectedType) {
92
+ throw new Error(`WKB ${expectedType} collection contains a ${header.geometryType} child`);
93
+ }
94
+ byteOffset = header.bodyByteOffset;
95
+ switch (header.geometryType) {
96
+ case "Point":
97
+ (_b = (_a = state.visitor).geometry) == null ? void 0 : _b.call(_a, header, void 0, depth);
98
+ byteOffset = visitCoordinate(view, byteOffset, header, state.visitor, depth);
99
+ break;
100
+ case "LineString": {
101
+ const pointCount = readCount(view, byteOffset, header.littleEndian, state);
102
+ byteOffset += 4;
103
+ (_d = (_c = state.visitor).geometry) == null ? void 0 : _d.call(_c, header, pointCount, depth);
104
+ byteOffset = visitCoordinateSequence(view, byteOffset, pointCount, header, state, depth);
105
+ break;
106
+ }
107
+ case "Polygon": {
108
+ const ringCount = readCount(view, byteOffset, header.littleEndian, state);
109
+ byteOffset += 4;
110
+ (_f = (_e = state.visitor).geometry) == null ? void 0 : _f.call(_e, header, ringCount, depth);
111
+ for (let ringIndex = 0; ringIndex < ringCount; ringIndex++) {
112
+ const pointCount = readCount(view, byteOffset, header.littleEndian, state);
113
+ byteOffset += 4;
114
+ (_h = (_g = state.visitor).ring) == null ? void 0 : _h.call(_g, pointCount, ringIndex, depth);
115
+ byteOffset = visitCoordinateSequence(view, byteOffset, pointCount, header, state, depth);
116
+ }
117
+ break;
118
+ }
119
+ case "MultiPoint":
120
+ case "MultiLineString":
121
+ case "MultiPolygon":
122
+ case "GeometryCollection": {
123
+ const childCount = readCount(view, byteOffset, header.littleEndian, state);
124
+ byteOffset += 4;
125
+ (_j = (_i = state.visitor).geometry) == null ? void 0 : _j.call(_i, header, childCount, depth);
126
+ const childType = header.geometryType === "MultiPoint" ? "Point" : header.geometryType === "MultiLineString" ? "LineString" : header.geometryType === "MultiPolygon" ? "Polygon" : void 0;
127
+ for (let childIndex = 0; childIndex < childCount; childIndex++) {
128
+ byteOffset = visitGeometry(view, byteOffset, state, depth + 1, childType).byteOffset;
129
+ }
130
+ break;
131
+ }
132
+ }
133
+ return { byteOffset, header };
134
+ }
135
+ function visitCoordinateSequence(view, byteOffset, pointCount, header, state, depth) {
136
+ for (let pointIndex = 0; pointIndex < pointCount; pointIndex++) {
137
+ byteOffset = visitCoordinate(view, byteOffset, header, state.visitor, depth);
138
+ }
139
+ return byteOffset;
140
+ }
141
+ function visitCoordinate(view, byteOffset, header, visitor, depth) {
142
+ var _a;
143
+ const coordinateByteLength = getWellKnownDimensionSize(header.dimension) * 8;
144
+ assertRemaining(view, byteOffset, coordinateByteLength);
145
+ if (!visitor.coordinate)
146
+ return byteOffset + coordinateByteLength;
147
+ const x = view.getFloat64(byteOffset, header.littleEndian);
148
+ const y = view.getFloat64(byteOffset + 8, header.littleEndian);
149
+ const third = header.dimension === "xy" ? void 0 : view.getFloat64(byteOffset + 16, header.littleEndian);
150
+ const fourth = header.dimension === "xyzm" ? view.getFloat64(byteOffset + 24, header.littleEndian) : void 0;
151
+ const z = header.dimension === "xyz" || header.dimension === "xyzm" ? third : void 0;
152
+ const m = header.dimension === "xym" ? third : fourth;
153
+ (_a = visitor.coordinate) == null ? void 0 : _a.call(visitor, x, y, z, m, header.dimension, byteOffset, depth);
154
+ return byteOffset + coordinateByteLength;
155
+ }
156
+ function inspectWKBHeaderView(view, byteOffset) {
157
+ const startByteOffset = byteOffset;
158
+ assertRemaining(view, byteOffset, 5);
159
+ const byteOrder = view.getUint8(byteOffset++);
160
+ if (byteOrder !== 0 && byteOrder !== 1)
161
+ throw new Error("Invalid WKB byte order");
162
+ const littleEndian = byteOrder === 1;
163
+ const typeCode = view.getUint32(byteOffset, littleEndian);
164
+ byteOffset += 4;
165
+ const hasZ = Boolean(typeCode & 2147483648);
166
+ const hasM = Boolean(typeCode & 1073741824);
167
+ const hasSrid = Boolean(typeCode & 536870912);
168
+ let geometryCode = typeCode & 536870911;
169
+ let dimension;
170
+ if (geometryCode >= 3e3 && geometryCode < 4e3) {
171
+ dimension = "xyzm";
172
+ geometryCode -= 3e3;
173
+ } else if (geometryCode >= 2e3 && geometryCode < 3e3) {
174
+ dimension = "xym";
175
+ geometryCode -= 2e3;
176
+ } else if (geometryCode >= 1e3 && geometryCode < 2e3) {
177
+ dimension = "xyz";
178
+ geometryCode -= 1e3;
179
+ } else {
180
+ dimension = hasZ && hasM ? "xyzm" : hasZ ? "xyz" : hasM ? "xym" : "xy";
181
+ }
182
+ const geometryType = GEOMETRY_TYPES[geometryCode - 1];
183
+ if (!geometryType)
184
+ throw new Error(`Unsupported WKB geometry type ${geometryCode}`);
185
+ let srid;
186
+ if (hasSrid) {
187
+ assertRemaining(view, byteOffset, 4);
188
+ srid = view.getUint32(byteOffset, littleEndian);
189
+ byteOffset += 4;
190
+ }
191
+ const dialect = hasZ || hasM || hasSrid ? "ewkb" : dimension === "xy" ? "wkb" : "iso-wkb";
192
+ return {
193
+ geometryType,
194
+ dimension,
195
+ dialect,
196
+ littleEndian,
197
+ byteOffset: startByteOffset,
198
+ bodyByteOffset: byteOffset,
199
+ byteLength: byteOffset - startByteOffset,
200
+ ...srid === void 0 ? {} : { srid }
201
+ };
202
+ }
203
+ function readCount(view, byteOffset, littleEndian, state) {
204
+ assertRemaining(view, byteOffset, 4);
205
+ const count = view.getUint32(byteOffset, littleEndian);
206
+ state.elementCount += count;
207
+ if (state.elementCount > state.maximumElements) {
208
+ throw new Error("WKB element count exceeds maximumElements");
209
+ }
210
+ return count;
211
+ }
212
+ function getDataView(input) {
213
+ return ArrayBuffer.isView(input) ? new DataView(input.buffer, input.byteOffset, input.byteLength) : new DataView(input);
214
+ }
215
+ function assertRemaining(view, byteOffset, byteLength) {
216
+ if (byteOffset < 0 || byteOffset + byteLength > view.byteLength) {
217
+ throw new Error("Unexpected end of WKB");
218
+ }
219
+ }
220
+ function validateLimit(value, fallback, name) {
221
+ const limit = value ?? fallback;
222
+ if (!Number.isSafeInteger(limit) || limit < 0) {
223
+ throw new Error(`${name} must be a non-negative safe integer`);
224
+ }
225
+ return limit;
226
+ }
227
+
228
+ // dist/wkb/wkb-builder.js
229
+ var GEOMETRY_TYPE_CODES = {
230
+ Point: 1,
231
+ LineString: 2,
232
+ Polygon: 3,
233
+ MultiPoint: 4,
234
+ MultiLineString: 5,
235
+ MultiPolygon: 6,
236
+ GeometryCollection: 7
237
+ };
238
+ var WKBBuilder = class _WKBBuilder {
239
+ constructor(options) {
240
+ this.mode = options.mode;
241
+ this.dimension = options.dimension ?? "xy";
242
+ this.littleEndian = options.byteOrder !== "big-endian";
243
+ this.srid = options.srid;
244
+ this.transform = options.transform;
245
+ validateSrid(this.srid);
246
+ if (options.mode === "write") {
247
+ const dataView = getTargetDataView(options.target);
248
+ const byteOffset = options.byteOffset ?? 0;
249
+ if (!Number.isSafeInteger(byteOffset) || byteOffset < 0 || byteOffset > dataView.byteLength) {
250
+ throw new Error("WKBBuilder byteOffset is outside the target");
251
+ }
252
+ this.dataView = dataView;
253
+ this.startByteOffset = byteOffset;
254
+ this.endByteOffset = dataView.byteLength;
255
+ this.byteOffset = byteOffset;
256
+ } else {
257
+ this.dataView = null;
258
+ this.startByteOffset = 0;
259
+ this.endByteOffset = Number.POSITIVE_INFINITY;
260
+ this.byteOffset = 0;
261
+ }
262
+ }
263
+ /** Begins a geometry and writes its count field when required. */
264
+ beginGeometry(type, count) {
265
+ switch (type) {
266
+ case "Point":
267
+ this.beginPoint();
268
+ break;
269
+ case "LineString":
270
+ this.beginLineString(count ?? 0);
271
+ break;
272
+ case "Polygon":
273
+ this.beginPolygon(count ?? 0);
274
+ break;
275
+ case "MultiPoint":
276
+ this.beginMultiPoint(count ?? 0);
277
+ break;
278
+ case "MultiLineString":
279
+ this.beginMultiLineString(count ?? 0);
280
+ break;
281
+ case "MultiPolygon":
282
+ this.beginMultiPolygon(count ?? 0);
283
+ break;
284
+ case "GeometryCollection":
285
+ this.writeHeader("GeometryCollection");
286
+ this.writeUint32(count ?? 0);
287
+ break;
288
+ }
289
+ }
290
+ /** Begins one point geometry. */
291
+ beginPoint() {
292
+ this.writeHeader("Point");
293
+ }
294
+ /** Begins one linestring geometry. */
295
+ beginLineString(pointCount) {
296
+ this.writeHeader("LineString");
297
+ this.writeUint32(pointCount);
298
+ }
299
+ /** Begins one polygon geometry. */
300
+ beginPolygon(ringCount) {
301
+ this.writeHeader("Polygon");
302
+ this.writeUint32(ringCount);
303
+ }
304
+ /** Begins one linear ring inside a polygon. */
305
+ beginLinearRing(pointCount) {
306
+ this.writeUint32(pointCount);
307
+ }
308
+ /** Begins one multipoint geometry. */
309
+ beginMultiPoint(pointCount) {
310
+ this.writeHeader("MultiPoint");
311
+ this.writeUint32(pointCount);
312
+ }
313
+ /** Begins one multilinestring geometry. */
314
+ beginMultiLineString(lineCount) {
315
+ this.writeHeader("MultiLineString");
316
+ this.writeUint32(lineCount);
317
+ }
318
+ /** Begins one multipolygon geometry. */
319
+ beginMultiPolygon(polygonCount) {
320
+ this.writeHeader("MultiPolygon");
321
+ this.writeUint32(polygonCount);
322
+ }
323
+ /** Writes one coordinate using the builder's semantic dimension. */
324
+ writeCoordinate(x, y, z, m) {
325
+ let coordinate = makeCoordinate(this.dimension, x, y, z, m);
326
+ if (this.transform)
327
+ coordinate = this.transform(coordinate, this.dimension);
328
+ const coordinateSize = getDimensionSize(this.dimension);
329
+ for (let index = 0; index < coordinateSize; index++) {
330
+ this.writeFloat64(coordinate[index] ?? Number.NaN);
331
+ }
332
+ }
333
+ /** Temporarily changes the semantic dimension for a nested geometry. */
334
+ withDimension(dimension, callback) {
335
+ const previous = this.dimension;
336
+ this.dimension = dimension;
337
+ try {
338
+ return callback();
339
+ } finally {
340
+ this.dimension = previous;
341
+ }
342
+ }
343
+ /** Returns the number of bytes measured or written. */
344
+ finishGeometry() {
345
+ return this.byteOffset - this.startByteOffset;
346
+ }
347
+ /** Measures geometry callbacks and returns contiguous Binary offsets. */
348
+ static measureGeometryArray(geometryWriters, options = {}) {
349
+ var _a;
350
+ const valueOffsets = new Int32Array(geometryWriters.length + 1);
351
+ for (let geometryIndex = 0; geometryIndex < geometryWriters.length; geometryIndex++) {
352
+ const geometryWriter = geometryWriters[geometryIndex];
353
+ const byteLength = geometryWriter ? measureGeometry(geometryWriter, {
354
+ ...options,
355
+ dimension: ((_a = options.dimensionResolver) == null ? void 0 : _a.call(options, geometryIndex)) ?? options.dimension
356
+ }) : 0;
357
+ const nextOffset = valueOffsets[geometryIndex] + byteLength;
358
+ if (nextOffset > 2147483647)
359
+ throw new Error("WKB geometry array exceeds Int32 offsets");
360
+ valueOffsets[geometryIndex + 1] = nextOffset;
361
+ }
362
+ return valueOffsets;
363
+ }
364
+ /** Writes geometry callbacks into an existing contiguous values buffer. */
365
+ static writeGeometryArray(geometryWriters, valueOffsets, values, options = {}) {
366
+ var _a;
367
+ if (valueOffsets.length !== geometryWriters.length + 1) {
368
+ throw new Error("WKB valueOffsets length must equal geometry count plus one");
369
+ }
370
+ if (valueOffsets[valueOffsets.length - 1] > values.byteLength) {
371
+ throw new Error("WKB values buffer is smaller than its final offset");
372
+ }
373
+ for (let geometryIndex = 0; geometryIndex < geometryWriters.length; geometryIndex++) {
374
+ const geometryWriter = geometryWriters[geometryIndex];
375
+ if (!geometryWriter)
376
+ continue;
377
+ const builder = new _WKBBuilder({
378
+ mode: "write",
379
+ target: values,
380
+ byteOffset: valueOffsets[geometryIndex],
381
+ ...options,
382
+ dimension: ((_a = options.dimensionResolver) == null ? void 0 : _a.call(options, geometryIndex)) ?? options.dimension
383
+ });
384
+ geometryWriter(builder);
385
+ const byteLength = builder.finishGeometry();
386
+ if (valueOffsets[geometryIndex] + byteLength !== valueOffsets[geometryIndex + 1]) {
387
+ throw new Error("WKB measure and write passes produced different byte lengths");
388
+ }
389
+ }
390
+ return values;
391
+ }
392
+ /** Builds plain offsets, values, and validity buffers in two passes. */
393
+ static buildGeometryArray(geometryWriters, options = {}) {
394
+ const valueOffsets = _WKBBuilder.measureGeometryArray(geometryWriters, options);
395
+ const values = new Uint8Array(valueOffsets[valueOffsets.length - 1]);
396
+ _WKBBuilder.writeGeometryArray(geometryWriters, valueOffsets, values, options);
397
+ const { nullBitmap, nullCount } = makeNullBitmap(geometryWriters);
398
+ return {
399
+ valueOffsets,
400
+ values,
401
+ ...nullCount > 0 ? { nullBitmap } : {},
402
+ nullCount
403
+ };
404
+ }
405
+ writeHeader(geometryType) {
406
+ this.writeUint8(this.littleEndian ? 1 : 0);
407
+ this.writeUint32(getWKBTypeCode(geometryType, this.dimension, this.srid !== void 0));
408
+ if (this.srid !== void 0)
409
+ this.writeUint32(this.srid);
410
+ }
411
+ writeUint8(value) {
412
+ var _a;
413
+ this.ensureSize(1);
414
+ (_a = this.dataView) == null ? void 0 : _a.setUint8(this.byteOffset, value);
415
+ this.byteOffset++;
416
+ }
417
+ writeUint32(value) {
418
+ var _a;
419
+ if (!Number.isSafeInteger(value) || value < 0 || value > 4294967295) {
420
+ throw new Error("WKB count must be an unsigned 32-bit integer");
421
+ }
422
+ this.ensureSize(4);
423
+ (_a = this.dataView) == null ? void 0 : _a.setUint32(this.byteOffset, value, this.littleEndian);
424
+ this.byteOffset += 4;
425
+ }
426
+ writeFloat64(value) {
427
+ var _a;
428
+ this.ensureSize(8);
429
+ (_a = this.dataView) == null ? void 0 : _a.setFloat64(this.byteOffset, value, this.littleEndian);
430
+ this.byteOffset += 8;
431
+ }
432
+ ensureSize(byteLength) {
433
+ if (this.byteOffset + byteLength > this.endByteOffset) {
434
+ throw new Error("WKBBuilder target buffer overflow");
435
+ }
436
+ }
437
+ };
438
+ function measureGeometry(geometryWriter, options) {
439
+ const builder = new WKBBuilder({ mode: "measure", ...options });
440
+ geometryWriter(builder);
441
+ return builder.finishGeometry();
442
+ }
443
+ function getTargetDataView(target) {
444
+ return ArrayBuffer.isView(target) ? new DataView(target.buffer, target.byteOffset, target.byteLength) : new DataView(target);
445
+ }
446
+ function getWKBTypeCode(geometryType, dimension, hasSrid) {
447
+ const geometryCode = GEOMETRY_TYPE_CODES[geometryType];
448
+ if (hasSrid) {
449
+ const dimensionFlags = dimension === "xyz" ? 2147483648 : dimension === "xym" ? 1073741824 : dimension === "xyzm" ? 3221225472 : 0;
450
+ return (geometryCode | dimensionFlags | 536870912) >>> 0;
451
+ }
452
+ const dimensionOffset = dimension === "xyz" ? 1e3 : dimension === "xym" ? 2e3 : dimension === "xyzm" ? 3e3 : 0;
453
+ return geometryCode + dimensionOffset;
454
+ }
455
+ function makeCoordinate(dimension, x, y, z, m) {
456
+ switch (dimension) {
457
+ case "xy":
458
+ return [x, y];
459
+ case "xyz":
460
+ return [x, y, z ?? Number.NaN];
461
+ case "xym":
462
+ return [x, y, m ?? Number.NaN];
463
+ case "xyzm":
464
+ return [x, y, z ?? Number.NaN, m ?? Number.NaN];
465
+ }
466
+ }
467
+ function getDimensionSize(dimension) {
468
+ return dimension === "xy" ? 2 : dimension === "xyzm" ? 4 : 3;
469
+ }
470
+ function validateSrid(srid) {
471
+ if (srid !== void 0 && (!Number.isSafeInteger(srid) || srid < 0 || srid > 4294967295)) {
472
+ throw new Error("WKBBuilder srid must be an unsigned 32-bit integer");
473
+ }
474
+ }
475
+ function makeNullBitmap(geometryWriters) {
476
+ const nullBitmap = new Uint8Array(Math.ceil(geometryWriters.length / 8));
477
+ let nullCount = 0;
478
+ for (let geometryIndex = 0; geometryIndex < geometryWriters.length; geometryIndex++) {
479
+ if (geometryWriters[geometryIndex]) {
480
+ nullBitmap[geometryIndex >> 3] |= 1 << (geometryIndex & 7);
481
+ } else {
482
+ nullCount++;
483
+ }
484
+ }
485
+ return { nullBitmap, nullCount };
486
+ }
487
+
488
+ // dist/wkb/wkt.js
489
+ function parseWKT(text, options) {
490
+ const parser = new WKTParser(text);
491
+ const result = parser.parseGeometry("xy", options ?? {}, false);
492
+ parser.assertComplete();
493
+ return result.geometry;
494
+ }
495
+ function formatWKT(geometry, dimension) {
496
+ if (isWKTParseResult(geometry)) {
497
+ return dimension === void 0 ? formatWKTResult(geometry) : formatWKTGeometry(geometry.geometry, dimension);
498
+ }
499
+ return formatWKTGeometry(geometry, dimension ?? inferWellKnownGeometryDimension(geometry));
500
+ }
501
+ function formatWKTResult(result) {
502
+ return formatWKTGeometry(result.geometry, result.dimension, result.children);
503
+ }
504
+ function formatWKTGeometry(geometry, dimension, children) {
505
+ const dimensionToken = dimension === "xy" ? "" : " " + dimension.slice(2).toUpperCase();
506
+ if (geometry.type === "GeometryCollection") {
507
+ if (geometry.geometries.length === 0)
508
+ return "GEOMETRYCOLLECTION" + dimensionToken + " EMPTY";
509
+ const formattedChildren = children ? children.map(formatWKTResult) : geometry.geometries.map((child) => formatWKTGeometry(child, dimension));
510
+ return "GEOMETRYCOLLECTION" + dimensionToken + " (" + formattedChildren.join(", ") + ")";
511
+ }
512
+ const type = geometry.type.toUpperCase();
513
+ const isEmpty = geometry.type === "MultiPoint" ? geometry.coordinates.length === 0 : isEmptyCoordinates(geometry.coordinates);
514
+ if (isEmpty)
515
+ return type + dimensionToken + " EMPTY";
516
+ return type + dimensionToken + " " + formatCoordinateNesting(geometry.coordinates, getGeometryDepth(geometry.type), geometry.type === "MultiPoint");
517
+ }
518
+ function isWKTParseResult(value) {
519
+ return "geometry" in value && "dimension" in value;
520
+ }
521
+ var WKTParser = class {
522
+ constructor(text) {
523
+ this.index = 0;
524
+ this.tokens = tokenizeWKT(text);
525
+ }
526
+ parseGeometry(inheritedDimension, options, validateInheritedDimensions) {
527
+ const type = this.takeWord().toUpperCase();
528
+ let dimension = inheritedDimension;
529
+ let hasExplicitDimension = false;
530
+ if (["Z", "M", "ZM"].includes(this.peek().toUpperCase())) {
531
+ const token = this.take().toUpperCase();
532
+ dimension = token === "Z" ? "xyz" : token === "M" ? "xym" : "xyzm";
533
+ hasExplicitDimension = true;
534
+ }
535
+ const dimensionSize = getWellKnownDimensionSize(dimension);
536
+ if (this.peek().toUpperCase() === "EMPTY") {
537
+ this.take();
538
+ return { geometry: makeEmptyGeometry(type, dimensionSize), dimension };
539
+ }
540
+ if (type === "GEOMETRYCOLLECTION") {
541
+ this.expect("(");
542
+ const children = [];
543
+ if (this.peek() !== ")") {
544
+ do
545
+ children.push(this.parseGeometry(dimension, options, validateInheritedDimensions));
546
+ while (this.takeIf(","));
547
+ }
548
+ this.expect(")");
549
+ return {
550
+ geometry: { type: "GeometryCollection", geometries: children.map((child) => child.geometry) },
551
+ dimension,
552
+ children
553
+ };
554
+ }
555
+ const inferDimension = Boolean(options.inferDimensions && !hasExplicitDimension && inheritedDimension === "xy");
556
+ const coordinates = this.parseCoordinateNesting(getWKTDepth(type), inferDimension ? null : dimensionSize, type === "MULTIPOINT");
557
+ const coordinateValues = coordinates;
558
+ if (inferDimension) {
559
+ const inferredSize = inferCoordinateSize(coordinateValues);
560
+ if (inferredSize !== null)
561
+ dimension = getDimensionForSize(inferredSize);
562
+ } else if (hasExplicitDimension || validateInheritedDimensions) {
563
+ assertCoordinateSize(coordinateValues, dimensionSize);
564
+ }
565
+ return { geometry: makeGeometry(type, coordinates), dimension };
566
+ }
567
+ assertComplete() {
568
+ if (this.index !== this.tokens.length)
569
+ throw new Error(`Unexpected WKT token ${this.peek()}`);
570
+ }
571
+ parseCoordinateNesting(depth, dimensionSize, allowEmptyPoints = false) {
572
+ this.expect("(");
573
+ if (depth === 0) {
574
+ const coordinate = this.readCoordinate(dimensionSize);
575
+ this.expect(")");
576
+ return coordinate;
577
+ }
578
+ const values = [];
579
+ if (this.peek() !== ")") {
580
+ do {
581
+ if (allowEmptyPoints && depth === 1 && this.peek().toUpperCase() === "EMPTY") {
582
+ this.take();
583
+ values.push([]);
584
+ } else if (depth === 1 && this.peek() !== "(") {
585
+ values.push(this.readCoordinate(dimensionSize));
586
+ } else {
587
+ values.push(this.parseCoordinateNesting(depth - 1, dimensionSize));
588
+ }
589
+ } while (this.takeIf(","));
590
+ }
591
+ this.expect(")");
592
+ return values;
593
+ }
594
+ readCoordinate(dimensionSize) {
595
+ const values = [];
596
+ while ((dimensionSize === null || values.length < dimensionSize) && isNumberToken(this.peek())) {
597
+ values.push(Number(this.take()));
598
+ }
599
+ if (values.length < 2)
600
+ throw new Error("WKT coordinate requires at least two numbers");
601
+ if (values.length > 4)
602
+ throw new Error("WKT coordinates cannot contain more than four numbers");
603
+ return values;
604
+ }
605
+ peek() {
606
+ return this.tokens[this.index] || "";
607
+ }
608
+ take() {
609
+ if (this.index >= this.tokens.length)
610
+ throw new Error("Unexpected end of WKT");
611
+ return this.tokens[this.index++];
612
+ }
613
+ takeWord() {
614
+ const token = this.take();
615
+ if (!/^[A-Za-z_]+$/.test(token))
616
+ throw new Error(`Expected WKT geometry type, found ${token}`);
617
+ return token;
618
+ }
619
+ takeIf(token) {
620
+ if (this.peek() !== token)
621
+ return false;
622
+ this.index++;
623
+ return true;
624
+ }
625
+ expect(token) {
626
+ const actual = this.take();
627
+ if (actual !== token)
628
+ throw new Error(`Expected WKT token ${token}, found ${actual}`);
629
+ }
630
+ };
631
+ function inferCoordinateSize(value) {
632
+ let coordinateSize = null;
633
+ const visit = (coordinates) => {
634
+ if (coordinates.length === 0)
635
+ return;
636
+ if (typeof coordinates[0] === "number") {
637
+ if (coordinates.length < 2 || coordinates.length > 4) {
638
+ throw new Error("WKT coordinates must contain between two and four numbers");
639
+ }
640
+ if (coordinateSize !== null && coordinateSize !== coordinates.length) {
641
+ throw new Error("WKT geometry contains inconsistent coordinate dimensions");
642
+ }
643
+ coordinateSize = coordinates.length;
644
+ return;
645
+ }
646
+ for (const child of coordinates)
647
+ visit(child);
648
+ };
649
+ visit(value);
650
+ return coordinateSize;
651
+ }
652
+ function assertCoordinateSize(value, expectedSize) {
653
+ const actualSize = inferCoordinateSize(value);
654
+ if (actualSize !== null && actualSize !== expectedSize) {
655
+ throw new Error("WKT coordinate dimension does not match declared dimension " + expectedSize);
656
+ }
657
+ }
658
+ function getDimensionForSize(size) {
659
+ switch (size) {
660
+ case 2:
661
+ return "xy";
662
+ case 3:
663
+ return "xyz";
664
+ case 4:
665
+ return "xyzm";
666
+ default:
667
+ throw new Error("Unsupported WKT coordinate dimension " + size);
668
+ }
669
+ }
670
+ function tokenizeWKT(text) {
671
+ const tokens = [];
672
+ const tokenPattern = /[A-Za-z_]+|[(),]|[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?/gy;
673
+ let index = 0;
674
+ while (index < text.length) {
675
+ while (index < text.length && /\s/.test(text[index]))
676
+ index++;
677
+ if (index === text.length)
678
+ break;
679
+ tokenPattern.lastIndex = index;
680
+ const match = tokenPattern.exec(text);
681
+ if (!match) {
682
+ throw new Error(`Unexpected WKT character ${JSON.stringify(text[index])} at ${index}`);
683
+ }
684
+ tokens.push(match[0]);
685
+ index = tokenPattern.lastIndex;
686
+ }
687
+ return tokens;
688
+ }
689
+ function formatCoordinateNesting(value, depth, allowEmptyPoints = false) {
690
+ if (depth === 0)
691
+ return `(${value.map(formatNumber).join(" ")})`;
692
+ return `(${value.map((child) => {
693
+ if (depth === 1) {
694
+ const coordinate = child;
695
+ if (allowEmptyPoints && isEmptyCoordinates(coordinate))
696
+ return "EMPTY";
697
+ return coordinate.map(formatNumber).join(" ");
698
+ }
699
+ return formatCoordinateNesting(child, depth - 1);
700
+ }).join(", ")})`;
701
+ }
702
+ function formatNumber(value) {
703
+ if (!Number.isFinite(value))
704
+ return "NaN";
705
+ return String(value);
706
+ }
707
+ function getGeometryDepth(type) {
708
+ switch (type) {
709
+ case "Point":
710
+ return 0;
711
+ case "LineString":
712
+ case "MultiPoint":
713
+ return 1;
714
+ case "Polygon":
715
+ case "MultiLineString":
716
+ return 2;
717
+ case "MultiPolygon":
718
+ return 3;
719
+ }
720
+ }
721
+ function getWKTDepth(type) {
722
+ switch (type) {
723
+ case "POINT":
724
+ return 0;
725
+ case "LINESTRING":
726
+ return 1;
727
+ case "POLYGON":
728
+ return 2;
729
+ case "MULTIPOINT":
730
+ return 1;
731
+ case "MULTILINESTRING":
732
+ return 2;
733
+ case "MULTIPOLYGON":
734
+ return 3;
735
+ default:
736
+ throw new Error(`Unsupported WKT geometry type ${type}`);
737
+ }
738
+ }
739
+ function makeGeometry(type, coordinates) {
740
+ const canonical = type[0] + type.slice(1).toLowerCase();
741
+ const names = {
742
+ Point: "Point",
743
+ Linestring: "LineString",
744
+ Polygon: "Polygon",
745
+ Multipoint: "MultiPoint",
746
+ Multilinestring: "MultiLineString",
747
+ Multipolygon: "MultiPolygon"
748
+ };
749
+ const geometryType = names[canonical];
750
+ if (!geometryType)
751
+ throw new Error(`Unsupported WKT geometry type ${type}`);
752
+ return { type: geometryType, coordinates };
753
+ }
754
+ function makeEmptyGeometry(type, dimensionSize) {
755
+ if (type === "GEOMETRYCOLLECTION")
756
+ return { type: "GeometryCollection", geometries: [] };
757
+ if (type === "POINT") {
758
+ return {
759
+ type: "Point",
760
+ coordinates: new Array(getValidDimensionSize(dimensionSize)).fill(Number.NaN)
761
+ };
762
+ }
763
+ return makeGeometry(type, []);
764
+ }
765
+ function getValidDimensionSize(size) {
766
+ if (size === 2 || size === 3 || size === 4)
767
+ return size;
768
+ return getWellKnownDimensionSize("xy");
769
+ }
770
+ function isEmptyCoordinates(value) {
771
+ if (value.length === 0)
772
+ return true;
773
+ if (typeof value[0] === "number") {
774
+ return value.every((component) => !Number.isFinite(component));
775
+ }
776
+ return value.every((child) => isEmptyCoordinates(child));
777
+ }
778
+ function isNumberToken(token) {
779
+ return token !== "" && Number.isFinite(Number(token));
780
+ }
781
+
782
+ // dist/geoarrow/types.js
783
+ function getGeoArrowDimensionSize(dimension) {
784
+ switch (dimension) {
785
+ case "xy":
786
+ return 2;
787
+ case "xyz":
788
+ case "xym":
789
+ return 3;
790
+ case "xyzm":
791
+ return 4;
792
+ }
793
+ }
794
+ function getGeoArrowGeometryType(encoding) {
795
+ switch (encoding) {
796
+ case "geoarrow.point":
797
+ return "Point";
798
+ case "geoarrow.linestring":
799
+ return "LineString";
800
+ case "geoarrow.polygon":
801
+ return "Polygon";
802
+ case "geoarrow.multipoint":
803
+ return "MultiPoint";
804
+ case "geoarrow.multilinestring":
805
+ return "MultiLineString";
806
+ case "geoarrow.multipolygon":
807
+ return "MultiPolygon";
808
+ case "geoarrow.geometrycollection":
809
+ return "GeometryCollection";
810
+ default:
811
+ return null;
812
+ }
813
+ }
814
+ function getGeoArrowEncodingForGeometry(type) {
815
+ return `geoarrow.${type.toLowerCase()}`;
816
+ }
817
+
818
+ // dist/geoarrow/builder.js
819
+ var GeoArrowBuilder = class _GeoArrowBuilder {
820
+ constructor(options) {
821
+ this.length = 0;
822
+ this.nullCount = 0;
823
+ this.coordinateCount = 0;
824
+ this.partCount = 0;
825
+ this.ringCount = 0;
826
+ this.eventStack = [];
827
+ this.mode = options.mode;
828
+ this.encoding = options.encoding;
829
+ this.dimension = options.dimension || "xy";
830
+ this.coordinateLayout = options.coordinateLayout || "interleaved";
831
+ this.offsetType = options.offsetType || "int32";
832
+ this.coordinateType = options.coordinateType || "float64";
833
+ this.target = options.mode === "write" ? options.target : void 0;
834
+ if (this.target)
835
+ this.initializeTargetOffsets(this.target);
836
+ }
837
+ /** Appends one geometry row or null. */
838
+ append(geometry) {
839
+ var _a, _b, _c, _d, _e, _f;
840
+ const rowIndex = this.length++;
841
+ if (!geometry) {
842
+ this.nullCount++;
843
+ this.appendNull(rowIndex);
844
+ return this;
845
+ }
846
+ const expectedType = getGeoArrowGeometryType(this.encoding);
847
+ if (geometry.type !== expectedType) {
848
+ throw new Error(`GeoArrowBuilder for ${this.encoding} cannot append ${geometry.type}`);
849
+ }
850
+ if (geometry.type === "GeometryCollection") {
851
+ throw new Error("GeoArrowBuilder only accepts concrete geometry families");
852
+ }
853
+ if (this.target)
854
+ setValidityBit(this.target.validity, rowIndex);
855
+ const depth = getBuilderDepth(this.encoding);
856
+ const coordinates = geometry.coordinates;
857
+ if (depth === 0) {
858
+ this.writeCoordinateValues(coordinates);
859
+ } else if (depth === 1) {
860
+ this.writeCoordinateList(coordinates);
861
+ this.writeOffset((_a = this.target) == null ? void 0 : _a.geometryOffsets, rowIndex + 1, this.coordinateCount);
862
+ } else if (depth === 2) {
863
+ for (const part of coordinates) {
864
+ this.writeCoordinateList(part);
865
+ this.partCount++;
866
+ this.writeOffset((_b = this.target) == null ? void 0 : _b.partOffsets, this.partCount, this.coordinateCount);
867
+ }
868
+ this.writeOffset((_c = this.target) == null ? void 0 : _c.geometryOffsets, rowIndex + 1, this.partCount);
869
+ } else {
870
+ for (const polygon of coordinates) {
871
+ for (const ring of polygon) {
872
+ this.writeCoordinateList(ring);
873
+ this.ringCount++;
874
+ this.writeOffset((_d = this.target) == null ? void 0 : _d.ringOffsets, this.ringCount, this.coordinateCount);
875
+ }
876
+ this.partCount++;
877
+ this.writeOffset((_e = this.target) == null ? void 0 : _e.partOffsets, this.partCount, this.ringCount);
878
+ }
879
+ this.writeOffset((_f = this.target) == null ? void 0 : _f.geometryOffsets, rowIndex + 1, this.partCount);
880
+ }
881
+ return this;
882
+ }
883
+ /** Returns current exact allocation counts. */
884
+ getMeasurement() {
885
+ const depth = getBuilderDepth(this.encoding);
886
+ return {
887
+ length: this.length,
888
+ nullCount: this.nullCount,
889
+ coordinateCount: this.coordinateCount,
890
+ geometryOffsetCount: depth >= 1 ? this.length + 1 : 0,
891
+ partOffsetCount: depth >= 2 ? this.partCount + 1 : 0,
892
+ ringOffsetCount: depth >= 3 ? this.ringCount + 1 : 0
893
+ };
894
+ }
895
+ /** Allocates a write target from the current measure pass. */
896
+ allocateTarget() {
897
+ if (this.mode !== "measure")
898
+ throw new Error("Only a measure builder can allocate a target");
899
+ return allocateGeoArrowBuilderTarget(this.getMeasurement(), {
900
+ encoding: this.encoding,
901
+ dimension: this.dimension,
902
+ coordinateLayout: this.coordinateLayout,
903
+ offsetType: this.offsetType,
904
+ coordinateType: this.coordinateType
905
+ });
906
+ }
907
+ /** Finishes a write pass and returns a one-chunk borrowed column. */
908
+ finish() {
909
+ if (!this.target)
910
+ throw new Error("A measure builder has no finished column");
911
+ const measurement = this.getMeasurement();
912
+ assertTargetCapacity(this.target, measurement, getGeoArrowDimensionSize(this.dimension));
913
+ const coordinates = makeCoordinateArray(this.target.coordinates, measurement.coordinateCount, this.dimension, this.coordinateLayout);
914
+ const depth = getBuilderDepth(this.encoding);
915
+ let chunk = coordinates;
916
+ if (depth >= 3) {
917
+ chunk = {
918
+ kind: "list",
919
+ length: this.ringCount,
920
+ offsets: this.target.ringOffsets,
921
+ child: chunk
922
+ };
923
+ }
924
+ if (depth >= 2) {
925
+ chunk = {
926
+ kind: "list",
927
+ length: this.partCount,
928
+ offsets: this.target.partOffsets,
929
+ child: chunk
930
+ };
931
+ }
932
+ if (depth >= 1) {
933
+ chunk = {
934
+ kind: "list",
935
+ length: this.length,
936
+ offsets: this.target.geometryOffsets,
937
+ child: chunk,
938
+ validity: { values: this.target.validity }
939
+ };
940
+ } else {
941
+ chunk = { ...chunk, validity: { values: this.target.validity } };
942
+ }
943
+ return {
944
+ encoding: this.encoding,
945
+ dimension: this.dimension,
946
+ coordinateLayout: this.coordinateLayout,
947
+ chunks: [chunk]
948
+ };
949
+ }
950
+ /** Builds a homogeneous column using an internal measure/write pair. */
951
+ static build(rows, options) {
952
+ const measure = new _GeoArrowBuilder({ ...options, mode: "measure" });
953
+ for (const row of rows)
954
+ measure.append(row);
955
+ const write = new _GeoArrowBuilder({
956
+ ...options,
957
+ mode: "write",
958
+ target: measure.allocateTarget()
959
+ });
960
+ for (const row of rows)
961
+ write.append(row);
962
+ return write.finish();
963
+ }
964
+ appendNull(rowIndex) {
965
+ var _a;
966
+ const depth = getBuilderDepth(this.encoding);
967
+ if (depth === 0) {
968
+ this.writeCoordinateValues(new Array(getGeoArrowDimensionSize(this.dimension)).fill(0));
969
+ } else {
970
+ this.writeOffset((_a = this.target) == null ? void 0 : _a.geometryOffsets, rowIndex + 1, depth === 1 ? this.coordinateCount : this.partCount);
971
+ }
972
+ }
973
+ writeCoordinateList(coordinates) {
974
+ for (const coordinate of coordinates)
975
+ this.writeCoordinateValues(coordinate);
976
+ }
977
+ writeCoordinateValues(coordinate) {
978
+ const size = getGeoArrowDimensionSize(this.dimension);
979
+ if (coordinate.length === 0 && (this.encoding === "geoarrow.point" || this.encoding === "geoarrow.multipoint")) {
980
+ coordinate = new Array(size).fill(Number.NaN);
981
+ }
982
+ if (coordinate.length !== size) {
983
+ throw new Error(`Expected ${size} coordinate values for ${this.dimension}`);
984
+ }
985
+ if (this.target)
986
+ writeCoordinate(this.target.coordinates, this.coordinateCount, coordinate, this.dimension);
987
+ this.coordinateCount++;
988
+ }
989
+ writeCoordinateComponents(x, y, z, m, sourceDimension) {
990
+ const targetZ = sourceDimension === "xyz" || sourceDimension === "xyzm" ? z ?? 0 : 0;
991
+ const targetM = sourceDimension === "xym" || sourceDimension === "xyzm" ? m ?? 0 : 0;
992
+ if (this.target) {
993
+ writeCoordinateComponents(this.target.coordinates, this.coordinateCount, x, y, targetZ, targetM, this.dimension);
994
+ }
995
+ this.coordinateCount++;
996
+ }
997
+ /** Begins an event-driven geometry. Events are accepted by both measure and write builders. */
998
+ beginGeometry(type, dimension = this.dimension, _count) {
999
+ const direct = getGeoArrowGeometryType(this.encoding) === type;
1000
+ const rowIndex = direct ? this.length++ : -1;
1001
+ this.eventStack.push({
1002
+ type,
1003
+ dimension,
1004
+ direct,
1005
+ rowIndex,
1006
+ ringStarted: false,
1007
+ polygonStarted: false,
1008
+ ...direct ? {} : { rings: [], polygons: [] },
1009
+ ...direct ? {} : { children: [] }
1010
+ });
1011
+ return this;
1012
+ }
1013
+ /** Begins a polygon part inside an event-built MultiPolygon. */
1014
+ beginPolygon() {
1015
+ const state = this.eventStack[this.eventStack.length - 1];
1016
+ if (!state || state.type !== "MultiPolygon") {
1017
+ throw new Error("beginPolygon must follow beginGeometry('MultiPolygon')");
1018
+ }
1019
+ if (state.direct) {
1020
+ this.finishEventRing(state);
1021
+ this.finishEventPolygon(state);
1022
+ state.polygonStarted = true;
1023
+ return this;
1024
+ }
1025
+ state.currentPolygon = [];
1026
+ state.polygons.push(state.currentPolygon);
1027
+ state.currentRing = void 0;
1028
+ return this;
1029
+ }
1030
+ /** Begins a ring/part in the current event geometry. */
1031
+ beginRing(_count) {
1032
+ const state = this.eventStack[this.eventStack.length - 1];
1033
+ if (!state)
1034
+ throw new Error("beginRing must follow beginGeometry");
1035
+ if (state.direct) {
1036
+ this.finishEventRing(state);
1037
+ state.ringStarted = true;
1038
+ return this;
1039
+ }
1040
+ state.currentRing = [];
1041
+ if (state.type === "MultiPolygon") {
1042
+ if (!state.currentPolygon)
1043
+ this.beginPolygon();
1044
+ state.currentPolygon.push(state.currentRing);
1045
+ } else {
1046
+ state.rings.push(state.currentRing);
1047
+ }
1048
+ return this;
1049
+ }
1050
+ /** Writes one coordinate into the current event ring or point. */
1051
+ writeCoordinate(x, y, z, m) {
1052
+ const state = this.eventStack[this.eventStack.length - 1];
1053
+ if (!state)
1054
+ throw new Error("writeCoordinate must follow beginGeometry");
1055
+ if (typeof x === "number" && state.direct) {
1056
+ this.writeCoordinateComponents(x, y, z, m, state.dimension);
1057
+ return this;
1058
+ }
1059
+ const coordinate = Array.isArray(x) ? [...x] : [x, y, ...z === void 0 ? [] : [z], ...m === void 0 ? [] : [m]];
1060
+ const size = getGeoArrowDimensionSize(state.dimension);
1061
+ if (coordinate.length !== size)
1062
+ throw new Error(`Expected ${size} coordinate values for ${state.dimension}`);
1063
+ if (state.direct) {
1064
+ this.writeCoordinateValues(resizeEventCoordinate(coordinate, state.dimension, this.dimension));
1065
+ return this;
1066
+ }
1067
+ if (state.type === "Point") {
1068
+ state.rings = [[coordinate]];
1069
+ return this;
1070
+ }
1071
+ if (!state.currentRing)
1072
+ this.beginRing();
1073
+ state.currentRing.push(coordinate);
1074
+ return this;
1075
+ }
1076
+ /** Writes scalar ordinates tagged with their source dimension without allocating a tuple. */
1077
+ writeCoordinateFromDimension(x, y, z, m, sourceDimension) {
1078
+ const state = this.eventStack[this.eventStack.length - 1];
1079
+ if (!state)
1080
+ throw new Error("writeCoordinateFromDimension must follow beginGeometry");
1081
+ if (state.direct) {
1082
+ this.writeCoordinateComponents(x, y, z, m, sourceDimension);
1083
+ return this;
1084
+ }
1085
+ const coordinate = getDimensionNames(state.dimension).map((name) => {
1086
+ if (name === "x")
1087
+ return x;
1088
+ if (name === "y")
1089
+ return y;
1090
+ if (name === "z")
1091
+ return sourceDimension === "xyz" || sourceDimension === "xyzm" ? z ?? 0 : 0;
1092
+ return sourceDimension === "xym" || sourceDimension === "xyzm" ? m ?? 0 : 0;
1093
+ });
1094
+ return this.writeCoordinate(coordinate);
1095
+ }
1096
+ /** Ends the current event geometry and appends it to the builder/parent. */
1097
+ endGeometry() {
1098
+ var _a, _b, _c;
1099
+ const state = this.eventStack.pop();
1100
+ if (!state)
1101
+ throw new Error("endGeometry without beginGeometry");
1102
+ if (state.direct) {
1103
+ this.finishEventRing(state);
1104
+ this.finishEventPolygon(state);
1105
+ const depth = getBuilderDepth(this.encoding);
1106
+ if (depth >= 1) {
1107
+ this.writeOffset((_a = this.target) == null ? void 0 : _a.geometryOffsets, state.rowIndex + 1, depth === 1 ? this.coordinateCount : this.partCount);
1108
+ }
1109
+ if (this.target)
1110
+ setValidityBit(this.target.validity, state.rowIndex);
1111
+ return this;
1112
+ }
1113
+ const coordinates = state.rings || [];
1114
+ let geometry;
1115
+ switch (state.type) {
1116
+ case "Point":
1117
+ geometry = { type: "Point", coordinates: ((_b = coordinates[0]) == null ? void 0 : _b[0]) || [] };
1118
+ break;
1119
+ case "LineString":
1120
+ geometry = { type: "LineString", coordinates: coordinates[0] || [] };
1121
+ break;
1122
+ case "MultiPoint":
1123
+ geometry = { type: "MultiPoint", coordinates: coordinates.flat() };
1124
+ break;
1125
+ case "Polygon":
1126
+ geometry = { type: "Polygon", coordinates };
1127
+ break;
1128
+ case "MultiLineString":
1129
+ geometry = { type: "MultiLineString", coordinates };
1130
+ break;
1131
+ case "MultiPolygon":
1132
+ geometry = {
1133
+ type: "MultiPolygon",
1134
+ coordinates: ((_c = state.polygons) == null ? void 0 : _c.length) ? state.polygons : [coordinates]
1135
+ };
1136
+ break;
1137
+ case "GeometryCollection":
1138
+ geometry = { type: "GeometryCollection", geometries: state.children || [] };
1139
+ break;
1140
+ }
1141
+ const parent = this.eventStack[this.eventStack.length - 1];
1142
+ if ((parent == null ? void 0 : parent.type) === "GeometryCollection")
1143
+ parent.children.push(geometry);
1144
+ else
1145
+ this.append(geometry);
1146
+ return this;
1147
+ }
1148
+ writeOffset(target, index, value) {
1149
+ if (!target)
1150
+ return;
1151
+ if (target instanceof BigInt64Array)
1152
+ target[index] = BigInt(value);
1153
+ else
1154
+ target[index] = value;
1155
+ }
1156
+ finishEventRing(state) {
1157
+ var _a, _b;
1158
+ if (!state.direct || !state.ringStarted)
1159
+ return;
1160
+ if (this.encoding === "geoarrow.multipolygon") {
1161
+ this.ringCount++;
1162
+ this.writeOffset((_a = this.target) == null ? void 0 : _a.ringOffsets, this.ringCount, this.coordinateCount);
1163
+ } else if (getBuilderDepth(this.encoding) >= 2) {
1164
+ this.partCount++;
1165
+ this.writeOffset((_b = this.target) == null ? void 0 : _b.partOffsets, this.partCount, this.coordinateCount);
1166
+ }
1167
+ state.ringStarted = false;
1168
+ }
1169
+ finishEventPolygon(state) {
1170
+ var _a;
1171
+ if (!state.direct || !state.polygonStarted)
1172
+ return;
1173
+ if (this.encoding === "geoarrow.multipolygon") {
1174
+ this.partCount++;
1175
+ this.writeOffset((_a = this.target) == null ? void 0 : _a.partOffsets, this.partCount, this.ringCount);
1176
+ }
1177
+ state.polygonStarted = false;
1178
+ }
1179
+ initializeTargetOffsets(target) {
1180
+ this.writeOffset(target.geometryOffsets, 0, 0);
1181
+ this.writeOffset(target.partOffsets, 0, 0);
1182
+ this.writeOffset(target.ringOffsets, 0, 0);
1183
+ }
1184
+ };
1185
+ function allocateGeoArrowBuilderTarget(measurement, options) {
1186
+ const dimension = options.dimension || "xy";
1187
+ const size = getGeoArrowDimensionSize(dimension);
1188
+ const FloatArray = options.coordinateType === "float32" ? Float32Array : Float64Array;
1189
+ const coordinateLayout = options.coordinateLayout || "interleaved";
1190
+ const coordinates = coordinateLayout === "interleaved" ? new FloatArray(measurement.coordinateCount * size) : makeSeparatedCoordinateTarget(FloatArray, measurement.coordinateCount, dimension);
1191
+ const OffsetArray = options.offsetType === "int64" ? BigInt64Array : Int32Array;
1192
+ return {
1193
+ validity: new Uint8Array(Math.ceil(measurement.length / 8)),
1194
+ coordinates,
1195
+ geometryOffsets: measurement.geometryOffsetCount ? new OffsetArray(measurement.geometryOffsetCount) : void 0,
1196
+ partOffsets: measurement.partOffsetCount ? new OffsetArray(measurement.partOffsetCount) : void 0,
1197
+ ringOffsets: measurement.ringOffsetCount ? new OffsetArray(measurement.ringOffsetCount) : void 0
1198
+ };
1199
+ }
1200
+ function makeGeoArrowColumnFromGeometryRows(rows, options = {}) {
1201
+ const geometryTypes = [...new Set(rows.filter(Boolean).map((row) => row.type))];
1202
+ const dimension = options.dimension || inferRowsDimension(rows);
1203
+ if (options.encoding === "geoarrow.geometry") {
1204
+ return {
1205
+ encoding: "geoarrow.geometry",
1206
+ dimension,
1207
+ coordinateLayout: options.coordinateLayout || "interleaved",
1208
+ chunks: [makeDenseUnionArray(rows, options, dimension)]
1209
+ };
1210
+ }
1211
+ if (geometryTypes.length === 0) {
1212
+ return GeoArrowBuilder.build(rows, { ...options, dimension, encoding: "geoarrow.point" });
1213
+ }
1214
+ if (geometryTypes.length === 1 && geometryTypes[0] !== "GeometryCollection") {
1215
+ return GeoArrowBuilder.build(rows, {
1216
+ ...options,
1217
+ dimension,
1218
+ encoding: getGeoArrowEncodingForGeometry(geometryTypes[0])
1219
+ });
1220
+ }
1221
+ if (geometryTypes.length === 1 && geometryTypes[0] === "GeometryCollection") {
1222
+ return {
1223
+ encoding: "geoarrow.geometrycollection",
1224
+ dimension,
1225
+ coordinateLayout: options.coordinateLayout || "interleaved",
1226
+ chunks: [makeGeometryCollectionArray(rows, options, dimension)]
1227
+ };
1228
+ }
1229
+ return {
1230
+ encoding: "geoarrow.geometry",
1231
+ dimension,
1232
+ coordinateLayout: options.coordinateLayout || "interleaved",
1233
+ chunks: [makeDenseUnionArray(rows, options, dimension)]
1234
+ };
1235
+ }
1236
+ function makeDenseUnionArray(rows, options, dimension) {
1237
+ const nonNullTypes = [...new Set(rows.filter(Boolean).map((row) => row.type))];
1238
+ const fallbackType = nonNullTypes[0] || "Point";
1239
+ const childRows = /* @__PURE__ */ new Map();
1240
+ for (const type of nonNullTypes.length ? nonNullTypes : [fallbackType])
1241
+ childRows.set(type, []);
1242
+ const typeIds = new Int8Array(rows.length);
1243
+ const valueOffsets = new Int32Array(rows.length);
1244
+ for (let rowIndex = 0; rowIndex < rows.length; rowIndex++) {
1245
+ const geometry = rows[rowIndex];
1246
+ const type = (geometry == null ? void 0 : geometry.type) || fallbackType;
1247
+ const values = childRows.get(type) || [];
1248
+ typeIds[rowIndex] = getGeometryTypeId(type, dimension);
1249
+ valueOffsets[rowIndex] = values.length;
1250
+ values.push(geometry);
1251
+ childRows.set(type, values);
1252
+ }
1253
+ const children = [...childRows.entries()].sort(([left], [right]) => getGeometryTypeId(left, dimension) - getGeometryTypeId(right, dimension)).map(([type, values]) => {
1254
+ const data = type === "GeometryCollection" ? makeGeometryCollectionArray(values, options, dimension) : GeoArrowBuilder.build(values, {
1255
+ ...options,
1256
+ dimension,
1257
+ encoding: getGeoArrowEncodingForGeometry(type)
1258
+ }).chunks[0];
1259
+ return {
1260
+ name: type,
1261
+ typeId: getGeometryTypeId(type, dimension),
1262
+ encoding: getGeoArrowEncodingForGeometry(type),
1263
+ dimension,
1264
+ coordinateLayout: options.coordinateLayout || "interleaved",
1265
+ data
1266
+ };
1267
+ });
1268
+ return {
1269
+ kind: "dense-union",
1270
+ length: rows.length,
1271
+ typeIds,
1272
+ valueOffsets,
1273
+ children
1274
+ };
1275
+ }
1276
+ function makeGeometryCollectionArray(rows, options, dimension) {
1277
+ const offsets = new Int32Array(rows.length + 1);
1278
+ const validity = new Uint8Array(Math.ceil(rows.length / 8));
1279
+ const flattened = [];
1280
+ for (let rowIndex = 0; rowIndex < rows.length; rowIndex++) {
1281
+ const row = rows[rowIndex];
1282
+ if ((row == null ? void 0 : row.type) === "GeometryCollection") {
1283
+ flattened.push(...row.geometries);
1284
+ setValidityBit(validity, rowIndex);
1285
+ }
1286
+ offsets[rowIndex + 1] = flattened.length;
1287
+ }
1288
+ return {
1289
+ kind: "list",
1290
+ length: rows.length,
1291
+ offsets,
1292
+ child: makeDenseUnionArray(flattened, options, dimension),
1293
+ validity: { values: validity }
1294
+ };
1295
+ }
1296
+ function makeCoordinateArray(coordinates, coordinateCount, dimension, layout) {
1297
+ const size = getGeoArrowDimensionSize(dimension);
1298
+ if (layout === "interleaved") {
1299
+ const values = coordinates;
1300
+ return {
1301
+ kind: "fixed-size-list",
1302
+ length: coordinateCount,
1303
+ size,
1304
+ child: { kind: "primitive", length: coordinateCount * size, values }
1305
+ };
1306
+ }
1307
+ const separated = coordinates;
1308
+ const children = {
1309
+ x: { kind: "primitive", length: coordinateCount, values: separated.x },
1310
+ y: { kind: "primitive", length: coordinateCount, values: separated.y }
1311
+ };
1312
+ if (separated.z) {
1313
+ children["z"] = { kind: "primitive", length: coordinateCount, values: separated.z };
1314
+ }
1315
+ if (separated.m) {
1316
+ children["m"] = { kind: "primitive", length: coordinateCount, values: separated.m };
1317
+ }
1318
+ return { kind: "struct", length: coordinateCount, children };
1319
+ }
1320
+ function makeSeparatedCoordinateTarget(FloatArray, count, dimension) {
1321
+ return {
1322
+ x: new FloatArray(count),
1323
+ y: new FloatArray(count),
1324
+ z: dimension === "xyz" || dimension === "xyzm" ? new FloatArray(count) : void 0,
1325
+ m: dimension === "xym" || dimension === "xyzm" ? new FloatArray(count) : void 0
1326
+ };
1327
+ }
1328
+ function writeCoordinate(target, coordinateIndex, coordinate, dimension) {
1329
+ if (target instanceof Float32Array || target instanceof Float64Array) {
1330
+ target.set(coordinate, coordinateIndex * coordinate.length);
1331
+ return;
1332
+ }
1333
+ target.x[coordinateIndex] = coordinate[0];
1334
+ target.y[coordinateIndex] = coordinate[1];
1335
+ if (dimension === "xyz")
1336
+ target.z[coordinateIndex] = coordinate[2];
1337
+ else if (dimension === "xym")
1338
+ target.m[coordinateIndex] = coordinate[2];
1339
+ else if (dimension === "xyzm") {
1340
+ target.z[coordinateIndex] = coordinate[2];
1341
+ target.m[coordinateIndex] = coordinate[3];
1342
+ }
1343
+ }
1344
+ function writeCoordinateComponents(target, coordinateIndex, x, y, z, m, dimension) {
1345
+ if (target instanceof Float32Array || target instanceof Float64Array) {
1346
+ const size = getGeoArrowDimensionSize(dimension);
1347
+ const offset = coordinateIndex * size;
1348
+ target[offset] = x;
1349
+ target[offset + 1] = y;
1350
+ if (dimension === "xyz")
1351
+ target[offset + 2] = z;
1352
+ else if (dimension === "xym")
1353
+ target[offset + 2] = m;
1354
+ else if (dimension === "xyzm") {
1355
+ target[offset + 2] = z;
1356
+ target[offset + 3] = m;
1357
+ }
1358
+ return;
1359
+ }
1360
+ target.x[coordinateIndex] = x;
1361
+ target.y[coordinateIndex] = y;
1362
+ if (dimension === "xyz")
1363
+ target.z[coordinateIndex] = z;
1364
+ else if (dimension === "xym")
1365
+ target.m[coordinateIndex] = m;
1366
+ else if (dimension === "xyzm") {
1367
+ target.z[coordinateIndex] = z;
1368
+ target.m[coordinateIndex] = m;
1369
+ }
1370
+ }
1371
+ function resizeEventCoordinate(coordinate, sourceDimension, targetDimension) {
1372
+ if (sourceDimension === targetDimension)
1373
+ return [...coordinate];
1374
+ const sourceNames = getDimensionNames(sourceDimension);
1375
+ return getDimensionNames(targetDimension).map((name) => {
1376
+ const index = sourceNames.indexOf(name);
1377
+ return index >= 0 ? coordinate[index] ?? 0 : 0;
1378
+ });
1379
+ }
1380
+ function getDimensionNames(dimension) {
1381
+ switch (dimension) {
1382
+ case "xy":
1383
+ return ["x", "y"];
1384
+ case "xyz":
1385
+ return ["x", "y", "z"];
1386
+ case "xym":
1387
+ return ["x", "y", "m"];
1388
+ case "xyzm":
1389
+ return ["x", "y", "z", "m"];
1390
+ }
1391
+ }
1392
+ function setValidityBit(validity, index) {
1393
+ validity[index >> 3] |= 1 << (index & 7);
1394
+ }
1395
+ function getBuilderDepth(encoding) {
1396
+ switch (encoding) {
1397
+ case "geoarrow.point":
1398
+ return 0;
1399
+ case "geoarrow.linestring":
1400
+ case "geoarrow.multipoint":
1401
+ return 1;
1402
+ case "geoarrow.polygon":
1403
+ case "geoarrow.multilinestring":
1404
+ return 2;
1405
+ case "geoarrow.multipolygon":
1406
+ return 3;
1407
+ }
1408
+ }
1409
+ function getGeometryTypeId(type, dimension = "xy") {
1410
+ const family = [
1411
+ "Point",
1412
+ "LineString",
1413
+ "Polygon",
1414
+ "MultiPoint",
1415
+ "MultiLineString",
1416
+ "MultiPolygon",
1417
+ "GeometryCollection"
1418
+ ].indexOf(type);
1419
+ const dimensionIndex = ["xy", "xyz", "xym", "xyzm"].indexOf(dimension);
1420
+ return family < 0 || dimensionIndex < 0 ? 1 : family * 4 + dimensionIndex + 1;
1421
+ }
1422
+ function inferRowsDimension(rows) {
1423
+ let size = 2;
1424
+ const visit = (value) => {
1425
+ if (!Array.isArray(value) || value.length === 0)
1426
+ return;
1427
+ if (typeof value[0] === "number")
1428
+ size = Math.max(size, value.length);
1429
+ else
1430
+ for (const child of value)
1431
+ visit(child);
1432
+ };
1433
+ const visitGeometry2 = (geometry) => {
1434
+ if (geometry.type === "GeometryCollection") {
1435
+ for (const child of geometry.geometries)
1436
+ visitGeometry2(child);
1437
+ } else {
1438
+ visit(geometry.coordinates);
1439
+ }
1440
+ };
1441
+ for (const row of rows) {
1442
+ if (row)
1443
+ visitGeometry2(row);
1444
+ }
1445
+ return size >= 4 ? "xyzm" : size === 3 ? "xyz" : "xy";
1446
+ }
1447
+ function assertTargetCapacity(target, measurement, size) {
1448
+ const coordinateLength = target.coordinates instanceof Float32Array || target.coordinates instanceof Float64Array ? target.coordinates.length / size : target.coordinates.x.length;
1449
+ if (coordinateLength < measurement.coordinateCount || target.validity.length * 8 < measurement.length) {
1450
+ throw new Error("GeoArrowBuilder target is smaller than its measured output");
1451
+ }
1452
+ }
1453
+
1454
+ // dist/geoarrow/layout.js
1455
+ function isGeoArrowValueValid(validity, index) {
1456
+ if (!validity)
1457
+ return true;
1458
+ const bitIndex = (validity.bitOffset || 0) + index;
1459
+ return Boolean(validity.values[bitIndex >> 3] & 1 << (bitIndex & 7));
1460
+ }
1461
+ function materializeGeometryRow(array, rowIndex, encoding) {
1462
+ if (!isGeoArrowValueValid(array.validity, rowIndex))
1463
+ return null;
1464
+ if (encoding === "geoarrow.geometry") {
1465
+ if (array.kind !== "dense-union")
1466
+ return null;
1467
+ return materializeUnionRow(array, rowIndex);
1468
+ }
1469
+ if (encoding === "geoarrow.geometrycollection") {
1470
+ if (array.kind !== "list")
1471
+ return null;
1472
+ const [first, last] = getListRange(array, rowIndex);
1473
+ const geometries = [];
1474
+ for (let index = first; index < last; index++) {
1475
+ if (array.child.kind !== "dense-union")
1476
+ continue;
1477
+ const geometry = materializeUnionRow(array.child, index);
1478
+ if (geometry)
1479
+ geometries.push(geometry);
1480
+ }
1481
+ return { type: "GeometryCollection", geometries };
1482
+ }
1483
+ const geometryType = getGeoArrowGeometryType(encoding);
1484
+ if (!geometryType || geometryType === "GeometryCollection")
1485
+ return null;
1486
+ const depth = getEncodingDepth(encoding);
1487
+ const coordinates = readNestedCoordinates(array, rowIndex, depth, geometryType === "Point" || geometryType === "MultiPoint");
1488
+ if (!coordinates)
1489
+ return null;
1490
+ return { type: geometryType, coordinates };
1491
+ }
1492
+ function getGeoArrowOffset(offsets, index) {
1493
+ const value = offsets[index];
1494
+ const numericValue = typeof value === "bigint" ? Number(value) : value;
1495
+ if (!Number.isSafeInteger(numericValue)) {
1496
+ throw new Error(`GeoArrow offset ${String(value)} exceeds JavaScript's safe integer range`);
1497
+ }
1498
+ return numericValue;
1499
+ }
1500
+ function getListRange(list, rowIndex) {
1501
+ const offsetIndex = (list.offset || 0) + rowIndex;
1502
+ const baseValue = list.offsetBase ?? 0;
1503
+ const base = typeof baseValue === "bigint" ? Number(baseValue) : baseValue;
1504
+ return [
1505
+ getGeoArrowOffset(list.offsets, offsetIndex) - base,
1506
+ getGeoArrowOffset(list.offsets, offsetIndex + 1) - base
1507
+ ];
1508
+ }
1509
+ function readNestedCoordinates(array, index, depth, normalizeEmptyPoints) {
1510
+ if (depth === 0) {
1511
+ const coordinate = readCoordinate(array, index);
1512
+ return normalizeEmptyPoints && (coordinate == null ? void 0 : coordinate.every((value) => !Number.isFinite(value))) ? [] : coordinate;
1513
+ }
1514
+ if (array.kind !== "list" || !isGeoArrowValueValid(array.validity, index))
1515
+ return null;
1516
+ const [first, last] = getListRange(array, index);
1517
+ const values = [];
1518
+ for (let childIndex = first; childIndex < last; childIndex++) {
1519
+ const value = readNestedCoordinates(array.child, childIndex, depth - 1, normalizeEmptyPoints);
1520
+ if (value !== null)
1521
+ values.push(value);
1522
+ }
1523
+ return values;
1524
+ }
1525
+ function readCoordinate(array, index) {
1526
+ if (!isGeoArrowValueValid(array.validity, index))
1527
+ return null;
1528
+ if (array.kind === "fixed-size-list") {
1529
+ const listIndex = (array.offset || 0) + index;
1530
+ const coordinate = [];
1531
+ for (let component = 0; component < array.size; component++) {
1532
+ coordinate.push(readPrimitive(array.child, listIndex * array.size + component));
1533
+ }
1534
+ return coordinate;
1535
+ }
1536
+ if (array.kind === "struct") {
1537
+ const structIndex = (array.offset || 0) + index;
1538
+ const coordinate = [];
1539
+ for (const name of ["x", "y", "z", "m"]) {
1540
+ const child = array.children[name];
1541
+ if (child)
1542
+ coordinate.push(readPrimitive(child, structIndex));
1543
+ }
1544
+ return coordinate.length >= 2 ? coordinate : null;
1545
+ }
1546
+ return null;
1547
+ }
1548
+ function readPrimitive(array, index) {
1549
+ if (array.kind !== "primitive")
1550
+ throw new Error("GeoArrow coordinate child must be primitive");
1551
+ if (!isGeoArrowValueValid(array.validity, index))
1552
+ return Number.NaN;
1553
+ const valueIndex = (array.offset || 0) + index * (array.stride || 1);
1554
+ return Number(array.values[valueIndex]);
1555
+ }
1556
+ function materializeUnionRow(union, rowIndex) {
1557
+ if (!isGeoArrowValueValid(union.validity, rowIndex))
1558
+ return null;
1559
+ const physicalIndex = (union.offset || 0) + rowIndex;
1560
+ const typeId = union.typeIds[physicalIndex];
1561
+ const valueOffset = union.valueOffsets[physicalIndex];
1562
+ const child = union.children.find((candidate) => candidate.typeId === typeId);
1563
+ if (!child || valueOffset < 0 || valueOffset >= child.data.length)
1564
+ return null;
1565
+ return materializeGeometryRow(child.data, valueOffset, child.encoding || getEncodingFromChildName(child.name));
1566
+ }
1567
+ function getEncodingFromChildName(name) {
1568
+ const normalized = name.replace(/[^a-z]/gi, "").toLowerCase();
1569
+ switch (normalized) {
1570
+ case "point":
1571
+ return "geoarrow.point";
1572
+ case "linestring":
1573
+ return "geoarrow.linestring";
1574
+ case "polygon":
1575
+ return "geoarrow.polygon";
1576
+ case "multipoint":
1577
+ return "geoarrow.multipoint";
1578
+ case "multilinestring":
1579
+ return "geoarrow.multilinestring";
1580
+ case "multipolygon":
1581
+ return "geoarrow.multipolygon";
1582
+ case "geometrycollection":
1583
+ return "geoarrow.geometrycollection";
1584
+ default:
1585
+ throw new Error(`Unknown GeoArrow dense-union child ${name}`);
1586
+ }
1587
+ }
1588
+ function getEncodingDepth(encoding) {
1589
+ switch (encoding) {
1590
+ case "geoarrow.point":
1591
+ return 0;
1592
+ case "geoarrow.linestring":
1593
+ case "geoarrow.multipoint":
1594
+ return 1;
1595
+ case "geoarrow.polygon":
1596
+ case "geoarrow.multilinestring":
1597
+ return 2;
1598
+ case "geoarrow.multipolygon":
1599
+ return 3;
1600
+ default:
1601
+ return 0;
1602
+ }
1603
+ }
1604
+
1605
+ // dist/geoarrow/codecs.js
1606
+ var textEncoder = new TextEncoder();
1607
+ var textDecoder = new TextDecoder();
1608
+ var NULL_FAMILY = 255;
1609
+ function decodeGeoArrowWKB(column, options = {}) {
1610
+ if (column.encoding !== "geoarrow.wkb")
1611
+ throw new Error("Expected a geoarrow.wkb column");
1612
+ const classifications = [];
1613
+ const schemaKeys = /* @__PURE__ */ new Set();
1614
+ const collectionSchemas = [];
1615
+ const rootFamilies = /* @__PURE__ */ new Set();
1616
+ let hasNulls = false;
1617
+ let inferredDimension = "xy";
1618
+ for (const chunk of column.chunks) {
1619
+ if (chunk.kind !== "serialized")
1620
+ throw new Error("Serialized column contains native storage");
1621
+ const families = new Uint8Array(chunk.length).fill(NULL_FAMILY);
1622
+ const dimensions = new Uint8Array(chunk.length);
1623
+ for (let rowIndex = 0; rowIndex < chunk.length; rowIndex++) {
1624
+ if (!isGeoArrowValueValid(chunk.validity, rowIndex)) {
1625
+ hasNulls = true;
1626
+ continue;
1627
+ }
1628
+ const bytes = getSerializedBytes(chunk, rowIndex);
1629
+ const rootHeader = inspectWKBHeader(bytes);
1630
+ const rootFamily = getGeometryFamilyIndex(rootHeader.geometryType);
1631
+ let rowDimension = rootHeader.dimension;
1632
+ if (rootHeader.geometryType === "GeometryCollection") {
1633
+ const collectionStack = [];
1634
+ let concreteRootDepth = -1;
1635
+ visitWKB(bytes, {
1636
+ geometry: (header, _count, depth) => {
1637
+ var _a;
1638
+ rowDimension = mergeDimensions(rowDimension, header.dimension);
1639
+ if (concreteRootDepth >= 0 && depth > concreteRootDepth)
1640
+ return;
1641
+ concreteRootDepth = -1;
1642
+ while (collectionStack.length && depth <= collectionStack[collectionStack.length - 1].depth) {
1643
+ collectionStack.pop();
1644
+ }
1645
+ const parent = collectionStack[collectionStack.length - 1];
1646
+ if (parent) {
1647
+ collectionSchemas[_a = parent.level] || (collectionSchemas[_a] = /* @__PURE__ */ new Set());
1648
+ collectionSchemas[parent.level].add(getGeometryTypeId2(header.geometryType, header.dimension));
1649
+ }
1650
+ if (header.geometryType === "GeometryCollection") {
1651
+ collectionStack.push({ depth, level: parent ? parent.level + 1 : 0 });
1652
+ } else if (parent) {
1653
+ concreteRootDepth = depth;
1654
+ }
1655
+ }
1656
+ }, options.traversal);
1657
+ }
1658
+ families[rowIndex] = rootFamily;
1659
+ dimensions[rowIndex] = getDimensionIndex(rowDimension);
1660
+ rootFamilies.add(rootFamily);
1661
+ schemaKeys.add(getGeometryTypeIdFromIndices(rootFamily, dimensions[rowIndex]));
1662
+ inferredDimension = mergeDimensions(inferredDimension, rowDimension);
1663
+ }
1664
+ classifications.push({ families, dimensions });
1665
+ }
1666
+ const dimension = resolveDecodeDimension(options.dimension, column.dimension, inferredDimension);
1667
+ const forceDimension = Boolean(options.dimension && options.dimension !== "infer");
1668
+ if (forceDimension) {
1669
+ schemaKeys.clear();
1670
+ for (const classification of classifications) {
1671
+ for (let rowIndex = 0; rowIndex < classification.families.length; rowIndex++) {
1672
+ const family = classification.families[rowIndex];
1673
+ if (family === NULL_FAMILY)
1674
+ continue;
1675
+ classification.dimensions[rowIndex] = getDimensionIndex(dimension);
1676
+ schemaKeys.add(getGeometryTypeIdFromIndices(family, getDimensionIndex(dimension)));
1677
+ }
1678
+ }
1679
+ }
1680
+ const encoding = resolveDecodeEncoding(options.encoding, rootFamilies);
1681
+ validateDecodeEncoding(encoding, rootFamilies);
1682
+ const builderOptions = {
1683
+ dimension,
1684
+ coordinateLayout: options.coordinateLayout || "interleaved",
1685
+ coordinateType: options.coordinateType || "float64",
1686
+ offsetType: options.offsetType || "int32"
1687
+ };
1688
+ if (encoding !== "geoarrow.geometry" && encoding !== "geoarrow.geometrycollection") {
1689
+ const chunks2 = column.chunks.map((chunk, chunkIndex) => decodeConcreteWKBChunk(chunk, classifications[chunkIndex], encoding, builderOptions, options.traversal));
1690
+ return copyMetadata(column, {
1691
+ encoding,
1692
+ dimension,
1693
+ coordinateLayout: builderOptions.coordinateLayout,
1694
+ chunks: chunks2
1695
+ });
1696
+ }
1697
+ if (encoding === "geoarrow.geometrycollection") {
1698
+ const stableCollectionSchemas = normalizeCollectionSchemas(collectionSchemas, dimension, forceDimension);
1699
+ const chunks2 = column.chunks.map((chunk, chunkIndex) => decodeGeometryCollectionWKBChunk(chunk, classifications[chunkIndex], void 0, stableCollectionSchemas, builderOptions, options.traversal, forceDimension ? dimension : void 0));
1700
+ return copyMetadata(column, {
1701
+ encoding,
1702
+ dimension,
1703
+ coordinateLayout: builderOptions.coordinateLayout,
1704
+ chunks: chunks2
1705
+ });
1706
+ }
1707
+ if (schemaKeys.size === 0)
1708
+ schemaKeys.add(getGeometryTypeId2("Point", dimension));
1709
+ if (hasNulls)
1710
+ schemaKeys.add(getGeometryTypeId2("Point", dimension));
1711
+ const stableSchema = [...schemaKeys].sort((left, right) => left - right);
1712
+ const chunks = column.chunks.map((chunk, chunkIndex) => decodeUnionWKBChunk(chunk, classifications[chunkIndex], stableSchema, normalizeCollectionSchemas(collectionSchemas, dimension, forceDimension), builderOptions, options.traversal, forceDimension ? dimension : void 0));
1713
+ return copyMetadata(column, {
1714
+ encoding: "geoarrow.geometry",
1715
+ dimension,
1716
+ coordinateLayout: builderOptions.coordinateLayout,
1717
+ chunks
1718
+ });
1719
+ }
1720
+ function getGeoArrowWKBVertexCount(column, traversal) {
1721
+ if (column.encoding !== "geoarrow.wkb")
1722
+ throw new Error("Expected a geoarrow.wkb column");
1723
+ let vertexCount = 0;
1724
+ for (const chunk of column.chunks) {
1725
+ if (chunk.kind !== "serialized")
1726
+ throw new Error("Serialized column contains native storage");
1727
+ for (let rowIndex = 0; rowIndex < chunk.length; rowIndex++) {
1728
+ if (!isGeoArrowValueValid(chunk.validity, rowIndex))
1729
+ continue;
1730
+ visitWKB(getSerializedBytes(chunk, rowIndex), {
1731
+ geometry: (header, count) => {
1732
+ if (header.geometryType === "Point")
1733
+ vertexCount++;
1734
+ else if (header.geometryType === "LineString")
1735
+ vertexCount += count || 0;
1736
+ },
1737
+ ring: (pointCount) => {
1738
+ vertexCount += pointCount;
1739
+ }
1740
+ }, traversal);
1741
+ }
1742
+ }
1743
+ return vertexCount;
1744
+ }
1745
+ function decodeConcreteWKBChunk(chunk, classification, encoding, options, traversal) {
1746
+ const measure = new GeoArrowBuilder({ ...options, encoding, mode: "measure" });
1747
+ replaySerializedChunk(chunk, classification, encoding, measure, traversal);
1748
+ const write = new GeoArrowBuilder({
1749
+ ...options,
1750
+ encoding,
1751
+ mode: "write",
1752
+ target: measure.allocateTarget()
1753
+ });
1754
+ replaySerializedChunk(chunk, classification, encoding, write, traversal);
1755
+ return write.finish().chunks[0];
1756
+ }
1757
+ function replaySerializedChunk(chunk, classification, encoding, builder, traversal) {
1758
+ const targetType = geometryTypeFromEncoding(encoding);
1759
+ for (let rowIndex = 0; rowIndex < chunk.length; rowIndex++) {
1760
+ if (classification.families[rowIndex] === NULL_FAMILY)
1761
+ builder.append(null);
1762
+ else
1763
+ visitWKBIntoBuilder(getSerializedBytes(chunk, rowIndex), builder, targetType, traversal);
1764
+ }
1765
+ }
1766
+ function decodeUnionWKBChunk(chunk, classification, stableSchema, collectionSchemas, options, traversal, childDimensionOverride) {
1767
+ const measureBuilders = /* @__PURE__ */ new Map();
1768
+ for (const key of stableSchema) {
1769
+ const type = getGeometryTypeFromId(key);
1770
+ if (type !== "GeometryCollection") {
1771
+ const encoding = encodingFromGeometryType(type);
1772
+ measureBuilders.set(key, new GeoArrowBuilder({
1773
+ ...options,
1774
+ encoding,
1775
+ dimension: getDimensionFromId(key),
1776
+ mode: "measure"
1777
+ }));
1778
+ }
1779
+ }
1780
+ const typeIds = new Int8Array(chunk.length);
1781
+ const valueOffsets = new Int32Array(chunk.length);
1782
+ const childCounts = /* @__PURE__ */ new Map();
1783
+ const nullKey = stableSchema[0];
1784
+ for (let rowIndex = 0; rowIndex < chunk.length; rowIndex++) {
1785
+ const family = classification.families[rowIndex];
1786
+ const key = family === NULL_FAMILY ? nullKey : getGeometryTypeIdFromIndices(family, classification.dimensions[rowIndex]);
1787
+ typeIds[rowIndex] = key;
1788
+ valueOffsets[rowIndex] = childCounts.get(key) || 0;
1789
+ childCounts.set(key, valueOffsets[rowIndex] + 1);
1790
+ const builder = measureBuilders.get(key);
1791
+ if (builder) {
1792
+ if (family === NULL_FAMILY)
1793
+ builder.append(null);
1794
+ else
1795
+ visitWKBIntoBuilder(getSerializedBytes(chunk, rowIndex), builder, getConcreteGeometryTypeFromId(key), traversal);
1796
+ }
1797
+ }
1798
+ const writeBuilders = /* @__PURE__ */ new Map();
1799
+ for (const key of stableSchema) {
1800
+ if (getGeometryTypeFromId(key) === "GeometryCollection")
1801
+ continue;
1802
+ const measure = measureBuilders.get(key);
1803
+ writeBuilders.set(key, new GeoArrowBuilder({
1804
+ ...options,
1805
+ encoding: encodingFromGeometryType(getConcreteGeometryTypeFromId(key)),
1806
+ dimension: getDimensionFromId(key),
1807
+ mode: "write",
1808
+ target: measure.allocateTarget()
1809
+ }));
1810
+ }
1811
+ for (let rowIndex = 0; rowIndex < chunk.length; rowIndex++) {
1812
+ const family = classification.families[rowIndex];
1813
+ const key = family === NULL_FAMILY ? nullKey : getGeometryTypeIdFromIndices(family, classification.dimensions[rowIndex]);
1814
+ const builder = writeBuilders.get(key);
1815
+ if (builder) {
1816
+ if (family === NULL_FAMILY)
1817
+ builder.append(null);
1818
+ else
1819
+ visitWKBIntoBuilder(getSerializedBytes(chunk, rowIndex), builder, getConcreteGeometryTypeFromId(key), traversal);
1820
+ }
1821
+ }
1822
+ const children = stableSchema.map((key) => {
1823
+ const type = getGeometryTypeFromId(key);
1824
+ if (type === "GeometryCollection") {
1825
+ return {
1826
+ name: type,
1827
+ typeId: key,
1828
+ encoding: "geoarrow.geometrycollection",
1829
+ dimension: getDimensionFromId(key),
1830
+ coordinateLayout: options.coordinateLayout,
1831
+ data: decodeGeometryCollectionWKBChunk(chunk, classification, key, collectionSchemas, { ...options, dimension: getDimensionFromId(key) }, traversal, childDimensionOverride)
1832
+ };
1833
+ }
1834
+ const built = writeBuilders.get(key).finish();
1835
+ return {
1836
+ name: getGeometryTypeFromId(key),
1837
+ typeId: key,
1838
+ encoding: built.encoding,
1839
+ dimension: built.dimension,
1840
+ coordinateLayout: built.coordinateLayout,
1841
+ data: built.chunks[0]
1842
+ };
1843
+ });
1844
+ return { kind: "dense-union", length: chunk.length, typeIds, valueOffsets, children };
1845
+ }
1846
+ function decodeGeometryCollectionWKBChunk(chunk, classification, selectorKey, schemas, options, traversal, childDimensionOverride) {
1847
+ const measureLevels = schemas.map((schema) => makeCollectionMeasureLevel(schema, options));
1848
+ if (measureLevels.length === 0)
1849
+ measureLevels.push(makeCollectionMeasureLevel([], options));
1850
+ forEachSelectedCollectionRow(chunk, classification, selectorKey, (bytes, valid) => {
1851
+ if (!valid) {
1852
+ measureLevels[0].rowCount++;
1853
+ return;
1854
+ }
1855
+ replayWKBCollection(bytes, measureLevels, void 0, options.dimension, traversal, childDimensionOverride);
1856
+ });
1857
+ const writeLevels = measureLevels.map((level) => makeCollectionWriteLevel(level, options));
1858
+ forEachSelectedCollectionRow(chunk, classification, selectorKey, (bytes, valid) => {
1859
+ if (!valid) {
1860
+ writeCollectionRow(writeLevels[0], 0);
1861
+ return;
1862
+ }
1863
+ replayWKBCollection(bytes, measureLevels, writeLevels, options.dimension, traversal, childDimensionOverride);
1864
+ });
1865
+ const root = makeCollectionLevelArray(0, measureLevels, writeLevels, options);
1866
+ if (selectorKey !== void 0)
1867
+ return root;
1868
+ const validity = new Uint8Array(Math.ceil(root.length / 8));
1869
+ for (let rowIndex = 0; rowIndex < classification.families.length; rowIndex++) {
1870
+ if (classification.families[rowIndex] === getGeometryFamilyIndex("GeometryCollection")) {
1871
+ validity[rowIndex >> 3] |= 1 << (rowIndex & 7);
1872
+ }
1873
+ }
1874
+ return { ...root, validity: { values: validity } };
1875
+ }
1876
+ function forEachSelectedCollectionRow(chunk, classification, selectorKey, visitor) {
1877
+ const collectionFamily = getGeometryFamilyIndex("GeometryCollection");
1878
+ for (let rowIndex = 0; rowIndex < chunk.length; rowIndex++) {
1879
+ const family = classification.families[rowIndex];
1880
+ if (selectorKey === void 0) {
1881
+ if (family === NULL_FAMILY)
1882
+ visitor(void 0, false);
1883
+ else if (family === collectionFamily)
1884
+ visitor(getSerializedBytes(chunk, rowIndex), true);
1885
+ else
1886
+ throw new Error("Rows cannot be represented as geoarrow.geometrycollection");
1887
+ } else if (family === collectionFamily && getGeometryTypeIdFromIndices(family, classification.dimensions[rowIndex]) === selectorKey) {
1888
+ visitor(getSerializedBytes(chunk, rowIndex), true);
1889
+ }
1890
+ }
1891
+ }
1892
+ function makeCollectionMeasureLevel(schema, options) {
1893
+ const builders = /* @__PURE__ */ new Map();
1894
+ for (const key of schema) {
1895
+ const type = getGeometryTypeFromId(key);
1896
+ if (type !== "GeometryCollection") {
1897
+ builders.set(key, new GeoArrowBuilder({
1898
+ ...options,
1899
+ encoding: encodingFromGeometryType(type),
1900
+ dimension: getDimensionFromId(key),
1901
+ mode: "measure"
1902
+ }));
1903
+ }
1904
+ }
1905
+ return { schema, rowCount: 0, childCount: 0, builders };
1906
+ }
1907
+ function makeCollectionWriteLevel(measure, options) {
1908
+ const OffsetArray = options.offsetType === "int64" ? BigInt64Array : Int32Array;
1909
+ const builders = /* @__PURE__ */ new Map();
1910
+ for (const [key, builder] of measure.builders) {
1911
+ builders.set(key, new GeoArrowBuilder({
1912
+ ...options,
1913
+ encoding: encodingFromGeometryType(getConcreteGeometryTypeFromId(key)),
1914
+ dimension: getDimensionFromId(key),
1915
+ mode: "write",
1916
+ target: builder.allocateTarget()
1917
+ }));
1918
+ }
1919
+ return {
1920
+ schema: measure.schema,
1921
+ rowCursor: 0,
1922
+ childCursor: 0,
1923
+ offsets: new OffsetArray(measure.rowCount + 1),
1924
+ typeIds: new Int8Array(measure.childCount),
1925
+ valueOffsets: new Int32Array(measure.childCount),
1926
+ childCounts: /* @__PURE__ */ new Map(),
1927
+ builders
1928
+ };
1929
+ }
1930
+ function replayWKBCollection(bytes, measureLevels, writeLevels, collectionDimension, traversal, childDimensionOverride) {
1931
+ const collectionStack = [];
1932
+ let active;
1933
+ const finishActive = () => {
1934
+ active == null ? void 0 : active.builder.endGeometry();
1935
+ active = void 0;
1936
+ };
1937
+ visitWKB(bytes, {
1938
+ geometry: (header, count, depth) => {
1939
+ if (active && depth > active.rootDepth) {
1940
+ if (active.rootType === "MultiLineString" && header.geometryType === "LineString") {
1941
+ active.builder.beginRing(count);
1942
+ } else if (active.rootType === "MultiPolygon" && header.geometryType === "Polygon") {
1943
+ active.builder.beginPolygon();
1944
+ }
1945
+ return;
1946
+ }
1947
+ finishActive();
1948
+ while (collectionStack.length && depth <= collectionStack[collectionStack.length - 1].depth) {
1949
+ collectionStack.pop();
1950
+ }
1951
+ const parent = collectionStack[collectionStack.length - 1];
1952
+ if (header.geometryType === "GeometryCollection") {
1953
+ if (parent) {
1954
+ addCollectionChild(measureLevels[parent.level], writeLevels == null ? void 0 : writeLevels[parent.level], getGeometryTypeId2("GeometryCollection", collectionDimension));
1955
+ }
1956
+ const level = parent ? parent.level + 1 : 0;
1957
+ if (!measureLevels[level]) {
1958
+ measureLevels[level] = makeCollectionMeasureLevel([], {
1959
+ dimension: collectionDimension,
1960
+ coordinateLayout: "interleaved",
1961
+ coordinateType: "float64",
1962
+ offsetType: "int32"
1963
+ });
1964
+ }
1965
+ if (writeLevels)
1966
+ writeCollectionRow(writeLevels[level], count || 0);
1967
+ else
1968
+ measureLevels[level].rowCount++;
1969
+ collectionStack.push({ depth, level });
1970
+ return;
1971
+ }
1972
+ if (!parent)
1973
+ throw new Error("Expected a GeometryCollection root");
1974
+ const key = getGeometryTypeId2(header.geometryType, childDimensionOverride || header.dimension);
1975
+ addCollectionChild(measureLevels[parent.level], writeLevels == null ? void 0 : writeLevels[parent.level], key);
1976
+ const builder = writeLevels ? writeLevels[parent.level].builders.get(key) : measureLevels[parent.level].builders.get(key);
1977
+ if (!builder)
1978
+ throw new Error(`Missing GeometryCollection child schema for type ID ${key}`);
1979
+ builder.beginGeometry(header.geometryType, header.dimension, count);
1980
+ active = { builder, rootDepth: depth, rootType: header.geometryType };
1981
+ },
1982
+ ring: (pointCount) => active == null ? void 0 : active.builder.beginRing(pointCount),
1983
+ coordinate: (x, y, z, m, dimension) => active == null ? void 0 : active.builder.writeCoordinateFromDimension(x, y, z, m, dimension)
1984
+ }, traversal);
1985
+ finishActive();
1986
+ }
1987
+ function addCollectionChild(measure, write, key) {
1988
+ if (!write) {
1989
+ measure.childCount++;
1990
+ return;
1991
+ }
1992
+ const index = write.childCursor++;
1993
+ write.typeIds[index] = key;
1994
+ write.valueOffsets[index] = write.childCounts.get(key) || 0;
1995
+ write.childCounts.set(key, write.valueOffsets[index] + 1);
1996
+ }
1997
+ function writeCollectionRow(level, childCount) {
1998
+ level.rowCursor++;
1999
+ setGeoArrowOffset(level.offsets, level.rowCursor, level.childCursor + childCount);
2000
+ }
2001
+ function makeCollectionLevelArray(levelIndex, measureLevels, writeLevels, options) {
2002
+ const measure = measureLevels[levelIndex];
2003
+ const write = writeLevels[levelIndex];
2004
+ const children = measure.schema.map((key) => {
2005
+ const type = getGeometryTypeFromId(key);
2006
+ if (type === "GeometryCollection") {
2007
+ return {
2008
+ name: type,
2009
+ typeId: key,
2010
+ encoding: "geoarrow.geometrycollection",
2011
+ dimension: getDimensionFromId(key),
2012
+ coordinateLayout: options.coordinateLayout,
2013
+ data: makeCollectionLevelArray(levelIndex + 1, measureLevels, writeLevels, options)
2014
+ };
2015
+ }
2016
+ const built = write.builders.get(key).finish();
2017
+ return {
2018
+ name: type,
2019
+ typeId: key,
2020
+ encoding: built.encoding,
2021
+ dimension: built.dimension,
2022
+ coordinateLayout: built.coordinateLayout,
2023
+ data: built.chunks[0]
2024
+ };
2025
+ });
2026
+ return {
2027
+ kind: "list",
2028
+ length: measure.rowCount,
2029
+ offsets: write.offsets,
2030
+ child: {
2031
+ kind: "dense-union",
2032
+ length: measure.childCount,
2033
+ typeIds: write.typeIds,
2034
+ valueOffsets: write.valueOffsets,
2035
+ children
2036
+ }
2037
+ };
2038
+ }
2039
+ function setGeoArrowOffset(offsets, index, value) {
2040
+ if (offsets instanceof BigInt64Array)
2041
+ offsets[index] = BigInt(value);
2042
+ else
2043
+ offsets[index] = value;
2044
+ }
2045
+ function normalizeCollectionSchemas(schemas, dimension, forceDimension) {
2046
+ return schemas.map((schema) => [...schema].map((key) => forceDimension || getGeometryTypeFromId(key) === "GeometryCollection" ? getGeometryTypeId2(getGeometryTypeFromId(key), dimension) : key).filter((key, index, values) => values.indexOf(key) === index).sort((left, right) => left - right));
2047
+ }
2048
+ function visitWKBIntoBuilder(bytes, builder, targetType, traversal) {
2049
+ let rootType;
2050
+ visitWKB(bytes, {
2051
+ geometry: (header, _count, depth) => {
2052
+ if (depth === 0) {
2053
+ rootType = header.geometryType;
2054
+ builder.beginGeometry(targetType, header.dimension, _count);
2055
+ if (rootType === "LineString" && targetType === "MultiLineString")
2056
+ builder.beginRing(_count);
2057
+ if (rootType === "Polygon" && targetType === "MultiPolygon")
2058
+ builder.beginPolygon();
2059
+ } else if (rootType === "MultiLineString" && header.geometryType === "LineString") {
2060
+ builder.beginRing(_count);
2061
+ } else if (rootType === "MultiPolygon" && header.geometryType === "Polygon") {
2062
+ builder.beginPolygon();
2063
+ }
2064
+ },
2065
+ ring: (pointCount) => {
2066
+ if (rootType === "Polygon" || rootType === "MultiPolygon")
2067
+ builder.beginRing(pointCount);
2068
+ },
2069
+ coordinate: (x, y, z, m, dimension) => {
2070
+ builder.writeCoordinateFromDimension(x, y, z, m, dimension);
2071
+ }
2072
+ }, traversal);
2073
+ builder.endGeometry();
2074
+ }
2075
+ function encodingFromGeometryType(type) {
2076
+ if (type === "GeometryCollection")
2077
+ throw new Error("GeometryCollection requires collection storage");
2078
+ return `geoarrow.${type.toLowerCase()}`;
2079
+ }
2080
+ function getGeometryTypeId2(type, dimension) {
2081
+ return getGeometryTypeIdFromIndices(getGeometryFamilyIndex(type), getDimensionIndex(dimension));
2082
+ }
2083
+ var GEOMETRY_TYPES2 = [
2084
+ "Point",
2085
+ "LineString",
2086
+ "Polygon",
2087
+ "MultiPoint",
2088
+ "MultiLineString",
2089
+ "MultiPolygon",
2090
+ "GeometryCollection"
2091
+ ];
2092
+ var DIMENSIONS = ["xy", "xyz", "xym", "xyzm"];
2093
+ function getGeometryFamilyIndex(type) {
2094
+ return GEOMETRY_TYPES2.indexOf(type);
2095
+ }
2096
+ function getDimensionIndex(dimension) {
2097
+ return DIMENSIONS.indexOf(dimension);
2098
+ }
2099
+ function getGeometryTypeIdFromIndices(family, dimension) {
2100
+ return family * 4 + dimension + 1;
2101
+ }
2102
+ function getGeometryTypeFromId(typeId) {
2103
+ return GEOMETRY_TYPES2[Math.floor((typeId - 1) / 4)];
2104
+ }
2105
+ function getConcreteGeometryTypeFromId(typeId) {
2106
+ const type = getGeometryTypeFromId(typeId);
2107
+ if (type === "GeometryCollection")
2108
+ throw new Error("GeometryCollection requires collection storage");
2109
+ return type;
2110
+ }
2111
+ function getDimensionFromId(typeId) {
2112
+ return DIMENSIONS[(typeId - 1) % 4];
2113
+ }
2114
+ function mergeDimensions(left, right) {
2115
+ const hasZ = left === "xyz" || left === "xyzm" || right === "xyz" || right === "xyzm";
2116
+ const hasM = left === "xym" || left === "xyzm" || right === "xym" || right === "xyzm";
2117
+ return hasZ && hasM ? "xyzm" : hasZ ? "xyz" : hasM ? "xym" : "xy";
2118
+ }
2119
+ function resolveDecodeDimension(requested, declared, inferred) {
2120
+ if (!requested || requested === "infer")
2121
+ return inferred;
2122
+ return requested === "preserve" ? declared : requested;
2123
+ }
2124
+ function resolveDecodeEncoding(requested, families) {
2125
+ if (requested && requested !== "native")
2126
+ return requested;
2127
+ if (families.size !== 1)
2128
+ return "geoarrow.geometry";
2129
+ const type = GEOMETRY_TYPES2[[...families][0]];
2130
+ return type === "GeometryCollection" ? "geoarrow.geometrycollection" : encodingFromGeometryType(type);
2131
+ }
2132
+ function validateDecodeEncoding(encoding, families) {
2133
+ if (encoding === "geoarrow.geometry")
2134
+ return;
2135
+ if (encoding === "geoarrow.geometrycollection") {
2136
+ const collectionFamily = getGeometryFamilyIndex("GeometryCollection");
2137
+ if ([...families].some((family) => family !== collectionFamily)) {
2138
+ throw new Error("Rows cannot be represented as geoarrow.geometrycollection");
2139
+ }
2140
+ return;
2141
+ }
2142
+ const targetType = geometryTypeFromEncoding(encoding);
2143
+ for (const family of families) {
2144
+ const sourceType = GEOMETRY_TYPES2[family];
2145
+ const promotable = sourceType === targetType || sourceType === "Point" && targetType === "MultiPoint" || sourceType === "LineString" && targetType === "MultiLineString" || sourceType === "Polygon" && targetType === "MultiPolygon";
2146
+ if (!promotable)
2147
+ throw new Error(`Rows cannot be represented as ${encoding}`);
2148
+ }
2149
+ }
2150
+ function geometryTypeFromEncoding(encoding) {
2151
+ const type = GEOMETRY_TYPES2.find((candidate) => `geoarrow.${candidate.toLowerCase()}` === encoding);
2152
+ if (!type || type === "GeometryCollection")
2153
+ throw new Error(`Unsupported target encoding ${encoding}`);
2154
+ return type;
2155
+ }
2156
+ function encodeGeoArrowWKB(column) {
2157
+ if (column.encoding === "geoarrow.wkb")
2158
+ return column;
2159
+ return copyMetadata(column, {
2160
+ encoding: "geoarrow.wkb",
2161
+ dimension: column.dimension,
2162
+ coordinateLayout: null,
2163
+ chunks: column.chunks.map((chunk) => encodeWKBChunk(column, chunk))
2164
+ });
2165
+ }
2166
+ function encodeWKBChunk(column, chunk) {
2167
+ const offsets = new Int32Array(chunk.length + 1);
2168
+ const validity = new Uint8Array(Math.ceil(chunk.length / 8));
2169
+ let nullCount = 0;
2170
+ for (let rowIndex = 0; rowIndex < chunk.length; rowIndex++) {
2171
+ let byteLength = 0;
2172
+ if (isPhysicalGeometryRowValid(chunk, rowIndex, column.encoding)) {
2173
+ const dimension = getPhysicalGeometryDimension(chunk, rowIndex, column.encoding, column.dimension);
2174
+ const builder = new WKBBuilder({ mode: "measure", dimension });
2175
+ writePhysicalGeometry(builder, chunk, rowIndex, column.encoding, dimension);
2176
+ byteLength = builder.finishGeometry();
2177
+ validity[rowIndex >> 3] |= 1 << (rowIndex & 7);
2178
+ } else {
2179
+ nullCount++;
2180
+ }
2181
+ const nextOffset = offsets[rowIndex] + byteLength;
2182
+ if (nextOffset > 2147483647)
2183
+ throw new Error("WKB geometry chunk exceeds Int32 offsets");
2184
+ offsets[rowIndex + 1] = nextOffset;
2185
+ }
2186
+ const values = new Uint8Array(offsets[offsets.length - 1]);
2187
+ for (let rowIndex = 0; rowIndex < chunk.length; rowIndex++) {
2188
+ if (!isPhysicalGeometryRowValid(chunk, rowIndex, column.encoding))
2189
+ continue;
2190
+ const dimension = getPhysicalGeometryDimension(chunk, rowIndex, column.encoding, column.dimension);
2191
+ const builder = new WKBBuilder({
2192
+ mode: "write",
2193
+ target: values,
2194
+ byteOffset: offsets[rowIndex],
2195
+ dimension
2196
+ });
2197
+ writePhysicalGeometry(builder, chunk, rowIndex, column.encoding, dimension);
2198
+ if (offsets[rowIndex] + builder.finishGeometry() !== offsets[rowIndex + 1]) {
2199
+ throw new Error("WKB measure and write passes produced different byte lengths");
2200
+ }
2201
+ }
2202
+ return {
2203
+ kind: "serialized",
2204
+ encoding: "binary",
2205
+ length: chunk.length,
2206
+ offsets,
2207
+ values,
2208
+ ...nullCount ? { validity: { values: validity } } : {}
2209
+ };
2210
+ }
2211
+ function isPhysicalGeometryRowValid(array, rowIndex, encoding) {
2212
+ if (!isGeoArrowValueValid(array.validity, rowIndex))
2213
+ return false;
2214
+ if (encoding !== "geoarrow.geometry" || array.kind !== "dense-union")
2215
+ return true;
2216
+ const physical = (array.offset || 0) + rowIndex;
2217
+ const child = array.children.find((candidate) => candidate.typeId === array.typeIds[physical]);
2218
+ const childIndex = array.valueOffsets[physical];
2219
+ return Boolean(child && childIndex >= 0 && childIndex < child.data.length && isGeoArrowValueValid(child.data.validity, childIndex));
2220
+ }
2221
+ function decodeGeoArrowWKT(column) {
2222
+ if (column.encoding !== "geoarrow.wkt")
2223
+ throw new Error("Expected a geoarrow.wkt column");
2224
+ const rows = normalizeRowsToDimension(decodeSerializedRows(column, (bytes) => parseWKT(textDecoder.decode(bytes))), column.dimension);
2225
+ return copyMetadata(column, makeGeoArrowColumnFromGeometryRows(rows, { dimension: column.dimension }));
2226
+ }
2227
+ function encodeGeoArrowWKT(column) {
2228
+ if (column.encoding === "geoarrow.wkt")
2229
+ return column;
2230
+ const values = [];
2231
+ for (const chunk of column.chunks) {
2232
+ for (let rowIndex = 0; rowIndex < chunk.length; rowIndex++) {
2233
+ const row = isGeoArrowValueValid(chunk.validity, rowIndex) ? materializeGeometryRow(chunk, rowIndex, column.encoding) : null;
2234
+ values.push(row ? textEncoder.encode(formatWKT(row, column.dimension)) : null);
2235
+ }
2236
+ }
2237
+ return copyMetadata(column, makeSerializedColumn(values, "geoarrow.wkt", column.dimension));
2238
+ }
2239
+ function writePhysicalGeometry(builder, array, rowIndex, encoding, dimension) {
2240
+ const depth = getEncodingDepth2(encoding);
2241
+ if (encoding === "geoarrow.geometry" && array.kind === "dense-union") {
2242
+ const physical = (array.offset || 0) + rowIndex;
2243
+ const typeId = array.typeIds[physical];
2244
+ const child = array.children.find((candidate) => candidate.typeId === typeId);
2245
+ if (!child)
2246
+ throw new Error("Dense-union row references an unknown child");
2247
+ const childDimension = child.dimension || dimension;
2248
+ builder.withDimension(childDimension, () => writePhysicalGeometry(builder, child.data, array.valueOffsets[physical], child.encoding || encodingFromName(child.name), childDimension));
2249
+ return;
2250
+ }
2251
+ if (encoding === "geoarrow.geometrycollection" && array.kind === "list") {
2252
+ const [first, last] = getListRange2(array, rowIndex);
2253
+ builder.beginGeometry("GeometryCollection", last - first);
2254
+ if (array.child.kind !== "dense-union")
2255
+ throw new Error("GeometryCollection requires dense union child");
2256
+ const union = array.child;
2257
+ for (let index = first; index < last; index++) {
2258
+ const physical = (union.offset || 0) + index;
2259
+ const child = union.children.find((candidate) => candidate.typeId === union.typeIds[physical]);
2260
+ if (child) {
2261
+ const childDimension = child.dimension || dimension;
2262
+ builder.withDimension(childDimension, () => writePhysicalGeometry(builder, child.data, union.valueOffsets[physical], child.encoding || encodingFromName(child.name), childDimension));
2263
+ }
2264
+ }
2265
+ return;
2266
+ }
2267
+ if (array.kind !== "list" && depth > 0)
2268
+ throw new Error(`Invalid ${encoding} storage`);
2269
+ const writeCoordinate2 = (leaf, index) => {
2270
+ const coordinate = readPhysicalCoordinate(leaf, index);
2271
+ if (!coordinate)
2272
+ throw new Error("Invalid GeoArrow coordinate storage");
2273
+ if (dimension === "xym")
2274
+ builder.writeCoordinate(coordinate[0], coordinate[1], void 0, coordinate[2]);
2275
+ else if (dimension === "xyzm")
2276
+ builder.writeCoordinate(coordinate[0], coordinate[1], coordinate[2], coordinate[3]);
2277
+ else
2278
+ builder.writeCoordinate(coordinate[0], coordinate[1], coordinate[2]);
2279
+ };
2280
+ const writeSequence = (leaf, first, last) => {
2281
+ for (let index = first; index < last; index++)
2282
+ writeCoordinate2(leaf, index);
2283
+ };
2284
+ if (encoding === "geoarrow.point") {
2285
+ builder.beginPoint();
2286
+ writeCoordinate2(array, rowIndex);
2287
+ } else if (encoding === "geoarrow.linestring" || encoding === "geoarrow.multipoint") {
2288
+ const [first, last] = getListRange2(array, rowIndex);
2289
+ if (encoding === "geoarrow.linestring") {
2290
+ builder.beginLineString(last - first);
2291
+ writeSequence(array.child, first, last);
2292
+ } else {
2293
+ builder.beginMultiPoint(last - first);
2294
+ const leaf = array.child;
2295
+ for (let index = first; index < last; index++) {
2296
+ builder.beginPoint();
2297
+ writeCoordinate2(leaf, index);
2298
+ }
2299
+ }
2300
+ } else if (encoding === "geoarrow.polygon" || encoding === "geoarrow.multilinestring") {
2301
+ const [first, last] = getListRange2(array, rowIndex);
2302
+ const parts = array.child;
2303
+ if (encoding === "geoarrow.polygon")
2304
+ builder.beginPolygon(last - first);
2305
+ else
2306
+ builder.beginMultiLineString(last - first);
2307
+ for (let partIndex = first; partIndex < last; partIndex++) {
2308
+ const [ringFirst, ringLast] = getListRange2(parts, partIndex);
2309
+ const leaf = parts.child;
2310
+ if (encoding === "geoarrow.polygon")
2311
+ builder.beginLinearRing(ringLast - ringFirst);
2312
+ else
2313
+ builder.beginLineString(ringLast - ringFirst);
2314
+ writeSequence(leaf, ringFirst, ringLast);
2315
+ }
2316
+ } else if (encoding === "geoarrow.multipolygon") {
2317
+ const [first, last] = getListRange2(array, rowIndex);
2318
+ const polygons = array.child;
2319
+ builder.beginMultiPolygon(last - first);
2320
+ for (let polygonIndex = first; polygonIndex < last; polygonIndex++) {
2321
+ const [partFirst, partLast] = getListRange2(polygons, polygonIndex);
2322
+ const parts = polygons.child;
2323
+ builder.beginPolygon(partLast - partFirst);
2324
+ for (let partIndex = partFirst; partIndex < partLast; partIndex++) {
2325
+ const [ringFirst, ringLast] = getListRange2(parts, partIndex);
2326
+ builder.beginLinearRing(ringLast - ringFirst);
2327
+ writeSequence(parts.child, ringFirst, ringLast);
2328
+ }
2329
+ }
2330
+ }
2331
+ }
2332
+ function getPhysicalGeometryDimension(array, rowIndex, encoding, dimension) {
2333
+ if (encoding !== "geoarrow.geometry" || array.kind !== "dense-union")
2334
+ return dimension;
2335
+ const physical = (array.offset || 0) + rowIndex;
2336
+ const child = array.children.find((candidate) => candidate.typeId === array.typeIds[physical]);
2337
+ return (child == null ? void 0 : child.dimension) || dimension;
2338
+ }
2339
+ function readPhysicalCoordinate(array, index) {
2340
+ if (array.kind === "fixed-size-list" && array.child.kind === "primitive") {
2341
+ const logical = (array.offset || 0) + index;
2342
+ const values = [];
2343
+ for (let component = 0; component < array.size; component++)
2344
+ values.push(Number(array.child.values[(array.child.offset || 0) + (logical * array.size + component) * (array.child.stride || 1)]));
2345
+ return values;
2346
+ }
2347
+ if (array.kind === "struct") {
2348
+ const logical = (array.offset || 0) + index;
2349
+ return ["x", "y", "z", "m"].flatMap((name) => {
2350
+ const child = array.children[name];
2351
+ return (child == null ? void 0 : child.kind) === "primitive" ? [Number(child.values[(child.offset || 0) + logical * (child.stride || 1)])] : [];
2352
+ });
2353
+ }
2354
+ return null;
2355
+ }
2356
+ function getListRange2(list, index) {
2357
+ const offset = (list.offset || 0) + index;
2358
+ const base = typeof (list.offsetBase ?? 0) === "bigint" ? Number(list.offsetBase) : Number(list.offsetBase ?? 0);
2359
+ return [
2360
+ getGeoArrowOffset(list.offsets, offset) - base,
2361
+ getGeoArrowOffset(list.offsets, offset + 1) - base
2362
+ ];
2363
+ }
2364
+ function getEncodingDepth2(encoding) {
2365
+ return encoding === "geoarrow.point" ? 0 : encoding === "geoarrow.linestring" || encoding === "geoarrow.multipoint" ? 1 : encoding === "geoarrow.polygon" || encoding === "geoarrow.multilinestring" ? 2 : 3;
2366
+ }
2367
+ function encodingFromName(name) {
2368
+ return `geoarrow.${name.toLowerCase()}`;
2369
+ }
2370
+ function normalizeRowsToDimension(rows, dimension) {
2371
+ const size = getGeoArrowDimensionSize(dimension);
2372
+ const normalizeGeometry = (geometry) => {
2373
+ if (geometry.type === "GeometryCollection") {
2374
+ return { ...geometry, geometries: geometry.geometries.map(normalizeGeometry) };
2375
+ }
2376
+ return {
2377
+ ...geometry,
2378
+ coordinates: normalizeCoordinateNesting(geometry.coordinates, size)
2379
+ };
2380
+ };
2381
+ return rows.map((row) => row ? normalizeGeometry(row) : null);
2382
+ }
2383
+ function normalizeCoordinateNesting(value, size) {
2384
+ if (value.length === 0)
2385
+ return [];
2386
+ if (typeof value[0] === "number") {
2387
+ const coordinate = value.slice(0, size);
2388
+ while (coordinate.length < size)
2389
+ coordinate.push(0);
2390
+ return coordinate;
2391
+ }
2392
+ return value.map((child) => normalizeCoordinateNesting(child, size));
2393
+ }
2394
+ function decodeSerializedRows(column, decoder) {
2395
+ const rows = [];
2396
+ for (const chunk of column.chunks) {
2397
+ if (chunk.kind !== "serialized")
2398
+ throw new Error("Serialized column contains native storage");
2399
+ for (let rowIndex = 0; rowIndex < chunk.length; rowIndex++) {
2400
+ if (!isGeoArrowValueValid(chunk.validity, rowIndex)) {
2401
+ rows.push(null);
2402
+ continue;
2403
+ }
2404
+ rows.push(decoder(getSerializedBytes(chunk, rowIndex)));
2405
+ }
2406
+ }
2407
+ return rows;
2408
+ }
2409
+ function getSerializedBytes(array, rowIndex) {
2410
+ var _a;
2411
+ if (array.views) {
2412
+ const viewIndex = ((array.offset || 0) + rowIndex) * 4;
2413
+ const length = array.views[viewIndex];
2414
+ if (length <= 12) {
2415
+ const byteOffset2 = array.views.byteOffset + viewIndex * 4 + 4;
2416
+ return new Uint8Array(array.views.buffer, byteOffset2, length);
2417
+ }
2418
+ const bufferIndex = array.views[viewIndex + 2];
2419
+ const byteOffset = array.views[viewIndex + 3];
2420
+ const data = (_a = array.dataBuffers) == null ? void 0 : _a[bufferIndex];
2421
+ if (!data)
2422
+ throw new Error(`Serialized view references missing data buffer ${bufferIndex}`);
2423
+ return data.subarray(byteOffset, byteOffset + length);
2424
+ }
2425
+ const offsetIndex = (array.offset || 0) + rowIndex;
2426
+ const baseValue = array.offsetBase ?? 0;
2427
+ const base = typeof baseValue === "bigint" ? Number(baseValue) : baseValue;
2428
+ const first = getGeoArrowOffset(array.offsets, offsetIndex) - base;
2429
+ const last = getGeoArrowOffset(array.offsets, offsetIndex + 1) - base;
2430
+ return array.values.subarray(first, last);
2431
+ }
2432
+ function makeSerializedColumn(rows, encoding, dimension) {
2433
+ let byteLength = 0;
2434
+ for (const row of rows)
2435
+ byteLength += (row == null ? void 0 : row.byteLength) || 0;
2436
+ const values = new Uint8Array(byteLength);
2437
+ const offsets = new Int32Array(rows.length + 1);
2438
+ const validity = new Uint8Array(Math.ceil(rows.length / 8));
2439
+ let byteOffset = 0;
2440
+ for (let rowIndex = 0; rowIndex < rows.length; rowIndex++) {
2441
+ const row = rows[rowIndex];
2442
+ if (row) {
2443
+ values.set(row, byteOffset);
2444
+ byteOffset += row.byteLength;
2445
+ validity[rowIndex >> 3] |= 1 << (rowIndex & 7);
2446
+ }
2447
+ offsets[rowIndex + 1] = byteOffset;
2448
+ }
2449
+ const chunk = {
2450
+ kind: "serialized",
2451
+ encoding: encoding === "geoarrow.wkb" ? "binary" : "utf8",
2452
+ length: rows.length,
2453
+ offsets,
2454
+ values,
2455
+ validity: { values: validity }
2456
+ };
2457
+ return { encoding, dimension, coordinateLayout: null, chunks: [chunk] };
2458
+ }
2459
+ function copyMetadata(source, target) {
2460
+ return {
2461
+ ...target,
2462
+ spatialReference: source.spatialReference,
2463
+ edges: source.edges,
2464
+ metadata: source.metadata
2465
+ };
2466
+ }
2467
+ //# sourceMappingURL=wkb-entry.cjs.map