@math.gl/geospatial 5.0.0-alpha.2 → 5.0.0-alpha.20

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 (2520) hide show
  1. package/GEOGRAPHICLIB-LICENSE.txt +27 -0
  2. package/LICENSE +267 -69
  3. package/README.md +17 -0
  4. package/THIRD-PARTY-NOTICES.md +95 -0
  5. package/crs/README.md +84 -0
  6. package/crs/schemas/README.md +9 -0
  7. package/crs/schemas/projjson.schema.json +1174 -0
  8. package/dist/constants.d.ts.map +1 -1
  9. package/dist/constants.js +5 -3
  10. package/dist/constants.js.map +1 -1
  11. package/dist/crs/crs-metadata.cjs +67 -0
  12. package/dist/crs/crs-metadata.cjs.map +6 -0
  13. package/dist/crs/crs-metadata.d.ts +43 -0
  14. package/dist/crs/crs-metadata.d.ts.map +1 -0
  15. package/dist/crs/crs-metadata.js +26 -0
  16. package/dist/crs/crs-metadata.js.map +1 -0
  17. package/dist/crs/crs.d.ts +22 -0
  18. package/dist/crs/crs.d.ts.map +1 -0
  19. package/dist/crs/crs.js +5 -0
  20. package/dist/crs/crs.js.map +1 -0
  21. package/dist/crs/index.cjs +916 -0
  22. package/dist/crs/index.cjs.map +6 -0
  23. package/dist/crs/index.d.ts +12 -0
  24. package/dist/crs/index.d.ts.map +1 -0
  25. package/dist/crs/index.js +10 -0
  26. package/dist/crs/index.js.map +1 -0
  27. package/dist/crs/proj-string.cjs +219 -0
  28. package/dist/crs/proj-string.cjs.map +6 -0
  29. package/dist/crs/proj-string.d.ts +32 -0
  30. package/dist/crs/proj-string.d.ts.map +1 -0
  31. package/dist/crs/proj-string.js +204 -0
  32. package/dist/crs/proj-string.js.map +1 -0
  33. package/dist/crs/projjson-schema-constants.d.ts +5 -0
  34. package/dist/crs/projjson-schema-constants.d.ts.map +1 -0
  35. package/dist/crs/projjson-schema-constants.js +8 -0
  36. package/dist/crs/projjson-schema-constants.js.map +1 -0
  37. package/dist/crs/projjson-types.d.ts +557 -0
  38. package/dist/crs/projjson-types.d.ts.map +1 -0
  39. package/dist/crs/projjson-types.js +5 -0
  40. package/dist/crs/projjson-types.js.map +1 -0
  41. package/dist/crs/spatial-reference.cjs +80 -0
  42. package/dist/crs/spatial-reference.cjs.map +6 -0
  43. package/dist/crs/spatial-reference.d.ts +104 -0
  44. package/dist/crs/spatial-reference.d.ts.map +1 -0
  45. package/dist/crs/spatial-reference.js +86 -0
  46. package/dist/crs/spatial-reference.js.map +1 -0
  47. package/dist/crs/units-table.d.ts +4 -0
  48. package/dist/crs/units-table.d.ts.map +1 -0
  49. package/dist/crs/units-table.js +29 -0
  50. package/dist/crs/units-table.js.map +1 -0
  51. package/dist/crs/wkt-crs.cjs +610 -0
  52. package/dist/crs/wkt-crs.cjs.map +6 -0
  53. package/dist/crs/wkt-crs.d.ts +86 -0
  54. package/dist/crs/wkt-crs.d.ts.map +1 -0
  55. package/dist/crs/wkt-crs.js +613 -0
  56. package/dist/crs/wkt-crs.js.map +1 -0
  57. package/dist/discontinuous/air-ocean-mesh.d.ts +15 -0
  58. package/dist/discontinuous/air-ocean-mesh.d.ts.map +1 -0
  59. package/dist/discontinuous/air-ocean-mesh.js +75 -0
  60. package/dist/discontinuous/air-ocean-mesh.js.map +1 -0
  61. package/dist/discontinuous/albers-usa.d.ts +9 -0
  62. package/dist/discontinuous/albers-usa.d.ts.map +1 -0
  63. package/dist/discontinuous/albers-usa.js +105 -0
  64. package/dist/discontinuous/albers-usa.js.map +1 -0
  65. package/dist/discontinuous/cap-map.d.ts +23 -0
  66. package/dist/discontinuous/cap-map.d.ts.map +1 -0
  67. package/dist/discontinuous/cap-map.js +314 -0
  68. package/dist/discontinuous/cap-map.js.map +1 -0
  69. package/dist/discontinuous/elastic/data.d.ts +26 -0
  70. package/dist/discontinuous/elastic/data.d.ts.map +1 -0
  71. package/dist/discontinuous/elastic/data.js +72 -0
  72. package/dist/discontinuous/elastic/data.js.map +1 -0
  73. package/dist/discontinuous/elastic/elasticI.d.ts +3 -0
  74. package/dist/discontinuous/elastic/elasticI.d.ts.map +1 -0
  75. package/dist/discontinuous/elastic/elasticI.js +5233 -0
  76. package/dist/discontinuous/elastic/elasticI.js.map +1 -0
  77. package/dist/discontinuous/elastic/elasticII.d.ts +3 -0
  78. package/dist/discontinuous/elastic/elasticII.d.ts.map +1 -0
  79. package/dist/discontinuous/elastic/elasticII.js +18162 -0
  80. package/dist/discontinuous/elastic/elasticII.js.map +1 -0
  81. package/dist/discontinuous/elastic/elasticIII.d.ts +3 -0
  82. package/dist/discontinuous/elastic/elasticIII.d.ts.map +1 -0
  83. package/dist/discontinuous/elastic/elasticIII.js +29566 -0
  84. package/dist/discontinuous/elastic/elasticIII.js.map +1 -0
  85. package/dist/discontinuous/elastic/geometry.d.ts +22 -0
  86. package/dist/discontinuous/elastic/geometry.d.ts.map +1 -0
  87. package/dist/discontinuous/elastic/geometry.js +131 -0
  88. package/dist/discontinuous/elastic/geometry.js.map +1 -0
  89. package/dist/discontinuous/elastic/grid.d.ts +15 -0
  90. package/dist/discontinuous/elastic/grid.d.ts.map +1 -0
  91. package/dist/discontinuous/elastic/grid.js +177 -0
  92. package/dist/discontinuous/elastic/grid.js.map +1 -0
  93. package/dist/discontinuous/elastic/map.d.ts +8 -0
  94. package/dist/discontinuous/elastic/map.d.ts.map +1 -0
  95. package/dist/discontinuous/elastic/map.js +260 -0
  96. package/dist/discontinuous/elastic/map.js.map +1 -0
  97. package/dist/discontinuous/gray-fuller.d.ts +5 -0
  98. package/dist/discontinuous/gray-fuller.d.ts.map +1 -0
  99. package/dist/discontinuous/gray-fuller.js +36 -0
  100. package/dist/discontinuous/gray-fuller.js.map +1 -0
  101. package/dist/discontinuous/gringorten-kernel.d.ts +5 -0
  102. package/dist/discontinuous/gringorten-kernel.d.ts.map +1 -0
  103. package/dist/discontinuous/gringorten-kernel.js +94 -0
  104. package/dist/discontinuous/gringorten-kernel.js.map +1 -0
  105. package/dist/discontinuous/healpix.d.ts +13 -0
  106. package/dist/discontinuous/healpix.d.ts.map +1 -0
  107. package/dist/discontinuous/healpix.js +61 -0
  108. package/dist/discontinuous/healpix.js.map +1 -0
  109. package/dist/discontinuous/layout.d.ts +72 -0
  110. package/dist/discontinuous/layout.d.ts.map +1 -0
  111. package/dist/discontinuous/layout.js +114 -0
  112. package/dist/discontinuous/layout.js.map +1 -0
  113. package/dist/discontinuous/map-engine.d.ts +197 -0
  114. package/dist/discontinuous/map-engine.d.ts.map +1 -0
  115. package/dist/discontinuous/map-engine.js +356 -0
  116. package/dist/discontinuous/map-engine.js.map +1 -0
  117. package/dist/discontinuous/map-layout.d.ts +93 -0
  118. package/dist/discontinuous/map-layout.d.ts.map +1 -0
  119. package/dist/discontinuous/map-layout.js +490 -0
  120. package/dist/discontinuous/map-layout.js.map +1 -0
  121. package/dist/discontinuous/map-transition.d.ts +42 -0
  122. package/dist/discontinuous/map-transition.d.ts.map +1 -0
  123. package/dist/discontinuous/map-transition.js +283 -0
  124. package/dist/discontinuous/map-transition.js.map +1 -0
  125. package/dist/discontinuous/math.d.ts +19 -0
  126. package/dist/discontinuous/math.d.ts.map +1 -0
  127. package/dist/discontinuous/math.js +65 -0
  128. package/dist/discontinuous/math.js.map +1 -0
  129. package/dist/discontinuous/mercator-map.d.ts +22 -0
  130. package/dist/discontinuous/mercator-map.d.ts.map +1 -0
  131. package/dist/discontinuous/mercator-map.js +130 -0
  132. package/dist/discontinuous/mercator-map.js.map +1 -0
  133. package/dist/discontinuous/myriahedral/graticule.d.ts +6 -0
  134. package/dist/discontinuous/myriahedral/graticule.d.ts.map +1 -0
  135. package/dist/discontinuous/myriahedral/graticule.js +37 -0
  136. package/dist/discontinuous/myriahedral/graticule.js.map +1 -0
  137. package/dist/discontinuous/myriahedral/mesh.d.ts +18 -0
  138. package/dist/discontinuous/myriahedral/mesh.d.ts.map +1 -0
  139. package/dist/discontinuous/myriahedral/mesh.js +131 -0
  140. package/dist/discontinuous/myriahedral/mesh.js.map +1 -0
  141. package/dist/discontinuous/myriahedral/unfold.d.ts +36 -0
  142. package/dist/discontinuous/myriahedral/unfold.d.ts.map +1 -0
  143. package/dist/discontinuous/myriahedral/unfold.js +172 -0
  144. package/dist/discontinuous/myriahedral/unfold.js.map +1 -0
  145. package/dist/discontinuous/myriahedral.d.ts +56 -0
  146. package/dist/discontinuous/myriahedral.d.ts.map +1 -0
  147. package/dist/discontinuous/myriahedral.js +204 -0
  148. package/dist/discontinuous/myriahedral.js.map +1 -0
  149. package/dist/discontinuous/petroff.d.ts +8 -0
  150. package/dist/discontinuous/petroff.d.ts.map +1 -0
  151. package/dist/discontinuous/petroff.js +159 -0
  152. package/dist/discontinuous/petroff.js.map +1 -0
  153. package/dist/discontinuous/polyhedral.d.ts +8 -0
  154. package/dist/discontinuous/polyhedral.d.ts.map +1 -0
  155. package/dist/discontinuous/polyhedral.js +117 -0
  156. package/dist/discontinuous/polyhedral.js.map +1 -0
  157. package/dist/discontinuous/prepare-features.d.ts +78 -0
  158. package/dist/discontinuous/prepare-features.d.ts.map +1 -0
  159. package/dist/discontinuous/prepare-features.js +146 -0
  160. package/dist/discontinuous/prepare-features.js.map +1 -0
  161. package/dist/discontinuous/presets.d.ts +71 -0
  162. package/dist/discontinuous/presets.d.ts.map +1 -0
  163. package/dist/discontinuous/presets.js +372 -0
  164. package/dist/discontinuous/presets.js.map +1 -0
  165. package/dist/discontinuous/projection-catalog.d.ts +33 -0
  166. package/dist/discontinuous/projection-catalog.d.ts.map +1 -0
  167. package/dist/discontinuous/projection-catalog.js +96 -0
  168. package/dist/discontinuous/projection-catalog.js.map +1 -0
  169. package/dist/discontinuous/quincuncial-kernel.d.ts +9 -0
  170. package/dist/discontinuous/quincuncial-kernel.d.ts.map +1 -0
  171. package/dist/discontinuous/quincuncial-kernel.js +139 -0
  172. package/dist/discontinuous/quincuncial-kernel.js.map +1 -0
  173. package/dist/discontinuous/quincuncial-star.d.ts +29 -0
  174. package/dist/discontinuous/quincuncial-star.d.ts.map +1 -0
  175. package/dist/discontinuous/quincuncial-star.js +307 -0
  176. package/dist/discontinuous/quincuncial-star.js.map +1 -0
  177. package/dist/discontinuous/regional-map.d.ts +18 -0
  178. package/dist/discontinuous/regional-map.d.ts.map +1 -0
  179. package/dist/discontinuous/regional-map.js +193 -0
  180. package/dist/discontinuous/regional-map.js.map +1 -0
  181. package/dist/discontinuous/retroazimuthal-map.d.ts +6 -0
  182. package/dist/discontinuous/retroazimuthal-map.d.ts.map +1 -0
  183. package/dist/discontinuous/retroazimuthal-map.js +52 -0
  184. package/dist/discontinuous/retroazimuthal-map.js.map +1 -0
  185. package/dist/discontinuous/rotated-map.d.ts +31 -0
  186. package/dist/discontinuous/rotated-map.d.ts.map +1 -0
  187. package/dist/discontinuous/rotated-map.js +66 -0
  188. package/dist/discontinuous/rotated-map.js.map +1 -0
  189. package/dist/discontinuous/snyder-mesh.d.ts +11 -0
  190. package/dist/discontinuous/snyder-mesh.d.ts.map +1 -0
  191. package/dist/discontinuous/snyder-mesh.js +88 -0
  192. package/dist/discontinuous/snyder-mesh.js.map +1 -0
  193. package/dist/discontinuous/snyder.d.ts +16 -0
  194. package/dist/discontinuous/snyder.d.ts.map +1 -0
  195. package/dist/discontinuous/snyder.js +153 -0
  196. package/dist/discontinuous/snyder.js.map +1 -0
  197. package/dist/discontinuous/spherical-clip/cartesian.d.ts +8 -0
  198. package/dist/discontinuous/spherical-clip/cartesian.d.ts.map +1 -0
  199. package/dist/discontinuous/spherical-clip/cartesian.js +34 -0
  200. package/dist/discontinuous/spherical-clip/cartesian.js.map +1 -0
  201. package/dist/discontinuous/spherical-clip/circle.d.ts +2 -0
  202. package/dist/discontinuous/spherical-clip/circle.d.ts.map +1 -0
  203. package/dist/discontinuous/spherical-clip/circle.js +34 -0
  204. package/dist/discontinuous/spherical-clip/circle.js.map +1 -0
  205. package/dist/discontinuous/spherical-clip/clip-buffer.d.ts +9 -0
  206. package/dist/discontinuous/spherical-clip/clip-buffer.d.ts.map +1 -0
  207. package/dist/discontinuous/spherical-clip/clip-buffer.js +28 -0
  208. package/dist/discontinuous/spherical-clip/clip-buffer.js.map +1 -0
  209. package/dist/discontinuous/spherical-clip/clip-circle.d.ts +9 -0
  210. package/dist/discontinuous/spherical-clip/clip-circle.d.ts.map +1 -0
  211. package/dist/discontinuous/spherical-clip/clip-circle.js +160 -0
  212. package/dist/discontinuous/spherical-clip/clip-circle.js.map +1 -0
  213. package/dist/discontinuous/spherical-clip/clip-index.d.ts +9 -0
  214. package/dist/discontinuous/spherical-clip/clip-index.d.ts.map +1 -0
  215. package/dist/discontinuous/spherical-clip/clip-index.js +117 -0
  216. package/dist/discontinuous/spherical-clip/clip-index.js.map +1 -0
  217. package/dist/discontinuous/spherical-clip/clip-rejoin.d.ts +2 -0
  218. package/dist/discontinuous/spherical-clip/clip-rejoin.d.ts.map +1 -0
  219. package/dist/discontinuous/spherical-clip/clip-rejoin.js +99 -0
  220. package/dist/discontinuous/spherical-clip/clip-rejoin.js.map +1 -0
  221. package/dist/discontinuous/spherical-clip/helpers.d.ts +8 -0
  222. package/dist/discontinuous/spherical-clip/helpers.d.ts.map +1 -0
  223. package/dist/discontinuous/spherical-clip/helpers.js +21 -0
  224. package/dist/discontinuous/spherical-clip/helpers.js.map +1 -0
  225. package/dist/discontinuous/spherical-clip/math.d.ts +26 -0
  226. package/dist/discontinuous/spherical-clip/math.d.ts.map +1 -0
  227. package/dist/discontinuous/spherical-clip/math.js +39 -0
  228. package/dist/discontinuous/spherical-clip/math.js.map +1 -0
  229. package/dist/discontinuous/spherical-clip/noop.d.ts +2 -0
  230. package/dist/discontinuous/spherical-clip/noop.d.ts.map +1 -0
  231. package/dist/discontinuous/spherical-clip/noop.js +6 -0
  232. package/dist/discontinuous/spherical-clip/noop.js.map +1 -0
  233. package/dist/discontinuous/spherical-clip/pointEqual.d.ts +2 -0
  234. package/dist/discontinuous/spherical-clip/pointEqual.d.ts.map +1 -0
  235. package/dist/discontinuous/spherical-clip/pointEqual.js +9 -0
  236. package/dist/discontinuous/spherical-clip/pointEqual.js.map +1 -0
  237. package/dist/discontinuous/spherical-clip/polygonContains.d.ts +2 -0
  238. package/dist/discontinuous/spherical-clip/polygonContains.d.ts.map +1 -0
  239. package/dist/discontinuous/spherical-clip/polygonContains.js +52 -0
  240. package/dist/discontinuous/spherical-clip/polygonContains.js.map +1 -0
  241. package/dist/discontinuous/world-composite-kernels.d.ts +11 -0
  242. package/dist/discontinuous/world-composite-kernels.d.ts.map +1 -0
  243. package/dist/discontinuous/world-composite-kernels.js +30 -0
  244. package/dist/discontinuous/world-composite-kernels.js.map +1 -0
  245. package/dist/discontinuous/world-kernels/airy.d.ts +5 -0
  246. package/dist/discontinuous/world-kernels/airy.d.ts.map +1 -0
  247. package/dist/discontinuous/world-kernels/airy.js +28 -0
  248. package/dist/discontinuous/world-kernels/airy.js.map +1 -0
  249. package/dist/discontinuous/world-kernels/aitoff.d.ts +5 -0
  250. package/dist/discontinuous/world-kernels/aitoff.d.ts.map +1 -0
  251. package/dist/discontinuous/world-kernels/aitoff.js +26 -0
  252. package/dist/discontinuous/world-kernels/aitoff.js.map +1 -0
  253. package/dist/discontinuous/world-kernels/armadillo.d.ts +5 -0
  254. package/dist/discontinuous/world-kernels/armadillo.d.ts.map +1 -0
  255. package/dist/discontinuous/world-kernels/armadillo.js +28 -0
  256. package/dist/discontinuous/world-kernels/armadillo.js.map +1 -0
  257. package/dist/discontinuous/world-kernels/august.d.ts +5 -0
  258. package/dist/discontinuous/world-kernels/august.d.ts.map +1 -0
  259. package/dist/discontinuous/world-kernels/august.js +21 -0
  260. package/dist/discontinuous/world-kernels/august.js.map +1 -0
  261. package/dist/discontinuous/world-kernels/baker.d.ts +5 -0
  262. package/dist/discontinuous/world-kernels/baker.d.ts.map +1 -0
  263. package/dist/discontinuous/world-kernels/baker.js +29 -0
  264. package/dist/discontinuous/world-kernels/baker.js.map +1 -0
  265. package/dist/discontinuous/world-kernels/bertin.d.ts +5 -0
  266. package/dist/discontinuous/world-kernels/bertin.d.ts.map +1 -0
  267. package/dist/discontinuous/world-kernels/bertin.js +32 -0
  268. package/dist/discontinuous/world-kernels/bertin.js.map +1 -0
  269. package/dist/discontinuous/world-kernels/boggs.d.ts +5 -0
  270. package/dist/discontinuous/world-kernels/boggs.d.ts.map +1 -0
  271. package/dist/discontinuous/world-kernels/boggs.js +24 -0
  272. package/dist/discontinuous/world-kernels/boggs.js.map +1 -0
  273. package/dist/discontinuous/world-kernels/bonne.d.ts +3 -0
  274. package/dist/discontinuous/world-kernels/bonne.d.ts.map +1 -0
  275. package/dist/discontinuous/world-kernels/bonne.js +22 -0
  276. package/dist/discontinuous/world-kernels/bonne.js.map +1 -0
  277. package/dist/discontinuous/world-kernels/bottomley.d.ts +5 -0
  278. package/dist/discontinuous/world-kernels/bottomley.d.ts.map +1 -0
  279. package/dist/discontinuous/world-kernels/bottomley.js +18 -0
  280. package/dist/discontinuous/world-kernels/bottomley.js.map +1 -0
  281. package/dist/discontinuous/world-kernels/bromley.d.ts +5 -0
  282. package/dist/discontinuous/world-kernels/bromley.d.ts.map +1 -0
  283. package/dist/discontinuous/world-kernels/bromley.js +9 -0
  284. package/dist/discontinuous/world-kernels/bromley.js.map +1 -0
  285. package/dist/discontinuous/world-kernels/chamberlin.d.ts +2 -0
  286. package/dist/discontinuous/world-kernels/chamberlin.d.ts.map +1 -0
  287. package/dist/discontinuous/world-kernels/chamberlin.js +81 -0
  288. package/dist/discontinuous/world-kernels/chamberlin.js.map +1 -0
  289. package/dist/discontinuous/world-kernels/collignon.d.ts +5 -0
  290. package/dist/discontinuous/world-kernels/collignon.d.ts.map +1 -0
  291. package/dist/discontinuous/world-kernels/collignon.js +15 -0
  292. package/dist/discontinuous/world-kernels/collignon.js.map +1 -0
  293. package/dist/discontinuous/world-kernels/craig.d.ts +5 -0
  294. package/dist/discontinuous/world-kernels/craig.d.ts.map +1 -0
  295. package/dist/discontinuous/world-kernels/craig.js +30 -0
  296. package/dist/discontinuous/world-kernels/craig.js.map +1 -0
  297. package/dist/discontinuous/world-kernels/craster.d.ts +5 -0
  298. package/dist/discontinuous/world-kernels/craster.d.ts.map +1 -0
  299. package/dist/discontinuous/world-kernels/craster.js +15 -0
  300. package/dist/discontinuous/world-kernels/craster.js.map +1 -0
  301. package/dist/discontinuous/world-kernels/cylindricalEqualArea.d.ts +5 -0
  302. package/dist/discontinuous/world-kernels/cylindricalEqualArea.d.ts.map +1 -0
  303. package/dist/discontinuous/world-kernels/cylindricalEqualArea.js +17 -0
  304. package/dist/discontinuous/world-kernels/cylindricalEqualArea.js.map +1 -0
  305. package/dist/discontinuous/world-kernels/cylindricalStereographic.d.ts +5 -0
  306. package/dist/discontinuous/world-kernels/cylindricalStereographic.d.ts.map +1 -0
  307. package/dist/discontinuous/world-kernels/cylindricalStereographic.js +17 -0
  308. package/dist/discontinuous/world-kernels/cylindricalStereographic.js.map +1 -0
  309. package/dist/discontinuous/world-kernels/d3-geo-raw.d.ts +9 -0
  310. package/dist/discontinuous/world-kernels/d3-geo-raw.d.ts.map +1 -0
  311. package/dist/discontinuous/world-kernels/d3-geo-raw.js +21 -0
  312. package/dist/discontinuous/world-kernels/d3-geo-raw.js.map +1 -0
  313. package/dist/discontinuous/world-kernels/eckert1.d.ts +5 -0
  314. package/dist/discontinuous/world-kernels/eckert1.d.ts.map +1 -0
  315. package/dist/discontinuous/world-kernels/eckert1.js +15 -0
  316. package/dist/discontinuous/world-kernels/eckert1.js.map +1 -0
  317. package/dist/discontinuous/world-kernels/eckert2.d.ts +5 -0
  318. package/dist/discontinuous/world-kernels/eckert2.d.ts.map +1 -0
  319. package/dist/discontinuous/world-kernels/eckert2.js +15 -0
  320. package/dist/discontinuous/world-kernels/eckert2.js.map +1 -0
  321. package/dist/discontinuous/world-kernels/eckert3.d.ts +5 -0
  322. package/dist/discontinuous/world-kernels/eckert3.d.ts.map +1 -0
  323. package/dist/discontinuous/world-kernels/eckert3.js +15 -0
  324. package/dist/discontinuous/world-kernels/eckert3.js.map +1 -0
  325. package/dist/discontinuous/world-kernels/eckert4.d.ts +5 -0
  326. package/dist/discontinuous/world-kernels/eckert4.d.ts.map +1 -0
  327. package/dist/discontinuous/world-kernels/eckert4.js +20 -0
  328. package/dist/discontinuous/world-kernels/eckert4.js.map +1 -0
  329. package/dist/discontinuous/world-kernels/eckert5.d.ts +5 -0
  330. package/dist/discontinuous/world-kernels/eckert5.d.ts.map +1 -0
  331. package/dist/discontinuous/world-kernels/eckert5.js +14 -0
  332. package/dist/discontinuous/world-kernels/eckert5.js.map +1 -0
  333. package/dist/discontinuous/world-kernels/eckert6.d.ts +5 -0
  334. package/dist/discontinuous/world-kernels/eckert6.d.ts.map +1 -0
  335. package/dist/discontinuous/world-kernels/eckert6.js +19 -0
  336. package/dist/discontinuous/world-kernels/eckert6.js.map +1 -0
  337. package/dist/discontinuous/world-kernels/eisenlohr.d.ts +5 -0
  338. package/dist/discontinuous/world-kernels/eisenlohr.d.ts.map +1 -0
  339. package/dist/discontinuous/world-kernels/eisenlohr.js +41 -0
  340. package/dist/discontinuous/world-kernels/eisenlohr.js.map +1 -0
  341. package/dist/discontinuous/world-kernels/fahey.d.ts +5 -0
  342. package/dist/discontinuous/world-kernels/fahey.d.ts.map +1 -0
  343. package/dist/discontinuous/world-kernels/fahey.js +16 -0
  344. package/dist/discontinuous/world-kernels/fahey.js.map +1 -0
  345. package/dist/discontinuous/world-kernels/foucaut.d.ts +5 -0
  346. package/dist/discontinuous/world-kernels/foucaut.d.ts.map +1 -0
  347. package/dist/discontinuous/world-kernels/foucaut.js +15 -0
  348. package/dist/discontinuous/world-kernels/foucaut.js.map +1 -0
  349. package/dist/discontinuous/world-kernels/foucautSinusoidal.d.ts +5 -0
  350. package/dist/discontinuous/world-kernels/foucautSinusoidal.d.ts.map +1 -0
  351. package/dist/discontinuous/world-kernels/foucautSinusoidal.js +27 -0
  352. package/dist/discontinuous/world-kernels/foucautSinusoidal.js.map +1 -0
  353. package/dist/discontinuous/world-kernels/ginzburg4.d.ts +5 -0
  354. package/dist/discontinuous/world-kernels/ginzburg4.d.ts.map +1 -0
  355. package/dist/discontinuous/world-kernels/ginzburg4.js +8 -0
  356. package/dist/discontinuous/world-kernels/ginzburg4.js.map +1 -0
  357. package/dist/discontinuous/world-kernels/ginzburg5.d.ts +5 -0
  358. package/dist/discontinuous/world-kernels/ginzburg5.d.ts.map +1 -0
  359. package/dist/discontinuous/world-kernels/ginzburg5.js +8 -0
  360. package/dist/discontinuous/world-kernels/ginzburg5.js.map +1 -0
  361. package/dist/discontinuous/world-kernels/ginzburg6.d.ts +5 -0
  362. package/dist/discontinuous/world-kernels/ginzburg6.d.ts.map +1 -0
  363. package/dist/discontinuous/world-kernels/ginzburg6.js +9 -0
  364. package/dist/discontinuous/world-kernels/ginzburg6.js.map +1 -0
  365. package/dist/discontinuous/world-kernels/ginzburg8.d.ts +5 -0
  366. package/dist/discontinuous/world-kernels/ginzburg8.d.ts.map +1 -0
  367. package/dist/discontinuous/world-kernels/ginzburg8.js +28 -0
  368. package/dist/discontinuous/world-kernels/ginzburg8.js.map +1 -0
  369. package/dist/discontinuous/world-kernels/ginzburg9.d.ts +5 -0
  370. package/dist/discontinuous/world-kernels/ginzburg9.d.ts.map +1 -0
  371. package/dist/discontinuous/world-kernels/ginzburg9.js +8 -0
  372. package/dist/discontinuous/world-kernels/ginzburg9.js.map +1 -0
  373. package/dist/discontinuous/world-kernels/ginzburgPolyconic.d.ts +5 -0
  374. package/dist/discontinuous/world-kernels/ginzburgPolyconic.d.ts.map +1 -0
  375. package/dist/discontinuous/world-kernels/ginzburgPolyconic.js +29 -0
  376. package/dist/discontinuous/world-kernels/ginzburgPolyconic.js.map +1 -0
  377. package/dist/discontinuous/world-kernels/hammer.d.ts +3 -0
  378. package/dist/discontinuous/world-kernels/hammer.d.ts.map +1 -0
  379. package/dist/discontinuous/world-kernels/hammer.js +34 -0
  380. package/dist/discontinuous/world-kernels/hammer.js.map +1 -0
  381. package/dist/discontinuous/world-kernels/hammerRetroazimuthal.d.ts +5 -0
  382. package/dist/discontinuous/world-kernels/hammerRetroazimuthal.d.ts.map +1 -0
  383. package/dist/discontinuous/world-kernels/hammerRetroazimuthal.js +37 -0
  384. package/dist/discontinuous/world-kernels/hammerRetroazimuthal.js.map +1 -0
  385. package/dist/discontinuous/world-kernels/hill.d.ts +5 -0
  386. package/dist/discontinuous/world-kernels/hill.d.ts.map +1 -0
  387. package/dist/discontinuous/world-kernels/hill.js +36 -0
  388. package/dist/discontinuous/world-kernels/hill.js.map +1 -0
  389. package/dist/discontinuous/world-kernels/homolosine.d.ts +5 -0
  390. package/dist/discontinuous/world-kernels/homolosine.d.ts.map +1 -0
  391. package/dist/discontinuous/world-kernels/homolosine.js +22 -0
  392. package/dist/discontinuous/world-kernels/homolosine.js.map +1 -0
  393. package/dist/discontinuous/world-kernels/hufnagel.d.ts +5 -0
  394. package/dist/discontinuous/world-kernels/hufnagel.d.ts.map +1 -0
  395. package/dist/discontinuous/world-kernels/hufnagel.js +53 -0
  396. package/dist/discontinuous/world-kernels/hufnagel.js.map +1 -0
  397. package/dist/discontinuous/world-kernels/hyperelliptical.d.ts +5 -0
  398. package/dist/discontinuous/world-kernels/hyperelliptical.d.ts.map +1 -0
  399. package/dist/discontinuous/world-kernels/hyperelliptical.js +47 -0
  400. package/dist/discontinuous/world-kernels/hyperelliptical.js.map +1 -0
  401. package/dist/discontinuous/world-kernels/integrate.d.ts +2 -0
  402. package/dist/discontinuous/world-kernels/integrate.d.ts.map +1 -0
  403. package/dist/discontinuous/world-kernels/integrate.js +82 -0
  404. package/dist/discontinuous/world-kernels/integrate.js.map +1 -0
  405. package/dist/discontinuous/world-kernels/kavrayskiy7.d.ts +5 -0
  406. package/dist/discontinuous/world-kernels/kavrayskiy7.d.ts.map +1 -0
  407. package/dist/discontinuous/world-kernels/kavrayskiy7.js +13 -0
  408. package/dist/discontinuous/world-kernels/kavrayskiy7.js.map +1 -0
  409. package/dist/discontinuous/world-kernels/lagrange.d.ts +5 -0
  410. package/dist/discontinuous/world-kernels/lagrange.d.ts.map +1 -0
  411. package/dist/discontinuous/world-kernels/lagrange.js +27 -0
  412. package/dist/discontinuous/world-kernels/lagrange.js.map +1 -0
  413. package/dist/discontinuous/world-kernels/larrivee.d.ts +5 -0
  414. package/dist/discontinuous/world-kernels/larrivee.d.ts.map +1 -0
  415. package/dist/discontinuous/world-kernels/larrivee.js +26 -0
  416. package/dist/discontinuous/world-kernels/larrivee.js.map +1 -0
  417. package/dist/discontinuous/world-kernels/laskowski.d.ts +5 -0
  418. package/dist/discontinuous/world-kernels/laskowski.d.ts.map +1 -0
  419. package/dist/discontinuous/world-kernels/laskowski.js +31 -0
  420. package/dist/discontinuous/world-kernels/laskowski.js.map +1 -0
  421. package/dist/discontinuous/world-kernels/littrow.d.ts +5 -0
  422. package/dist/discontinuous/world-kernels/littrow.d.ts.map +1 -0
  423. package/dist/discontinuous/world-kernels/littrow.js +13 -0
  424. package/dist/discontinuous/world-kernels/littrow.js.map +1 -0
  425. package/dist/discontinuous/world-kernels/loximuthal.d.ts +5 -0
  426. package/dist/discontinuous/world-kernels/loximuthal.d.ts.map +1 -0
  427. package/dist/discontinuous/world-kernels/loximuthal.js +30 -0
  428. package/dist/discontinuous/world-kernels/loximuthal.js.map +1 -0
  429. package/dist/discontinuous/world-kernels/math.d.ts +36 -0
  430. package/dist/discontinuous/world-kernels/math.d.ts.map +1 -0
  431. package/dist/discontinuous/world-kernels/math.js +63 -0
  432. package/dist/discontinuous/world-kernels/math.js.map +1 -0
  433. package/dist/discontinuous/world-kernels/miller.d.ts +5 -0
  434. package/dist/discontinuous/world-kernels/miller.d.ts.map +1 -0
  435. package/dist/discontinuous/world-kernels/miller.js +13 -0
  436. package/dist/discontinuous/world-kernels/miller.js.map +1 -0
  437. package/dist/discontinuous/world-kernels/modifiedStereographic.d.ts +18 -0
  438. package/dist/discontinuous/world-kernels/modifiedStereographic.d.ts.map +1 -0
  439. package/dist/discontinuous/world-kernels/modifiedStereographic.js +79 -0
  440. package/dist/discontinuous/world-kernels/modifiedStereographic.js.map +1 -0
  441. package/dist/discontinuous/world-kernels/mollweide.d.ts +10 -0
  442. package/dist/discontinuous/world-kernels/mollweide.d.ts.map +1 -0
  443. package/dist/discontinuous/world-kernels/mollweide.js +24 -0
  444. package/dist/discontinuous/world-kernels/mollweide.js.map +1 -0
  445. package/dist/discontinuous/world-kernels/mtFlatPolarParabolic.d.ts +5 -0
  446. package/dist/discontinuous/world-kernels/mtFlatPolarParabolic.d.ts.map +1 -0
  447. package/dist/discontinuous/world-kernels/mtFlatPolarParabolic.js +19 -0
  448. package/dist/discontinuous/world-kernels/mtFlatPolarParabolic.js.map +1 -0
  449. package/dist/discontinuous/world-kernels/mtFlatPolarQuartic.d.ts +5 -0
  450. package/dist/discontinuous/world-kernels/mtFlatPolarQuartic.d.ts.map +1 -0
  451. package/dist/discontinuous/world-kernels/mtFlatPolarQuartic.js +26 -0
  452. package/dist/discontinuous/world-kernels/mtFlatPolarQuartic.js.map +1 -0
  453. package/dist/discontinuous/world-kernels/mtFlatPolarSinusoidal.d.ts +5 -0
  454. package/dist/discontinuous/world-kernels/mtFlatPolarSinusoidal.d.ts.map +1 -0
  455. package/dist/discontinuous/world-kernels/mtFlatPolarSinusoidal.js +22 -0
  456. package/dist/discontinuous/world-kernels/mtFlatPolarSinusoidal.js.map +1 -0
  457. package/dist/discontinuous/world-kernels/naturalEarth2.d.ts +5 -0
  458. package/dist/discontinuous/world-kernels/naturalEarth2.d.ts.map +1 -0
  459. package/dist/discontinuous/world-kernels/naturalEarth2.js +37 -0
  460. package/dist/discontinuous/world-kernels/naturalEarth2.js.map +1 -0
  461. package/dist/discontinuous/world-kernels/nellHammer.d.ts +5 -0
  462. package/dist/discontinuous/world-kernels/nellHammer.d.ts.map +1 -0
  463. package/dist/discontinuous/world-kernels/nellHammer.js +18 -0
  464. package/dist/discontinuous/world-kernels/nellHammer.js.map +1 -0
  465. package/dist/discontinuous/world-kernels/newton.d.ts +3 -0
  466. package/dist/discontinuous/world-kernels/newton.d.ts.map +1 -0
  467. package/dist/discontinuous/world-kernels/newton.js +65 -0
  468. package/dist/discontinuous/world-kernels/newton.js.map +1 -0
  469. package/dist/discontinuous/world-kernels/nicolosi.d.ts +5 -0
  470. package/dist/discontinuous/world-kernels/nicolosi.d.ts.map +1 -0
  471. package/dist/discontinuous/world-kernels/nicolosi.js +38 -0
  472. package/dist/discontinuous/world-kernels/nicolosi.js.map +1 -0
  473. package/dist/discontinuous/world-kernels/patterson.d.ts +5 -0
  474. package/dist/discontinuous/world-kernels/patterson.d.ts.map +1 -0
  475. package/dist/discontinuous/world-kernels/patterson.js +32 -0
  476. package/dist/discontinuous/world-kernels/patterson.js.map +1 -0
  477. package/dist/discontinuous/world-kernels/polyconic.d.ts +5 -0
  478. package/dist/discontinuous/world-kernels/polyconic.d.ts.map +1 -0
  479. package/dist/discontinuous/world-kernels/polyconic.js +30 -0
  480. package/dist/discontinuous/world-kernels/polyconic.js.map +1 -0
  481. package/dist/discontinuous/world-kernels/rectangularPolyconic.d.ts +5 -0
  482. package/dist/discontinuous/world-kernels/rectangularPolyconic.d.ts.map +1 -0
  483. package/dist/discontinuous/world-kernels/rectangularPolyconic.js +31 -0
  484. package/dist/discontinuous/world-kernels/rectangularPolyconic.js.map +1 -0
  485. package/dist/discontinuous/world-kernels/robinson.d.ts +5 -0
  486. package/dist/discontinuous/world-kernels/robinson.d.ts.map +1 -0
  487. package/dist/discontinuous/world-kernels/robinson.js +63 -0
  488. package/dist/discontinuous/world-kernels/robinson.js.map +1 -0
  489. package/dist/discontinuous/world-kernels/satellite.d.ts +5 -0
  490. package/dist/discontinuous/world-kernels/satellite.d.ts.map +1 -0
  491. package/dist/discontinuous/world-kernels/satellite.js +32 -0
  492. package/dist/discontinuous/world-kernels/satellite.js.map +1 -0
  493. package/dist/discontinuous/world-kernels/sinuMollweide.d.ts +7 -0
  494. package/dist/discontinuous/world-kernels/sinuMollweide.d.ts.map +1 -0
  495. package/dist/discontinuous/world-kernels/sinuMollweide.js +20 -0
  496. package/dist/discontinuous/world-kernels/sinuMollweide.js.map +1 -0
  497. package/dist/discontinuous/world-kernels/sinusoidal.d.ts +5 -0
  498. package/dist/discontinuous/world-kernels/sinusoidal.d.ts.map +1 -0
  499. package/dist/discontinuous/world-kernels/sinusoidal.js +13 -0
  500. package/dist/discontinuous/world-kernels/sinusoidal.js.map +1 -0
  501. package/dist/discontinuous/world-kernels/times.d.ts +5 -0
  502. package/dist/discontinuous/world-kernels/times.d.ts.map +1 -0
  503. package/dist/discontinuous/world-kernels/times.js +15 -0
  504. package/dist/discontinuous/world-kernels/times.js.map +1 -0
  505. package/dist/discontinuous/world-kernels/twoPointEquidistant.d.ts +3 -0
  506. package/dist/discontinuous/world-kernels/twoPointEquidistant.d.ts.map +1 -0
  507. package/dist/discontinuous/world-kernels/twoPointEquidistant.js +28 -0
  508. package/dist/discontinuous/world-kernels/twoPointEquidistant.js.map +1 -0
  509. package/dist/discontinuous/world-kernels/vanDerGrinten.d.ts +5 -0
  510. package/dist/discontinuous/world-kernels/vanDerGrinten.d.ts.map +1 -0
  511. package/dist/discontinuous/world-kernels/vanDerGrinten.js +30 -0
  512. package/dist/discontinuous/world-kernels/vanDerGrinten.js.map +1 -0
  513. package/dist/discontinuous/world-kernels/vanDerGrinten2.d.ts +5 -0
  514. package/dist/discontinuous/world-kernels/vanDerGrinten2.d.ts.map +1 -0
  515. package/dist/discontinuous/world-kernels/vanDerGrinten2.js +25 -0
  516. package/dist/discontinuous/world-kernels/vanDerGrinten2.js.map +1 -0
  517. package/dist/discontinuous/world-kernels/vanDerGrinten3.d.ts +5 -0
  518. package/dist/discontinuous/world-kernels/vanDerGrinten3.d.ts.map +1 -0
  519. package/dist/discontinuous/world-kernels/vanDerGrinten3.js +22 -0
  520. package/dist/discontinuous/world-kernels/vanDerGrinten3.js.map +1 -0
  521. package/dist/discontinuous/world-kernels/vanDerGrinten4.d.ts +5 -0
  522. package/dist/discontinuous/world-kernels/vanDerGrinten4.d.ts.map +1 -0
  523. package/dist/discontinuous/world-kernels/vanDerGrinten4.js +38 -0
  524. package/dist/discontinuous/world-kernels/vanDerGrinten4.js.map +1 -0
  525. package/dist/discontinuous/world-kernels/wagner.d.ts +5 -0
  526. package/dist/discontinuous/world-kernels/wagner.d.ts.map +1 -0
  527. package/dist/discontinuous/world-kernels/wagner.js +44 -0
  528. package/dist/discontinuous/world-kernels/wagner.js.map +1 -0
  529. package/dist/discontinuous/world-kernels/wagner4.d.ts +5 -0
  530. package/dist/discontinuous/world-kernels/wagner4.d.ts.map +1 -0
  531. package/dist/discontinuous/world-kernels/wagner4.js +10 -0
  532. package/dist/discontinuous/world-kernels/wagner4.js.map +1 -0
  533. package/dist/discontinuous/world-kernels/wagner6.d.ts +5 -0
  534. package/dist/discontinuous/world-kernels/wagner6.d.ts.map +1 -0
  535. package/dist/discontinuous/world-kernels/wagner6.js +13 -0
  536. package/dist/discontinuous/world-kernels/wagner6.js.map +1 -0
  537. package/dist/discontinuous/world-kernels/wiechel.d.ts +5 -0
  538. package/dist/discontinuous/world-kernels/wiechel.d.ts.map +1 -0
  539. package/dist/discontinuous/world-kernels/wiechel.js +15 -0
  540. package/dist/discontinuous/world-kernels/wiechel.js.map +1 -0
  541. package/dist/discontinuous/world-kernels/winkel3.d.ts +5 -0
  542. package/dist/discontinuous/world-kernels/winkel3.d.ts.map +1 -0
  543. package/dist/discontinuous/world-kernels/winkel3.js +20 -0
  544. package/dist/discontinuous/world-kernels/winkel3.js.map +1 -0
  545. package/dist/discontinuous/world-kernels.d.ts +150 -0
  546. package/dist/discontinuous/world-kernels.d.ts.map +1 -0
  547. package/dist/discontinuous/world-kernels.js +215 -0
  548. package/dist/discontinuous/world-kernels.js.map +1 -0
  549. package/dist/discontinuous/world-map.d.ts +25 -0
  550. package/dist/discontinuous/world-map.d.ts.map +1 -0
  551. package/dist/discontinuous/world-map.js +187 -0
  552. package/dist/discontinuous/world-map.js.map +1 -0
  553. package/dist/discontinuous.cjs +7037 -0
  554. package/dist/discontinuous.cjs.map +6 -0
  555. package/dist/discontinuous.d.ts +50 -0
  556. package/dist/discontinuous.d.ts.map +1 -0
  557. package/dist/discontinuous.js +35 -0
  558. package/dist/discontinuous.js.map +1 -0
  559. package/dist/elastic.cjs +52991 -0
  560. package/dist/elastic.cjs.map +6 -0
  561. package/dist/elastic.d.ts +5 -0
  562. package/dist/elastic.d.ts.map +1 -0
  563. package/dist/elastic.js +8 -0
  564. package/dist/elastic.js.map +1 -0
  565. package/dist/ellipsoid-geodesic.d.ts +62 -0
  566. package/dist/ellipsoid-geodesic.d.ts.map +1 -0
  567. package/dist/ellipsoid-geodesic.js +69 -0
  568. package/dist/ellipsoid-geodesic.js.map +1 -0
  569. package/dist/ellipsoid-helpers/ellipsoid-transform.d.ts +1 -1
  570. package/dist/ellipsoid-helpers/ellipsoid-transform.d.ts.map +1 -1
  571. package/dist/ellipsoid-helpers/ellipsoid-transform.js +59 -18
  572. package/dist/ellipsoid-helpers/ellipsoid-transform.js.map +1 -1
  573. package/dist/ellipsoid-helpers/exact-nearest-surface.d.ts +16 -0
  574. package/dist/ellipsoid-helpers/exact-nearest-surface.d.ts.map +1 -0
  575. package/dist/ellipsoid-helpers/exact-nearest-surface.js +108 -0
  576. package/dist/ellipsoid-helpers/exact-nearest-surface.js.map +1 -0
  577. package/dist/ellipsoid-helpers/intersection-bounds.d.ts +18 -0
  578. package/dist/ellipsoid-helpers/intersection-bounds.d.ts.map +1 -0
  579. package/dist/ellipsoid-helpers/intersection-bounds.js +60 -0
  580. package/dist/ellipsoid-helpers/intersection-bounds.js.map +1 -0
  581. package/dist/ellipsoid-helpers/nearest-surface.d.ts +12 -0
  582. package/dist/ellipsoid-helpers/nearest-surface.d.ts.map +1 -0
  583. package/dist/ellipsoid-helpers/nearest-surface.js +127 -0
  584. package/dist/ellipsoid-helpers/nearest-surface.js.map +1 -0
  585. package/dist/ellipsoid-helpers/rhumb-pole-distance.d.ts +3 -0
  586. package/dist/ellipsoid-helpers/rhumb-pole-distance.d.ts.map +1 -0
  587. package/dist/ellipsoid-helpers/rhumb-pole-distance.js +63 -0
  588. package/dist/ellipsoid-helpers/rhumb-pole-distance.js.map +1 -0
  589. package/dist/ellipsoid-helpers/scale-to-geodetic-surface.d.ts +2 -0
  590. package/dist/ellipsoid-helpers/scale-to-geodetic-surface.d.ts.map +1 -1
  591. package/dist/ellipsoid-helpers/scale-to-geodetic-surface.js +32 -63
  592. package/dist/ellipsoid-helpers/scale-to-geodetic-surface.js.map +1 -1
  593. package/dist/ellipsoid-helpers/surface-polygon.d.ts +65 -0
  594. package/dist/ellipsoid-helpers/surface-polygon.d.ts.map +1 -0
  595. package/dist/ellipsoid-helpers/surface-polygon.js +159 -0
  596. package/dist/ellipsoid-helpers/surface-polygon.js.map +1 -0
  597. package/dist/ellipsoid-helpers/tangent-plane-numerics.d.ts +7 -0
  598. package/dist/ellipsoid-helpers/tangent-plane-numerics.d.ts.map +1 -0
  599. package/dist/ellipsoid-helpers/tangent-plane-numerics.js +88 -0
  600. package/dist/ellipsoid-helpers/tangent-plane-numerics.js.map +1 -0
  601. package/dist/ellipsoid-metrics.d.ts +31 -0
  602. package/dist/ellipsoid-metrics.d.ts.map +1 -0
  603. package/dist/ellipsoid-metrics.js +186 -0
  604. package/dist/ellipsoid-metrics.js.map +1 -0
  605. package/dist/ellipsoid-occluder.d.ts +28 -0
  606. package/dist/ellipsoid-occluder.d.ts.map +1 -0
  607. package/dist/ellipsoid-occluder.js +112 -0
  608. package/dist/ellipsoid-occluder.js.map +1 -0
  609. package/dist/ellipsoid-rhumb.d.ts +52 -0
  610. package/dist/ellipsoid-rhumb.d.ts.map +1 -0
  611. package/dist/ellipsoid-rhumb.js +321 -0
  612. package/dist/ellipsoid-rhumb.js.map +1 -0
  613. package/dist/ellipsoid-tangent-plane.d.ts +30 -8
  614. package/dist/ellipsoid-tangent-plane.d.ts.map +1 -1
  615. package/dist/ellipsoid-tangent-plane.js +181 -31
  616. package/dist/ellipsoid-tangent-plane.js.map +1 -1
  617. package/dist/ellipsoid-transforms.d.ts +12 -0
  618. package/dist/ellipsoid-transforms.d.ts.map +1 -0
  619. package/dist/ellipsoid-transforms.js +15 -0
  620. package/dist/ellipsoid-transforms.js.map +1 -0
  621. package/dist/ellipsoid.d.ts +13 -12
  622. package/dist/ellipsoid.d.ts.map +1 -1
  623. package/dist/ellipsoid.js +230 -66
  624. package/dist/ellipsoid.js.map +1 -1
  625. package/dist/entries/ellipsoid.cjs +3910 -0
  626. package/dist/entries/ellipsoid.cjs.map +6 -0
  627. package/dist/entries/ellipsoid.d.ts +26 -0
  628. package/dist/entries/ellipsoid.d.ts.map +1 -0
  629. package/dist/entries/ellipsoid.js +17 -0
  630. package/dist/entries/ellipsoid.js.map +1 -0
  631. package/dist/expressions.cjs +726 -0
  632. package/dist/expressions.cjs.map +6 -0
  633. package/dist/expressions.d.ts +4 -0
  634. package/dist/expressions.d.ts.map +1 -0
  635. package/dist/expressions.js +24 -0
  636. package/dist/expressions.js.map +1 -0
  637. package/dist/geoarrow/builder-entry.cjs +699 -0
  638. package/dist/geoarrow/builder-entry.cjs.map +6 -0
  639. package/dist/geoarrow/builder-entry.d.ts +4 -0
  640. package/dist/geoarrow/builder-entry.d.ts.map +1 -0
  641. package/dist/geoarrow/builder-entry.js +5 -0
  642. package/dist/geoarrow/builder-entry.js.map +1 -0
  643. package/dist/geoarrow/builder.d.ts +106 -0
  644. package/dist/geoarrow/builder.d.ts.map +1 -0
  645. package/dist/geoarrow/builder.js +668 -0
  646. package/dist/geoarrow/builder.js.map +1 -0
  647. package/dist/geoarrow/codecs.d.ts +24 -0
  648. package/dist/geoarrow/codecs.d.ts.map +1 -0
  649. package/dist/geoarrow/codecs.js +916 -0
  650. package/dist/geoarrow/codecs.js.map +1 -0
  651. package/dist/geoarrow/index.cjs +4114 -0
  652. package/dist/geoarrow/index.cjs.map +6 -0
  653. package/dist/geoarrow/index.d.ts +15 -0
  654. package/dist/geoarrow/index.d.ts.map +1 -0
  655. package/dist/geoarrow/index.js +11 -0
  656. package/dist/geoarrow/index.js.map +1 -0
  657. package/dist/geoarrow/kernels.d.ts +56 -0
  658. package/dist/geoarrow/kernels.d.ts.map +1 -0
  659. package/dist/geoarrow/kernels.js +982 -0
  660. package/dist/geoarrow/kernels.js.map +1 -0
  661. package/dist/geoarrow/layout.d.ts +64 -0
  662. package/dist/geoarrow/layout.d.ts.map +1 -0
  663. package/dist/geoarrow/layout.js +722 -0
  664. package/dist/geoarrow/layout.js.map +1 -0
  665. package/dist/geoarrow/tessellate.d.ts +31 -0
  666. package/dist/geoarrow/tessellate.d.ts.map +1 -0
  667. package/dist/geoarrow/tessellate.js +102 -0
  668. package/dist/geoarrow/tessellate.js.map +1 -0
  669. package/dist/geoarrow/tessellation-entry.cjs +431 -0
  670. package/dist/geoarrow/tessellation-entry.cjs.map +6 -0
  671. package/dist/geoarrow/tessellation-entry.d.ts +4 -0
  672. package/dist/geoarrow/tessellation-entry.d.ts.map +1 -0
  673. package/dist/geoarrow/tessellation-entry.js +5 -0
  674. package/dist/geoarrow/tessellation-entry.js.map +1 -0
  675. package/dist/geoarrow/types.d.ts +155 -0
  676. package/dist/geoarrow/types.d.ts.map +1 -0
  677. package/dist/geoarrow/types.js +71 -0
  678. package/dist/geoarrow/types.js.map +1 -0
  679. package/dist/geoarrow/views.d.ts +45 -0
  680. package/dist/geoarrow/views.d.ts.map +1 -0
  681. package/dist/geoarrow/views.js +114 -0
  682. package/dist/geoarrow/views.js.map +1 -0
  683. package/dist/geoarrow/wkb-entry.cjs +2472 -0
  684. package/dist/geoarrow/wkb-entry.cjs.map +6 -0
  685. package/dist/geoarrow/wkb-entry.d.ts +4 -0
  686. package/dist/geoarrow/wkb-entry.d.ts.map +1 -0
  687. package/dist/geoarrow/wkb-entry.js +6 -0
  688. package/dist/geoarrow/wkb-entry.js.map +1 -0
  689. package/dist/geoarrow/worker.cjs +77 -0
  690. package/dist/geoarrow/worker.cjs.map +6 -0
  691. package/dist/geoarrow/worker.d.ts +11 -0
  692. package/dist/geoarrow/worker.d.ts.map +1 -0
  693. package/dist/geoarrow/worker.js +10 -0
  694. package/dist/geoarrow/worker.js.map +1 -0
  695. package/dist/geodesic-exact/area.d.ts +5 -0
  696. package/dist/geodesic-exact/area.d.ts.map +1 -0
  697. package/dist/geodesic-exact/area.js +56 -0
  698. package/dist/geodesic-exact/area.js.map +1 -0
  699. package/dist/geodesic-exact/inverse-engine.d.ts +57 -0
  700. package/dist/geodesic-exact/inverse-engine.d.ts.map +1 -0
  701. package/dist/geodesic-exact/inverse-engine.js +56 -0
  702. package/dist/geodesic-exact/inverse-engine.js.map +1 -0
  703. package/dist/geodesic-exact/polygon.d.ts +12 -0
  704. package/dist/geodesic-exact/polygon.d.ts.map +1 -0
  705. package/dist/geodesic-exact/polygon.js +27 -0
  706. package/dist/geodesic-exact/polygon.js.map +1 -0
  707. package/dist/geodesic-exact/quadrature.d.ts +9 -0
  708. package/dist/geodesic-exact/quadrature.d.ts.map +1 -0
  709. package/dist/geodesic-exact/quadrature.js +62 -0
  710. package/dist/geodesic-exact/quadrature.js.map +1 -0
  711. package/dist/geodesic-exact.cjs +1871 -0
  712. package/dist/geodesic-exact.cjs.map +6 -0
  713. package/dist/geodesic-exact.d.ts +23 -0
  714. package/dist/geodesic-exact.d.ts.map +1 -0
  715. package/dist/geodesic-exact.js +210 -0
  716. package/dist/geodesic-exact.js.map +1 -0
  717. package/dist/geodesic-intersections.d.ts +83 -0
  718. package/dist/geodesic-intersections.d.ts.map +1 -0
  719. package/dist/geodesic-intersections.js +451 -0
  720. package/dist/geodesic-intersections.js.map +1 -0
  721. package/dist/geodesic-path.d.ts +28 -0
  722. package/dist/geodesic-path.d.ts.map +1 -0
  723. package/dist/geodesic-path.js +102 -0
  724. package/dist/geodesic-path.js.map +1 -0
  725. package/dist/geodesic-polygon.d.ts +11 -0
  726. package/dist/geodesic-polygon.d.ts.map +1 -0
  727. package/dist/geodesic-polygon.js +16 -0
  728. package/dist/geodesic-polygon.js.map +1 -0
  729. package/dist/geographic-seams/edge.d.ts +46 -0
  730. package/dist/geographic-seams/edge.d.ts.map +1 -0
  731. package/dist/geographic-seams/edge.js +362 -0
  732. package/dist/geographic-seams/edge.js.map +1 -0
  733. package/dist/geographic-seams/polygon.d.ts +8 -0
  734. package/dist/geographic-seams/polygon.d.ts.map +1 -0
  735. package/dist/geographic-seams/polygon.js +381 -0
  736. package/dist/geographic-seams/polygon.js.map +1 -0
  737. package/dist/geographic-seams/types.d.ts +59 -0
  738. package/dist/geographic-seams/types.d.ts.map +1 -0
  739. package/dist/geographic-seams/types.js +8 -0
  740. package/dist/geographic-seams/types.js.map +1 -0
  741. package/dist/geographic-seams.d.ts +12 -0
  742. package/dist/geographic-seams.d.ts.map +1 -0
  743. package/dist/geographic-seams.js +54 -0
  744. package/dist/geographic-seams.js.map +1 -0
  745. package/dist/geographic-tiles.d.ts +24 -0
  746. package/dist/geographic-tiles.d.ts.map +1 -0
  747. package/dist/geographic-tiles.js +72 -0
  748. package/dist/geographic-tiles.js.map +1 -0
  749. package/dist/globe-horizon-bounds.d.ts +13 -0
  750. package/dist/globe-horizon-bounds.d.ts.map +1 -0
  751. package/dist/globe-horizon-bounds.js +59 -0
  752. package/dist/globe-horizon-bounds.js.map +1 -0
  753. package/dist/globe.cjs +4155 -0
  754. package/dist/globe.cjs.map +6 -0
  755. package/dist/globe.d.ts +16 -0
  756. package/dist/globe.d.ts.map +1 -0
  757. package/dist/globe.js +12 -0
  758. package/dist/globe.js.map +1 -0
  759. package/dist/index.cjs +5027 -361
  760. package/dist/index.cjs.map +3 -3
  761. package/dist/index.d.ts +3 -6
  762. package/dist/index.d.ts.map +1 -1
  763. package/dist/index.js +4 -6
  764. package/dist/index.js.map +1 -1
  765. package/dist/lng-lat-rectangle.d.ts.map +1 -1
  766. package/dist/lng-lat-rectangle.js +5 -3
  767. package/dist/lng-lat-rectangle.js.map +1 -1
  768. package/dist/local-reference-frame.d.ts +57 -0
  769. package/dist/local-reference-frame.d.ts.map +1 -0
  770. package/dist/local-reference-frame.js +247 -0
  771. package/dist/local-reference-frame.js.map +1 -0
  772. package/dist/make-obb-from-region.d.ts +1 -1
  773. package/dist/make-obb-from-region.d.ts.map +1 -1
  774. package/dist/make-obb-from-region.js +6 -4
  775. package/dist/make-obb-from-region.js.map +1 -1
  776. package/dist/projection/analysis.cjs +239 -0
  777. package/dist/projection/analysis.cjs.map +6 -0
  778. package/dist/projection/analysis.d.ts +72 -0
  779. package/dist/projection/analysis.d.ts.map +1 -0
  780. package/dist/projection/analysis.js +221 -0
  781. package/dist/projection/analysis.js.map +1 -0
  782. package/dist/projection/bulk.cjs +203 -0
  783. package/dist/projection/bulk.cjs.map +6 -0
  784. package/dist/projection/bulk.d.ts +51 -0
  785. package/dist/projection/bulk.d.ts.map +1 -0
  786. package/dist/projection/bulk.js +215 -0
  787. package/dist/projection/bulk.js.map +1 -0
  788. package/dist/projection/datums.cjs +1383 -0
  789. package/dist/projection/datums.cjs.map +6 -0
  790. package/dist/projection/datums.d.ts +5 -0
  791. package/dist/projection/datums.d.ts.map +1 -0
  792. package/dist/projection/datums.js +10 -0
  793. package/dist/projection/datums.js.map +1 -0
  794. package/dist/projection/deformation.cjs +134 -0
  795. package/dist/projection/deformation.cjs.map +6 -0
  796. package/dist/projection/deformation.d.ts +3 -0
  797. package/dist/projection/deformation.d.ts.map +1 -0
  798. package/dist/projection/deformation.js +5 -0
  799. package/dist/projection/deformation.js.map +1 -0
  800. package/dist/projection/experimental/authalic-latitude.d.ts +7 -0
  801. package/dist/projection/experimental/authalic-latitude.d.ts.map +1 -0
  802. package/dist/projection/experimental/authalic-latitude.js +51 -0
  803. package/dist/projection/experimental/authalic-latitude.js.map +1 -0
  804. package/dist/projection/experimental/catalogue-kernel.d.ts +9 -0
  805. package/dist/projection/experimental/catalogue-kernel.d.ts.map +1 -0
  806. package/dist/projection/experimental/catalogue-kernel.js +44 -0
  807. package/dist/projection/experimental/catalogue-kernel.js.map +1 -0
  808. package/dist/projection/experimental/common/adjust_lat.d.ts +2 -0
  809. package/dist/projection/experimental/common/adjust_lat.d.ts.map +1 -0
  810. package/dist/projection/experimental/common/adjust_lat.js +10 -0
  811. package/dist/projection/experimental/common/adjust_lat.js.map +1 -0
  812. package/dist/projection/experimental/common/adjust_lon.d.ts +2 -0
  813. package/dist/projection/experimental/common/adjust_lon.d.ts.map +1 -0
  814. package/dist/projection/experimental/common/adjust_lon.js +13 -0
  815. package/dist/projection/experimental/common/adjust_lon.js.map +1 -0
  816. package/dist/projection/experimental/common/asinhy.d.ts +2 -0
  817. package/dist/projection/experimental/common/asinhy.d.ts.map +1 -0
  818. package/dist/projection/experimental/common/asinhy.js +12 -0
  819. package/dist/projection/experimental/common/asinhy.js.map +1 -0
  820. package/dist/projection/experimental/common/asinz.d.ts +2 -0
  821. package/dist/projection/experimental/common/asinz.d.ts.map +1 -0
  822. package/dist/projection/experimental/common/asinz.js +11 -0
  823. package/dist/projection/experimental/common/asinz.js.map +1 -0
  824. package/dist/projection/experimental/common/authlat.d.ts +2 -0
  825. package/dist/projection/experimental/common/authlat.d.ts.map +1 -0
  826. package/dist/projection/experimental/common/authlat.js +9 -0
  827. package/dist/projection/experimental/common/authlat.js.map +1 -0
  828. package/dist/projection/experimental/common/authset.d.ts +2 -0
  829. package/dist/projection/experimental/common/authset.d.ts.map +1 -0
  830. package/dist/projection/experimental/common/authset.js +24 -0
  831. package/dist/projection/experimental/common/authset.js.map +1 -0
  832. package/dist/projection/experimental/common/clens.d.ts +2 -0
  833. package/dist/projection/experimental/common/clens.d.ts.map +1 -0
  834. package/dist/projection/experimental/common/clens.js +18 -0
  835. package/dist/projection/experimental/common/clens.js.map +1 -0
  836. package/dist/projection/experimental/common/clens_cmplx.d.ts +5 -0
  837. package/dist/projection/experimental/common/clens_cmplx.d.ts.map +1 -0
  838. package/dist/projection/experimental/common/clens_cmplx.js +34 -0
  839. package/dist/projection/experimental/common/clens_cmplx.js.map +1 -0
  840. package/dist/projection/experimental/common/constants.d.ts +9 -0
  841. package/dist/projection/experimental/common/constants.d.ts.map +1 -0
  842. package/dist/projection/experimental/common/constants.js +14 -0
  843. package/dist/projection/experimental/common/constants.js.map +1 -0
  844. package/dist/projection/experimental/common/cosh.d.ts +2 -0
  845. package/dist/projection/experimental/common/cosh.d.ts.map +1 -0
  846. package/dist/projection/experimental/common/cosh.js +10 -0
  847. package/dist/projection/experimental/common/cosh.js.map +1 -0
  848. package/dist/projection/experimental/common/e0fn.d.ts +2 -0
  849. package/dist/projection/experimental/common/e0fn.d.ts.map +1 -0
  850. package/dist/projection/experimental/common/e0fn.js +8 -0
  851. package/dist/projection/experimental/common/e0fn.js.map +1 -0
  852. package/dist/projection/experimental/common/e1fn.d.ts +2 -0
  853. package/dist/projection/experimental/common/e1fn.d.ts.map +1 -0
  854. package/dist/projection/experimental/common/e1fn.js +8 -0
  855. package/dist/projection/experimental/common/e1fn.js.map +1 -0
  856. package/dist/projection/experimental/common/e2fn.d.ts +2 -0
  857. package/dist/projection/experimental/common/e2fn.d.ts.map +1 -0
  858. package/dist/projection/experimental/common/e2fn.js +8 -0
  859. package/dist/projection/experimental/common/e2fn.js.map +1 -0
  860. package/dist/projection/experimental/common/e3fn.d.ts +2 -0
  861. package/dist/projection/experimental/common/e3fn.d.ts.map +1 -0
  862. package/dist/projection/experimental/common/e3fn.js +8 -0
  863. package/dist/projection/experimental/common/e3fn.js.map +1 -0
  864. package/dist/projection/experimental/common/fL.d.ts +2 -0
  865. package/dist/projection/experimental/common/fL.d.ts.map +1 -0
  866. package/dist/projection/experimental/common/fL.js +9 -0
  867. package/dist/projection/experimental/common/fL.js.map +1 -0
  868. package/dist/projection/experimental/common/gN.d.ts +2 -0
  869. package/dist/projection/experimental/common/gN.d.ts.map +1 -0
  870. package/dist/projection/experimental/common/gN.js +9 -0
  871. package/dist/projection/experimental/common/gN.js.map +1 -0
  872. package/dist/projection/experimental/common/gatg.d.ts +2 -0
  873. package/dist/projection/experimental/common/gatg.d.ts.map +1 -0
  874. package/dist/projection/experimental/common/gatg.js +18 -0
  875. package/dist/projection/experimental/common/gatg.js.map +1 -0
  876. package/dist/projection/experimental/common/hypot.d.ts +2 -0
  877. package/dist/projection/experimental/common/hypot.d.ts.map +1 -0
  878. package/dist/projection/experimental/common/hypot.js +12 -0
  879. package/dist/projection/experimental/common/hypot.js.map +1 -0
  880. package/dist/projection/experimental/common/imlfn.d.ts +2 -0
  881. package/dist/projection/experimental/common/imlfn.d.ts.map +1 -0
  882. package/dist/projection/experimental/common/imlfn.js +21 -0
  883. package/dist/projection/experimental/common/imlfn.js.map +1 -0
  884. package/dist/projection/experimental/common/invlatiso.d.ts +2 -0
  885. package/dist/projection/experimental/common/invlatiso.d.ts.map +1 -0
  886. package/dist/projection/experimental/common/invlatiso.js +20 -0
  887. package/dist/projection/experimental/common/invlatiso.js.map +1 -0
  888. package/dist/projection/experimental/common/iqsfnz.d.ts +2 -0
  889. package/dist/projection/experimental/common/iqsfnz.d.ts.map +1 -0
  890. package/dist/projection/experimental/common/iqsfnz.js +44 -0
  891. package/dist/projection/experimental/common/iqsfnz.js.map +1 -0
  892. package/dist/projection/experimental/common/latiso.d.ts +2 -0
  893. package/dist/projection/experimental/common/latiso.d.ts.map +1 -0
  894. package/dist/projection/experimental/common/latiso.js +19 -0
  895. package/dist/projection/experimental/common/latiso.js.map +1 -0
  896. package/dist/projection/experimental/common/log1py.d.ts +2 -0
  897. package/dist/projection/experimental/common/log1py.d.ts.map +1 -0
  898. package/dist/projection/experimental/common/log1py.js +10 -0
  899. package/dist/projection/experimental/common/log1py.js.map +1 -0
  900. package/dist/projection/experimental/common/meridian-distance.d.ts +5 -0
  901. package/dist/projection/experimental/common/meridian-distance.d.ts.map +1 -0
  902. package/dist/projection/experimental/common/meridian-distance.js +47 -0
  903. package/dist/projection/experimental/common/meridian-distance.js.map +1 -0
  904. package/dist/projection/experimental/common/mlfn.d.ts +2 -0
  905. package/dist/projection/experimental/common/mlfn.d.ts.map +1 -0
  906. package/dist/projection/experimental/common/mlfn.js +8 -0
  907. package/dist/projection/experimental/common/mlfn.js.map +1 -0
  908. package/dist/projection/experimental/common/msfnz.d.ts +2 -0
  909. package/dist/projection/experimental/common/msfnz.d.ts.map +1 -0
  910. package/dist/projection/experimental/common/msfnz.js +9 -0
  911. package/dist/projection/experimental/common/msfnz.js.map +1 -0
  912. package/dist/projection/experimental/common/phi2z.d.ts +2 -0
  913. package/dist/projection/experimental/common/phi2z.d.ts.map +1 -0
  914. package/dist/projection/experimental/common/phi2z.js +21 -0
  915. package/dist/projection/experimental/common/phi2z.js.map +1 -0
  916. package/dist/projection/experimental/common/pj_enfn.d.ts +2 -0
  917. package/dist/projection/experimental/common/pj_enfn.d.ts.map +1 -0
  918. package/dist/projection/experimental/common/pj_enfn.js +28 -0
  919. package/dist/projection/experimental/common/pj_enfn.js.map +1 -0
  920. package/dist/projection/experimental/common/pj_inv_mlfn.d.ts +2 -0
  921. package/dist/projection/experimental/common/pj_inv_mlfn.d.ts.map +1 -0
  922. package/dist/projection/experimental/common/pj_inv_mlfn.js +26 -0
  923. package/dist/projection/experimental/common/pj_inv_mlfn.js.map +1 -0
  924. package/dist/projection/experimental/common/pj_mlfn.d.ts +2 -0
  925. package/dist/projection/experimental/common/pj_mlfn.d.ts.map +1 -0
  926. package/dist/projection/experimental/common/pj_mlfn.js +10 -0
  927. package/dist/projection/experimental/common/pj_mlfn.js.map +1 -0
  928. package/dist/projection/experimental/common/qsfnz.d.ts +2 -0
  929. package/dist/projection/experimental/common/qsfnz.d.ts.map +1 -0
  930. package/dist/projection/experimental/common/qsfnz.js +16 -0
  931. package/dist/projection/experimental/common/qsfnz.js.map +1 -0
  932. package/dist/projection/experimental/common/sign.d.ts +2 -0
  933. package/dist/projection/experimental/common/sign.d.ts.map +1 -0
  934. package/dist/projection/experimental/common/sign.js +8 -0
  935. package/dist/projection/experimental/common/sign.js.map +1 -0
  936. package/dist/projection/experimental/common/sinh.d.ts +2 -0
  937. package/dist/projection/experimental/common/sinh.d.ts.map +1 -0
  938. package/dist/projection/experimental/common/sinh.js +10 -0
  939. package/dist/projection/experimental/common/sinh.js.map +1 -0
  940. package/dist/projection/experimental/common/srat.d.ts +2 -0
  941. package/dist/projection/experimental/common/srat.d.ts.map +1 -0
  942. package/dist/projection/experimental/common/srat.js +8 -0
  943. package/dist/projection/experimental/common/srat.js.map +1 -0
  944. package/dist/projection/experimental/common/tsfnz.d.ts +2 -0
  945. package/dist/projection/experimental/common/tsfnz.d.ts.map +1 -0
  946. package/dist/projection/experimental/common/tsfnz.js +12 -0
  947. package/dist/projection/experimental/common/tsfnz.js.map +1 -0
  948. package/dist/projection/experimental/common/vincenty.d.ts +29 -0
  949. package/dist/projection/experimental/common/vincenty.d.ts.map +1 -0
  950. package/dist/projection/experimental/common/vincenty.js +134 -0
  951. package/dist/projection/experimental/common/vincenty.js.map +1 -0
  952. package/dist/projection/experimental/core.cjs +1940 -0
  953. package/dist/projection/experimental/core.cjs.map +6 -0
  954. package/dist/projection/experimental/core.d.ts +16 -0
  955. package/dist/projection/experimental/core.d.ts.map +1 -0
  956. package/dist/projection/experimental/core.js +10 -0
  957. package/dist/projection/experimental/core.js.map +1 -0
  958. package/dist/projection/experimental/crs/datum-catalog.d.ts +5 -0
  959. package/dist/projection/experimental/crs/datum-catalog.d.ts.map +1 -0
  960. package/dist/projection/experimental/crs/datum-catalog.js +47 -0
  961. package/dist/projection/experimental/crs/datum-catalog.js.map +1 -0
  962. package/dist/projection/experimental/crs/datum-table.d.ts +8 -0
  963. package/dist/projection/experimental/crs/datum-table.d.ts.map +1 -0
  964. package/dist/projection/experimental/crs/datum-table.js +1355 -0
  965. package/dist/projection/experimental/crs/datum-table.js.map +1 -0
  966. package/dist/projection/experimental/crs/ellipsoid-table.d.ts +8 -0
  967. package/dist/projection/experimental/crs/ellipsoid-table.d.ts.map +1 -0
  968. package/dist/projection/experimental/crs/ellipsoid-table.js +229 -0
  969. package/dist/projection/experimental/crs/ellipsoid-table.js.map +1 -0
  970. package/dist/projection/experimental/crs/normalize.d.ts +8 -0
  971. package/dist/projection/experimental/crs/normalize.d.ts.map +1 -0
  972. package/dist/projection/experimental/crs/normalize.js +279 -0
  973. package/dist/projection/experimental/crs/normalize.js.map +1 -0
  974. package/dist/projection/experimental/crs/primemeridian-table.d.ts +3 -0
  975. package/dist/projection/experimental/crs/primemeridian-table.d.ts.map +1 -0
  976. package/dist/projection/experimental/crs/primemeridian-table.js +20 -0
  977. package/dist/projection/experimental/crs/primemeridian-table.js.map +1 -0
  978. package/dist/projection/experimental/crs/projjson.cjs +564 -0
  979. package/dist/projection/experimental/crs/projjson.cjs.map +6 -0
  980. package/dist/projection/experimental/crs/projjson.d.ts +4 -0
  981. package/dist/projection/experimental/crs/projjson.d.ts.map +1 -0
  982. package/dist/projection/experimental/crs/projjson.js +12 -0
  983. package/dist/projection/experimental/crs/projjson.js.map +1 -0
  984. package/dist/projection/experimental/crs/spatial-reference.d.ts +11 -0
  985. package/dist/projection/experimental/crs/spatial-reference.d.ts.map +1 -0
  986. package/dist/projection/experimental/crs/spatial-reference.js +91 -0
  987. package/dist/projection/experimental/crs/spatial-reference.js.map +1 -0
  988. package/dist/projection/experimental/crs/structured.d.ts +8 -0
  989. package/dist/projection/experimental/crs/structured.d.ts.map +1 -0
  990. package/dist/projection/experimental/crs/structured.js +534 -0
  991. package/dist/projection/experimental/crs/structured.js.map +1 -0
  992. package/dist/projection/experimental/crs/types.d.ts +73 -0
  993. package/dist/projection/experimental/crs/types.d.ts.map +1 -0
  994. package/dist/projection/experimental/crs/types.js +21 -0
  995. package/dist/projection/experimental/crs/types.js.map +1 -0
  996. package/dist/projection/experimental/crs/wkt.cjs +1229 -0
  997. package/dist/projection/experimental/crs/wkt.cjs.map +6 -0
  998. package/dist/projection/experimental/crs/wkt.d.ts +3 -0
  999. package/dist/projection/experimental/crs/wkt.d.ts.map +1 -0
  1000. package/dist/projection/experimental/crs/wkt.js +190 -0
  1001. package/dist/projection/experimental/crs/wkt.js.map +1 -0
  1002. package/dist/projection/experimental/crs-descriptor.d.ts +10 -0
  1003. package/dist/projection/experimental/crs-descriptor.d.ts.map +1 -0
  1004. package/dist/projection/experimental/crs-descriptor.js +171 -0
  1005. package/dist/projection/experimental/crs-descriptor.js.map +1 -0
  1006. package/dist/projection/experimental/crs-rendering-scale.d.ts +5 -0
  1007. package/dist/projection/experimental/crs-rendering-scale.d.ts.map +1 -0
  1008. package/dist/projection/experimental/crs-rendering-scale.js +97 -0
  1009. package/dist/projection/experimental/crs-rendering-scale.js.map +1 -0
  1010. package/dist/projection/experimental/datum.d.ts +17 -0
  1011. package/dist/projection/experimental/datum.d.ts.map +1 -0
  1012. package/dist/projection/experimental/datum.js +160 -0
  1013. package/dist/projection/experimental/datum.js.map +1 -0
  1014. package/dist/projection/experimental/deformation-inverse.d.ts +5 -0
  1015. package/dist/projection/experimental/deformation-inverse.d.ts.map +1 -0
  1016. package/dist/projection/experimental/deformation-inverse.js +89 -0
  1017. package/dist/projection/experimental/deformation-inverse.js.map +1 -0
  1018. package/dist/projection/experimental/deformation.d.ts +23 -0
  1019. package/dist/projection/experimental/deformation.d.ts.map +1 -0
  1020. package/dist/projection/experimental/deformation.js +13 -0
  1021. package/dist/projection/experimental/deformation.js.map +1 -0
  1022. package/dist/projection/experimental/ellipsoidal-gnomonic.d.ts +10 -0
  1023. package/dist/projection/experimental/ellipsoidal-gnomonic.d.ts.map +1 -0
  1024. package/dist/projection/experimental/ellipsoidal-gnomonic.js +59 -0
  1025. package/dist/projection/experimental/ellipsoidal-gnomonic.js.map +1 -0
  1026. package/dist/projection/experimental/entries/projections/aea.cjs +649 -0
  1027. package/dist/projection/experimental/entries/projections/aea.cjs.map +6 -0
  1028. package/dist/projection/experimental/entries/projections/aea.d.ts +2 -0
  1029. package/dist/projection/experimental/entries/projections/aea.d.ts.map +1 -0
  1030. package/dist/projection/experimental/entries/projections/aea.js +5 -0
  1031. package/dist/projection/experimental/entries/projections/aea.js.map +1 -0
  1032. package/dist/projection/experimental/entries/projections/aeqd.cjs +718 -0
  1033. package/dist/projection/experimental/entries/projections/aeqd.cjs.map +6 -0
  1034. package/dist/projection/experimental/entries/projections/aeqd.d.ts +2 -0
  1035. package/dist/projection/experimental/entries/projections/aeqd.d.ts.map +1 -0
  1036. package/dist/projection/experimental/entries/projections/aeqd.js +5 -0
  1037. package/dist/projection/experimental/entries/projections/aeqd.js.map +1 -0
  1038. package/dist/projection/experimental/entries/projections/bonne.cjs +621 -0
  1039. package/dist/projection/experimental/entries/projections/bonne.cjs.map +6 -0
  1040. package/dist/projection/experimental/entries/projections/bonne.d.ts +2 -0
  1041. package/dist/projection/experimental/entries/projections/bonne.d.ts.map +1 -0
  1042. package/dist/projection/experimental/entries/projections/bonne.js +5 -0
  1043. package/dist/projection/experimental/entries/projections/bonne.js.map +1 -0
  1044. package/dist/projection/experimental/entries/projections/cass.cjs +610 -0
  1045. package/dist/projection/experimental/entries/projections/cass.cjs.map +6 -0
  1046. package/dist/projection/experimental/entries/projections/cass.d.ts +2 -0
  1047. package/dist/projection/experimental/entries/projections/cass.d.ts.map +1 -0
  1048. package/dist/projection/experimental/entries/projections/cass.js +5 -0
  1049. package/dist/projection/experimental/entries/projections/cass.js.map +1 -0
  1050. package/dist/projection/experimental/entries/projections/cea.cjs +536 -0
  1051. package/dist/projection/experimental/entries/projections/cea.cjs.map +6 -0
  1052. package/dist/projection/experimental/entries/projections/cea.d.ts +2 -0
  1053. package/dist/projection/experimental/entries/projections/cea.d.ts.map +1 -0
  1054. package/dist/projection/experimental/entries/projections/cea.js +5 -0
  1055. package/dist/projection/experimental/entries/projections/cea.js.map +1 -0
  1056. package/dist/projection/experimental/entries/projections/eck6.cjs +562 -0
  1057. package/dist/projection/experimental/entries/projections/eck6.cjs.map +6 -0
  1058. package/dist/projection/experimental/entries/projections/eck6.d.ts +2 -0
  1059. package/dist/projection/experimental/entries/projections/eck6.d.ts.map +1 -0
  1060. package/dist/projection/experimental/entries/projections/eck6.js +5 -0
  1061. package/dist/projection/experimental/entries/projections/eck6.js.map +1 -0
  1062. package/dist/projection/experimental/entries/projections/eqc.cjs +256 -0
  1063. package/dist/projection/experimental/entries/projections/eqc.cjs.map +6 -0
  1064. package/dist/projection/experimental/entries/projections/eqc.d.ts +2 -0
  1065. package/dist/projection/experimental/entries/projections/eqc.d.ts.map +1 -0
  1066. package/dist/projection/experimental/entries/projections/eqc.js +5 -0
  1067. package/dist/projection/experimental/entries/projections/eqc.js.map +1 -0
  1068. package/dist/projection/experimental/entries/projections/eqdc.cjs +650 -0
  1069. package/dist/projection/experimental/entries/projections/eqdc.cjs.map +6 -0
  1070. package/dist/projection/experimental/entries/projections/eqdc.d.ts +2 -0
  1071. package/dist/projection/experimental/entries/projections/eqdc.d.ts.map +1 -0
  1072. package/dist/projection/experimental/entries/projections/eqdc.js +5 -0
  1073. package/dist/projection/experimental/entries/projections/eqdc.js.map +1 -0
  1074. package/dist/projection/experimental/entries/projections/eqearth.cjs +460 -0
  1075. package/dist/projection/experimental/entries/projections/eqearth.cjs.map +6 -0
  1076. package/dist/projection/experimental/entries/projections/eqearth.d.ts +2 -0
  1077. package/dist/projection/experimental/entries/projections/eqearth.d.ts.map +1 -0
  1078. package/dist/projection/experimental/entries/projections/eqearth.js +5 -0
  1079. package/dist/projection/experimental/entries/projections/eqearth.js.map +1 -0
  1080. package/dist/projection/experimental/entries/projections/equi.cjs +477 -0
  1081. package/dist/projection/experimental/entries/projections/equi.cjs.map +6 -0
  1082. package/dist/projection/experimental/entries/projections/equi.d.ts +2 -0
  1083. package/dist/projection/experimental/entries/projections/equi.d.ts.map +1 -0
  1084. package/dist/projection/experimental/entries/projections/equi.js +5 -0
  1085. package/dist/projection/experimental/entries/projections/equi.js.map +1 -0
  1086. package/dist/projection/experimental/entries/projections/etmerc.cjs +887 -0
  1087. package/dist/projection/experimental/entries/projections/etmerc.cjs.map +6 -0
  1088. package/dist/projection/experimental/entries/projections/etmerc.d.ts +2 -0
  1089. package/dist/projection/experimental/entries/projections/etmerc.d.ts.map +1 -0
  1090. package/dist/projection/experimental/entries/projections/etmerc.js +5 -0
  1091. package/dist/projection/experimental/entries/projections/etmerc.js.map +1 -0
  1092. package/dist/projection/experimental/entries/projections/geocent.cjs +215 -0
  1093. package/dist/projection/experimental/entries/projections/geocent.cjs.map +6 -0
  1094. package/dist/projection/experimental/entries/projections/geocent.d.ts +2 -0
  1095. package/dist/projection/experimental/entries/projections/geocent.d.ts.map +1 -0
  1096. package/dist/projection/experimental/entries/projections/geocent.js +5 -0
  1097. package/dist/projection/experimental/entries/projections/geocent.js.map +1 -0
  1098. package/dist/projection/experimental/entries/projections/geos.cjs +703 -0
  1099. package/dist/projection/experimental/entries/projections/geos.cjs.map +6 -0
  1100. package/dist/projection/experimental/entries/projections/geos.d.ts +2 -0
  1101. package/dist/projection/experimental/entries/projections/geos.d.ts.map +1 -0
  1102. package/dist/projection/experimental/entries/projections/geos.js +5 -0
  1103. package/dist/projection/experimental/entries/projections/geos.js.map +1 -0
  1104. package/dist/projection/experimental/entries/projections/gnom.cjs +2028 -0
  1105. package/dist/projection/experimental/entries/projections/gnom.cjs.map +6 -0
  1106. package/dist/projection/experimental/entries/projections/gnom.d.ts +2 -0
  1107. package/dist/projection/experimental/entries/projections/gnom.d.ts.map +1 -0
  1108. package/dist/projection/experimental/entries/projections/gnom.js +5 -0
  1109. package/dist/projection/experimental/entries/projections/gnom.js.map +1 -0
  1110. package/dist/projection/experimental/entries/projections/gstmerc.cjs +526 -0
  1111. package/dist/projection/experimental/entries/projections/gstmerc.cjs.map +6 -0
  1112. package/dist/projection/experimental/entries/projections/gstmerc.d.ts +2 -0
  1113. package/dist/projection/experimental/entries/projections/gstmerc.d.ts.map +1 -0
  1114. package/dist/projection/experimental/entries/projections/gstmerc.js +5 -0
  1115. package/dist/projection/experimental/entries/projections/gstmerc.js.map +1 -0
  1116. package/dist/projection/experimental/entries/projections/krovak.cjs +683 -0
  1117. package/dist/projection/experimental/entries/projections/krovak.cjs.map +6 -0
  1118. package/dist/projection/experimental/entries/projections/krovak.d.ts +2 -0
  1119. package/dist/projection/experimental/entries/projections/krovak.d.ts.map +1 -0
  1120. package/dist/projection/experimental/entries/projections/krovak.js +5 -0
  1121. package/dist/projection/experimental/entries/projections/krovak.js.map +1 -0
  1122. package/dist/projection/experimental/entries/projections/laea.cjs +797 -0
  1123. package/dist/projection/experimental/entries/projections/laea.cjs.map +6 -0
  1124. package/dist/projection/experimental/entries/projections/laea.d.ts +2 -0
  1125. package/dist/projection/experimental/entries/projections/laea.d.ts.map +1 -0
  1126. package/dist/projection/experimental/entries/projections/laea.js +5 -0
  1127. package/dist/projection/experimental/entries/projections/laea.js.map +1 -0
  1128. package/dist/projection/experimental/entries/projections/lcc.cjs +637 -0
  1129. package/dist/projection/experimental/entries/projections/lcc.cjs.map +6 -0
  1130. package/dist/projection/experimental/entries/projections/lcc.d.ts +2 -0
  1131. package/dist/projection/experimental/entries/projections/lcc.d.ts.map +1 -0
  1132. package/dist/projection/experimental/entries/projections/lcc.js +5 -0
  1133. package/dist/projection/experimental/entries/projections/lcc.js.map +1 -0
  1134. package/dist/projection/experimental/entries/projections/merc.cjs +354 -0
  1135. package/dist/projection/experimental/entries/projections/merc.cjs.map +6 -0
  1136. package/dist/projection/experimental/entries/projections/merc.d.ts +2 -0
  1137. package/dist/projection/experimental/entries/projections/merc.d.ts.map +1 -0
  1138. package/dist/projection/experimental/entries/projections/merc.js +5 -0
  1139. package/dist/projection/experimental/entries/projections/merc.js.map +1 -0
  1140. package/dist/projection/experimental/entries/projections/mill.cjs +470 -0
  1141. package/dist/projection/experimental/entries/projections/mill.cjs.map +6 -0
  1142. package/dist/projection/experimental/entries/projections/mill.d.ts +2 -0
  1143. package/dist/projection/experimental/entries/projections/mill.d.ts.map +1 -0
  1144. package/dist/projection/experimental/entries/projections/mill.js +5 -0
  1145. package/dist/projection/experimental/entries/projections/mill.js.map +1 -0
  1146. package/dist/projection/experimental/entries/projections/moll.cjs +517 -0
  1147. package/dist/projection/experimental/entries/projections/moll.cjs.map +6 -0
  1148. package/dist/projection/experimental/entries/projections/moll.d.ts +2 -0
  1149. package/dist/projection/experimental/entries/projections/moll.d.ts.map +1 -0
  1150. package/dist/projection/experimental/entries/projections/moll.js +5 -0
  1151. package/dist/projection/experimental/entries/projections/moll.js.map +1 -0
  1152. package/dist/projection/experimental/entries/projections/nzmg.cjs +623 -0
  1153. package/dist/projection/experimental/entries/projections/nzmg.cjs.map +6 -0
  1154. package/dist/projection/experimental/entries/projections/nzmg.d.ts +2 -0
  1155. package/dist/projection/experimental/entries/projections/nzmg.d.ts.map +1 -0
  1156. package/dist/projection/experimental/entries/projections/nzmg.js +5 -0
  1157. package/dist/projection/experimental/entries/projections/nzmg.js.map +1 -0
  1158. package/dist/projection/experimental/entries/projections/ob_tran.cjs +540 -0
  1159. package/dist/projection/experimental/entries/projections/ob_tran.cjs.map +6 -0
  1160. package/dist/projection/experimental/entries/projections/ob_tran.d.ts +2 -0
  1161. package/dist/projection/experimental/entries/projections/ob_tran.d.ts.map +1 -0
  1162. package/dist/projection/experimental/entries/projections/ob_tran.js +5 -0
  1163. package/dist/projection/experimental/entries/projections/ob_tran.js.map +1 -0
  1164. package/dist/projection/experimental/entries/projections/omerc.cjs +850 -0
  1165. package/dist/projection/experimental/entries/projections/omerc.cjs.map +6 -0
  1166. package/dist/projection/experimental/entries/projections/omerc.d.ts +2 -0
  1167. package/dist/projection/experimental/entries/projections/omerc.d.ts.map +1 -0
  1168. package/dist/projection/experimental/entries/projections/omerc.js +5 -0
  1169. package/dist/projection/experimental/entries/projections/omerc.js.map +1 -0
  1170. package/dist/projection/experimental/entries/projections/ortho.cjs +519 -0
  1171. package/dist/projection/experimental/entries/projections/ortho.cjs.map +6 -0
  1172. package/dist/projection/experimental/entries/projections/ortho.d.ts +2 -0
  1173. package/dist/projection/experimental/entries/projections/ortho.d.ts.map +1 -0
  1174. package/dist/projection/experimental/entries/projections/ortho.js +5 -0
  1175. package/dist/projection/experimental/entries/projections/ortho.js.map +1 -0
  1176. package/dist/projection/experimental/entries/projections/poly.cjs +622 -0
  1177. package/dist/projection/experimental/entries/projections/poly.cjs.map +6 -0
  1178. package/dist/projection/experimental/entries/projections/poly.d.ts +2 -0
  1179. package/dist/projection/experimental/entries/projections/poly.d.ts.map +1 -0
  1180. package/dist/projection/experimental/entries/projections/poly.js +5 -0
  1181. package/dist/projection/experimental/entries/projections/poly.js.map +1 -0
  1182. package/dist/projection/experimental/entries/projections/qsc.cjs +695 -0
  1183. package/dist/projection/experimental/entries/projections/qsc.cjs.map +6 -0
  1184. package/dist/projection/experimental/entries/projections/qsc.d.ts +2 -0
  1185. package/dist/projection/experimental/entries/projections/qsc.d.ts.map +1 -0
  1186. package/dist/projection/experimental/entries/projections/qsc.js +5 -0
  1187. package/dist/projection/experimental/entries/projections/qsc.js.map +1 -0
  1188. package/dist/projection/experimental/entries/projections/robin.cjs +584 -0
  1189. package/dist/projection/experimental/entries/projections/robin.cjs.map +6 -0
  1190. package/dist/projection/experimental/entries/projections/robin.d.ts +2 -0
  1191. package/dist/projection/experimental/entries/projections/robin.d.ts.map +1 -0
  1192. package/dist/projection/experimental/entries/projections/robin.js +5 -0
  1193. package/dist/projection/experimental/entries/projections/robin.js.map +1 -0
  1194. package/dist/projection/experimental/entries/projections/sinu.cjs +586 -0
  1195. package/dist/projection/experimental/entries/projections/sinu.cjs.map +6 -0
  1196. package/dist/projection/experimental/entries/projections/sinu.d.ts +2 -0
  1197. package/dist/projection/experimental/entries/projections/sinu.d.ts.map +1 -0
  1198. package/dist/projection/experimental/entries/projections/sinu.js +5 -0
  1199. package/dist/projection/experimental/entries/projections/sinu.js.map +1 -0
  1200. package/dist/projection/experimental/entries/projections/somerc.cjs +575 -0
  1201. package/dist/projection/experimental/entries/projections/somerc.cjs.map +6 -0
  1202. package/dist/projection/experimental/entries/projections/somerc.d.ts +2 -0
  1203. package/dist/projection/experimental/entries/projections/somerc.d.ts.map +1 -0
  1204. package/dist/projection/experimental/entries/projections/somerc.js +5 -0
  1205. package/dist/projection/experimental/entries/projections/somerc.js.map +1 -0
  1206. package/dist/projection/experimental/entries/projections/stere.cjs +697 -0
  1207. package/dist/projection/experimental/entries/projections/stere.cjs.map +6 -0
  1208. package/dist/projection/experimental/entries/projections/stere.d.ts +2 -0
  1209. package/dist/projection/experimental/entries/projections/stere.d.ts.map +1 -0
  1210. package/dist/projection/experimental/entries/projections/stere.js +5 -0
  1211. package/dist/projection/experimental/entries/projections/stere.js.map +1 -0
  1212. package/dist/projection/experimental/entries/projections/sterea.cjs +631 -0
  1213. package/dist/projection/experimental/entries/projections/sterea.cjs.map +6 -0
  1214. package/dist/projection/experimental/entries/projections/sterea.d.ts +2 -0
  1215. package/dist/projection/experimental/entries/projections/sterea.d.ts.map +1 -0
  1216. package/dist/projection/experimental/entries/projections/sterea.js +5 -0
  1217. package/dist/projection/experimental/entries/projections/sterea.js.map +1 -0
  1218. package/dist/projection/experimental/entries/projections/tmerc.cjs +887 -0
  1219. package/dist/projection/experimental/entries/projections/tmerc.cjs.map +6 -0
  1220. package/dist/projection/experimental/entries/projections/tmerc.d.ts +2 -0
  1221. package/dist/projection/experimental/entries/projections/tmerc.d.ts.map +1 -0
  1222. package/dist/projection/experimental/entries/projections/tmerc.js +5 -0
  1223. package/dist/projection/experimental/entries/projections/tmerc.js.map +1 -0
  1224. package/dist/projection/experimental/entries/projections/tpers.cjs +645 -0
  1225. package/dist/projection/experimental/entries/projections/tpers.cjs.map +6 -0
  1226. package/dist/projection/experimental/entries/projections/tpers.d.ts +2 -0
  1227. package/dist/projection/experimental/entries/projections/tpers.d.ts.map +1 -0
  1228. package/dist/projection/experimental/entries/projections/tpers.js +5 -0
  1229. package/dist/projection/experimental/entries/projections/tpers.js.map +1 -0
  1230. package/dist/projection/experimental/entries/projections/utm.cjs +915 -0
  1231. package/dist/projection/experimental/entries/projections/utm.cjs.map +6 -0
  1232. package/dist/projection/experimental/entries/projections/utm.d.ts +2 -0
  1233. package/dist/projection/experimental/entries/projections/utm.d.ts.map +1 -0
  1234. package/dist/projection/experimental/entries/projections/utm.js +5 -0
  1235. package/dist/projection/experimental/entries/projections/utm.js.map +1 -0
  1236. package/dist/projection/experimental/entries/projections/vandg.cjs +560 -0
  1237. package/dist/projection/experimental/entries/projections/vandg.cjs.map +6 -0
  1238. package/dist/projection/experimental/entries/projections/vandg.d.ts +2 -0
  1239. package/dist/projection/experimental/entries/projections/vandg.d.ts.map +1 -0
  1240. package/dist/projection/experimental/entries/projections/vandg.js +5 -0
  1241. package/dist/projection/experimental/entries/projections/vandg.js.map +1 -0
  1242. package/dist/projection/experimental/exact-helmert.d.ts +9 -0
  1243. package/dist/projection/experimental/exact-helmert.d.ts.map +1 -0
  1244. package/dist/projection/experimental/exact-helmert.js +32 -0
  1245. package/dist/projection/experimental/exact-helmert.js.map +1 -0
  1246. package/dist/projection/experimental/flat-projection.d.ts +15 -0
  1247. package/dist/projection/experimental/flat-projection.d.ts.map +1 -0
  1248. package/dist/projection/experimental/flat-projection.js +70 -0
  1249. package/dist/projection/experimental/flat-projection.js.map +1 -0
  1250. package/dist/projection/experimental/grids/geotiff.cjs +180 -0
  1251. package/dist/projection/experimental/grids/geotiff.cjs.map +6 -0
  1252. package/dist/projection/experimental/grids/geotiff.d.ts +23 -0
  1253. package/dist/projection/experimental/grids/geotiff.d.ts.map +1 -0
  1254. package/dist/projection/experimental/grids/geotiff.js +59 -0
  1255. package/dist/projection/experimental/grids/geotiff.js.map +1 -0
  1256. package/dist/projection/experimental/grids/grid.d.ts +4 -0
  1257. package/dist/projection/experimental/grids/grid.d.ts.map +1 -0
  1258. package/dist/projection/experimental/grids/grid.js +111 -0
  1259. package/dist/projection/experimental/grids/grid.js.map +1 -0
  1260. package/dist/projection/experimental/grids/gtx.cjs +91 -0
  1261. package/dist/projection/experimental/grids/gtx.cjs.map +6 -0
  1262. package/dist/projection/experimental/grids/gtx.d.ts +7 -0
  1263. package/dist/projection/experimental/grids/gtx.d.ts.map +1 -0
  1264. package/dist/projection/experimental/grids/gtx.js +30 -0
  1265. package/dist/projection/experimental/grids/gtx.js.map +1 -0
  1266. package/dist/projection/experimental/grids/ntv2.cjs +181 -0
  1267. package/dist/projection/experimental/grids/ntv2.cjs.map +6 -0
  1268. package/dist/projection/experimental/grids/ntv2.d.ts +8 -0
  1269. package/dist/projection/experimental/grids/ntv2.d.ts.map +1 -0
  1270. package/dist/projection/experimental/grids/ntv2.js +56 -0
  1271. package/dist/projection/experimental/grids/ntv2.js.map +1 -0
  1272. package/dist/projection/experimental/grids/scalar-geotiff.d.ts +58 -0
  1273. package/dist/projection/experimental/grids/scalar-geotiff.d.ts.map +1 -0
  1274. package/dist/projection/experimental/grids/scalar-geotiff.js +147 -0
  1275. package/dist/projection/experimental/grids/scalar-geotiff.js.map +1 -0
  1276. package/dist/projection/experimental/grids/types.d.ts +35 -0
  1277. package/dist/projection/experimental/grids/types.d.ts.map +1 -0
  1278. package/dist/projection/experimental/grids/types.js +2 -0
  1279. package/dist/projection/experimental/grids/types.js.map +1 -0
  1280. package/dist/projection/experimental/grids/velocity-geotiff.cjs +247 -0
  1281. package/dist/projection/experimental/grids/velocity-geotiff.cjs.map +6 -0
  1282. package/dist/projection/experimental/grids/velocity-geotiff.d.ts +11 -0
  1283. package/dist/projection/experimental/grids/velocity-geotiff.d.ts.map +1 -0
  1284. package/dist/projection/experimental/grids/velocity-geotiff.js +61 -0
  1285. package/dist/projection/experimental/grids/velocity-geotiff.js.map +1 -0
  1286. package/dist/projection/experimental/grids/velocity.d.ts +21 -0
  1287. package/dist/projection/experimental/grids/velocity.d.ts.map +1 -0
  1288. package/dist/projection/experimental/grids/velocity.js +29 -0
  1289. package/dist/projection/experimental/grids/velocity.js.map +1 -0
  1290. package/dist/projection/experimental/grids/vertical-geotiff.cjs +195 -0
  1291. package/dist/projection/experimental/grids/vertical-geotiff.cjs.map +6 -0
  1292. package/dist/projection/experimental/grids/vertical-geotiff.d.ts +6 -0
  1293. package/dist/projection/experimental/grids/vertical-geotiff.d.ts.map +1 -0
  1294. package/dist/projection/experimental/grids/vertical-geotiff.js +20 -0
  1295. package/dist/projection/experimental/grids/vertical-geotiff.js.map +1 -0
  1296. package/dist/projection/experimental/grids/vertical.cjs +80 -0
  1297. package/dist/projection/experimental/grids/vertical.cjs.map +6 -0
  1298. package/dist/projection/experimental/grids/vertical.d.ts +22 -0
  1299. package/dist/projection/experimental/grids/vertical.d.ts.map +1 -0
  1300. package/dist/projection/experimental/grids/vertical.js +73 -0
  1301. package/dist/projection/experimental/grids/vertical.js.map +1 -0
  1302. package/dist/projection/experimental/helmert-flat.d.ts +4 -0
  1303. package/dist/projection/experimental/helmert-flat.d.ts.map +1 -0
  1304. package/dist/projection/experimental/helmert-flat.js +53 -0
  1305. package/dist/projection/experimental/helmert-flat.js.map +1 -0
  1306. package/dist/projection/experimental/index.cjs +11552 -0
  1307. package/dist/projection/experimental/index.cjs.map +6 -0
  1308. package/dist/projection/experimental/index.d.ts +49 -0
  1309. package/dist/projection/experimental/index.d.ts.map +1 -0
  1310. package/dist/projection/experimental/index.js +48 -0
  1311. package/dist/projection/experimental/index.js.map +1 -0
  1312. package/dist/projection/experimental/inverse-spherical-latitude.d.ts +2 -0
  1313. package/dist/projection/experimental/inverse-spherical-latitude.d.ts.map +1 -0
  1314. package/dist/projection/experimental/inverse-spherical-latitude.js +11 -0
  1315. package/dist/projection/experimental/inverse-spherical-latitude.js.map +1 -0
  1316. package/dist/projection/experimental/kernel.d.ts +37 -0
  1317. package/dist/projection/experimental/kernel.d.ts.map +1 -0
  1318. package/dist/projection/experimental/kernel.js +81 -0
  1319. package/dist/projection/experimental/kernel.js.map +1 -0
  1320. package/dist/projection/experimental/kernels/aea.d.ts +25 -0
  1321. package/dist/projection/experimental/kernels/aea.d.ts.map +1 -0
  1322. package/dist/projection/experimental/kernels/aea.js +118 -0
  1323. package/dist/projection/experimental/kernels/aea.js.map +1 -0
  1324. package/dist/projection/experimental/kernels/aeqd.d.ts +10 -0
  1325. package/dist/projection/experimental/kernels/aeqd.d.ts.map +1 -0
  1326. package/dist/projection/experimental/kernels/aeqd.js +168 -0
  1327. package/dist/projection/experimental/kernels/aeqd.js.map +1 -0
  1328. package/dist/projection/experimental/kernels/bonne.d.ts +12 -0
  1329. package/dist/projection/experimental/kernels/bonne.d.ts.map +1 -0
  1330. package/dist/projection/experimental/kernels/bonne.js +128 -0
  1331. package/dist/projection/experimental/kernels/bonne.js.map +1 -0
  1332. package/dist/projection/experimental/kernels/cass.d.ts +10 -0
  1333. package/dist/projection/experimental/kernels/cass.d.ts.map +1 -0
  1334. package/dist/projection/experimental/kernels/cass.js +122 -0
  1335. package/dist/projection/experimental/kernels/cass.js.map +1 -0
  1336. package/dist/projection/experimental/kernels/cea.d.ts +6 -0
  1337. package/dist/projection/experimental/kernels/cea.d.ts.map +1 -0
  1338. package/dist/projection/experimental/kernels/cea.js +63 -0
  1339. package/dist/projection/experimental/kernels/cea.js.map +1 -0
  1340. package/dist/projection/experimental/kernels/eck6.d.ts +13 -0
  1341. package/dist/projection/experimental/kernels/eck6.d.ts.map +1 -0
  1342. package/dist/projection/experimental/kernels/eck6.js +23 -0
  1343. package/dist/projection/experimental/kernels/eck6.js.map +1 -0
  1344. package/dist/projection/experimental/kernels/eqdc.d.ts +19 -0
  1345. package/dist/projection/experimental/kernels/eqdc.d.ts.map +1 -0
  1346. package/dist/projection/experimental/kernels/eqdc.js +117 -0
  1347. package/dist/projection/experimental/kernels/eqdc.js.map +1 -0
  1348. package/dist/projection/experimental/kernels/eqearth.d.ts +10 -0
  1349. package/dist/projection/experimental/kernels/eqearth.d.ts.map +1 -0
  1350. package/dist/projection/experimental/kernels/eqearth.js +114 -0
  1351. package/dist/projection/experimental/kernels/eqearth.js.map +1 -0
  1352. package/dist/projection/experimental/kernels/equi.d.ts +9 -0
  1353. package/dist/projection/experimental/kernels/equi.d.ts.map +1 -0
  1354. package/dist/projection/experimental/kernels/equi.js +43 -0
  1355. package/dist/projection/experimental/kernels/equi.js.map +1 -0
  1356. package/dist/projection/experimental/kernels/etmerc.d.ts +13 -0
  1357. package/dist/projection/experimental/kernels/etmerc.d.ts.map +1 -0
  1358. package/dist/projection/experimental/kernels/etmerc.js +145 -0
  1359. package/dist/projection/experimental/kernels/etmerc.js.map +1 -0
  1360. package/dist/projection/experimental/kernels/gauss.d.ts +12 -0
  1361. package/dist/projection/experimental/kernels/gauss.d.ts.map +1 -0
  1362. package/dist/projection/experimental/kernels/gauss.js +64 -0
  1363. package/dist/projection/experimental/kernels/gauss.js.map +1 -0
  1364. package/dist/projection/experimental/kernels/geos.d.ts +17 -0
  1365. package/dist/projection/experimental/kernels/geos.d.ts.map +1 -0
  1366. package/dist/projection/experimental/kernels/geos.js +153 -0
  1367. package/dist/projection/experimental/kernels/geos.js.map +1 -0
  1368. package/dist/projection/experimental/kernels/gnom.d.ts +14 -0
  1369. package/dist/projection/experimental/kernels/gnom.d.ts.map +1 -0
  1370. package/dist/projection/experimental/kernels/gnom.js +102 -0
  1371. package/dist/projection/experimental/kernels/gnom.js.map +1 -0
  1372. package/dist/projection/experimental/kernels/gstmerc.d.ts +13 -0
  1373. package/dist/projection/experimental/kernels/gstmerc.d.ts.map +1 -0
  1374. package/dist/projection/experimental/kernels/gstmerc.js +57 -0
  1375. package/dist/projection/experimental/kernels/gstmerc.js.map +1 -0
  1376. package/dist/projection/experimental/kernels/krovak.d.ts +23 -0
  1377. package/dist/projection/experimental/kernels/krovak.d.ts.map +1 -0
  1378. package/dist/projection/experimental/kernels/krovak.js +128 -0
  1379. package/dist/projection/experimental/kernels/krovak.js.map +1 -0
  1380. package/dist/projection/experimental/kernels/laea.d.ts +22 -0
  1381. package/dist/projection/experimental/kernels/laea.d.ts.map +1 -0
  1382. package/dist/projection/experimental/kernels/laea.js +296 -0
  1383. package/dist/projection/experimental/kernels/laea.js.map +1 -0
  1384. package/dist/projection/experimental/kernels/lcc.d.ts +10 -0
  1385. package/dist/projection/experimental/kernels/lcc.d.ts.map +1 -0
  1386. package/dist/projection/experimental/kernels/lcc.js +126 -0
  1387. package/dist/projection/experimental/kernels/lcc.js.map +1 -0
  1388. package/dist/projection/experimental/kernels/mill.d.ts +6 -0
  1389. package/dist/projection/experimental/kernels/mill.d.ts.map +1 -0
  1390. package/dist/projection/experimental/kernels/mill.js +49 -0
  1391. package/dist/projection/experimental/kernels/mill.js.map +1 -0
  1392. package/dist/projection/experimental/kernels/moll.d.ts +6 -0
  1393. package/dist/projection/experimental/kernels/moll.d.ts.map +1 -0
  1394. package/dist/projection/experimental/kernels/moll.js +104 -0
  1395. package/dist/projection/experimental/kernels/moll.js.map +1 -0
  1396. package/dist/projection/experimental/kernels/nzmg.d.ts +28 -0
  1397. package/dist/projection/experimental/kernels/nzmg.d.ts.map +1 -0
  1398. package/dist/projection/experimental/kernels/nzmg.js +209 -0
  1399. package/dist/projection/experimental/kernels/nzmg.js.map +1 -0
  1400. package/dist/projection/experimental/kernels/omerc.d.ts +30 -0
  1401. package/dist/projection/experimental/kernels/omerc.d.ts.map +1 -0
  1402. package/dist/projection/experimental/kernels/omerc.js +260 -0
  1403. package/dist/projection/experimental/kernels/omerc.js.map +1 -0
  1404. package/dist/projection/experimental/kernels/ortho.d.ts +10 -0
  1405. package/dist/projection/experimental/kernels/ortho.d.ts.map +1 -0
  1406. package/dist/projection/experimental/kernels/ortho.js +43 -0
  1407. package/dist/projection/experimental/kernels/ortho.js.map +1 -0
  1408. package/dist/projection/experimental/kernels/poly.d.ts +10 -0
  1409. package/dist/projection/experimental/kernels/poly.d.ts.map +1 -0
  1410. package/dist/projection/experimental/kernels/poly.js +193 -0
  1411. package/dist/projection/experimental/kernels/poly.js.map +1 -0
  1412. package/dist/projection/experimental/kernels/qsc.d.ts +10 -0
  1413. package/dist/projection/experimental/kernels/qsc.d.ts.map +1 -0
  1414. package/dist/projection/experimental/kernels/qsc.js +364 -0
  1415. package/dist/projection/experimental/kernels/qsc.js.map +1 -0
  1416. package/dist/projection/experimental/kernels/robin.d.ts +6 -0
  1417. package/dist/projection/experimental/kernels/robin.d.ts.map +1 -0
  1418. package/dist/projection/experimental/kernels/robin.js +166 -0
  1419. package/dist/projection/experimental/kernels/robin.js.map +1 -0
  1420. package/dist/projection/experimental/kernels/sinu.d.ts +12 -0
  1421. package/dist/projection/experimental/kernels/sinu.d.ts.map +1 -0
  1422. package/dist/projection/experimental/kernels/sinu.js +107 -0
  1423. package/dist/projection/experimental/kernels/sinu.js.map +1 -0
  1424. package/dist/projection/experimental/kernels/somerc.d.ts +13 -0
  1425. package/dist/projection/experimental/kernels/somerc.d.ts.map +1 -0
  1426. package/dist/projection/experimental/kernels/somerc.js +79 -0
  1427. package/dist/projection/experimental/kernels/somerc.js.map +1 -0
  1428. package/dist/projection/experimental/kernels/stere.d.ts +15 -0
  1429. package/dist/projection/experimental/kernels/stere.d.ts.map +1 -0
  1430. package/dist/projection/experimental/kernels/stere.js +207 -0
  1431. package/dist/projection/experimental/kernels/stere.js.map +1 -0
  1432. package/dist/projection/experimental/kernels/sterea.d.ts +11 -0
  1433. package/dist/projection/experimental/kernels/sterea.d.ts.map +1 -0
  1434. package/dist/projection/experimental/kernels/sterea.js +67 -0
  1435. package/dist/projection/experimental/kernels/sterea.js.map +1 -0
  1436. package/dist/projection/experimental/kernels/tmerc.d.ts +9 -0
  1437. package/dist/projection/experimental/kernels/tmerc.d.ts.map +1 -0
  1438. package/dist/projection/experimental/kernels/tmerc.js +201 -0
  1439. package/dist/projection/experimental/kernels/tmerc.js.map +1 -0
  1440. package/dist/projection/experimental/kernels/tpers.d.ts +22 -0
  1441. package/dist/projection/experimental/kernels/tpers.d.ts.map +1 -0
  1442. package/dist/projection/experimental/kernels/tpers.js +156 -0
  1443. package/dist/projection/experimental/kernels/tpers.js.map +1 -0
  1444. package/dist/projection/experimental/kernels/vandg.d.ts +8 -0
  1445. package/dist/projection/experimental/kernels/vandg.d.ts.map +1 -0
  1446. package/dist/projection/experimental/kernels/vandg.js +133 -0
  1447. package/dist/projection/experimental/kernels/vandg.js.map +1 -0
  1448. package/dist/projection/experimental/kinematic-helmert-flat.d.ts +4 -0
  1449. package/dist/projection/experimental/kinematic-helmert-flat.d.ts.map +1 -0
  1450. package/dist/projection/experimental/kinematic-helmert-flat.js +60 -0
  1451. package/dist/projection/experimental/kinematic-helmert-flat.js.map +1 -0
  1452. package/dist/projection/experimental/kinematic-helmert.d.ts +11 -0
  1453. package/dist/projection/experimental/kinematic-helmert.d.ts.map +1 -0
  1454. package/dist/projection/experimental/kinematic-helmert.js +103 -0
  1455. package/dist/projection/experimental/kinematic-helmert.js.map +1 -0
  1456. package/dist/projection/experimental/lazy-projection.d.ts +17 -0
  1457. package/dist/projection/experimental/lazy-projection.d.ts.map +1 -0
  1458. package/dist/projection/experimental/lazy-projection.js +156 -0
  1459. package/dist/projection/experimental/lazy-projection.js.map +1 -0
  1460. package/dist/projection/experimental/lazy-projections/aea.cjs +79 -0
  1461. package/dist/projection/experimental/lazy-projections/aea.cjs.map +6 -0
  1462. package/dist/projection/experimental/lazy-projections/aea.d.ts +3 -0
  1463. package/dist/projection/experimental/lazy-projections/aea.d.ts.map +1 -0
  1464. package/dist/projection/experimental/lazy-projections/aea.js +7 -0
  1465. package/dist/projection/experimental/lazy-projections/aea.js.map +1 -0
  1466. package/dist/projection/experimental/lazy-projections/aeqd.cjs +79 -0
  1467. package/dist/projection/experimental/lazy-projections/aeqd.cjs.map +6 -0
  1468. package/dist/projection/experimental/lazy-projections/aeqd.d.ts +3 -0
  1469. package/dist/projection/experimental/lazy-projections/aeqd.d.ts.map +1 -0
  1470. package/dist/projection/experimental/lazy-projections/aeqd.js +8 -0
  1471. package/dist/projection/experimental/lazy-projections/aeqd.js.map +1 -0
  1472. package/dist/projection/experimental/lazy-projections/bonne.cjs +79 -0
  1473. package/dist/projection/experimental/lazy-projections/bonne.cjs.map +6 -0
  1474. package/dist/projection/experimental/lazy-projections/bonne.d.ts +3 -0
  1475. package/dist/projection/experimental/lazy-projections/bonne.d.ts.map +1 -0
  1476. package/dist/projection/experimental/lazy-projections/bonne.js +7 -0
  1477. package/dist/projection/experimental/lazy-projections/bonne.js.map +1 -0
  1478. package/dist/projection/experimental/lazy-projections/cass.cjs +79 -0
  1479. package/dist/projection/experimental/lazy-projections/cass.cjs.map +6 -0
  1480. package/dist/projection/experimental/lazy-projections/cass.d.ts +3 -0
  1481. package/dist/projection/experimental/lazy-projections/cass.d.ts.map +1 -0
  1482. package/dist/projection/experimental/lazy-projections/cass.js +7 -0
  1483. package/dist/projection/experimental/lazy-projections/cass.js.map +1 -0
  1484. package/dist/projection/experimental/lazy-projections/cea.cjs +79 -0
  1485. package/dist/projection/experimental/lazy-projections/cea.cjs.map +6 -0
  1486. package/dist/projection/experimental/lazy-projections/cea.d.ts +3 -0
  1487. package/dist/projection/experimental/lazy-projections/cea.d.ts.map +1 -0
  1488. package/dist/projection/experimental/lazy-projections/cea.js +8 -0
  1489. package/dist/projection/experimental/lazy-projections/cea.js.map +1 -0
  1490. package/dist/projection/experimental/lazy-projections/eck6.cjs +79 -0
  1491. package/dist/projection/experimental/lazy-projections/eck6.cjs.map +6 -0
  1492. package/dist/projection/experimental/lazy-projections/eck6.d.ts +3 -0
  1493. package/dist/projection/experimental/lazy-projections/eck6.d.ts.map +1 -0
  1494. package/dist/projection/experimental/lazy-projections/eck6.js +7 -0
  1495. package/dist/projection/experimental/lazy-projections/eck6.js.map +1 -0
  1496. package/dist/projection/experimental/lazy-projections/eqc.cjs +82 -0
  1497. package/dist/projection/experimental/lazy-projections/eqc.cjs.map +6 -0
  1498. package/dist/projection/experimental/lazy-projections/eqc.d.ts +3 -0
  1499. package/dist/projection/experimental/lazy-projections/eqc.d.ts.map +1 -0
  1500. package/dist/projection/experimental/lazy-projections/eqc.js +11 -0
  1501. package/dist/projection/experimental/lazy-projections/eqc.js.map +1 -0
  1502. package/dist/projection/experimental/lazy-projections/eqdc.cjs +79 -0
  1503. package/dist/projection/experimental/lazy-projections/eqdc.cjs.map +6 -0
  1504. package/dist/projection/experimental/lazy-projections/eqdc.d.ts +3 -0
  1505. package/dist/projection/experimental/lazy-projections/eqdc.d.ts.map +1 -0
  1506. package/dist/projection/experimental/lazy-projections/eqdc.js +8 -0
  1507. package/dist/projection/experimental/lazy-projections/eqdc.js.map +1 -0
  1508. package/dist/projection/experimental/lazy-projections/eqearth.cjs +79 -0
  1509. package/dist/projection/experimental/lazy-projections/eqearth.cjs.map +6 -0
  1510. package/dist/projection/experimental/lazy-projections/eqearth.d.ts +3 -0
  1511. package/dist/projection/experimental/lazy-projections/eqearth.d.ts.map +1 -0
  1512. package/dist/projection/experimental/lazy-projections/eqearth.js +7 -0
  1513. package/dist/projection/experimental/lazy-projections/eqearth.js.map +1 -0
  1514. package/dist/projection/experimental/lazy-projections/equi.cjs +79 -0
  1515. package/dist/projection/experimental/lazy-projections/equi.cjs.map +6 -0
  1516. package/dist/projection/experimental/lazy-projections/equi.d.ts +3 -0
  1517. package/dist/projection/experimental/lazy-projections/equi.d.ts.map +1 -0
  1518. package/dist/projection/experimental/lazy-projections/equi.js +7 -0
  1519. package/dist/projection/experimental/lazy-projections/equi.js.map +1 -0
  1520. package/dist/projection/experimental/lazy-projections/etmerc.cjs +79 -0
  1521. package/dist/projection/experimental/lazy-projections/etmerc.cjs.map +6 -0
  1522. package/dist/projection/experimental/lazy-projections/etmerc.d.ts +3 -0
  1523. package/dist/projection/experimental/lazy-projections/etmerc.d.ts.map +1 -0
  1524. package/dist/projection/experimental/lazy-projections/etmerc.js +8 -0
  1525. package/dist/projection/experimental/lazy-projections/etmerc.js.map +1 -0
  1526. package/dist/projection/experimental/lazy-projections/geocent.cjs +79 -0
  1527. package/dist/projection/experimental/lazy-projections/geocent.cjs.map +6 -0
  1528. package/dist/projection/experimental/lazy-projections/geocent.d.ts +3 -0
  1529. package/dist/projection/experimental/lazy-projections/geocent.d.ts.map +1 -0
  1530. package/dist/projection/experimental/lazy-projections/geocent.js +7 -0
  1531. package/dist/projection/experimental/lazy-projections/geocent.js.map +1 -0
  1532. package/dist/projection/experimental/lazy-projections/geos.cjs +79 -0
  1533. package/dist/projection/experimental/lazy-projections/geos.cjs.map +6 -0
  1534. package/dist/projection/experimental/lazy-projections/geos.d.ts +3 -0
  1535. package/dist/projection/experimental/lazy-projections/geos.d.ts.map +1 -0
  1536. package/dist/projection/experimental/lazy-projections/geos.js +7 -0
  1537. package/dist/projection/experimental/lazy-projections/geos.js.map +1 -0
  1538. package/dist/projection/experimental/lazy-projections/gnom.cjs +79 -0
  1539. package/dist/projection/experimental/lazy-projections/gnom.cjs.map +6 -0
  1540. package/dist/projection/experimental/lazy-projections/gnom.d.ts +3 -0
  1541. package/dist/projection/experimental/lazy-projections/gnom.d.ts.map +1 -0
  1542. package/dist/projection/experimental/lazy-projections/gnom.js +7 -0
  1543. package/dist/projection/experimental/lazy-projections/gnom.js.map +1 -0
  1544. package/dist/projection/experimental/lazy-projections/gstmerc.cjs +79 -0
  1545. package/dist/projection/experimental/lazy-projections/gstmerc.cjs.map +6 -0
  1546. package/dist/projection/experimental/lazy-projections/gstmerc.d.ts +3 -0
  1547. package/dist/projection/experimental/lazy-projections/gstmerc.d.ts.map +1 -0
  1548. package/dist/projection/experimental/lazy-projections/gstmerc.js +9 -0
  1549. package/dist/projection/experimental/lazy-projections/gstmerc.js.map +1 -0
  1550. package/dist/projection/experimental/lazy-projections/index.cjs +2243 -0
  1551. package/dist/projection/experimental/lazy-projections/index.cjs.map +6 -0
  1552. package/dist/projection/experimental/lazy-projections/index.d.ts +38 -0
  1553. package/dist/projection/experimental/lazy-projections/index.d.ts.map +1 -0
  1554. package/dist/projection/experimental/lazy-projections/index.js +41 -0
  1555. package/dist/projection/experimental/lazy-projections/index.js.map +1 -0
  1556. package/dist/projection/experimental/lazy-projections/krovak.cjs +87 -0
  1557. package/dist/projection/experimental/lazy-projections/krovak.cjs.map +6 -0
  1558. package/dist/projection/experimental/lazy-projections/krovak.d.ts +3 -0
  1559. package/dist/projection/experimental/lazy-projections/krovak.d.ts.map +1 -0
  1560. package/dist/projection/experimental/lazy-projections/krovak.js +15 -0
  1561. package/dist/projection/experimental/lazy-projections/krovak.js.map +1 -0
  1562. package/dist/projection/experimental/lazy-projections/laea.cjs +79 -0
  1563. package/dist/projection/experimental/lazy-projections/laea.cjs.map +6 -0
  1564. package/dist/projection/experimental/lazy-projections/laea.d.ts +3 -0
  1565. package/dist/projection/experimental/lazy-projections/laea.d.ts.map +1 -0
  1566. package/dist/projection/experimental/lazy-projections/laea.js +8 -0
  1567. package/dist/projection/experimental/lazy-projections/laea.js.map +1 -0
  1568. package/dist/projection/experimental/lazy-projections/lcc.cjs +89 -0
  1569. package/dist/projection/experimental/lazy-projections/lcc.cjs.map +6 -0
  1570. package/dist/projection/experimental/lazy-projections/lcc.d.ts +3 -0
  1571. package/dist/projection/experimental/lazy-projections/lcc.d.ts.map +1 -0
  1572. package/dist/projection/experimental/lazy-projections/lcc.js +18 -0
  1573. package/dist/projection/experimental/lazy-projections/lcc.js.map +1 -0
  1574. package/dist/projection/experimental/lazy-projections/merc.cjs +88 -0
  1575. package/dist/projection/experimental/lazy-projections/merc.cjs.map +6 -0
  1576. package/dist/projection/experimental/lazy-projections/merc.d.ts +3 -0
  1577. package/dist/projection/experimental/lazy-projections/merc.d.ts.map +1 -0
  1578. package/dist/projection/experimental/lazy-projections/merc.js +16 -0
  1579. package/dist/projection/experimental/lazy-projections/merc.js.map +1 -0
  1580. package/dist/projection/experimental/lazy-projections/mill.cjs +79 -0
  1581. package/dist/projection/experimental/lazy-projections/mill.cjs.map +6 -0
  1582. package/dist/projection/experimental/lazy-projections/mill.d.ts +3 -0
  1583. package/dist/projection/experimental/lazy-projections/mill.d.ts.map +1 -0
  1584. package/dist/projection/experimental/lazy-projections/mill.js +8 -0
  1585. package/dist/projection/experimental/lazy-projections/mill.js.map +1 -0
  1586. package/dist/projection/experimental/lazy-projections/moll.cjs +79 -0
  1587. package/dist/projection/experimental/lazy-projections/moll.cjs.map +6 -0
  1588. package/dist/projection/experimental/lazy-projections/moll.d.ts +3 -0
  1589. package/dist/projection/experimental/lazy-projections/moll.d.ts.map +1 -0
  1590. package/dist/projection/experimental/lazy-projections/moll.js +7 -0
  1591. package/dist/projection/experimental/lazy-projections/moll.js.map +1 -0
  1592. package/dist/projection/experimental/lazy-projections/nzmg.cjs +79 -0
  1593. package/dist/projection/experimental/lazy-projections/nzmg.cjs.map +6 -0
  1594. package/dist/projection/experimental/lazy-projections/nzmg.d.ts +3 -0
  1595. package/dist/projection/experimental/lazy-projections/nzmg.d.ts.map +1 -0
  1596. package/dist/projection/experimental/lazy-projections/nzmg.js +8 -0
  1597. package/dist/projection/experimental/lazy-projections/nzmg.js.map +1 -0
  1598. package/dist/projection/experimental/lazy-projections/ob_tran.cjs +90 -0
  1599. package/dist/projection/experimental/lazy-projections/ob_tran.cjs.map +6 -0
  1600. package/dist/projection/experimental/lazy-projections/ob_tran.d.ts +5 -0
  1601. package/dist/projection/experimental/lazy-projections/ob_tran.d.ts.map +1 -0
  1602. package/dist/projection/experimental/lazy-projections/ob_tran.js +18 -0
  1603. package/dist/projection/experimental/lazy-projections/ob_tran.js.map +1 -0
  1604. package/dist/projection/experimental/lazy-projections/omerc.cjs +91 -0
  1605. package/dist/projection/experimental/lazy-projections/omerc.cjs.map +6 -0
  1606. package/dist/projection/experimental/lazy-projections/omerc.d.ts +3 -0
  1607. package/dist/projection/experimental/lazy-projections/omerc.d.ts.map +1 -0
  1608. package/dist/projection/experimental/lazy-projections/omerc.js +19 -0
  1609. package/dist/projection/experimental/lazy-projections/omerc.js.map +1 -0
  1610. package/dist/projection/experimental/lazy-projections/ortho.cjs +79 -0
  1611. package/dist/projection/experimental/lazy-projections/ortho.cjs.map +6 -0
  1612. package/dist/projection/experimental/lazy-projections/ortho.d.ts +3 -0
  1613. package/dist/projection/experimental/lazy-projections/ortho.d.ts.map +1 -0
  1614. package/dist/projection/experimental/lazy-projections/ortho.js +7 -0
  1615. package/dist/projection/experimental/lazy-projections/ortho.js.map +1 -0
  1616. package/dist/projection/experimental/lazy-projections/poly.cjs +79 -0
  1617. package/dist/projection/experimental/lazy-projections/poly.cjs.map +6 -0
  1618. package/dist/projection/experimental/lazy-projections/poly.d.ts +3 -0
  1619. package/dist/projection/experimental/lazy-projections/poly.d.ts.map +1 -0
  1620. package/dist/projection/experimental/lazy-projections/poly.js +7 -0
  1621. package/dist/projection/experimental/lazy-projections/poly.js.map +1 -0
  1622. package/dist/projection/experimental/lazy-projections/qsc.cjs +82 -0
  1623. package/dist/projection/experimental/lazy-projections/qsc.cjs.map +6 -0
  1624. package/dist/projection/experimental/lazy-projections/qsc.d.ts +3 -0
  1625. package/dist/projection/experimental/lazy-projections/qsc.d.ts.map +1 -0
  1626. package/dist/projection/experimental/lazy-projections/qsc.js +12 -0
  1627. package/dist/projection/experimental/lazy-projections/qsc.js.map +1 -0
  1628. package/dist/projection/experimental/lazy-projections/robin.cjs +79 -0
  1629. package/dist/projection/experimental/lazy-projections/robin.cjs.map +6 -0
  1630. package/dist/projection/experimental/lazy-projections/robin.d.ts +3 -0
  1631. package/dist/projection/experimental/lazy-projections/robin.d.ts.map +1 -0
  1632. package/dist/projection/experimental/lazy-projections/robin.js +7 -0
  1633. package/dist/projection/experimental/lazy-projections/robin.js.map +1 -0
  1634. package/dist/projection/experimental/lazy-projections/sinu.cjs +79 -0
  1635. package/dist/projection/experimental/lazy-projections/sinu.cjs.map +6 -0
  1636. package/dist/projection/experimental/lazy-projections/sinu.d.ts +3 -0
  1637. package/dist/projection/experimental/lazy-projections/sinu.d.ts.map +1 -0
  1638. package/dist/projection/experimental/lazy-projections/sinu.js +7 -0
  1639. package/dist/projection/experimental/lazy-projections/sinu.js.map +1 -0
  1640. package/dist/projection/experimental/lazy-projections/somerc.cjs +79 -0
  1641. package/dist/projection/experimental/lazy-projections/somerc.cjs.map +6 -0
  1642. package/dist/projection/experimental/lazy-projections/somerc.d.ts +3 -0
  1643. package/dist/projection/experimental/lazy-projections/somerc.d.ts.map +1 -0
  1644. package/dist/projection/experimental/lazy-projections/somerc.js +8 -0
  1645. package/dist/projection/experimental/lazy-projections/somerc.js.map +1 -0
  1646. package/dist/projection/experimental/lazy-projections/stere.cjs +87 -0
  1647. package/dist/projection/experimental/lazy-projections/stere.cjs.map +6 -0
  1648. package/dist/projection/experimental/lazy-projections/stere.d.ts +3 -0
  1649. package/dist/projection/experimental/lazy-projections/stere.d.ts.map +1 -0
  1650. package/dist/projection/experimental/lazy-projections/stere.js +15 -0
  1651. package/dist/projection/experimental/lazy-projections/stere.js.map +1 -0
  1652. package/dist/projection/experimental/lazy-projections/sterea.cjs +87 -0
  1653. package/dist/projection/experimental/lazy-projections/sterea.cjs.map +6 -0
  1654. package/dist/projection/experimental/lazy-projections/sterea.d.ts +3 -0
  1655. package/dist/projection/experimental/lazy-projections/sterea.d.ts.map +1 -0
  1656. package/dist/projection/experimental/lazy-projections/sterea.js +16 -0
  1657. package/dist/projection/experimental/lazy-projections/sterea.js.map +1 -0
  1658. package/dist/projection/experimental/lazy-projections/tmerc.cjs +89 -0
  1659. package/dist/projection/experimental/lazy-projections/tmerc.cjs.map +6 -0
  1660. package/dist/projection/experimental/lazy-projections/tmerc.d.ts +3 -0
  1661. package/dist/projection/experimental/lazy-projections/tmerc.d.ts.map +1 -0
  1662. package/dist/projection/experimental/lazy-projections/tmerc.js +18 -0
  1663. package/dist/projection/experimental/lazy-projections/tmerc.js.map +1 -0
  1664. package/dist/projection/experimental/lazy-projections/tpers.cjs +79 -0
  1665. package/dist/projection/experimental/lazy-projections/tpers.cjs.map +6 -0
  1666. package/dist/projection/experimental/lazy-projections/tpers.d.ts +3 -0
  1667. package/dist/projection/experimental/lazy-projections/tpers.d.ts.map +1 -0
  1668. package/dist/projection/experimental/lazy-projections/tpers.js +8 -0
  1669. package/dist/projection/experimental/lazy-projections/tpers.js.map +1 -0
  1670. package/dist/projection/experimental/lazy-projections/utm.cjs +79 -0
  1671. package/dist/projection/experimental/lazy-projections/utm.cjs.map +6 -0
  1672. package/dist/projection/experimental/lazy-projections/utm.d.ts +3 -0
  1673. package/dist/projection/experimental/lazy-projections/utm.d.ts.map +1 -0
  1674. package/dist/projection/experimental/lazy-projections/utm.js +8 -0
  1675. package/dist/projection/experimental/lazy-projections/utm.js.map +1 -0
  1676. package/dist/projection/experimental/lazy-projections/vandg.cjs +79 -0
  1677. package/dist/projection/experimental/lazy-projections/vandg.cjs.map +6 -0
  1678. package/dist/projection/experimental/lazy-projections/vandg.d.ts +3 -0
  1679. package/dist/projection/experimental/lazy-projections/vandg.d.ts.map +1 -0
  1680. package/dist/projection/experimental/lazy-projections/vandg.js +7 -0
  1681. package/dist/projection/experimental/lazy-projections/vandg.js.map +1 -0
  1682. package/dist/projection/experimental/mutable-projection.d.ts +6 -0
  1683. package/dist/projection/experimental/mutable-projection.d.ts.map +1 -0
  1684. package/dist/projection/experimental/mutable-projection.js +53 -0
  1685. package/dist/projection/experimental/mutable-projection.js.map +1 -0
  1686. package/dist/projection/experimental/numeric-flat.d.ts +8 -0
  1687. package/dist/projection/experimental/numeric-flat.d.ts.map +1 -0
  1688. package/dist/projection/experimental/numeric-flat.js +54 -0
  1689. package/dist/projection/experimental/numeric-flat.js.map +1 -0
  1690. package/dist/projection/experimental/parameters.d.ts +8 -0
  1691. package/dist/projection/experimental/parameters.d.ts.map +1 -0
  1692. package/dist/projection/experimental/parameters.js +31 -0
  1693. package/dist/projection/experimental/parameters.js.map +1 -0
  1694. package/dist/projection/experimental/projection-descriptor.d.ts +13 -0
  1695. package/dist/projection/experimental/projection-descriptor.d.ts.map +1 -0
  1696. package/dist/projection/experimental/projection-descriptor.js +52 -0
  1697. package/dist/projection/experimental/projection-descriptor.js.map +1 -0
  1698. package/dist/projection/experimental/projection-engine.d.ts +27 -0
  1699. package/dist/projection/experimental/projection-engine.d.ts.map +1 -0
  1700. package/dist/projection/experimental/projection-engine.js +50 -0
  1701. package/dist/projection/experimental/projection-engine.js.map +1 -0
  1702. package/dist/projection/experimental/projection-pipeline.d.ts +142 -0
  1703. package/dist/projection/experimental/projection-pipeline.d.ts.map +1 -0
  1704. package/dist/projection/experimental/projection-pipeline.js +740 -0
  1705. package/dist/projection/experimental/projection-pipeline.js.map +1 -0
  1706. package/dist/projection/experimental/projection-scratch.d.ts +11 -0
  1707. package/dist/projection/experimental/projection-scratch.d.ts.map +1 -0
  1708. package/dist/projection/experimental/projection-scratch.js +25 -0
  1709. package/dist/projection/experimental/projection-scratch.js.map +1 -0
  1710. package/dist/projection/experimental/projections/aea.d.ts +3 -0
  1711. package/dist/projection/experimental/projections/aea.d.ts.map +1 -0
  1712. package/dist/projection/experimental/projections/aea.js +24 -0
  1713. package/dist/projection/experimental/projections/aea.js.map +1 -0
  1714. package/dist/projection/experimental/projections/aeqd.d.ts +3 -0
  1715. package/dist/projection/experimental/projections/aeqd.d.ts.map +1 -0
  1716. package/dist/projection/experimental/projections/aeqd.js +19 -0
  1717. package/dist/projection/experimental/projections/aeqd.js.map +1 -0
  1718. package/dist/projection/experimental/projections/bonne.d.ts +3 -0
  1719. package/dist/projection/experimental/projections/bonne.d.ts.map +1 -0
  1720. package/dist/projection/experimental/projections/bonne.js +25 -0
  1721. package/dist/projection/experimental/projections/bonne.js.map +1 -0
  1722. package/dist/projection/experimental/projections/cass.d.ts +3 -0
  1723. package/dist/projection/experimental/projections/cass.d.ts.map +1 -0
  1724. package/dist/projection/experimental/projections/cass.js +22 -0
  1725. package/dist/projection/experimental/projections/cass.js.map +1 -0
  1726. package/dist/projection/experimental/projections/cea.d.ts +3 -0
  1727. package/dist/projection/experimental/projections/cea.d.ts.map +1 -0
  1728. package/dist/projection/experimental/projections/cea.js +24 -0
  1729. package/dist/projection/experimental/projections/cea.js.map +1 -0
  1730. package/dist/projection/experimental/projections/eck6.d.ts +3 -0
  1731. package/dist/projection/experimental/projections/eck6.d.ts.map +1 -0
  1732. package/dist/projection/experimental/projections/eck6.js +22 -0
  1733. package/dist/projection/experimental/projections/eck6.js.map +1 -0
  1734. package/dist/projection/experimental/projections/eqdc.d.ts +3 -0
  1735. package/dist/projection/experimental/projections/eqdc.d.ts.map +1 -0
  1736. package/dist/projection/experimental/projections/eqdc.js +23 -0
  1737. package/dist/projection/experimental/projections/eqdc.js.map +1 -0
  1738. package/dist/projection/experimental/projections/eqearth.d.ts +3 -0
  1739. package/dist/projection/experimental/projections/eqearth.d.ts.map +1 -0
  1740. package/dist/projection/experimental/projections/eqearth.js +47 -0
  1741. package/dist/projection/experimental/projections/eqearth.js.map +1 -0
  1742. package/dist/projection/experimental/projections/equi.d.ts +3 -0
  1743. package/dist/projection/experimental/projections/equi.d.ts.map +1 -0
  1744. package/dist/projection/experimental/projections/equi.js +24 -0
  1745. package/dist/projection/experimental/projections/equi.js.map +1 -0
  1746. package/dist/projection/experimental/projections/equidistant-cylindrical.d.ts +4 -0
  1747. package/dist/projection/experimental/projections/equidistant-cylindrical.d.ts.map +1 -0
  1748. package/dist/projection/experimental/projections/equidistant-cylindrical.js +47 -0
  1749. package/dist/projection/experimental/projections/equidistant-cylindrical.js.map +1 -0
  1750. package/dist/projection/experimental/projections/geocentric.d.ts +3 -0
  1751. package/dist/projection/experimental/projections/geocentric.d.ts.map +1 -0
  1752. package/dist/projection/experimental/projections/geocentric.js +34 -0
  1753. package/dist/projection/experimental/projections/geocentric.js.map +1 -0
  1754. package/dist/projection/experimental/projections/geos.d.ts +3 -0
  1755. package/dist/projection/experimental/projections/geos.d.ts.map +1 -0
  1756. package/dist/projection/experimental/projections/geos.js +30 -0
  1757. package/dist/projection/experimental/projections/geos.js.map +1 -0
  1758. package/dist/projection/experimental/projections/gnom.d.ts +3 -0
  1759. package/dist/projection/experimental/projections/gnom.d.ts.map +1 -0
  1760. package/dist/projection/experimental/projections/gnom.js +22 -0
  1761. package/dist/projection/experimental/projections/gnom.js.map +1 -0
  1762. package/dist/projection/experimental/projections/gstmerc.d.ts +3 -0
  1763. package/dist/projection/experimental/projections/gstmerc.d.ts.map +1 -0
  1764. package/dist/projection/experimental/projections/gstmerc.js +23 -0
  1765. package/dist/projection/experimental/projections/gstmerc.js.map +1 -0
  1766. package/dist/projection/experimental/projections/krovak.d.ts +3 -0
  1767. package/dist/projection/experimental/projections/krovak.d.ts.map +1 -0
  1768. package/dist/projection/experimental/projections/krovak.js +41 -0
  1769. package/dist/projection/experimental/projections/krovak.js.map +1 -0
  1770. package/dist/projection/experimental/projections/laea.d.ts +3 -0
  1771. package/dist/projection/experimental/projections/laea.d.ts.map +1 -0
  1772. package/dist/projection/experimental/projections/laea.js +22 -0
  1773. package/dist/projection/experimental/projections/laea.js.map +1 -0
  1774. package/dist/projection/experimental/projections/lcc.d.ts +3 -0
  1775. package/dist/projection/experimental/projections/lcc.d.ts.map +1 -0
  1776. package/dist/projection/experimental/projections/lcc.js +39 -0
  1777. package/dist/projection/experimental/projections/lcc.js.map +1 -0
  1778. package/dist/projection/experimental/projections/mercator.d.ts +4 -0
  1779. package/dist/projection/experimental/projections/mercator.d.ts.map +1 -0
  1780. package/dist/projection/experimental/projections/mercator.js +106 -0
  1781. package/dist/projection/experimental/projections/mercator.js.map +1 -0
  1782. package/dist/projection/experimental/projections/mill.d.ts +3 -0
  1783. package/dist/projection/experimental/projections/mill.d.ts.map +1 -0
  1784. package/dist/projection/experimental/projections/mill.js +22 -0
  1785. package/dist/projection/experimental/projections/mill.js.map +1 -0
  1786. package/dist/projection/experimental/projections/moll.d.ts +3 -0
  1787. package/dist/projection/experimental/projections/moll.d.ts.map +1 -0
  1788. package/dist/projection/experimental/projections/moll.js +22 -0
  1789. package/dist/projection/experimental/projections/moll.js.map +1 -0
  1790. package/dist/projection/experimental/projections/nzmg.d.ts +3 -0
  1791. package/dist/projection/experimental/projections/nzmg.d.ts.map +1 -0
  1792. package/dist/projection/experimental/projections/nzmg.js +29 -0
  1793. package/dist/projection/experimental/projections/nzmg.js.map +1 -0
  1794. package/dist/projection/experimental/projections/ob-tran.d.ts +4 -0
  1795. package/dist/projection/experimental/projections/ob-tran.d.ts.map +1 -0
  1796. package/dist/projection/experimental/projections/ob-tran.js +194 -0
  1797. package/dist/projection/experimental/projections/ob-tran.js.map +1 -0
  1798. package/dist/projection/experimental/projections/omerc.d.ts +3 -0
  1799. package/dist/projection/experimental/projections/omerc.d.ts.map +1 -0
  1800. package/dist/projection/experimental/projections/omerc.js +69 -0
  1801. package/dist/projection/experimental/projections/omerc.js.map +1 -0
  1802. package/dist/projection/experimental/projections/ortho.d.ts +3 -0
  1803. package/dist/projection/experimental/projections/ortho.d.ts.map +1 -0
  1804. package/dist/projection/experimental/projections/ortho.js +20 -0
  1805. package/dist/projection/experimental/projections/ortho.js.map +1 -0
  1806. package/dist/projection/experimental/projections/poly.d.ts +3 -0
  1807. package/dist/projection/experimental/projections/poly.d.ts.map +1 -0
  1808. package/dist/projection/experimental/projections/poly.js +22 -0
  1809. package/dist/projection/experimental/projections/poly.js.map +1 -0
  1810. package/dist/projection/experimental/projections/qsc.d.ts +3 -0
  1811. package/dist/projection/experimental/projections/qsc.d.ts.map +1 -0
  1812. package/dist/projection/experimental/projections/qsc.js +64 -0
  1813. package/dist/projection/experimental/projections/qsc.js.map +1 -0
  1814. package/dist/projection/experimental/projections/robin.d.ts +3 -0
  1815. package/dist/projection/experimental/projections/robin.d.ts.map +1 -0
  1816. package/dist/projection/experimental/projections/robin.js +22 -0
  1817. package/dist/projection/experimental/projections/robin.js.map +1 -0
  1818. package/dist/projection/experimental/projections/sinu.d.ts +3 -0
  1819. package/dist/projection/experimental/projections/sinu.d.ts.map +1 -0
  1820. package/dist/projection/experimental/projections/sinu.js +22 -0
  1821. package/dist/projection/experimental/projections/sinu.js.map +1 -0
  1822. package/dist/projection/experimental/projections/somerc.d.ts +3 -0
  1823. package/dist/projection/experimental/projections/somerc.d.ts.map +1 -0
  1824. package/dist/projection/experimental/projections/somerc.js +22 -0
  1825. package/dist/projection/experimental/projections/somerc.js.map +1 -0
  1826. package/dist/projection/experimental/projections/stere.d.ts +3 -0
  1827. package/dist/projection/experimental/projections/stere.d.ts.map +1 -0
  1828. package/dist/projection/experimental/projections/stere.js +32 -0
  1829. package/dist/projection/experimental/projections/stere.js.map +1 -0
  1830. package/dist/projection/experimental/projections/sterea.d.ts +3 -0
  1831. package/dist/projection/experimental/projections/sterea.d.ts.map +1 -0
  1832. package/dist/projection/experimental/projections/sterea.js +32 -0
  1833. package/dist/projection/experimental/projections/sterea.js.map +1 -0
  1834. package/dist/projection/experimental/projections/tpers.d.ts +3 -0
  1835. package/dist/projection/experimental/projections/tpers.d.ts.map +1 -0
  1836. package/dist/projection/experimental/projections/tpers.js +31 -0
  1837. package/dist/projection/experimental/projections/tpers.js.map +1 -0
  1838. package/dist/projection/experimental/projections/transverse-mercator.d.ts +6 -0
  1839. package/dist/projection/experimental/projections/transverse-mercator.d.ts.map +1 -0
  1840. package/dist/projection/experimental/projections/transverse-mercator.js +48 -0
  1841. package/dist/projection/experimental/projections/transverse-mercator.js.map +1 -0
  1842. package/dist/projection/experimental/projections/utm.d.ts +3 -0
  1843. package/dist/projection/experimental/projections/utm.d.ts.map +1 -0
  1844. package/dist/projection/experimental/projections/utm.js +37 -0
  1845. package/dist/projection/experimental/projections/utm.js.map +1 -0
  1846. package/dist/projection/experimental/projections/vandg.d.ts +3 -0
  1847. package/dist/projection/experimental/projections/vandg.d.ts.map +1 -0
  1848. package/dist/projection/experimental/projections/vandg.js +22 -0
  1849. package/dist/projection/experimental/projections/vandg.js.map +1 -0
  1850. package/dist/projection/experimental/rendering-profile/angular-rendering-profile.d.ts +9 -0
  1851. package/dist/projection/experimental/rendering-profile/angular-rendering-profile.d.ts.map +1 -0
  1852. package/dist/projection/experimental/rendering-profile/angular-rendering-profile.js +79 -0
  1853. package/dist/projection/experimental/rendering-profile/angular-rendering-profile.js.map +1 -0
  1854. package/dist/projection/experimental/rendering-profile/azimuthal-rendering-bounds.d.ts +23 -0
  1855. package/dist/projection/experimental/rendering-profile/azimuthal-rendering-bounds.d.ts.map +1 -0
  1856. package/dist/projection/experimental/rendering-profile/azimuthal-rendering-bounds.js +131 -0
  1857. package/dist/projection/experimental/rendering-profile/azimuthal-rendering-bounds.js.map +1 -0
  1858. package/dist/projection/experimental/rendering-profile/geographic-bounds.d.ts +29 -0
  1859. package/dist/projection/experimental/rendering-profile/geographic-bounds.d.ts.map +1 -0
  1860. package/dist/projection/experimental/rendering-profile/geographic-bounds.js +127 -0
  1861. package/dist/projection/experimental/rendering-profile/geographic-bounds.js.map +1 -0
  1862. package/dist/projection/experimental/rendering-profile/geographic-rendering-profile.d.ts +4 -0
  1863. package/dist/projection/experimental/rendering-profile/geographic-rendering-profile.d.ts.map +1 -0
  1864. package/dist/projection/experimental/rendering-profile/geographic-rendering-profile.js +18 -0
  1865. package/dist/projection/experimental/rendering-profile/geographic-rendering-profile.js.map +1 -0
  1866. package/dist/projection/experimental/rendering-profile/geostationary-rendering-profile.d.ts +7 -0
  1867. package/dist/projection/experimental/rendering-profile/geostationary-rendering-profile.d.ts.map +1 -0
  1868. package/dist/projection/experimental/rendering-profile/geostationary-rendering-profile.js +86 -0
  1869. package/dist/projection/experimental/rendering-profile/geostationary-rendering-profile.js.map +1 -0
  1870. package/dist/projection/experimental/rendering-profile/identity-rendering-profile.d.ts +4 -0
  1871. package/dist/projection/experimental/rendering-profile/identity-rendering-profile.d.ts.map +1 -0
  1872. package/dist/projection/experimental/rendering-profile/identity-rendering-profile.js +13 -0
  1873. package/dist/projection/experimental/rendering-profile/identity-rendering-profile.js.map +1 -0
  1874. package/dist/projection/experimental/rendering-profile/rectangular-rendering-profile.d.ts +13 -0
  1875. package/dist/projection/experimental/rendering-profile/rectangular-rendering-profile.d.ts.map +1 -0
  1876. package/dist/projection/experimental/rendering-profile/rectangular-rendering-profile.js +76 -0
  1877. package/dist/projection/experimental/rendering-profile/rectangular-rendering-profile.js.map +1 -0
  1878. package/dist/projection/experimental/rendering-profile/regional-rendering-bounds.d.ts +29 -0
  1879. package/dist/projection/experimental/rendering-profile/regional-rendering-bounds.d.ts.map +1 -0
  1880. package/dist/projection/experimental/rendering-profile/regional-rendering-bounds.js +143 -0
  1881. package/dist/projection/experimental/rendering-profile/regional-rendering-bounds.js.map +1 -0
  1882. package/dist/projection/experimental/rendering-profile/rendering-bounds.d.ts +28 -0
  1883. package/dist/projection/experimental/rendering-profile/rendering-bounds.d.ts.map +1 -0
  1884. package/dist/projection/experimental/rendering-profile/rendering-bounds.js +111 -0
  1885. package/dist/projection/experimental/rendering-profile/rendering-bounds.js.map +1 -0
  1886. package/dist/projection/experimental/rendering-profile/rendering-profile.d.ts +11 -0
  1887. package/dist/projection/experimental/rendering-profile/rendering-profile.d.ts.map +1 -0
  1888. package/dist/projection/experimental/rendering-profile/rendering-profile.js +81 -0
  1889. package/dist/projection/experimental/rendering-profile/rendering-profile.js.map +1 -0
  1890. package/dist/projection/experimental/rendering-profile/spherical-rendering-domain.d.ts +24 -0
  1891. package/dist/projection/experimental/rendering-profile/spherical-rendering-domain.d.ts.map +1 -0
  1892. package/dist/projection/experimental/rendering-profile/spherical-rendering-domain.js +129 -0
  1893. package/dist/projection/experimental/rendering-profile/spherical-rendering-domain.js.map +1 -0
  1894. package/dist/projection/experimental/scalar-output.d.ts +8 -0
  1895. package/dist/projection/experimental/scalar-output.d.ts.map +1 -0
  1896. package/dist/projection/experimental/scalar-output.js +46 -0
  1897. package/dist/projection/experimental/scalar-output.js.map +1 -0
  1898. package/dist/projection/experimental/spatial-deformation.d.ts +6 -0
  1899. package/dist/projection/experimental/spatial-deformation.d.ts.map +1 -0
  1900. package/dist/projection/experimental/spatial-deformation.js +85 -0
  1901. package/dist/projection/experimental/spatial-deformation.js.map +1 -0
  1902. package/dist/projection/experimental/types.d.ts +156 -0
  1903. package/dist/projection/experimental/types.d.ts.map +1 -0
  1904. package/dist/projection/experimental/types.js +5 -0
  1905. package/dist/projection/experimental/types.js.map +1 -0
  1906. package/dist/projection/experimental/typescript-projection.d.ts +76 -0
  1907. package/dist/projection/experimental/typescript-projection.d.ts.map +1 -0
  1908. package/dist/projection/experimental/typescript-projection.js +459 -0
  1909. package/dist/projection/experimental/typescript-projection.js.map +1 -0
  1910. package/dist/projection/experimental/vertical-datum.d.ts +4 -0
  1911. package/dist/projection/experimental/vertical-datum.d.ts.map +1 -0
  1912. package/dist/projection/experimental/vertical-datum.js +43 -0
  1913. package/dist/projection/experimental/vertical-datum.js.map +1 -0
  1914. package/dist/projection/grids/velocity.cjs +92 -0
  1915. package/dist/projection/grids/velocity.cjs.map +6 -0
  1916. package/dist/projection/grids/velocity.d.ts +3 -0
  1917. package/dist/projection/grids/velocity.d.ts.map +1 -0
  1918. package/dist/projection/grids/velocity.js +5 -0
  1919. package/dist/projection/grids/velocity.js.map +1 -0
  1920. package/dist/projection/index.cjs +13009 -0
  1921. package/dist/projection/index.cjs.map +6 -0
  1922. package/dist/projection/index.d.ts +3 -0
  1923. package/dist/projection/index.d.ts.map +1 -0
  1924. package/dist/projection/index.js +6 -0
  1925. package/dist/projection/index.js.map +1 -0
  1926. package/dist/projection/lib/projection.d.ts +8 -0
  1927. package/dist/projection/lib/projection.d.ts.map +1 -0
  1928. package/dist/projection/lib/projection.js +115 -0
  1929. package/dist/projection/lib/projection.js.map +1 -0
  1930. package/dist/projection/numerical-derivative.d.ts +15 -0
  1931. package/dist/projection/numerical-derivative.d.ts.map +1 -0
  1932. package/dist/projection/numerical-derivative.js +47 -0
  1933. package/dist/projection/numerical-derivative.js.map +1 -0
  1934. package/dist/projection/operations.cjs +322 -0
  1935. package/dist/projection/operations.cjs.map +6 -0
  1936. package/dist/projection/operations.d.ts +89 -0
  1937. package/dist/projection/operations.d.ts.map +1 -0
  1938. package/dist/projection/operations.js +344 -0
  1939. package/dist/projection/operations.js.map +1 -0
  1940. package/dist/projection/pipeline.cjs +1961 -0
  1941. package/dist/projection/pipeline.cjs.map +6 -0
  1942. package/dist/projection/pipeline.d.ts +2 -0
  1943. package/dist/projection/pipeline.d.ts.map +1 -0
  1944. package/dist/projection/pipeline.js +5 -0
  1945. package/dist/projection/pipeline.js.map +1 -0
  1946. package/dist/projection/temporal.cjs +290 -0
  1947. package/dist/projection/temporal.cjs.map +6 -0
  1948. package/dist/projection/temporal.d.ts +31 -0
  1949. package/dist/projection/temporal.d.ts.map +1 -0
  1950. package/dist/projection/temporal.js +91 -0
  1951. package/dist/projection/temporal.js.map +1 -0
  1952. package/dist/projection/transform-analysis.cjs +1889 -0
  1953. package/dist/projection/transform-analysis.cjs.map +6 -0
  1954. package/dist/projection/transform-analysis.d.ts +43 -0
  1955. package/dist/projection/transform-analysis.d.ts.map +1 -0
  1956. package/dist/projection/transform-analysis.js +110 -0
  1957. package/dist/projection/transform-analysis.js.map +1 -0
  1958. package/dist/projection/types.cjs +18 -0
  1959. package/dist/projection/types.cjs.map +6 -0
  1960. package/dist/projection/types.d.ts +47 -0
  1961. package/dist/projection/types.d.ts.map +1 -0
  1962. package/dist/projection/types.js +5 -0
  1963. package/dist/projection/types.js.map +1 -0
  1964. package/dist/projection/web-mercator.cjs +171 -0
  1965. package/dist/projection/web-mercator.cjs.map +6 -0
  1966. package/dist/projection/web-mercator.d.ts +7 -0
  1967. package/dist/projection/web-mercator.d.ts.map +1 -0
  1968. package/dist/projection/web-mercator.js +113 -0
  1969. package/dist/projection/web-mercator.js.map +1 -0
  1970. package/dist/rhumb-path.d.ts +28 -0
  1971. package/dist/rhumb-path.d.ts.map +1 -0
  1972. package/dist/rhumb-path.js +100 -0
  1973. package/dist/rhumb-path.js.map +1 -0
  1974. package/dist/rhumb-polygon.d.ts +11 -0
  1975. package/dist/rhumb-polygon.d.ts.map +1 -0
  1976. package/dist/rhumb-polygon.js +19 -0
  1977. package/dist/rhumb-polygon.js.map +1 -0
  1978. package/dist/subdivide-geodesic-polyline.d.ts +15 -0
  1979. package/dist/subdivide-geodesic-polyline.d.ts.map +1 -0
  1980. package/dist/subdivide-geodesic-polyline.js +52 -0
  1981. package/dist/subdivide-geodesic-polyline.js.map +1 -0
  1982. package/dist/subdivide-globe-mesh.d.ts +20 -0
  1983. package/dist/subdivide-globe-mesh.d.ts.map +1 -0
  1984. package/dist/subdivide-globe-mesh.js +54 -0
  1985. package/dist/subdivide-globe-mesh.js.map +1 -0
  1986. package/dist/subdivide-rhumb-polyline.d.ts +12 -0
  1987. package/dist/subdivide-rhumb-polyline.d.ts.map +1 -0
  1988. package/dist/subdivide-rhumb-polyline.js +82 -0
  1989. package/dist/subdivide-rhumb-polyline.js.map +1 -0
  1990. package/dist/tile-matrix.cjs +235 -0
  1991. package/dist/tile-matrix.cjs.map +6 -0
  1992. package/dist/tile-matrix.d.ts +87 -0
  1993. package/dist/tile-matrix.d.ts.map +1 -0
  1994. package/dist/tile-matrix.js +307 -0
  1995. package/dist/tile-matrix.js.map +1 -0
  1996. package/dist/tiles.cjs +303 -0
  1997. package/dist/tiles.cjs.map +6 -0
  1998. package/dist/tiles.d.ts +5 -0
  1999. package/dist/tiles.d.ts.map +1 -0
  2000. package/dist/tiles.js +6 -0
  2001. package/dist/tiles.js.map +1 -0
  2002. package/dist/triaxial/integrate.d.ts +2 -0
  2003. package/dist/triaxial/integrate.d.ts.map +1 -0
  2004. package/dist/triaxial/integrate.js +76 -0
  2005. package/dist/triaxial/integrate.js.map +1 -0
  2006. package/dist/triaxial.cjs +204 -0
  2007. package/dist/triaxial.cjs.map +6 -0
  2008. package/dist/triaxial.d.ts +38 -0
  2009. package/dist/triaxial.d.ts.map +1 -0
  2010. package/dist/triaxial.js +121 -0
  2011. package/dist/triaxial.js.map +1 -0
  2012. package/dist/type-utils.d.ts +2 -0
  2013. package/dist/type-utils.d.ts.map +1 -1
  2014. package/dist/type-utils.js +25 -2
  2015. package/dist/type-utils.js.map +1 -1
  2016. package/dist/vendor/geographiclib-geodesic/runtime.d.ts +9 -0
  2017. package/dist/vendor/geographiclib-geodesic/runtime.d.ts.map +1 -0
  2018. package/dist/vendor/geographiclib-geodesic/runtime.js +2244 -0
  2019. package/dist/vendor/geographiclib-geodesic/runtime.js.map +1 -0
  2020. package/dist/web-mercator.cjs +20 -0
  2021. package/dist/web-mercator.cjs.map +6 -0
  2022. package/dist/web-mercator.d.ts +2 -0
  2023. package/dist/web-mercator.d.ts.map +1 -0
  2024. package/dist/web-mercator.js +5 -0
  2025. package/dist/web-mercator.js.map +1 -0
  2026. package/dist/wkb/index.cjs +1055 -0
  2027. package/dist/wkb/index.cjs.map +6 -0
  2028. package/dist/wkb/index.d.ts +11 -0
  2029. package/dist/wkb/index.d.ts.map +1 -0
  2030. package/dist/wkb/index.js +9 -0
  2031. package/dist/wkb/index.js.map +1 -0
  2032. package/dist/wkb/types.d.ts +30 -0
  2033. package/dist/wkb/types.d.ts.map +1 -0
  2034. package/dist/wkb/types.js +34 -0
  2035. package/dist/wkb/types.js.map +1 -0
  2036. package/dist/wkb/wkb-builder.d.ts +91 -0
  2037. package/dist/wkb/wkb-builder.d.ts.map +1 -0
  2038. package/dist/wkb/wkb-builder.js +283 -0
  2039. package/dist/wkb/wkb-builder.js.map +1 -0
  2040. package/dist/wkb/wkb-reader.d.ts +74 -0
  2041. package/dist/wkb/wkb-reader.d.ts.map +1 -0
  2042. package/dist/wkb/wkb-reader.js +251 -0
  2043. package/dist/wkb/wkb-reader.js.map +1 -0
  2044. package/dist/wkb/wkb.d.ts +21 -0
  2045. package/dist/wkb/wkb.d.ts.map +1 -0
  2046. package/dist/wkb/wkb.js +204 -0
  2047. package/dist/wkb/wkb.js.map +1 -0
  2048. package/dist/wkb/wkt.d.ts +19 -0
  2049. package/dist/wkb/wkt.d.ts.map +1 -0
  2050. package/dist/wkb/wkt.js +321 -0
  2051. package/dist/wkb/wkt.js.map +1 -0
  2052. package/package.json +1082 -6
  2053. package/projection/APACHE-2.0-LICENSE.txt +55 -0
  2054. package/projection/PROJ-LICENSE.txt +37 -0
  2055. package/projection/PROJ4-LICENSE.md +29 -0
  2056. package/projection/THIRD-PARTY-NOTICES.md +210 -0
  2057. package/src/constants.ts +5 -3
  2058. package/src/crs/crs-metadata.ts +63 -0
  2059. package/src/crs/crs.ts +36 -0
  2060. package/src/crs/index.ts +65 -0
  2061. package/src/crs/proj-string.ts +239 -0
  2062. package/src/crs/projjson-schema-constants.ts +9 -0
  2063. package/src/crs/projjson-types.ts +665 -0
  2064. package/src/crs/spatial-reference.ts +221 -0
  2065. package/src/crs/units-table.ts +51 -0
  2066. package/src/crs/wkt-crs.ts +790 -0
  2067. package/src/discontinuous/AIR-OCEAN-LICENSE.txt +26 -0
  2068. package/src/discontinuous/D3-LICENSE.txt +37 -0
  2069. package/src/discontinuous/PETROFF-LICENSE.txt +55 -0
  2070. package/src/discontinuous/PROJ-LICENSE.txt +34 -0
  2071. package/src/discontinuous/air-ocean-mesh.ts +86 -0
  2072. package/src/discontinuous/albers-usa.ts +181 -0
  2073. package/src/discontinuous/cap-map.ts +406 -0
  2074. package/src/discontinuous/elastic/README.md +20 -0
  2075. package/src/discontinuous/elastic/UNLICENSE.txt +24 -0
  2076. package/src/discontinuous/elastic/data.ts +86 -0
  2077. package/src/discontinuous/elastic/elasticI.ts +5238 -0
  2078. package/src/discontinuous/elastic/elasticII.ts +18167 -0
  2079. package/src/discontinuous/elastic/elasticIII.ts +29571 -0
  2080. package/src/discontinuous/elastic/geometry.ts +172 -0
  2081. package/src/discontinuous/elastic/grid.ts +194 -0
  2082. package/src/discontinuous/elastic/map.ts +317 -0
  2083. package/src/discontinuous/gray-fuller.ts +38 -0
  2084. package/src/discontinuous/gringorten-kernel.ts +160 -0
  2085. package/src/discontinuous/healpix.ts +61 -0
  2086. package/src/discontinuous/layout.ts +177 -0
  2087. package/src/discontinuous/map-engine.ts +528 -0
  2088. package/src/discontinuous/map-layout.ts +605 -0
  2089. package/src/discontinuous/map-transition.ts +339 -0
  2090. package/src/discontinuous/math.ts +67 -0
  2091. package/src/discontinuous/mercator-map.ts +155 -0
  2092. package/src/discontinuous/myriahedral/graticule.ts +40 -0
  2093. package/src/discontinuous/myriahedral/mesh.ts +138 -0
  2094. package/src/discontinuous/myriahedral/unfold.ts +208 -0
  2095. package/src/discontinuous/myriahedral.ts +285 -0
  2096. package/src/discontinuous/petroff.ts +178 -0
  2097. package/src/discontinuous/polyhedral.ts +138 -0
  2098. package/src/discontinuous/prepare-features.ts +239 -0
  2099. package/src/discontinuous/presets.ts +450 -0
  2100. package/src/discontinuous/projection-catalog.ts +132 -0
  2101. package/src/discontinuous/quincuncial-kernel.ts +173 -0
  2102. package/src/discontinuous/quincuncial-star.ts +328 -0
  2103. package/src/discontinuous/regional-map.ts +228 -0
  2104. package/src/discontinuous/retroazimuthal-map.ts +52 -0
  2105. package/src/discontinuous/rotated-map.ts +86 -0
  2106. package/src/discontinuous/snyder-mesh.ts +88 -0
  2107. package/src/discontinuous/snyder.ts +171 -0
  2108. package/src/discontinuous/spherical-clip/D3-GEO-LICENSE.txt +34 -0
  2109. package/src/discontinuous/spherical-clip/README.md +16 -0
  2110. package/src/discontinuous/spherical-clip/cartesian.js +43 -0
  2111. package/src/discontinuous/spherical-clip/circle.js +35 -0
  2112. package/src/discontinuous/spherical-clip/clip-buffer.js +29 -0
  2113. package/src/discontinuous/spherical-clip/clip-circle.js +197 -0
  2114. package/src/discontinuous/spherical-clip/clip-index.js +140 -0
  2115. package/src/discontinuous/spherical-clip/clip-rejoin.js +111 -0
  2116. package/src/discontinuous/spherical-clip/helpers.js +20 -0
  2117. package/src/discontinuous/spherical-clip/math.js +45 -0
  2118. package/src/discontinuous/spherical-clip/noop.js +6 -0
  2119. package/src/discontinuous/spherical-clip/pointEqual.js +10 -0
  2120. package/src/discontinuous/spherical-clip/polygonContains.js +96 -0
  2121. package/src/discontinuous/world-composite-kernels.ts +30 -0
  2122. package/src/discontinuous/world-kernels/INTEGRATE-LICENSE.txt +21 -0
  2123. package/src/discontinuous/world-kernels/README.md +24 -0
  2124. package/src/discontinuous/world-kernels/airy.js +43 -0
  2125. package/src/discontinuous/world-kernels/aitoff.js +48 -0
  2126. package/src/discontinuous/world-kernels/armadillo.js +51 -0
  2127. package/src/discontinuous/world-kernels/august.js +36 -0
  2128. package/src/discontinuous/world-kernels/baker.js +50 -0
  2129. package/src/discontinuous/world-kernels/bertin.js +41 -0
  2130. package/src/discontinuous/world-kernels/boggs.js +32 -0
  2131. package/src/discontinuous/world-kernels/bonne.js +27 -0
  2132. package/src/discontinuous/world-kernels/bottomley.js +25 -0
  2133. package/src/discontinuous/world-kernels/bromley.js +10 -0
  2134. package/src/discontinuous/world-kernels/chamberlin.js +97 -0
  2135. package/src/discontinuous/world-kernels/collignon.js +17 -0
  2136. package/src/discontinuous/world-kernels/craig.js +33 -0
  2137. package/src/discontinuous/world-kernels/craster.js +18 -0
  2138. package/src/discontinuous/world-kernels/cylindricalEqualArea.js +21 -0
  2139. package/src/discontinuous/world-kernels/cylindricalStereographic.js +21 -0
  2140. package/src/discontinuous/world-kernels/d3-geo-raw.js +26 -0
  2141. package/src/discontinuous/world-kernels/eckert1.js +18 -0
  2142. package/src/discontinuous/world-kernels/eckert2.js +17 -0
  2143. package/src/discontinuous/world-kernels/eckert3.js +17 -0
  2144. package/src/discontinuous/world-kernels/eckert4.js +24 -0
  2145. package/src/discontinuous/world-kernels/eckert5.js +17 -0
  2146. package/src/discontinuous/world-kernels/eckert6.js +22 -0
  2147. package/src/discontinuous/world-kernels/eisenlohr.js +88 -0
  2148. package/src/discontinuous/world-kernels/fahey.js +19 -0
  2149. package/src/discontinuous/world-kernels/foucaut.js +20 -0
  2150. package/src/discontinuous/world-kernels/foucautSinusoidal.js +38 -0
  2151. package/src/discontinuous/world-kernels/ginzburg4.js +17 -0
  2152. package/src/discontinuous/world-kernels/ginzburg5.js +17 -0
  2153. package/src/discontinuous/world-kernels/ginzburg6.js +19 -0
  2154. package/src/discontinuous/world-kernels/ginzburg8.js +34 -0
  2155. package/src/discontinuous/world-kernels/ginzburg9.js +17 -0
  2156. package/src/discontinuous/world-kernels/ginzburgPolyconic.js +64 -0
  2157. package/src/discontinuous/world-kernels/hammer.js +37 -0
  2158. package/src/discontinuous/world-kernels/hammerRetroazimuthal.js +63 -0
  2159. package/src/discontinuous/world-kernels/hill.js +57 -0
  2160. package/src/discontinuous/world-kernels/homolosine.js +24 -0
  2161. package/src/discontinuous/world-kernels/hufnagel.js +68 -0
  2162. package/src/discontinuous/world-kernels/hyperelliptical.js +56 -0
  2163. package/src/discontinuous/world-kernels/integrate.js +99 -0
  2164. package/src/discontinuous/world-kernels/kavrayskiy7.js +15 -0
  2165. package/src/discontinuous/world-kernels/lagrange.js +32 -0
  2166. package/src/discontinuous/world-kernels/larrivee.js +43 -0
  2167. package/src/discontinuous/world-kernels/laskowski.js +50 -0
  2168. package/src/discontinuous/world-kernels/littrow.js +19 -0
  2169. package/src/discontinuous/world-kernels/loximuthal.js +38 -0
  2170. package/src/discontinuous/world-kernels/math.js +98 -0
  2171. package/src/discontinuous/world-kernels/miller.js +15 -0
  2172. package/src/discontinuous/world-kernels/modifiedStereographic.js +112 -0
  2173. package/src/discontinuous/world-kernels/mollweide.js +30 -0
  2174. package/src/discontinuous/world-kernels/mtFlatPolarParabolic.js +23 -0
  2175. package/src/discontinuous/world-kernels/mtFlatPolarQuartic.js +29 -0
  2176. package/src/discontinuous/world-kernels/mtFlatPolarSinusoidal.js +25 -0
  2177. package/src/discontinuous/world-kernels/naturalEarth2.js +46 -0
  2178. package/src/discontinuous/world-kernels/nellHammer.js +20 -0
  2179. package/src/discontinuous/world-kernels/newton.js +77 -0
  2180. package/src/discontinuous/world-kernels/nicolosi.js +60 -0
  2181. package/src/discontinuous/world-kernels/patterson.js +45 -0
  2182. package/src/discontinuous/world-kernels/polyconic.js +36 -0
  2183. package/src/discontinuous/world-kernels/rectangularPolyconic.js +41 -0
  2184. package/src/discontinuous/world-kernels/robinson.js +88 -0
  2185. package/src/discontinuous/world-kernels/satellite.js +44 -0
  2186. package/src/discontinuous/world-kernels/sinuMollweide.js +24 -0
  2187. package/src/discontinuous/world-kernels/sinusoidal.js +15 -0
  2188. package/src/discontinuous/world-kernels/times.js +19 -0
  2189. package/src/discontinuous/world-kernels/twoPointEquidistant.js +41 -0
  2190. package/src/discontinuous/world-kernels/vanDerGrinten.js +48 -0
  2191. package/src/discontinuous/world-kernels/vanDerGrinten2.js +32 -0
  2192. package/src/discontinuous/world-kernels/vanDerGrinten3.js +24 -0
  2193. package/src/discontinuous/world-kernels/vanDerGrinten4.js +70 -0
  2194. package/src/discontinuous/world-kernels/wagner.js +61 -0
  2195. package/src/discontinuous/world-kernels/wagner4.js +13 -0
  2196. package/src/discontinuous/world-kernels/wagner6.js +15 -0
  2197. package/src/discontinuous/world-kernels/wiechel.js +25 -0
  2198. package/src/discontinuous/world-kernels/winkel3.js +45 -0
  2199. package/src/discontinuous/world-kernels.ts +249 -0
  2200. package/src/discontinuous/world-map.ts +257 -0
  2201. package/src/discontinuous.ts +134 -0
  2202. package/src/elastic.ts +7 -0
  2203. package/src/ellipsoid-geodesic.ts +159 -0
  2204. package/src/ellipsoid-helpers/ellipsoid-transform.ts +79 -20
  2205. package/src/ellipsoid-helpers/exact-nearest-surface.ts +118 -0
  2206. package/src/ellipsoid-helpers/intersection-bounds.ts +85 -0
  2207. package/src/ellipsoid-helpers/nearest-surface.ts +157 -0
  2208. package/src/ellipsoid-helpers/rhumb-pole-distance.ts +76 -0
  2209. package/src/ellipsoid-helpers/scale-to-geodetic-surface.ts +31 -90
  2210. package/src/ellipsoid-helpers/surface-polygon.ts +210 -0
  2211. package/src/ellipsoid-helpers/tangent-plane-numerics.ts +124 -0
  2212. package/src/ellipsoid-metrics.ts +225 -0
  2213. package/src/ellipsoid-occluder.ts +135 -0
  2214. package/src/ellipsoid-rhumb.ts +404 -0
  2215. package/src/ellipsoid-tangent-plane.ts +236 -38
  2216. package/src/ellipsoid-transforms.ts +61 -0
  2217. package/src/ellipsoid.ts +285 -117
  2218. package/src/entries/ellipsoid.ts +44 -0
  2219. package/src/expressions.ts +35 -0
  2220. package/src/geoarrow/builder-entry.ts +18 -0
  2221. package/src/geoarrow/builder.ts +860 -0
  2222. package/src/geoarrow/codecs.ts +1268 -0
  2223. package/src/geoarrow/index.ts +102 -0
  2224. package/src/geoarrow/kernels.ts +1290 -0
  2225. package/src/geoarrow/layout.ts +899 -0
  2226. package/src/geoarrow/tessellate.ts +133 -0
  2227. package/src/geoarrow/tessellation-entry.ts +7 -0
  2228. package/src/geoarrow/types.ts +259 -0
  2229. package/src/geoarrow/views.ts +150 -0
  2230. package/src/geoarrow/wkb-entry.ts +13 -0
  2231. package/src/geoarrow/worker.ts +20 -0
  2232. package/src/geodesic-exact/area.ts +70 -0
  2233. package/src/geodesic-exact/inverse-engine.ts +166 -0
  2234. package/src/geodesic-exact/polygon.ts +36 -0
  2235. package/src/geodesic-exact/quadrature.ts +60 -0
  2236. package/src/geodesic-exact.ts +290 -0
  2237. package/src/geodesic-intersections.ts +598 -0
  2238. package/src/geodesic-path.ts +128 -0
  2239. package/src/geodesic-polygon.ts +19 -0
  2240. package/src/geographic-seams/edge.ts +406 -0
  2241. package/src/geographic-seams/polygon.ts +478 -0
  2242. package/src/geographic-seams/types.ts +67 -0
  2243. package/src/geographic-seams.ts +81 -0
  2244. package/src/geographic-tiles.ts +87 -0
  2245. package/src/globe-horizon-bounds.ts +68 -0
  2246. package/src/globe.ts +31 -0
  2247. package/src/index.ts +4 -7
  2248. package/src/lng-lat-rectangle.ts +5 -3
  2249. package/src/local-reference-frame.ts +320 -0
  2250. package/src/make-obb-from-region.ts +6 -4
  2251. package/src/projection/analysis.ts +284 -0
  2252. package/src/projection/bulk.ts +343 -0
  2253. package/src/projection/datums.ts +13 -0
  2254. package/src/projection/deformation.ts +5 -0
  2255. package/src/projection/experimental/authalic-latitude.ts +49 -0
  2256. package/src/projection/experimental/catalogue-kernel.ts +65 -0
  2257. package/src/projection/experimental/common/adjust_lat.ts +11 -0
  2258. package/src/projection/experimental/common/adjust_lon.ts +14 -0
  2259. package/src/projection/experimental/common/asinhy.ts +14 -0
  2260. package/src/projection/experimental/common/asinz.ts +11 -0
  2261. package/src/projection/experimental/common/authlat.ts +9 -0
  2262. package/src/projection/experimental/common/authset.ts +25 -0
  2263. package/src/projection/experimental/common/clens.ts +20 -0
  2264. package/src/projection/experimental/common/clens_cmplx.ts +43 -0
  2265. package/src/projection/experimental/common/constants.ts +15 -0
  2266. package/src/projection/experimental/common/cosh.ts +10 -0
  2267. package/src/projection/experimental/common/e0fn.ts +8 -0
  2268. package/src/projection/experimental/common/e1fn.ts +8 -0
  2269. package/src/projection/experimental/common/e2fn.ts +8 -0
  2270. package/src/projection/experimental/common/e3fn.ts +8 -0
  2271. package/src/projection/experimental/common/fL.ts +10 -0
  2272. package/src/projection/experimental/common/gN.ts +9 -0
  2273. package/src/projection/experimental/common/gatg.ts +20 -0
  2274. package/src/projection/experimental/common/hypot.ts +13 -0
  2275. package/src/projection/experimental/common/imlfn.ts +23 -0
  2276. package/src/projection/experimental/common/invlatiso.ts +20 -0
  2277. package/src/projection/experimental/common/iqsfnz.ts +45 -0
  2278. package/src/projection/experimental/common/latiso.ts +21 -0
  2279. package/src/projection/experimental/common/log1py.ts +11 -0
  2280. package/src/projection/experimental/common/meridian-distance.ts +45 -0
  2281. package/src/projection/experimental/common/mlfn.ts +8 -0
  2282. package/src/projection/experimental/common/msfnz.ts +9 -0
  2283. package/src/projection/experimental/common/phi2z.ts +22 -0
  2284. package/src/projection/experimental/common/pj_enfn.ts +29 -0
  2285. package/src/projection/experimental/common/pj_inv_mlfn.ts +28 -0
  2286. package/src/projection/experimental/common/pj_mlfn.ts +10 -0
  2287. package/src/projection/experimental/common/qsfnz.ts +17 -0
  2288. package/src/projection/experimental/common/sign.ts +8 -0
  2289. package/src/projection/experimental/common/sinh.ts +10 -0
  2290. package/src/projection/experimental/common/srat.ts +8 -0
  2291. package/src/projection/experimental/common/tsfnz.ts +14 -0
  2292. package/src/projection/experimental/common/vincenty.ts +180 -0
  2293. package/src/projection/experimental/core.ts +77 -0
  2294. package/src/projection/experimental/crs/datum-catalog.ts +65 -0
  2295. package/src/projection/experimental/crs/datum-table.ts +1360 -0
  2296. package/src/projection/experimental/crs/ellipsoid-table.ts +230 -0
  2297. package/src/projection/experimental/crs/normalize.ts +306 -0
  2298. package/src/projection/experimental/crs/primemeridian-table.ts +22 -0
  2299. package/src/projection/experimental/crs/projjson.ts +12 -0
  2300. package/src/projection/experimental/crs/spatial-reference.ts +115 -0
  2301. package/src/projection/experimental/crs/structured.ts +580 -0
  2302. package/src/projection/experimental/crs/types.ts +97 -0
  2303. package/src/projection/experimental/crs/wkt.ts +201 -0
  2304. package/src/projection/experimental/crs-descriptor.ts +250 -0
  2305. package/src/projection/experimental/crs-rendering-scale.ts +115 -0
  2306. package/src/projection/experimental/datum.ts +185 -0
  2307. package/src/projection/experimental/deformation-inverse.ts +125 -0
  2308. package/src/projection/experimental/deformation.ts +30 -0
  2309. package/src/projection/experimental/ellipsoidal-gnomonic.ts +83 -0
  2310. package/src/projection/experimental/entries/projections/aea.ts +5 -0
  2311. package/src/projection/experimental/entries/projections/aeqd.ts +5 -0
  2312. package/src/projection/experimental/entries/projections/bonne.ts +5 -0
  2313. package/src/projection/experimental/entries/projections/cass.ts +5 -0
  2314. package/src/projection/experimental/entries/projections/cea.ts +5 -0
  2315. package/src/projection/experimental/entries/projections/eck6.ts +5 -0
  2316. package/src/projection/experimental/entries/projections/eqc.ts +5 -0
  2317. package/src/projection/experimental/entries/projections/eqdc.ts +5 -0
  2318. package/src/projection/experimental/entries/projections/eqearth.ts +5 -0
  2319. package/src/projection/experimental/entries/projections/equi.ts +5 -0
  2320. package/src/projection/experimental/entries/projections/etmerc.ts +5 -0
  2321. package/src/projection/experimental/entries/projections/geocent.ts +5 -0
  2322. package/src/projection/experimental/entries/projections/geos.ts +5 -0
  2323. package/src/projection/experimental/entries/projections/gnom.ts +5 -0
  2324. package/src/projection/experimental/entries/projections/gstmerc.ts +5 -0
  2325. package/src/projection/experimental/entries/projections/krovak.ts +5 -0
  2326. package/src/projection/experimental/entries/projections/laea.ts +5 -0
  2327. package/src/projection/experimental/entries/projections/lcc.ts +5 -0
  2328. package/src/projection/experimental/entries/projections/merc.ts +5 -0
  2329. package/src/projection/experimental/entries/projections/mill.ts +5 -0
  2330. package/src/projection/experimental/entries/projections/moll.ts +5 -0
  2331. package/src/projection/experimental/entries/projections/nzmg.ts +5 -0
  2332. package/src/projection/experimental/entries/projections/ob_tran.ts +5 -0
  2333. package/src/projection/experimental/entries/projections/omerc.ts +5 -0
  2334. package/src/projection/experimental/entries/projections/ortho.ts +5 -0
  2335. package/src/projection/experimental/entries/projections/poly.ts +5 -0
  2336. package/src/projection/experimental/entries/projections/qsc.ts +5 -0
  2337. package/src/projection/experimental/entries/projections/robin.ts +5 -0
  2338. package/src/projection/experimental/entries/projections/sinu.ts +5 -0
  2339. package/src/projection/experimental/entries/projections/somerc.ts +5 -0
  2340. package/src/projection/experimental/entries/projections/stere.ts +5 -0
  2341. package/src/projection/experimental/entries/projections/sterea.ts +5 -0
  2342. package/src/projection/experimental/entries/projections/tmerc.ts +5 -0
  2343. package/src/projection/experimental/entries/projections/tpers.ts +5 -0
  2344. package/src/projection/experimental/entries/projections/utm.ts +5 -0
  2345. package/src/projection/experimental/entries/projections/vandg.ts +5 -0
  2346. package/src/projection/experimental/exact-helmert.ts +58 -0
  2347. package/src/projection/experimental/flat-projection.ts +80 -0
  2348. package/src/projection/experimental/grids/geotiff.ts +88 -0
  2349. package/src/projection/experimental/grids/grid.ts +141 -0
  2350. package/src/projection/experimental/grids/gtx.ts +31 -0
  2351. package/src/projection/experimental/grids/ntv2.ts +71 -0
  2352. package/src/projection/experimental/grids/scalar-geotiff.ts +231 -0
  2353. package/src/projection/experimental/grids/types.ts +35 -0
  2354. package/src/projection/experimental/grids/velocity-geotiff.ts +82 -0
  2355. package/src/projection/experimental/grids/velocity.ts +58 -0
  2356. package/src/projection/experimental/grids/vertical-geotiff.ts +28 -0
  2357. package/src/projection/experimental/grids/vertical.ts +99 -0
  2358. package/src/projection/experimental/helmert-flat.ts +76 -0
  2359. package/src/projection/experimental/index.ts +59 -0
  2360. package/src/projection/experimental/inverse-spherical-latitude.ts +19 -0
  2361. package/src/projection/experimental/kernel.ts +142 -0
  2362. package/src/projection/experimental/kernels/aea.ts +149 -0
  2363. package/src/projection/experimental/kernels/aeqd.ts +171 -0
  2364. package/src/projection/experimental/kernels/bonne.ts +141 -0
  2365. package/src/projection/experimental/kernels/cass.ts +140 -0
  2366. package/src/projection/experimental/kernels/cea.ts +71 -0
  2367. package/src/projection/experimental/kernels/eck6.ts +36 -0
  2368. package/src/projection/experimental/kernels/eqdc.ts +137 -0
  2369. package/src/projection/experimental/kernels/eqearth.ts +146 -0
  2370. package/src/projection/experimental/kernels/equi.ts +55 -0
  2371. package/src/projection/experimental/kernels/etmerc.ts +190 -0
  2372. package/src/projection/experimental/kernels/gauss.ts +79 -0
  2373. package/src/projection/experimental/kernels/geos.ts +183 -0
  2374. package/src/projection/experimental/kernels/gnom.ts +123 -0
  2375. package/src/projection/experimental/kernels/gstmerc.ts +74 -0
  2376. package/src/projection/experimental/kernels/krovak.ts +166 -0
  2377. package/src/projection/experimental/kernels/laea.ts +320 -0
  2378. package/src/projection/experimental/kernels/lcc.ts +141 -0
  2379. package/src/projection/experimental/kernels/mill.ts +60 -0
  2380. package/src/projection/experimental/kernels/moll.ts +109 -0
  2381. package/src/projection/experimental/kernels/nzmg.ts +249 -0
  2382. package/src/projection/experimental/kernels/omerc.ts +343 -0
  2383. package/src/projection/experimental/kernels/ortho.ts +52 -0
  2384. package/src/projection/experimental/kernels/poly.ts +217 -0
  2385. package/src/projection/experimental/kernels/qsc.ts +359 -0
  2386. package/src/projection/experimental/kernels/robin.ts +189 -0
  2387. package/src/projection/experimental/kernels/sinu.ts +118 -0
  2388. package/src/projection/experimental/kernels/somerc.ts +102 -0
  2389. package/src/projection/experimental/kernels/stere.ts +249 -0
  2390. package/src/projection/experimental/kernels/sterea.ts +82 -0
  2391. package/src/projection/experimental/kernels/tmerc.ts +227 -0
  2392. package/src/projection/experimental/kernels/tpers.ts +187 -0
  2393. package/src/projection/experimental/kernels/vandg.ts +147 -0
  2394. package/src/projection/experimental/kinematic-helmert-flat.ts +85 -0
  2395. package/src/projection/experimental/kinematic-helmert.ts +132 -0
  2396. package/src/projection/experimental/lazy-projection.ts +179 -0
  2397. package/src/projection/experimental/lazy-projections/aea.ts +10 -0
  2398. package/src/projection/experimental/lazy-projections/aeqd.ts +12 -0
  2399. package/src/projection/experimental/lazy-projections/bonne.ts +10 -0
  2400. package/src/projection/experimental/lazy-projections/cass.ts +10 -0
  2401. package/src/projection/experimental/lazy-projections/cea.ts +12 -0
  2402. package/src/projection/experimental/lazy-projections/eck6.ts +10 -0
  2403. package/src/projection/experimental/lazy-projections/eqc.ts +15 -0
  2404. package/src/projection/experimental/lazy-projections/eqdc.ts +11 -0
  2405. package/src/projection/experimental/lazy-projections/eqearth.ts +10 -0
  2406. package/src/projection/experimental/lazy-projections/equi.ts +10 -0
  2407. package/src/projection/experimental/lazy-projections/etmerc.ts +12 -0
  2408. package/src/projection/experimental/lazy-projections/geocent.ts +10 -0
  2409. package/src/projection/experimental/lazy-projections/geos.ts +10 -0
  2410. package/src/projection/experimental/lazy-projections/gnom.ts +10 -0
  2411. package/src/projection/experimental/lazy-projections/gstmerc.ts +13 -0
  2412. package/src/projection/experimental/lazy-projections/index.ts +41 -0
  2413. package/src/projection/experimental/lazy-projections/krovak.ts +18 -0
  2414. package/src/projection/experimental/lazy-projections/laea.ts +12 -0
  2415. package/src/projection/experimental/lazy-projections/lcc.ts +22 -0
  2416. package/src/projection/experimental/lazy-projections/merc.ts +19 -0
  2417. package/src/projection/experimental/lazy-projections/mill.ts +11 -0
  2418. package/src/projection/experimental/lazy-projections/moll.ts +10 -0
  2419. package/src/projection/experimental/lazy-projections/nzmg.ts +11 -0
  2420. package/src/projection/experimental/lazy-projections/ob_tran.ts +25 -0
  2421. package/src/projection/experimental/lazy-projections/omerc.ts +22 -0
  2422. package/src/projection/experimental/lazy-projections/ortho.ts +10 -0
  2423. package/src/projection/experimental/lazy-projections/poly.ts +10 -0
  2424. package/src/projection/experimental/lazy-projections/qsc.ts +16 -0
  2425. package/src/projection/experimental/lazy-projections/robin.ts +10 -0
  2426. package/src/projection/experimental/lazy-projections/sinu.ts +10 -0
  2427. package/src/projection/experimental/lazy-projections/somerc.ts +12 -0
  2428. package/src/projection/experimental/lazy-projections/stere.ts +18 -0
  2429. package/src/projection/experimental/lazy-projections/sterea.ts +20 -0
  2430. package/src/projection/experimental/lazy-projections/tmerc.ts +22 -0
  2431. package/src/projection/experimental/lazy-projections/tpers.ts +11 -0
  2432. package/src/projection/experimental/lazy-projections/utm.ts +12 -0
  2433. package/src/projection/experimental/lazy-projections/vandg.ts +10 -0
  2434. package/src/projection/experimental/mutable-projection.ts +63 -0
  2435. package/src/projection/experimental/numeric-flat.ts +73 -0
  2436. package/src/projection/experimental/parameters.ts +36 -0
  2437. package/src/projection/experimental/projection-descriptor.ts +79 -0
  2438. package/src/projection/experimental/projection-engine.ts +81 -0
  2439. package/src/projection/experimental/projection-pipeline.ts +1047 -0
  2440. package/src/projection/experimental/projection-scratch.ts +26 -0
  2441. package/src/projection/experimental/projections/aea.ts +41 -0
  2442. package/src/projection/experimental/projections/aeqd.ts +27 -0
  2443. package/src/projection/experimental/projections/bonne.ts +38 -0
  2444. package/src/projection/experimental/projections/cass.ts +39 -0
  2445. package/src/projection/experimental/projections/cea.ts +31 -0
  2446. package/src/projection/experimental/projections/eck6.ts +30 -0
  2447. package/src/projection/experimental/projections/eqdc.ts +40 -0
  2448. package/src/projection/experimental/projections/eqearth.ts +72 -0
  2449. package/src/projection/experimental/projections/equi.ts +31 -0
  2450. package/src/projection/experimental/projections/equidistant-cylindrical.ts +79 -0
  2451. package/src/projection/experimental/projections/geocentric.ts +42 -0
  2452. package/src/projection/experimental/projections/geos.ts +46 -0
  2453. package/src/projection/experimental/projections/gnom.ts +51 -0
  2454. package/src/projection/experimental/projections/gstmerc.ts +43 -0
  2455. package/src/projection/experimental/projections/krovak.ts +61 -0
  2456. package/src/projection/experimental/projections/laea.ts +39 -0
  2457. package/src/projection/experimental/projections/lcc.ts +67 -0
  2458. package/src/projection/experimental/projections/mercator.ts +150 -0
  2459. package/src/projection/experimental/projections/mill.ts +30 -0
  2460. package/src/projection/experimental/projections/moll.ts +30 -0
  2461. package/src/projection/experimental/projections/nzmg.ts +47 -0
  2462. package/src/projection/experimental/projections/ob-tran.ts +279 -0
  2463. package/src/projection/experimental/projections/omerc.ts +86 -0
  2464. package/src/projection/experimental/projections/ortho.ts +34 -0
  2465. package/src/projection/experimental/projections/poly.ts +40 -0
  2466. package/src/projection/experimental/projections/qsc.ts +84 -0
  2467. package/src/projection/experimental/projections/robin.ts +30 -0
  2468. package/src/projection/experimental/projections/sinu.ts +30 -0
  2469. package/src/projection/experimental/projections/somerc.ts +39 -0
  2470. package/src/projection/experimental/projections/stere.ts +59 -0
  2471. package/src/projection/experimental/projections/sterea.ts +61 -0
  2472. package/src/projection/experimental/projections/tpers.ts +59 -0
  2473. package/src/projection/experimental/projections/transverse-mercator.ts +89 -0
  2474. package/src/projection/experimental/projections/utm.ts +50 -0
  2475. package/src/projection/experimental/projections/vandg.ts +30 -0
  2476. package/src/projection/experimental/rendering-profile/angular-rendering-profile.ts +117 -0
  2477. package/src/projection/experimental/rendering-profile/azimuthal-rendering-bounds.ts +251 -0
  2478. package/src/projection/experimental/rendering-profile/geographic-bounds.ts +190 -0
  2479. package/src/projection/experimental/rendering-profile/geographic-rendering-profile.ts +29 -0
  2480. package/src/projection/experimental/rendering-profile/geostationary-rendering-profile.ts +128 -0
  2481. package/src/projection/experimental/rendering-profile/identity-rendering-profile.ts +15 -0
  2482. package/src/projection/experimental/rendering-profile/rectangular-rendering-profile.ts +133 -0
  2483. package/src/projection/experimental/rendering-profile/regional-rendering-bounds.ts +252 -0
  2484. package/src/projection/experimental/rendering-profile/rendering-bounds.ts +163 -0
  2485. package/src/projection/experimental/rendering-profile/rendering-profile.ts +96 -0
  2486. package/src/projection/experimental/rendering-profile/spherical-rendering-domain.ts +175 -0
  2487. package/src/projection/experimental/scalar-output.ts +74 -0
  2488. package/src/projection/experimental/spatial-deformation.ts +115 -0
  2489. package/src/projection/experimental/types.ts +181 -0
  2490. package/src/projection/experimental/typescript-projection.ts +581 -0
  2491. package/src/projection/experimental/vertical-datum.ts +39 -0
  2492. package/src/projection/grids/velocity.ts +5 -0
  2493. package/src/projection/index.ts +6 -0
  2494. package/src/projection/lib/projection.ts +161 -0
  2495. package/src/projection/numerical-derivative.ts +50 -0
  2496. package/src/projection/operations.ts +479 -0
  2497. package/src/projection/pipeline.ts +4 -0
  2498. package/src/projection/temporal.ts +133 -0
  2499. package/src/projection/transform-analysis.ts +169 -0
  2500. package/src/projection/types.ts +79 -0
  2501. package/src/projection/web-mercator.ts +148 -0
  2502. package/src/rhumb-path.ts +128 -0
  2503. package/src/rhumb-polygon.ts +24 -0
  2504. package/src/subdivide-geodesic-polyline.ts +74 -0
  2505. package/src/subdivide-globe-mesh.ts +75 -0
  2506. package/src/subdivide-rhumb-polyline.ts +108 -0
  2507. package/src/tile-matrix.ts +496 -0
  2508. package/src/tiles.ts +28 -0
  2509. package/src/triaxial/integrate.ts +82 -0
  2510. package/src/triaxial.ts +172 -0
  2511. package/src/type-utils.ts +31 -3
  2512. package/src/vendor/geographiclib-geodesic/README.md +21 -0
  2513. package/src/vendor/geographiclib-geodesic/runtime.js +2338 -0
  2514. package/src/web-mercator.ts +5 -0
  2515. package/src/wkb/index.ts +38 -0
  2516. package/src/wkb/types.ts +54 -0
  2517. package/src/wkb/wkb-builder.ts +395 -0
  2518. package/src/wkb/wkb-reader.ts +401 -0
  2519. package/src/wkb/wkb.ts +255 -0
  2520. package/src/wkb/wkt.ts +375 -0
package/dist/globe.cjs ADDED
@@ -0,0 +1,4155 @@
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/globe.js
20
+ var globe_exports = {};
21
+ __export(globe_exports, {
22
+ EllipsoidOccluder: () => EllipsoidOccluder,
23
+ GeographicSeamError: () => GeographicSeamError,
24
+ LngLatRectangle: () => LngLatRectangle,
25
+ getGlobeHorizonBounds: () => getGlobeHorizonBounds,
26
+ makeOBBFromRegion: () => makeOBBFromRegion,
27
+ splitGeographicPolygon: () => splitGeographicPolygon,
28
+ splitGeographicPolyline: () => splitGeographicPolyline,
29
+ splitGlobeBounds: () => splitGlobeBounds,
30
+ subdivideGeodesicPolyline: () => subdivideGeodesicPolyline,
31
+ subdivideGlobeMesh: () => subdivideGlobeMesh,
32
+ subdivideRhumbPolyline: () => subdivideRhumbPolyline
33
+ });
34
+ module.exports = __toCommonJS(globe_exports);
35
+
36
+ // dist/lng-lat-rectangle.js
37
+ var import_core = require("@math.gl/core");
38
+ var LngLatRectangle = class {
39
+ /**
40
+ * Creates a new two dimensional region specified as longitude and latitude coordinates.
41
+ *
42
+ * @param west The westernmost longitude, in radians, in the range [-Pi, Pi].
43
+ * @param south The southernmost latitude, in radians, in the range [-Pi/2, Pi/2].
44
+ * @param east The easternmost longitude, in radians, in the range [-Pi, Pi].
45
+ * @param north The northernmost latitude, in radians, in the range [-Pi/2, Pi/2].
46
+ */
47
+ constructor(west, south, east, north) {
48
+ this.west = west;
49
+ this.south = south;
50
+ this.east = east;
51
+ this.north = north;
52
+ }
53
+ /**
54
+ * Computes the center of a rectangle.
55
+ *
56
+ * @param rectangle The rectangle for which to find the center
57
+ * @param [result] The object onto which to store the result.
58
+ * @returns The modified result parameter or a new Cartographic instance if none was provided.
59
+ */
60
+ static center(rectangle, result) {
61
+ if (!result)
62
+ result = new import_core.Vector3();
63
+ let east = rectangle.east;
64
+ const west = rectangle.west;
65
+ if (east < west) {
66
+ east += import_core._MathUtils.TWO_PI;
67
+ }
68
+ const longitude = (0, import_core.normalizeAngle)((west + east) * 0.5, "negative-pi-to-pi");
69
+ const latitude = (rectangle.south + rectangle.north) * 0.5;
70
+ result.x = longitude;
71
+ result.y = latitude;
72
+ result.z = 0;
73
+ return result;
74
+ }
75
+ get width() {
76
+ let east = this.east;
77
+ const west = this.west;
78
+ if (east < west) {
79
+ east += import_core._MathUtils.TWO_PI;
80
+ }
81
+ return east - west;
82
+ }
83
+ };
84
+
85
+ // dist/make-obb-from-region.js
86
+ var import_core6 = require("@math.gl/core");
87
+ var import_culling2 = require("@math.gl/geometry/culling");
88
+
89
+ // dist/ellipsoid.js
90
+ var import_core4 = require("@math.gl/core");
91
+ var import_spheroid = require("@math.gl/core/spheroid");
92
+
93
+ // dist/constants.js
94
+ var WGS84_RADIUS_X = 6378137;
95
+ var WGS84_RADIUS_Y = 6378137;
96
+ var WGS84_RADIUS_Z = 6356752314245179e-9;
97
+ var WGS84_CONSTANTS = {
98
+ radii: [WGS84_RADIUS_X, WGS84_RADIUS_Y, WGS84_RADIUS_Z],
99
+ radiiSquared: [
100
+ WGS84_RADIUS_X * WGS84_RADIUS_X,
101
+ WGS84_RADIUS_Y * WGS84_RADIUS_Y,
102
+ WGS84_RADIUS_Z * WGS84_RADIUS_Z
103
+ ],
104
+ oneOverRadii: [1 / WGS84_RADIUS_X, 1 / WGS84_RADIUS_Y, 1 / WGS84_RADIUS_Z],
105
+ oneOverRadiiSquared: [
106
+ 1 / (WGS84_RADIUS_X * WGS84_RADIUS_X),
107
+ 1 / (WGS84_RADIUS_Y * WGS84_RADIUS_Y),
108
+ 1 / (WGS84_RADIUS_Z * WGS84_RADIUS_Z)
109
+ ],
110
+ maximumRadius: Math.max(WGS84_RADIUS_X, WGS84_RADIUS_Y, WGS84_RADIUS_Z),
111
+ centerToleranceSquared: 0.1
112
+ // EPSILON1;
113
+ };
114
+
115
+ // dist/type-utils.js
116
+ var import_core2 = require("@math.gl/core");
117
+ function identity(x) {
118
+ return x;
119
+ }
120
+ var scratchVector = new import_core2.Vector3();
121
+ function fromCartographic(cartographic, result = [], map = identity) {
122
+ if ("longitude" in cartographic) {
123
+ result[0] = map(cartographic.longitude);
124
+ result[1] = map(cartographic.latitude);
125
+ result[2] = cartographic.height;
126
+ } else if ("x" in cartographic) {
127
+ result[0] = map(cartographic.x);
128
+ result[1] = map(cartographic.y);
129
+ result[2] = cartographic.z;
130
+ } else {
131
+ result[0] = map(cartographic[0]);
132
+ result[1] = map(cartographic[1]);
133
+ result[2] = cartographic[2];
134
+ }
135
+ return result;
136
+ }
137
+ function fromCartographicToRadians(cartographic, vector = []) {
138
+ return fromCartographic(cartographic, vector, import_core2.config._cartographicRadians ? identity : import_core2.toRadians);
139
+ }
140
+ function toCartographicFromRadiansComponents(longitude, latitude, height, cartographic) {
141
+ const map = import_core2.config._cartographicRadians ? identity : import_core2.toDegrees;
142
+ const mappedLongitude = map(longitude), mappedLatitude = map(latitude);
143
+ if ("longitude" in cartographic) {
144
+ cartographic.longitude = mappedLongitude;
145
+ cartographic.latitude = mappedLatitude;
146
+ cartographic.height = height;
147
+ } else if ("x" in cartographic) {
148
+ cartographic.x = mappedLongitude;
149
+ cartographic.y = mappedLatitude;
150
+ cartographic.z = height;
151
+ } else {
152
+ cartographic[0] = mappedLongitude;
153
+ cartographic[1] = mappedLatitude;
154
+ cartographic[2] = height;
155
+ }
156
+ return cartographic;
157
+ }
158
+
159
+ // dist/ellipsoid-helpers/scale-to-geodetic-surface.js
160
+ var import_core3 = require("@math.gl/core");
161
+
162
+ // dist/ellipsoid-helpers/exact-nearest-surface.js
163
+ function exactNearestSurface(x, y, z, a, b, c, result) {
164
+ const values = [a, b, c, Math.abs(x), Math.abs(y), Math.abs(z)];
165
+ const parts = values.map((value) => {
166
+ const bits = value.toString(2);
167
+ const dot = bits.indexOf(".");
168
+ return {
169
+ integer: BigInt("0b" + bits.replace(".", "")),
170
+ exponent: dot < 0 ? 0 : dot + 1 - bits.length
171
+ };
172
+ });
173
+ const exponent = Math.min(...parts.filter((p) => p.integer !== 0n).map((p) => p.exponent));
174
+ const integers = parts.map((p) => p.integer << BigInt(p.exponent - exponent));
175
+ const squares = integers.slice(0, 3).map((v) => v * v);
176
+ const minimum = squares.reduce((p, v) => p < v ? p : v);
177
+ const offsets = squares.map((v) => v - minimum);
178
+ const products = squares.map((_, i) => integers[i] * integers[i + 3]);
179
+ let precision = 64;
180
+ if (!products.some((u3, i) => offsets[i] === 0n && u3 !== 0n)) {
181
+ let numerator = -1n, denominator = 1n;
182
+ for (let i = 0; i < 3; i++) {
183
+ if (offsets[i] === 0n)
184
+ continue;
185
+ const d2 = offsets[i] * offsets[i];
186
+ numerator = numerator * d2 + products[i] * products[i] * denominator;
187
+ denominator *= d2;
188
+ }
189
+ if (numerator < 0n)
190
+ return false;
191
+ if (numerator === 0n) {
192
+ return commit(0n, 1n);
193
+ }
194
+ const positive = offsets.filter((d2) => d2 > 0n);
195
+ const least = positive.reduce((p, v) => p < v ? p : v);
196
+ precision = Math.max(64, (2n * (denominator + numerator)).toString(2).length - (numerator * least).toString(2).length + 128);
197
+ }
198
+ const unit = 1n << BigInt(precision);
199
+ const d = offsets.map((v) => v * unit);
200
+ const u = products.map((v) => v * unit);
201
+ const u2 = u.map((v) => v * v);
202
+ let lower = 0n, upper = u.reduce((sum, v) => sum + v, 0n);
203
+ if (upper === 0n)
204
+ return false;
205
+ for (let iteration = 0; iteration < 4096; iteration++) {
206
+ const t = lower + upper >> 1n;
207
+ if (t === lower)
208
+ return false;
209
+ const dx = d[0] + t, dy = d[1] + t, dz = d[2] + t;
210
+ const xx = dx * dx, yy = dy * dy, zz = dz * dz;
211
+ const sign = u2[0] * yy * zz + u2[1] * xx * zz + u2[2] * xx * yy - xx * yy * zz;
212
+ if (sign === 0n)
213
+ return commit(t, unit);
214
+ if (sign > 0n)
215
+ lower = t;
216
+ else
217
+ upper = t;
218
+ if (lower > 0n && upper - lower <= lower >> 60n)
219
+ return commit(lower + upper >> 1n, unit);
220
+ }
221
+ return false;
222
+ function commit(t, unit2) {
223
+ const output2 = squares.map((r2, i) => {
224
+ const denominator = offsets[i] * unit2 + t;
225
+ return denominator === 0n ? 0 : ratio(r2 * integers[i + 3] * unit2, denominator, exponent);
226
+ });
227
+ if (!output2.every(Number.isFinite))
228
+ return false;
229
+ const qx = Math.sign(x) * output2[0], qy = Math.sign(y) * output2[1], qz = Math.sign(z) * output2[2];
230
+ result.x = qx;
231
+ result.y = qy;
232
+ result.z = qz;
233
+ return true;
234
+ }
235
+ }
236
+ function ratio(n, d, exponent) {
237
+ if (n === 0n)
238
+ return 0;
239
+ const shift2 = 52 - (n.toString(2).length - d.toString(2).length);
240
+ const numerator = shift2 >= 0 ? n << BigInt(shift2) : n;
241
+ const denominator = shift2 >= 0 ? d : d << BigInt(-shift2);
242
+ let quotient = numerator / denominator;
243
+ const remainder = numerator % denominator;
244
+ if (2n * remainder > denominator || 2n * remainder === denominator && quotient & 1n)
245
+ quotient++;
246
+ const power = exponent - shift2;
247
+ const first = Math.max(-1022, Math.min(1023, power));
248
+ return Number(quotient) * 2 ** first * 2 ** (power - first);
249
+ }
250
+
251
+ // dist/ellipsoid-helpers/nearest-surface.js
252
+ function nearestSurface(x, y, z, a, b, c, result) {
253
+ const minimum = Math.min(a, b, c);
254
+ const minimumSquared = minimum * minimum;
255
+ const aa = a * a, bb = b * b, cc = c * c;
256
+ if (!(minimum > 0) || !(minimumSquared > 0) || !Number.isFinite(Math.max(aa, bb, cc)))
257
+ return false;
258
+ const minimumError = productError(minimum, minimum, minimumSquared);
259
+ const dx = aa - minimumSquared, dy = bb - minimumSquared, dz = cc - minimumSquared;
260
+ const ex = sumError(aa, -minimumSquared, dx) + productError(a, a, aa) - minimumError;
261
+ const ey = sumError(bb, -minimumSquared, dy) + productError(b, b, bb) - minimumError;
262
+ const ez = sumError(cc, -minimumSquared, dz) + productError(c, c, cc) - minimumError;
263
+ const ux = a * Math.abs(x), uy = b * Math.abs(y), uz = c * Math.abs(z);
264
+ if (minimumSquared < 2 ** -1022 || x !== 0 && ux < 2 ** -1022 || y !== 0 && uy < 2 ** -1022 || z !== 0 && uz < 2 ** -1022)
265
+ return exactNearestSurface(x, y, z, a, b, c, result);
266
+ const fx = productError(a, Math.abs(x), ux);
267
+ const fy = productError(b, Math.abs(y), uy);
268
+ const fz = productError(c, Math.abs(z), uz);
269
+ const limit = Math.hypot(dx === 0 ? ux === 0 ? 0 : Infinity : ux / (dx + ex), dy === 0 ? uy === 0 ? 0 : Infinity : uy / (dy + ey), dz === 0 ? uz === 0 ? 0 : Infinity : uz / (dz + ez));
270
+ if (limit <= 1 + 64 * Number.EPSILON)
271
+ return exactNearestSurface(x, y, z, a, b, c, result);
272
+ if ((x !== 0 ? 1 : 0) + (y !== 0 ? 1 : 0) + (z !== 0 ? 1 : 0) === 1) {
273
+ result.x = x === 0 ? x : Math.sign(x) * a;
274
+ result.y = y === 0 ? y : Math.sign(y) * b;
275
+ result.z = z === 0 ? z : Math.sign(z) * c;
276
+ return true;
277
+ }
278
+ let lower = Math.hypot(dx === 0 ? ux : 0, dy === 0 ? uy : 0, dz === 0 ? uz : 0);
279
+ let upper = Math.hypot(ux, uy, uz);
280
+ if (!(upper > 0) || !Number.isFinite(upper))
281
+ return exactNearestSurface(x, y, z, a, b, c, result);
282
+ let t = lower > 0 ? lower : upper;
283
+ for (let iteration = 0; iteration < 512; iteration++) {
284
+ const hx = dx + t, hy = dy + t, hz = dz + t;
285
+ const lx = sumError(dx, t, hx) + ex;
286
+ const ly = sumError(dy, t, hy) + ey;
287
+ const lz = sumError(dz, t, hz) + ez;
288
+ const vx = ux / hx, vy = uy / hy, vz = uz / hz;
289
+ let term, rest;
290
+ if (vx >= vy && vx >= vz) {
291
+ term = offset(ux, fx, dx, ex, t, hx) * (vx + 1);
292
+ rest = (vy * (1 - ly / hy)) ** 2 + (vz * (1 - lz / hz)) ** 2;
293
+ } else if (vy >= vz) {
294
+ term = offset(uy, fy, dy, ey, t, hy) * (vy + 1);
295
+ rest = (vx * (1 - lx / hx)) ** 2 + (vz * (1 - lz / hz)) ** 2;
296
+ } else {
297
+ term = offset(uz, fz, dz, ez, t, hz) * (vz + 1);
298
+ rest = (vx * (1 - lx / hx)) ** 2 + (vy * (1 - ly / hy)) ** 2;
299
+ }
300
+ const derivative = -2 * (vx * vx / hx + vy * vy / hy + vz * vz / hz);
301
+ const roundoff = 4 * Number.EPSILON * (Math.abs(term) + rest);
302
+ const residual = term + rest;
303
+ if (!Number.isFinite(residual))
304
+ return exactNearestSurface(x, y, z, a, b, c, result);
305
+ if (Math.abs(residual) <= 4 * Number.EPSILON * (Math.abs(term) + rest) || upper - lower <= 4 * Number.EPSILON * t) {
306
+ const uncertainty = roundoff / Math.abs(derivative);
307
+ if (!Number.isFinite(derivative) || !(Math.abs(derivative) > 0) || uncertainty > 2e-13 * t)
308
+ return exactNearestSurface(x, y, z, a, b, c, result);
309
+ const qx = Math.sign(x) * a * (vx * (1 - lx / hx));
310
+ const qy = Math.sign(y) * b * (vy * (1 - ly / hy));
311
+ const qz = Math.sign(z) * c * (vz * (1 - lz / hz));
312
+ const displacement = 2 * uncertainty * Math.max(Math.abs(qx / hx), Math.abs(qy / hy), Math.abs(qz / hz));
313
+ if (!Number.isFinite(displacement) || displacement > 2e-13 * Math.max(a, b, c))
314
+ return exactNearestSurface(x, y, z, a, b, c, result);
315
+ if (!Number.isFinite(qx) || !Number.isFinite(qy) || !Number.isFinite(qz))
316
+ return exactNearestSurface(x, y, z, a, b, c, result);
317
+ result.x = qx;
318
+ result.y = qy;
319
+ result.z = qz;
320
+ return true;
321
+ }
322
+ if (residual > 0)
323
+ lower = t;
324
+ else
325
+ upper = t;
326
+ const candidate = t - residual / derivative;
327
+ const next = candidate > lower && candidate < upper ? candidate : lower + (upper - lower) / 2;
328
+ if (next === t)
329
+ return exactNearestSurface(x, y, z, a, b, c, result);
330
+ t = next;
331
+ }
332
+ return exactNearestSurface(x, y, z, a, b, c, result);
333
+ }
334
+ function offset(u, error, d, dError, t, denominator) {
335
+ const difference = u - d;
336
+ const correction = sumError(u, -d, difference) + error - dError;
337
+ const base = difference + correction;
338
+ const low = sumError(difference, correction, base);
339
+ const shifted = base - t;
340
+ return (shifted + (sumError(base, -t, shifted) + low)) / denominator;
341
+ }
342
+ function sumError(x, y, sum) {
343
+ const part = sum - x;
344
+ return x - (sum - part) + (y - part);
345
+ }
346
+ function productError(x, y, product) {
347
+ const sx = 134217729 * x, sy = 134217729 * y;
348
+ if (!Number.isFinite(sx) || !Number.isFinite(sy))
349
+ return 0;
350
+ const hx = sx - (sx - x), hy = sy - (sy - y);
351
+ const lx = x - hx, ly = y - hy;
352
+ return hx * hy - product + hx * ly + lx * hy + lx * ly;
353
+ }
354
+
355
+ // dist/ellipsoid-helpers/scale-to-geodetic-surface.js
356
+ var surface = { x: 0, y: 0, z: 0 };
357
+ function scaleToGeodeticSurface(cartesian, ellipsoid, result = []) {
358
+ const object = cartesian;
359
+ const x = "x" in cartesian ? object.x : cartesian[0];
360
+ const y = "x" in cartesian ? object.y : cartesian[1];
361
+ const z = "x" in cartesian ? object.z : cartesian[2];
362
+ if (!Number.isFinite(x) || !Number.isFinite(y) || !Number.isFinite(z))
363
+ return void 0;
364
+ if (!Number.isFinite(x * x + y * y + z * z))
365
+ return void 0;
366
+ const { radii } = ellipsoid;
367
+ if (!nearestSurface(x, y, z, radii.x, radii.y, radii.z, surface))
368
+ return void 0;
369
+ return writeResult(result, surface.x, surface.y, surface.z);
370
+ }
371
+ function writeResult(result, x, y, z) {
372
+ if ((0, import_core3.isArray)(result)) {
373
+ result[0] = x;
374
+ result[1] = y;
375
+ result[2] = z;
376
+ } else {
377
+ const point = result;
378
+ point.x = x;
379
+ point.y = y;
380
+ point.z = z;
381
+ }
382
+ return result;
383
+ }
384
+
385
+ // dist/ellipsoid.js
386
+ var spheroidScratch = { x: 0, y: 0, z: 0 };
387
+ var scratchVector2 = new import_core4.Vector3();
388
+ var scratchNormal = new import_core4.Vector3();
389
+ var scratchPosition = new import_core4.Vector3();
390
+ var scratchCartesian = new import_core4.Vector3();
391
+ var Ellipsoid = class _Ellipsoid {
392
+ /** Construct from two-axis geometry, including normalized projection ellipsoids.
393
+ * The equatorial X/Y radii are equal; no CRS or datum information is inferred.
394
+ */
395
+ static fromSpheroid(parameters) {
396
+ const { semiMajorAxis, semiMinorAxis } = parameters;
397
+ validateSpheroid(semiMajorAxis, semiMinorAxis);
398
+ return new _Ellipsoid(semiMajorAxis, semiMajorAxis, semiMinorAxis);
399
+ }
400
+ constructor(x = 0, y = 0, z = 0) {
401
+ this.centerToleranceSquared = import_core4._MathUtils.EPSILON1;
402
+ (0, import_core4.assert)(Number.isFinite(x) && x >= 0);
403
+ (0, import_core4.assert)(Number.isFinite(y) && y >= 0);
404
+ (0, import_core4.assert)(Number.isFinite(z) && z >= 0);
405
+ this.radii = new import_core4.Vector3(x, y, z);
406
+ this.radiiSquared = new import_core4.Vector3(x * x, y * y, z * z);
407
+ this.radiiToTheFourth = new import_core4.Vector3(x * x * x * x, y * y * y * y, z * z * z * z);
408
+ this.oneOverRadii = new import_core4.Vector3(x === 0 ? 0 : 1 / x, y === 0 ? 0 : 1 / y, z === 0 ? 0 : 1 / z);
409
+ this.oneOverRadiiSquared = new import_core4.Vector3(x === 0 ? 0 : 1 / (x * x), y === 0 ? 0 : 1 / (y * y), z === 0 ? 0 : 1 / (z * z));
410
+ this.minimumRadius = Math.min(x, y, z);
411
+ this.maximumRadius = Math.max(x, y, z);
412
+ if (z !== 0) {
413
+ this.squaredXOverSquaredZ = (x / z) ** 2;
414
+ }
415
+ if (x === y && z > 0 && z <= x && Number.isFinite(this.radiiSquared.x) && this.radiiSquared.z > 0)
416
+ this.spheroidGeometry = Object.freeze({
417
+ semiMajorAxis: x,
418
+ semiMinorAxis: z,
419
+ eccentricitySquared: 1 - (z / x) ** 2
420
+ });
421
+ Object.freeze(this.radii);
422
+ Object.freeze(this.radiiSquared);
423
+ Object.freeze(this.radiiToTheFourth);
424
+ Object.freeze(this.oneOverRadii);
425
+ Object.freeze(this.oneOverRadiiSquared);
426
+ Object.freeze(this);
427
+ }
428
+ /** Return an owned geometry snapshot for a sphere or oblate spheroid.
429
+ * Triaxial, prolate and degenerate ellipsoids cannot be represented by this contract.
430
+ * Call during setup, outside coordinate loops.
431
+ */
432
+ toSpheroid() {
433
+ const { x, y, z } = this.radii;
434
+ if (x !== y)
435
+ throw new Error("Spheroid requires equal X/Y radii");
436
+ validateSpheroid(x, z);
437
+ return Object.freeze({ semiMajorAxis: x, semiMinorAxis: z });
438
+ }
439
+ /** Compares this Ellipsoid against the provided Ellipsoid componentwise */
440
+ equals(right) {
441
+ return this === right || Boolean(right && this.radii.equals(right.radii));
442
+ }
443
+ /** Creates a string representing this Ellipsoid in the format '[radii.x, radii.y, radii.z]'. */
444
+ toString() {
445
+ return this.radii.toString();
446
+ }
447
+ cartographicToCartesian(cartographic, result = [0, 0, 0]) {
448
+ const llh = fromCartographicToRadians(cartographic, scratchCartesian);
449
+ const longitude = llh[0], latitude = llh[1], height = llh[2];
450
+ if (!Number.isFinite(longitude) || !Number.isFinite(latitude) || !Number.isFinite(height) || !(this.minimumRadius > 0) || !Number.isFinite(this.maximumRadius * this.maximumRadius))
451
+ return void 0;
452
+ if (this.spheroidGeometry && (import_core4.config._cartographicRadians || Math.abs(latitude) <= Math.PI / 4)) {
453
+ spheroidScratch.x = longitude;
454
+ spheroidScratch.y = latitude;
455
+ spheroidScratch.z = height;
456
+ if (!(0, import_spheroid.spheroidToCartesian)(spheroidScratch, this.spheroidGeometry))
457
+ return void 0;
458
+ return writeResult(result, spheroidScratch.x, spheroidScratch.y, spheroidScratch.z);
459
+ }
460
+ const normal = scratchNormal;
461
+ this.geodeticSurfaceNormalCartographic(cartographic, normal);
462
+ const nx = normal.x, ny = normal.y, nz = normal.z;
463
+ const rx = this.radii.x, ry = this.radii.y, rz = this.radii.z;
464
+ const gamma = Math.hypot(rx * nx, ry * ny, rz * nz);
465
+ const x = rx * (rx * nx / gamma) + height * nx;
466
+ const y = ry * (ry * ny / gamma) + height * ny;
467
+ const z = rz * (rz * nz / gamma) + height * nz;
468
+ if (!Number.isFinite(x) || !Number.isFinite(y) || !Number.isFinite(z))
469
+ return void 0;
470
+ return writeResult(result, x, y, z);
471
+ }
472
+ cartesianToCartographic(cartesian, result = [0, 0, 0]) {
473
+ const object = cartesian;
474
+ const x = "x" in cartesian ? object.x : cartesian[0];
475
+ const y = "x" in cartesian ? object.y : cartesian[1];
476
+ const z = "x" in cartesian ? object.z : cartesian[2];
477
+ if (!Number.isFinite(x) || !Number.isFinite(y) || !Number.isFinite(z))
478
+ return void 0;
479
+ if (this.spheroidGeometry && Number.isFinite(x * x + y * y + z * z) && Number.isFinite(this.oneOverRadiiSquared.x) && Number.isFinite(this.oneOverRadiiSquared.z)) {
480
+ spheroidScratch.x = x;
481
+ spheroidScratch.y = y;
482
+ spheroidScratch.z = z;
483
+ const shape = this.spheroidGeometry;
484
+ const nearBoundary = z === 0 && shape.semiMinorAxis < shape.semiMajorAxis && Math.abs(Math.hypot(x, y) - shape.semiMajorAxis * shape.eccentricitySquared) <= 64 * Number.EPSILON * shape.semiMajorAxis;
485
+ if (!nearBoundary && (0, import_spheroid.cartesianToSpheroid)(spheroidScratch, shape)) {
486
+ const longitude2 = x === 0 && y === 0 ? Math.atan2(y, x) : spheroidScratch.x;
487
+ return toCartographicFromRadiansComponents(longitude2, spheroidScratch.y, spheroidScratch.z, result);
488
+ }
489
+ }
490
+ if (!(this.minimumRadius > 0) || !Number.isFinite(this.maximumRadius * this.maximumRadius) || !Number.isFinite(1 / (this.minimumRadius * this.minimumRadius)))
491
+ return void 0;
492
+ scratchCartesian.set(x, y, z);
493
+ const point = this.scaleToGeodeticSurface(scratchCartesian, scratchPosition);
494
+ if (!point) {
495
+ return void 0;
496
+ }
497
+ const gx = point[0] * this.oneOverRadiiSquared.x;
498
+ const gy = point[1] * this.oneOverRadiiSquared.y;
499
+ const gz = point[2] * this.oneOverRadiiSquared.z;
500
+ const length = Math.hypot(gx, gy, gz);
501
+ if (!(length > 0) || !Number.isFinite(length))
502
+ return void 0;
503
+ const nx = gx / length, ny = gy / length, nz = gz / length;
504
+ const longitude = Math.atan2(ny, nx);
505
+ const latitude = Math.atan2(nz, Math.hypot(nx, ny));
506
+ const height = (x - point[0]) * nx + (y - point[1]) * ny + (z - point[2]) * nz;
507
+ return toCartographicFromRadiansComponents(longitude, latitude, height, result);
508
+ }
509
+ geocentricSurfaceNormal(cartesian, result = [0, 0, 0]) {
510
+ fromCartographic(cartesian, scratchVector2);
511
+ const point = scratchVector2;
512
+ return normalResult(point.x, point.y, point.z, result);
513
+ }
514
+ geodeticSurfaceNormalCartographic(cartographic, result = [0, 0, 0]) {
515
+ const point = fromCartographic(cartographic, scratchCartesian);
516
+ const longitude = import_core4.config._cartographicRadians ? point[0] : point[0] * Math.PI / 180;
517
+ const latitude = import_core4.config._cartographicRadians ? point[1] : point[1] * Math.PI / 180;
518
+ const polarDegrees = !import_core4.config._cartographicRadians && Math.abs(point[1]) > 45;
519
+ const complement = (90 - Math.abs(point[1])) * Math.PI / 180;
520
+ const cosLatitude = polarDegrees ? Math.sin(complement) : Math.abs(latitude) === Math.PI / 2 ? 0 : Math.cos(latitude);
521
+ const sinLatitude = polarDegrees ? Math.sign(point[1]) * Math.cos(complement) : Math.sin(latitude);
522
+ return normalResult(cosLatitude * Math.cos(longitude), cosLatitude * Math.sin(longitude), sinLatitude, result);
523
+ }
524
+ geodeticSurfaceNormal(cartesian, result = [0, 0, 0]) {
525
+ if (!(this.minimumRadius > 0))
526
+ return void 0;
527
+ fromCartographic(cartesian, scratchVector2);
528
+ const point = scratchVector2;
529
+ const scale = Math.max(Math.abs(point.x), Math.abs(point.y), Math.abs(point.z));
530
+ if (!(scale > 0) || !Number.isFinite(scale))
531
+ return void 0;
532
+ const nx = point.x / scale * (this.minimumRadius / this.radii.x) ** 2;
533
+ const ny = point.y / scale * (this.minimumRadius / this.radii.y) ** 2;
534
+ const nz = point.z / scale * (this.minimumRadius / this.radii.z) ** 2;
535
+ if ((point.x === 0 || Math.abs(nx) >= 2 ** -1022) && (point.y === 0 || Math.abs(ny) >= 2 ** -1022) && (point.z === 0 || Math.abs(nz) >= 2 ** -1022))
536
+ return normalResult(nx, ny, nz, result);
537
+ const ex = point.x === 0 ? 0 : Math.min(1023, Math.floor(Math.log2(Math.abs(point.x))));
538
+ const ey = point.y === 0 ? 0 : Math.min(1023, Math.floor(Math.log2(Math.abs(point.y))));
539
+ const ez = point.z === 0 ? 0 : Math.min(1023, Math.floor(Math.log2(Math.abs(point.z))));
540
+ const ax = Math.min(1023, Math.floor(Math.log2(this.radii.x)));
541
+ const ay = Math.min(1023, Math.floor(Math.log2(this.radii.y)));
542
+ const az = Math.min(1023, Math.floor(Math.log2(this.radii.z)));
543
+ const common = Math.max(point.x === 0 ? -Infinity : ex - 2 * ax, point.y === 0 ? -Infinity : ey - 2 * ay, point.z === 0 ? -Infinity : ez - 2 * az);
544
+ return normalResult(point.x === 0 ? point.x : point.x / 2 ** ex / (this.radii.x / 2 ** ax) ** 2 * 2 ** (ex - 2 * ax - common), point.y === 0 ? point.y : point.y / 2 ** ey / (this.radii.y / 2 ** ay) ** 2 * 2 ** (ey - 2 * ay - common), point.z === 0 ? point.z : point.z / 2 ** ez / (this.radii.z / 2 ** az) ** 2 * 2 ** (ez - 2 * az - common), result);
545
+ }
546
+ /** Scales the provided Cartesian position along the geodetic surface normal
547
+ * so that it is on the surface of this ellipsoid. If the position is
548
+ * at the center of the ellipsoid, this function returns undefined. */
549
+ scaleToGeodeticSurface(cartesian, result) {
550
+ return scaleToGeodeticSurface(cartesian, this, result);
551
+ }
552
+ /** Scales the provided Cartesian position along the geocentric surface normal
553
+ * so that it is on the surface of this ellipsoid. */
554
+ scaleToGeocentricSurface(cartesian, result = [0, 0, 0]) {
555
+ fromCartographic(cartesian, scratchPosition);
556
+ const point = scratchPosition;
557
+ const scale = Math.max(Math.abs(point.x), Math.abs(point.y), Math.abs(point.z));
558
+ if (!(this.minimumRadius > 0) || !(scale > 0) || !Number.isFinite(scale))
559
+ return void 0;
560
+ const squared = point.x * point.x * this.oneOverRadiiSquared.x + point.y * point.y * this.oneOverRadiiSquared.y + point.z * point.z * this.oneOverRadiiSquared.z;
561
+ if (squared >= 2 ** -1022 && Number.isFinite(squared) && scale * scale >= 2 ** -1022 && Number.isFinite(scale * scale)) {
562
+ const beta = 1 / Math.sqrt(squared);
563
+ return writeResult(result, point.x * beta, point.y * beta, point.z * beta);
564
+ }
565
+ const x = point.x / scale, y = point.y / scale, z = point.z / scale;
566
+ const norm = Math.hypot(x / this.radii.x, y / this.radii.y, z / this.radii.z);
567
+ if (!(norm > 0) || !Number.isFinite(norm))
568
+ return void 0;
569
+ return writeResult(result, x / norm, y / norm, z / norm);
570
+ }
571
+ /** Transforms a Cartesian X, Y, Z position to the ellipsoid-scaled space by multiplying
572
+ * its components by the result of `Ellipsoid#oneOverRadii` */
573
+ transformPositionToScaledSpace(position, result = [0, 0, 0]) {
574
+ fromCartographic(position, scratchPosition);
575
+ const point = scratchPosition.scale(this.oneOverRadii);
576
+ return writeResult(result, point.x, point.y, point.z);
577
+ }
578
+ /** Transforms a Cartesian X, Y, Z position from the ellipsoid-scaled space by multiplying
579
+ * its components by the result of `Ellipsoid#radii`. */
580
+ transformPositionFromScaledSpace(position, result = [0, 0, 0]) {
581
+ fromCartographic(position, scratchPosition);
582
+ const point = scratchPosition.scale(this.radii);
583
+ return writeResult(result, point.x, point.y, point.z);
584
+ }
585
+ /** Computes a point which is the intersection of the surface normal with the z-axis. */
586
+ getSurfaceNormalIntersectionWithZAxis(position, buffer = 0, result = [0, 0, 0]) {
587
+ (0, import_core4.assert)(this.radii.x === this.radii.y && this.minimumRadius > 0);
588
+ fromCartographic(position, scratchPosition);
589
+ if (!Number.isFinite(scratchPosition.x) || !Number.isFinite(scratchPosition.y) || !Number.isFinite(scratchPosition.z) || !Number.isFinite(buffer))
590
+ return void 0;
591
+ const z = scratchPosition.z * (1 - this.squaredXOverSquaredZ);
592
+ if (!Number.isFinite(z))
593
+ return void 0;
594
+ if (Math.abs(z) >= this.radii.z - buffer) {
595
+ return void 0;
596
+ }
597
+ return writeResult(result, 0, 0, z);
598
+ }
599
+ };
600
+ Ellipsoid.WGS84 = new Ellipsoid(WGS84_RADIUS_X, WGS84_RADIUS_Y, WGS84_RADIUS_Z);
601
+ function validateSpheroid(a, b) {
602
+ if (!Number.isFinite(a) || !Number.isFinite(b) || a <= 0 || b <= 0 || b > a)
603
+ throw new Error("Spheroid requires finite positive axes with semiMinorAxis <= semiMajorAxis");
604
+ }
605
+ function normalResult(x, y, z, result) {
606
+ const scale = Math.max(Math.abs(x), Math.abs(y), Math.abs(z));
607
+ if (!(scale > 0) || !Number.isFinite(scale))
608
+ return void 0;
609
+ const nx = x / scale, ny = y / scale, nz = z / scale;
610
+ const length = Math.hypot(nx, ny, nz);
611
+ return writeResult(result, nx / length, ny / length, nz / length);
612
+ }
613
+
614
+ // dist/ellipsoid-tangent-plane.js
615
+ var import_core5 = require("@math.gl/core");
616
+ var import_culling = require("@math.gl/geometry/culling");
617
+
618
+ // dist/ellipsoid-helpers/tangent-plane-numerics.js
619
+ var SPLITTER = 134217729;
620
+ function productError2(a, b, product) {
621
+ const ca = SPLITTER * a, cb = SPLITTER * b;
622
+ const ah = ca - (ca - a), al = a - ah;
623
+ const bh = cb - (cb - b), bl = b - bh;
624
+ return ah * bh - product + ah * bl + al * bh + al * bl;
625
+ }
626
+ function sumError2(a, b, sum) {
627
+ const v = sum - a;
628
+ return a - (sum - v) + (b - v);
629
+ }
630
+ function binaryScale(value) {
631
+ return 2 ** Math.min(1023, Math.floor(Math.log2(value)));
632
+ }
633
+ function compensatedDot3(x, y, z, a, b, c) {
634
+ const magnitude = Math.max(Math.abs(x), Math.abs(y), Math.abs(z));
635
+ if (magnitude === 0)
636
+ return 0;
637
+ const scale = binaryScale(magnitude);
638
+ const sx = x / scale, sy = y / scale, sz = z / scale;
639
+ const p = sx * a, q = sy * b, r = sz * c;
640
+ const s = p + q, t = s + r;
641
+ return (t + (sumError2(p, q, s) + sumError2(s, r, t) + productError2(sx, a, p) + productError2(sy, b, q) + productError2(sz, c, r))) * scale;
642
+ }
643
+ function exactNormalIntersection(radii, origin, east, north, normal, point, sphereRadius) {
644
+ const values = sphereRadius ? [
645
+ sphereRadius,
646
+ sphereRadius,
647
+ sphereRadius,
648
+ sphereRadius,
649
+ 0,
650
+ 0,
651
+ 0,
652
+ 1,
653
+ 0,
654
+ 0,
655
+ 0,
656
+ 1,
657
+ 1,
658
+ 0,
659
+ 0,
660
+ point[0],
661
+ point[1]
662
+ ] : [...radii, ...origin, ...east, ...north, ...normal, ...point];
663
+ const v = values.map((value2) => {
664
+ const [whole, fraction = ""] = Math.abs(value2).toString(2).split(".");
665
+ return (value2 < 0 ? -1n : 1n) * BigInt("0b" + whole + fraction) << BigInt(1074 - fraction.length);
666
+ });
667
+ const unit = 1n << 1074n, q = 1n << 64n;
668
+ const factors = [v[1] * v[2], v[0] * v[2], v[0] * v[1]];
669
+ const p = [0, 1, 2].map((i) => (v[3 + i] * unit + v[6 + i] * v[15] + v[9 + i] * v[16]) * factors[i]);
670
+ const n = v.slice(12, 15).map((x, i) => x * factors[i]);
671
+ const dot = (x, y) => x.reduce((s, v2, i) => s + v2 * y[i], 0n);
672
+ const a = dot(n, n), b = dot(n, p), c = dot(p, p) - (v[0] * v[1] * v[2] * unit) ** 2n;
673
+ const discriminant = b * b - a * c;
674
+ if (a === 0n || discriminant < 0n)
675
+ return void 0;
676
+ const value = discriminant << 128n;
677
+ let root2 = value === 0n ? 0n : 1n << BigInt(Math.ceil(value.toString(2).length / 2));
678
+ if (root2)
679
+ for (; ; ) {
680
+ const next = root2 + value / root2 >> 1n;
681
+ if (next >= root2)
682
+ break;
683
+ root2 = next;
684
+ }
685
+ const output2 = p.map((x, i) => signedRatio(x * a * q + n[i] * (root2 - b * q), a * q * factors[i]));
686
+ return sphereRadius ? output2.map((_, i) => east[i] * output2[1] + north[i] * output2[2] + normal[i] * output2[0]) : output2;
687
+ }
688
+ function signedRatio(n, d) {
689
+ return Math.sign(Number(n)) * ratio(n < 0n ? -n : n, d, -2148);
690
+ }
691
+
692
+ // dist/ellipsoid-tangent-plane.js
693
+ var EllipsoidTangentPlane = class {
694
+ /**
695
+ * Creates a new plane tangent to an ellipsoid at the provided origin.
696
+ * If origin is not on the surface of the ellipsoid, its surface projection will be used.
697
+ *
698
+ * @param origin A nonzero Cartesian point on or near the ellipsoid.
699
+ * @param ellipsoid The ellipsoid to which the origin belongs. Defaults to WGS84.
700
+ */
701
+ constructor(origin, ellipsoid = Ellipsoid.WGS84) {
702
+ finiteInput(origin, 3);
703
+ this.radii = Object.freeze(Array.from(ellipsoid.radii));
704
+ if (this.radii[0] === this.radii[1] && this.radii[1] === this.radii[2])
705
+ this.radius = this.radii[0];
706
+ if (!this.radii.every((radius) => radius > 0 && Number.isFinite(radius))) {
707
+ throw new RangeError("Tangent plane requires positive finite ellipsoid radii");
708
+ }
709
+ const originOnSurface = ellipsoid.scaleToGeodeticSurface(Array.from(origin), new import_core5.Vector3());
710
+ if (!originOnSurface)
711
+ throw new RangeError("Origin has no unique ellipsoid surface point");
712
+ this.anchor = new import_core5.Vector3(originOnSurface);
713
+ const normal = new import_core5.Vector3(ellipsoid.geodeticSurfaceNormal(originOnSurface));
714
+ if (!normal.every(Number.isFinite) || !(normal.len() > 0)) {
715
+ throw new RangeError("Cannot resolve tangent-plane normal");
716
+ }
717
+ normal.normalize();
718
+ const horizontal = Math.hypot(normal[0], normal[1]);
719
+ this.east = horizontal > 0 ? new import_core5.Vector3(-normal[1] / horizontal, normal[0] / horizontal, 0) : new import_core5.Vector3(0, 1, 0);
720
+ this.north = new import_core5.Vector3(normal).cross(this.east).normalize();
721
+ this._plane = new import_culling.Plane().fromPointNormal(this.anchor, normal);
722
+ }
723
+ /**
724
+ * Computes the projection of the provided 3D position onto the 2D plane, along the plane normal.
725
+ *
726
+ * @param cartesian The fixed Cartesian point to project.
727
+ * @param result The optional object in which to store the local east-north coordinates.
728
+ * @returns The supplied result or a new Vector2.
729
+ */
730
+ projectPointToNearestOnPlane(cartesian, result = new import_core5.Vector2()) {
731
+ finiteInput(cartesian, 3);
732
+ const x = cartesian[0] - this.anchor[0];
733
+ const y = cartesian[1] - this.anchor[1];
734
+ const z = cartesian[2] - this.anchor[2];
735
+ const projected = writePlanePoint(this, x, y, z, result, this.radius);
736
+ if (!projected)
737
+ throw new RangeError("Tangent-plane projection overflow");
738
+ return projected;
739
+ }
740
+ /** Project along the outward ray from the ellipsoid center.
741
+ * Back-facing, horizon and nonfinite intersections return undefined without writing result.
742
+ */
743
+ projectPointRadiallyOntoPlane(cartesian, result = new import_core5.Vector2()) {
744
+ finiteInput(cartesian, 3);
745
+ const scale = Math.max(Math.abs(cartesian[0]), Math.abs(cartesian[1]), Math.abs(cartesian[2]));
746
+ if (scale === 0)
747
+ return void 0;
748
+ const sx = cartesian[0] / scale, sy = cartesian[1] / scale, sz = cartesian[2] / scale;
749
+ const length = Math.hypot(sx, sy, sz);
750
+ const x = sx / length;
751
+ const y = sy / length;
752
+ const z = sz / length;
753
+ const n = this.zAxis;
754
+ const denominator = x * n[0] + y * n[1] + z * n[2];
755
+ if (denominator <= 1e-14)
756
+ return void 0;
757
+ const distance = this.anchor.dot(n) / denominator;
758
+ return writePlanePoint(this, x * distance - this.anchor[0], y * distance - this.anchor[1], z * distance - this.anchor[2], result, this.radius);
759
+ }
760
+ /** Lift a local east/north point to the ellipsoid. Radial is the inverse of radial
761
+ * projection. Normal selects the nearest-facing line intersection and can miss.
762
+ * Neither operation restores a source point's height. Failure leaves result untouched.
763
+ */
764
+ projectPointOntoEllipsoid(point, mode = "radial", result = new import_core5.Vector3()) {
765
+ finiteInput(point, 2);
766
+ checkMode(mode);
767
+ const [rx, ry, rz] = this.radii;
768
+ if (mode === "radial") {
769
+ const scale = Math.max(Math.abs(this.anchor[0]), Math.abs(this.anchor[1]), Math.abs(this.anchor[2]), Math.abs(point[0]), Math.abs(point[1]));
770
+ const u = point[0] / scale, v = point[1] / scale;
771
+ const x = this.anchor[0] / scale + this.east[0] * u + this.north[0] * v;
772
+ const y = this.anchor[1] / scale + this.east[1] * u + this.north[1] * v;
773
+ const z = this.anchor[2] / scale + this.east[2] * u + this.north[2] * v;
774
+ const minimum = Math.min(rx, ry, rz);
775
+ const ax2 = x * (minimum / rx), ay2 = y * (minimum / ry), az2 = z * (minimum / rz);
776
+ const length = Math.hypot(ax2, ay2, az2);
777
+ if (!(length > 0 && Number.isFinite(length)))
778
+ return void 0;
779
+ return writeSurfacePoint(rx * (ax2 / length), ry * (ay2 / length), rz * (az2 / length), result);
780
+ }
781
+ const n = this.zAxis;
782
+ const p = [
783
+ this.anchor[0] + this.east[0] * point[0] + this.north[0] * point[1],
784
+ this.anchor[1] + this.east[1] * point[0] + this.north[1] * point[1],
785
+ this.anchor[2] + this.east[2] * point[0] + this.north[2] * point[1]
786
+ ];
787
+ if (!p.every(Number.isFinite))
788
+ return void 0;
789
+ const ax = n[0] / rx, ay = n[1] / ry, az = n[2] / rz;
790
+ const px = p[0] / rx, py = p[1] / ry, pz = p[2] / rz;
791
+ const a = ax * ax + ay * ay + az * az;
792
+ const b = ax * px + ay * py + az * pz;
793
+ const c = px * px + py * py + pz * pz - 1;
794
+ const squaredB = b * b, ac = a * c;
795
+ const error = 1e-6 * (Math.abs(squaredB) + Math.abs(ac));
796
+ const discriminant = squaredB - ac;
797
+ if (!(a > 0) || !Number.isFinite(discriminant) || Math.abs(discriminant) <= error) {
798
+ const exact2 = exactNormalIntersection(this.radii, this.anchor, this.east, this.north, n, point, this.radius);
799
+ return exact2 && writeSurfacePoint(exact2[0], exact2[1], exact2[2], result);
800
+ }
801
+ if (discriminant < 0)
802
+ return void 0;
803
+ const root2 = Math.sqrt(Math.max(0, discriminant));
804
+ const t = b > 0 ? -c / (b + root2) : (-b + root2) / a;
805
+ return writeSurfacePoint(p[0] + t * n[0], p[1] + t * n[1], p[2] + t * n[2], result);
806
+ }
807
+ /** Packed XYZ to packed east/north. Invalid radial points produce NaN pairs and a zero mask.
808
+ * Optional output must have exactly two components per point and must not overlap input.
809
+ */
810
+ projectPointsFlat(input, mode = "normal", output2) {
811
+ checkMode(mode);
812
+ if (input.length % 3)
813
+ throw new RangeError("Expected packed XYZ coordinates");
814
+ const count = input.length / 3;
815
+ const positions = output2 || new Float64Array(count * 2);
816
+ if (positions.length !== count * 2)
817
+ throw new RangeError("Invalid tangent-plane output length");
818
+ if (ArrayBuffer.isView(input) && input.buffer === positions.buffer && input.byteOffset < positions.byteOffset + positions.byteLength && positions.byteOffset < input.byteOffset + input.byteLength) {
819
+ throw new RangeError("Input and output buffers must not overlap");
820
+ }
821
+ for (let i = 0; i < input.length; i++) {
822
+ if (!Number.isFinite(input[i]))
823
+ throw new RangeError("Expected finite coordinates");
824
+ }
825
+ const valid = new Uint8Array(count);
826
+ const point = new import_core5.Vector3();
827
+ const projected = new import_core5.Vector2();
828
+ for (let i = 0; i < count; i++) {
829
+ point.set(input[i * 3], input[i * 3 + 1], input[i * 3 + 2]);
830
+ const value = mode === "normal" ? this.projectPointToNearestOnPlane(point, projected) : this.projectPointRadiallyOntoPlane(point, projected);
831
+ valid[i] = value ? 1 : 0;
832
+ positions[i * 2] = value ? value[0] : NaN;
833
+ positions[i * 2 + 1] = value ? value[1] : NaN;
834
+ }
835
+ return { positions, valid };
836
+ }
837
+ get plane() {
838
+ return this._plane;
839
+ }
840
+ get origin() {
841
+ return this.anchor;
842
+ }
843
+ get xAxis() {
844
+ return this.east;
845
+ }
846
+ get yAxis() {
847
+ return this.north;
848
+ }
849
+ get zAxis() {
850
+ return this._plane.normal;
851
+ }
852
+ };
853
+ function finiteInput(point, length) {
854
+ if (point.length !== length)
855
+ throw new RangeError(`Expected ${length} finite coordinates`);
856
+ for (let i = 0; i < length; i++) {
857
+ if (!Number.isFinite(point[i]))
858
+ throw new RangeError(`Expected ${length} finite coordinates`);
859
+ }
860
+ }
861
+ function checkMode(mode) {
862
+ if (mode !== "normal" && mode !== "radial")
863
+ throw new RangeError("Invalid tangent-plane mode");
864
+ }
865
+ function writePlanePoint(plane, x, y, z, result, radius) {
866
+ let east = x * plane.xAxis[0] + y * plane.xAxis[1] + z * plane.xAxis[2];
867
+ let north = x * plane.yAxis[0] + y * plane.yAxis[1] + z * plane.yAxis[2];
868
+ if (radius !== void 0 && Math.abs((east / radius) ** 2 + (north / radius) ** 2 - 1) <= 32 * Number.EPSILON) {
869
+ east = compensatedDot3(x, y, z, plane.xAxis[0], plane.xAxis[1], plane.xAxis[2]);
870
+ north = compensatedDot3(x, y, z, plane.yAxis[0], plane.yAxis[1], plane.yAxis[2]);
871
+ }
872
+ if (!Number.isFinite(east) || !Number.isFinite(north))
873
+ return void 0;
874
+ return result.set(east, north);
875
+ }
876
+ function writeSurfacePoint(x, y, z, result) {
877
+ if (![x, y, z].every(Number.isFinite))
878
+ return void 0;
879
+ return result.set(x, y, z);
880
+ }
881
+
882
+ // dist/make-obb-from-region.js
883
+ var scratchOffset = new import_core6.Vector3();
884
+ var scratchTangentPoint = new import_core6.Vector3();
885
+ var scratchPerimeterCartographicNC = new import_core6.Vector3();
886
+ var scratchPerimeterCartographicNW = new import_core6.Vector3();
887
+ var scratchPerimeterCartographicCW = new import_core6.Vector3();
888
+ var scratchPerimeterCartographicSW = new import_core6.Vector3();
889
+ var scratchPerimeterCartographicSC = new import_core6.Vector3();
890
+ var scratchPerimeterCartesianNC = new import_core6.Vector3();
891
+ var scratchPerimeterCartesianNW = new import_core6.Vector3();
892
+ var scratchPerimeterCartesianCW = new import_core6.Vector3();
893
+ var scratchPerimeterCartesianSW = new import_core6.Vector3();
894
+ var scratchPerimeterCartesianSC = new import_core6.Vector3();
895
+ var scratchPerimeterProjectedNC = new import_core6.Vector2();
896
+ var scratchPerimeterProjectedNW = new import_core6.Vector2();
897
+ var scratchPerimeterProjectedCW = new import_core6.Vector2();
898
+ var scratchPerimeterProjectedSW = new import_core6.Vector2();
899
+ var scratchPerimeterProjectedSC = new import_core6.Vector2();
900
+ var scratchPlane = new import_culling2.Plane();
901
+ var scratchPlaneOrigin = new import_core6.Vector3();
902
+ var scratchPlaneNormal = new import_core6.Vector3();
903
+ var scratchPlaneXAxis = new import_core6.Vector3();
904
+ var scratchHorizonCartesian = new import_core6.Vector3();
905
+ var scratchHorizonProjected = new import_core6.Vector2();
906
+ var scratchMaxY = new import_core6.Vector3();
907
+ var scratchZ = new import_core6.Vector3();
908
+ var VECTOR3_UNIT_X = new import_core6.Vector3(1, 0, 0);
909
+ var VECTOR3_UNIT_Z = new import_core6.Vector3(0, 0, 1);
910
+ function makeOBBFromRegion(region, ellipsoid = Ellipsoid.WGS84, options = {}) {
911
+ if (!region || region.length !== 6 || region.some((value) => !Number.isFinite(value))) {
912
+ throw new Error("makeOBBFromRegion: region must contain exactly six finite numbers");
913
+ }
914
+ const unitScale = options.units === "degrees" ? (0, import_core6.radians)(1) : 1;
915
+ const [rawWest, rawSouth, rawEast, rawNorth, minimumHeight, maximumHeight] = region;
916
+ if (minimumHeight > maximumHeight) {
917
+ throw new Error("makeOBBFromRegion: minimumHeight must not exceed maximumHeight");
918
+ }
919
+ const south = rawSouth * unitScale;
920
+ const north = rawNorth * unitScale;
921
+ const west = normalizeLongitude(rawWest * unitScale);
922
+ let east = normalizeLongitude(rawEast * unitScale);
923
+ const directedSpan = rawEast * unitScale - rawWest * unitScale;
924
+ if (directedSpan >= import_core6._MathUtils.TWO_PI - 1e-12) {
925
+ east = west + import_core6._MathUtils.TWO_PI;
926
+ }
927
+ const latitudeTolerance = 1e-12;
928
+ if (south > north || south < -import_core6._MathUtils.PI_OVER_TWO - latitudeTolerance || north > import_core6._MathUtils.PI_OVER_TWO + latitudeTolerance) {
929
+ throw new Error("makeOBBFromRegion: latitude must be within [-\u03C0/2, \u03C0/2] and south \u2264 north");
930
+ }
931
+ const clampedSouth = Math.max(-import_core6._MathUtils.PI_OVER_TWO, Math.min(import_core6._MathUtils.PI_OVER_TWO, south));
932
+ const clampedNorth = Math.max(-import_core6._MathUtils.PI_OVER_TWO, Math.min(import_core6._MathUtils.PI_OVER_TWO, north));
933
+ return makeOBBFromNormalizedRegion([west, clampedSouth, east, clampedNorth, minimumHeight, maximumHeight], ellipsoid, options.transform);
934
+ }
935
+ function normalizeLongitude(value) {
936
+ const normalized = ((value + Math.PI) % import_core6._MathUtils.TWO_PI + import_core6._MathUtils.TWO_PI) % import_core6._MathUtils.TWO_PI - Math.PI;
937
+ return normalized === -Math.PI && value > 0 ? Math.PI : normalized;
938
+ }
939
+ function makeOBBFromNormalizedRegion(region, ellipsoid, transform) {
940
+ const obb = new import_culling2.OrientedBoundingBox();
941
+ const [west, south, east, north, minimumHeight, maximumHeight] = region;
942
+ const northDeg = (0, import_core6.degrees)(north);
943
+ const southDeg = (0, import_core6.degrees)(south);
944
+ let maxX;
945
+ let maxY;
946
+ let maxZ;
947
+ let minX;
948
+ let minY;
949
+ let minZ;
950
+ let plane;
951
+ const rectangle = new LngLatRectangle(west, south, east, north);
952
+ const tangentPoint = LngLatRectangle.center(rectangle, scratchTangentPoint);
953
+ const tangentPointCartographic = new import_core6.Vector3([
954
+ (0, import_core6.degrees)(tangentPoint.x),
955
+ (0, import_core6.degrees)(tangentPoint.y),
956
+ 0
957
+ ]);
958
+ const lonCenter = tangentPoint.x;
959
+ const lonCenterDeg = tangentPointCartographic.x;
960
+ if (rectangle.width <= import_core6._MathUtils.PI) {
961
+ const westDeg = (0, import_core6.degrees)(west);
962
+ const tangentPoint2 = ellipsoid.cartographicToCartesian(tangentPointCartographic);
963
+ const ellipsoidTangentPlane = new EllipsoidTangentPlane(tangentPoint2, ellipsoid);
964
+ const latCenter = southDeg < 0 && northDeg > 0 ? 0 : tangentPointCartographic.y;
965
+ const perimeterCartographicNC = scratchPerimeterCartographicNC.copy([
966
+ lonCenterDeg,
967
+ northDeg,
968
+ maximumHeight
969
+ ]);
970
+ const perimeterCartographicNW = scratchPerimeterCartographicNW.copy([
971
+ westDeg,
972
+ northDeg,
973
+ maximumHeight
974
+ ]);
975
+ const perimeterCartographicCW = scratchPerimeterCartographicCW.copy([
976
+ westDeg,
977
+ latCenter,
978
+ maximumHeight
979
+ ]);
980
+ const perimeterCartographicSW = scratchPerimeterCartographicSW.copy([
981
+ westDeg,
982
+ southDeg,
983
+ maximumHeight
984
+ ]);
985
+ const perimeterCartographicSC = scratchPerimeterCartographicSC.copy([
986
+ lonCenterDeg,
987
+ southDeg,
988
+ maximumHeight
989
+ ]);
990
+ const perimeterCartesianNC = ellipsoid.cartographicToCartesian(perimeterCartographicNC, scratchPerimeterCartesianNC);
991
+ let perimeterCartesianNW = ellipsoid.cartographicToCartesian(perimeterCartographicNW, scratchPerimeterCartesianNW);
992
+ const perimeterCartesianCW = ellipsoid.cartographicToCartesian(perimeterCartographicCW, scratchPerimeterCartesianCW);
993
+ let perimeterCartesianSW = ellipsoid.cartographicToCartesian(perimeterCartographicSW, scratchPerimeterCartesianSW);
994
+ const perimeterCartesianSC = ellipsoid.cartographicToCartesian(perimeterCartographicSC, scratchPerimeterCartesianSC);
995
+ const perimeterProjectedNC = ellipsoidTangentPlane.projectPointToNearestOnPlane(perimeterCartesianNC, scratchPerimeterProjectedNC);
996
+ const perimeterProjectedNW = ellipsoidTangentPlane.projectPointToNearestOnPlane(perimeterCartesianNW, scratchPerimeterProjectedNW);
997
+ const perimeterProjectedCW = ellipsoidTangentPlane.projectPointToNearestOnPlane(perimeterCartesianCW, scratchPerimeterProjectedCW);
998
+ const perimeterProjectedSW = ellipsoidTangentPlane.projectPointToNearestOnPlane(perimeterCartesianSW, scratchPerimeterProjectedSW);
999
+ const perimeterProjectedSC = ellipsoidTangentPlane.projectPointToNearestOnPlane(perimeterCartesianSC, scratchPerimeterProjectedSC);
1000
+ minX = Math.min(perimeterProjectedNW.x, perimeterProjectedCW.x, perimeterProjectedSW.x);
1001
+ maxX = -minX;
1002
+ maxY = Math.max(perimeterProjectedNW.y, perimeterProjectedNC.y);
1003
+ minY = Math.min(perimeterProjectedSW.y, perimeterProjectedSC.y);
1004
+ perimeterCartographicNW.z = perimeterCartographicSW.z = minimumHeight;
1005
+ perimeterCartesianNW = ellipsoid.cartographicToCartesian(perimeterCartographicNW, scratchPerimeterCartesianNW);
1006
+ perimeterCartesianSW = ellipsoid.cartographicToCartesian(perimeterCartographicSW, scratchPerimeterCartesianSW);
1007
+ plane = ellipsoidTangentPlane.plane;
1008
+ minZ = Math.min(plane.getPointDistance(perimeterCartesianNW), plane.getPointDistance(perimeterCartesianSW));
1009
+ maxZ = maximumHeight;
1010
+ return applyTransform(fromPlaneExtents(ellipsoidTangentPlane.origin, ellipsoidTangentPlane.xAxis, ellipsoidTangentPlane.yAxis, ellipsoidTangentPlane.zAxis, minX, maxX, minY, maxY, minZ, maxZ, obb), transform);
1011
+ }
1012
+ const eastDeg = (0, import_core6.degrees)(east);
1013
+ const fullyAboveEquator = south > 0;
1014
+ const fullyBelowEquator = north < 0;
1015
+ const latitudeNearestToEquator = fullyAboveEquator ? southDeg : fullyBelowEquator ? northDeg : 0;
1016
+ const planeOrigin = ellipsoid.cartographicToCartesian([lonCenterDeg, latitudeNearestToEquator, maximumHeight], scratchPlaneOrigin);
1017
+ planeOrigin.z = 0;
1018
+ const isPole = Math.abs(planeOrigin.x) < import_core6._MathUtils.EPSILON10 && Math.abs(planeOrigin.y) < import_core6._MathUtils.EPSILON10;
1019
+ const planeNormal = !isPole ? scratchPlaneNormal.copy(planeOrigin).normalize() : VECTOR3_UNIT_X;
1020
+ const planeYAxis = VECTOR3_UNIT_Z;
1021
+ const planeXAxis = scratchPlaneXAxis.copy(planeNormal).cross(planeYAxis);
1022
+ plane = scratchPlane.fromPointNormal(planeOrigin, planeNormal);
1023
+ const horizonCartesian = ellipsoid.cartographicToCartesian([(0, import_core6.degrees)(lonCenter + import_core6._MathUtils.PI_OVER_TWO), latitudeNearestToEquator, maximumHeight], scratchHorizonCartesian);
1024
+ const projectedPoint = plane.projectPointOntoPlane(horizonCartesian, scratchHorizonProjected);
1025
+ maxX = projectedPoint.dot(planeXAxis);
1026
+ minX = -maxX;
1027
+ const northHeight = fullyBelowEquator ? minimumHeight : maximumHeight;
1028
+ const southHeight = fullyAboveEquator ? minimumHeight : maximumHeight;
1029
+ maxY = latitudeZExtent(ellipsoid, northDeg, northHeight, true);
1030
+ minY = latitudeZExtent(ellipsoid, southDeg, southHeight, false);
1031
+ const farZ = ellipsoid.cartographicToCartesian([eastDeg, latitudeNearestToEquator, maximumHeight], scratchZ);
1032
+ minZ = plane.getPointDistance(farZ);
1033
+ maxZ = 0;
1034
+ return applyTransform(fromPlaneExtents(planeOrigin, planeXAxis, planeYAxis, planeNormal, minX, maxX, minY, maxY, minZ, maxZ, obb), transform);
1035
+ }
1036
+ function applyTransform(obb, transform) {
1037
+ if (!transform)
1038
+ return obb;
1039
+ const axes = [0, 1, 2].map((column) => obb.halfAxes.getColumn(column, new import_core6.Vector3()));
1040
+ const center = transform.transformAsPoint(obb.center);
1041
+ const minimum = [Infinity, Infinity, Infinity];
1042
+ const maximum = [-Infinity, -Infinity, -Infinity];
1043
+ for (let mask = 0; mask < 8; mask++) {
1044
+ const corner = new import_core6.Vector3(center);
1045
+ for (let axis = 0; axis < 3; axis++) {
1046
+ const transformedAxis = transform.transformAsVector(axes[axis]);
1047
+ corner.add(new import_core6.Vector3(transformedAxis).scale((mask & 1 << axis) === 0 ? -1 : 1));
1048
+ }
1049
+ for (let component = 0; component < 3; component++) {
1050
+ minimum[component] = Math.min(minimum[component], corner[component]);
1051
+ maximum[component] = Math.max(maximum[component], corner[component]);
1052
+ }
1053
+ }
1054
+ obb.center.copy(minimum).add(maximum).scale(0.5);
1055
+ const halfSize = new import_core6.Vector3(maximum).subtract(minimum).scale(0.5);
1056
+ obb.halfAxes = new import_core6.Matrix3().set(halfSize.x, 0, 0, 0, halfSize.y, 0, 0, 0, halfSize.z);
1057
+ return obb;
1058
+ }
1059
+ function latitudeZExtent(ellipsoid, latitude, height, maximum) {
1060
+ let extent = maximum ? -Infinity : Infinity;
1061
+ for (const longitude of [0, 90, 180, 270]) {
1062
+ const z = ellipsoid.cartographicToCartesian([longitude, latitude, height], scratchMaxY).z;
1063
+ extent = maximum ? Math.max(extent, z) : Math.min(extent, z);
1064
+ }
1065
+ return extent;
1066
+ }
1067
+ function fromPlaneExtents(planeOrigin, planeXAxis, planeYAxis, planeZAxis, minimumX, maximumX, minimumY, maximumY, minimumZ, maximumZ, result) {
1068
+ const center = result.center;
1069
+ const halfAxes = result.halfAxes;
1070
+ halfAxes.setColumn(0, planeXAxis);
1071
+ halfAxes.setColumn(1, planeYAxis);
1072
+ halfAxes.setColumn(2, planeZAxis);
1073
+ const centerOffset = scratchOffset.set((minimumX + maximumX) / 2, (minimumY + maximumY) / 2, (minimumZ + maximumZ) / 2).transformByMatrix3(halfAxes);
1074
+ const scaleX = (maximumX - minimumX) / 2;
1075
+ const scaleY = (maximumY - minimumY) / 2;
1076
+ const scaleZ = (maximumZ - minimumZ) / 2;
1077
+ halfAxes[0] *= scaleX;
1078
+ halfAxes[1] *= scaleX;
1079
+ halfAxes[2] *= scaleX;
1080
+ halfAxes[3] *= scaleY;
1081
+ halfAxes[4] *= scaleY;
1082
+ halfAxes[5] *= scaleY;
1083
+ halfAxes[6] *= scaleZ;
1084
+ halfAxes[7] *= scaleZ;
1085
+ halfAxes[8] *= scaleZ;
1086
+ center.copy(planeOrigin).add(centerOffset);
1087
+ return result;
1088
+ }
1089
+
1090
+ // dist/ellipsoid-occluder.js
1091
+ var EllipsoidOccluder = class {
1092
+ constructor(radii, center = [0, 0, 0]) {
1093
+ validateVector(radii);
1094
+ validateVector(center);
1095
+ if (Array.from(radii).some((value) => value <= 0))
1096
+ throw new RangeError("Radii must be positive");
1097
+ this.radii = Object.freeze(Array.from(radii));
1098
+ this.center = Object.freeze(Array.from(center));
1099
+ }
1100
+ /** Nonnegative ray parameter interval, including tangency and inside-origin rays.
1101
+ * Direction need not be normalized. Undefined is a true miss; never clamps a miss
1102
+ * to the limb. Result is untouched on miss. Distances equal parameters only for
1103
+ * unit directions. Zero direction is a miss.
1104
+ */
1105
+ intersectRay(origin, direction, result = [0, 0]) {
1106
+ validateVector(origin);
1107
+ validateVector(direction);
1108
+ const [x, y, z] = this.scalePoint(origin);
1109
+ const dx = direction[0] / this.radii[0];
1110
+ const dy = direction[1] / this.radii[1];
1111
+ const dz = direction[2] / this.radii[2];
1112
+ const length = Math.hypot(dx, dy, dz);
1113
+ if (length === 0 || !Number.isFinite(length))
1114
+ return void 0;
1115
+ const ux = dx / length, uy = dy / length, uz = dz / length;
1116
+ const along = -(x * ux + y * uy + z * uz);
1117
+ const perpendicular = Math.hypot(y * uz - z * uy, z * ux - x * uz, x * uy - y * ux);
1118
+ if (perpendicular > 1)
1119
+ return void 0;
1120
+ const half = Math.sqrt((1 - perpendicular) * (1 + perpendicular));
1121
+ let near = along - half;
1122
+ let far = along + half;
1123
+ const radius = Math.hypot(x, y, z);
1124
+ if (!Number.isFinite(radius))
1125
+ throw new RangeError("Scaled origin magnitude must be finite");
1126
+ if (half > 0 && along > 0 && far !== 0)
1127
+ near = (radius - 1) / far * (radius + 1);
1128
+ if (half > 0 && along < 0 && near !== 0)
1129
+ far = (radius - 1) / near * (radius + 1);
1130
+ if (far < 0)
1131
+ return void 0;
1132
+ result[0] = Math.max(0, Math.min(near, far)) / length;
1133
+ result[1] = Math.max(0, far) / length;
1134
+ return result;
1135
+ }
1136
+ /** True if the finite camera-to-point segment enters the solid interior.
1137
+ * Surface contact/tangency alone is not occlusion. Works for elevated points;
1138
+ * unlike a facing-normal test it does not discard visible points beyond the
1139
+ * surface horizon. tolerance is a nonnegative scaled-space squared-radius margin.
1140
+ */
1141
+ isPointOccluded(camera, point, tolerance = 1e-12) {
1142
+ validateVector(camera);
1143
+ validateVector(point);
1144
+ if (!Number.isFinite(tolerance) || tolerance < 0 || tolerance >= 1)
1145
+ throw new RangeError("Tolerance must be in [0, 1)");
1146
+ const a = this.scalePoint(camera);
1147
+ const b = this.scalePoint(point);
1148
+ const dx = b[0] - a[0], dy = b[1] - a[1], dz = b[2] - a[2];
1149
+ const length = Math.hypot(dx, dy, dz);
1150
+ if (!Number.isFinite(length))
1151
+ throw new RangeError("Segment magnitude must be finite");
1152
+ if (length === 0)
1153
+ return Math.hypot(...a) ** 2 < 1 - tolerance;
1154
+ const ux = dx / length, uy = dy / length, uz = dz / length;
1155
+ const distance = Math.max(0, Math.min(length, -(a[0] * ux + a[1] * uy + a[2] * uz)));
1156
+ return Math.hypot(a[0] + distance * ux, a[1] + distance * uy, a[2] + distance * uz) ** 2 < 1 - tolerance;
1157
+ }
1158
+ /** Exact apparent limb ellipse for an exterior camera; undefined on/inside surface. */
1159
+ getHorizon(camera) {
1160
+ validateVector(camera);
1161
+ const scaled = this.scalePoint(camera);
1162
+ const distance = Math.hypot(...scaled);
1163
+ if (!Number.isFinite(distance))
1164
+ throw new RangeError("Camera magnitude must be finite");
1165
+ if (distance <= 1)
1166
+ return void 0;
1167
+ const normal = scaled.map((value) => value / distance);
1168
+ const reference = Math.abs(normal[2]) < 0.9 ? [0, 0, 1] : [0, 1, 0];
1169
+ const u = cross(normal, reference);
1170
+ const uLength = Math.hypot(...u);
1171
+ const v = cross(normal, u.map((value) => value / uLength));
1172
+ const radius = Math.sqrt((1 - 1 / distance) * (1 + 1 / distance));
1173
+ return {
1174
+ center: normal.map((value, i) => this.center[i] + this.radii[i] * value / distance),
1175
+ axis1: u.map((value, i) => this.radii[i] * radius * value / uLength),
1176
+ axis2: v.map((value, i) => this.radii[i] * radius * value)
1177
+ };
1178
+ }
1179
+ scalePoint(point) {
1180
+ const result = this.radii.map((radius, i) => (point[i] - this.center[i]) / radius);
1181
+ if (!result.every(Number.isFinite))
1182
+ throw new RangeError("Scaled coordinates must be finite");
1183
+ return result;
1184
+ }
1185
+ };
1186
+ function validateVector(vector) {
1187
+ if (vector.length !== 3 || !Array.from(vector).every(Number.isFinite))
1188
+ throw new RangeError("Expected three finite Cartesian components");
1189
+ }
1190
+ function cross(a, b) {
1191
+ return [a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0]];
1192
+ }
1193
+
1194
+ // dist/globe-horizon-bounds.js
1195
+ function getGlobeHorizonBounds(camera, radius) {
1196
+ if (camera.length !== 3 || !Array.from(camera).every(Number.isFinite) || !Number.isFinite(radius) || radius <= 0)
1197
+ throw new RangeError("Expected a finite camera and positive sphere radius");
1198
+ const distance = Math.hypot(camera[0], camera[1], camera[2]);
1199
+ if (!Number.isFinite(distance))
1200
+ throw new RangeError("Camera magnitude must be finite");
1201
+ if (distance <= radius)
1202
+ return void 0;
1203
+ const latitude = Math.atan2(camera[2], Math.hypot(camera[0], camera[1]));
1204
+ const longitude = Math.atan2(camera[1], camera[0]);
1205
+ const angle2 = Math.acos(radius / distance);
1206
+ const degrees2 = 180 / Math.PI;
1207
+ const padding = 1e-10;
1208
+ const south = Math.max(-90, (latitude - angle2) * degrees2 - padding);
1209
+ const north = Math.min(90, (latitude + angle2) * degrees2 + padding);
1210
+ if (Math.abs(latitude) + angle2 >= Math.PI / 2 - 1e-12)
1211
+ return [-180, south, 180, north];
1212
+ const extent = Math.asin(Math.min(1, Math.sin(angle2) / Math.cos(latitude))) * degrees2 + padding;
1213
+ return [wrap(longitude * degrees2 - extent), south, wrap(longitude * degrees2 + extent), north];
1214
+ }
1215
+ function splitGlobeBounds(bounds) {
1216
+ const [west, south, east, north] = bounds;
1217
+ if (bounds.length !== 4 || !bounds.every(Number.isFinite) || west < -180 || west > 180 || east < -180 || east > 180 || south < -90 || north > 90 || south > north)
1218
+ throw new RangeError("Invalid degree bounds");
1219
+ return west <= east ? [[west, south, east, north]] : [
1220
+ [west, south, 180, north],
1221
+ [-180, south, east, north]
1222
+ ];
1223
+ }
1224
+ function wrap(longitude) {
1225
+ return ((longitude + 180) % 360 + 360) % 360 - 180;
1226
+ }
1227
+
1228
+ // dist/subdivide-globe-mesh.js
1229
+ var import_spheroid2 = require("@math.gl/core/spheroid");
1230
+ var import_polygon = require("@math.gl/geometry/polygon");
1231
+ function subdivideGlobeMesh(mesh, options) {
1232
+ const { semiMajorAxis = 6371e3, semiMinorAxis = semiMajorAxis, size = 2, ...limits } = options;
1233
+ if (size !== 2 && size !== 3)
1234
+ throw new RangeError("Source size must be 2 or 3");
1235
+ if (!Number.isFinite(semiMajorAxis) || !Number.isFinite(semiMinorAxis) || semiMajorAxis <= 0 || semiMinorAxis <= 0 || semiMinorAxis > semiMajorAxis)
1236
+ throw new RangeError("Expected positive sphere/oblate axes");
1237
+ for (let i = 1; i < mesh.positions.length; i += size)
1238
+ if (Math.abs(mesh.positions[i]) > 90)
1239
+ throw new RangeError("Latitude outside [-90, 90]");
1240
+ for (let i = 0; i < mesh.indices.length; i += 3) {
1241
+ const longitudes = [0, 1, 2].map((j) => mesh.positions[mesh.indices[i + j] * size]);
1242
+ if (Math.max(...longitudes) - Math.min(...longitudes) > 180)
1243
+ throw new RangeError("Unwrap longitude seams before globe subdivision");
1244
+ }
1245
+ const geometry = {
1246
+ semiMajorAxis,
1247
+ semiMinorAxis,
1248
+ eccentricitySquared: 1 - (semiMinorAxis / semiMajorAxis) ** 2
1249
+ };
1250
+ return (0, import_polygon.subdivideTriangleMesh)(mesh, {
1251
+ ...limits,
1252
+ size,
1253
+ targetSize: 3,
1254
+ transform(position) {
1255
+ const point = {
1256
+ x: position[0] * Math.PI / 180,
1257
+ y: position[1] * Math.PI / 180,
1258
+ z: size === 3 ? position[2] : 0
1259
+ };
1260
+ if (!(0, import_spheroid2.spheroidToCartesian)(point, geometry))
1261
+ return null;
1262
+ return [point.x, point.y, point.z];
1263
+ }
1264
+ });
1265
+ }
1266
+
1267
+ // dist/subdivide-geodesic-polyline.js
1268
+ var import_polygon2 = require("@math.gl/geometry/polygon");
1269
+
1270
+ // dist/vendor/geographiclib-geodesic/runtime.js
1271
+ var geodesic = {};
1272
+ geodesic.Constants = {};
1273
+ geodesic.Math = {};
1274
+ geodesic.Accumulator = {};
1275
+ (function(c) {
1276
+ "use strict";
1277
+ c.WGS84 = { a: 6378137, f: 1 / 298.257223563 };
1278
+ c.version = {
1279
+ major: 2,
1280
+ minor: 2,
1281
+ patch: 0
1282
+ };
1283
+ c.version_string = "2.2.0";
1284
+ })(geodesic.Constants);
1285
+ (function(m) {
1286
+ "use strict";
1287
+ m.digits = 53;
1288
+ m.epsilon = Math.pow(0.5, m.digits - 1);
1289
+ m.degree = Math.PI / 180;
1290
+ m.sq = function(x) {
1291
+ return x * x;
1292
+ };
1293
+ m.hypot = function(x, y) {
1294
+ return Math.sqrt(x * x + y * y);
1295
+ };
1296
+ m.cbrt = Math.cbrt || function(x) {
1297
+ var y = Math.pow(Math.abs(x), 1 / 3);
1298
+ return x > 0 ? y : x < 0 ? -y : x;
1299
+ };
1300
+ m.log1p = Math.log1p || function(x) {
1301
+ var y = 1 + x, z = y - 1;
1302
+ return z === 0 ? x : x * Math.log(y) / z;
1303
+ };
1304
+ m.atanh = Math.atanh || function(x) {
1305
+ var y = Math.abs(x);
1306
+ y = m.log1p(2 * y / (1 - y)) / 2;
1307
+ return x > 0 ? y : x < 0 ? -y : x;
1308
+ };
1309
+ m.copysign = function(x, y) {
1310
+ return Math.abs(x) * (y < 0 || y === 0 && 1 / y < 0 ? -1 : 1);
1311
+ };
1312
+ m.sum = function(u, v) {
1313
+ var s = u + v, up = s - v, vpp = s - up, t;
1314
+ up -= u;
1315
+ vpp -= v;
1316
+ t = s ? 0 - (up + vpp) : s;
1317
+ return { s, t };
1318
+ };
1319
+ m.polyval = function(N, p, s, x) {
1320
+ var y = N < 0 ? 0 : p[s++];
1321
+ while (--N >= 0)
1322
+ y = y * x + p[s++];
1323
+ return y;
1324
+ };
1325
+ m.AngRound = function(x) {
1326
+ var z = 1 / 16, y = Math.abs(x);
1327
+ y = y < z ? z - (z - y) : y;
1328
+ return m.copysign(y, x);
1329
+ };
1330
+ m.remainder = function(x, y) {
1331
+ x %= y;
1332
+ return x < -y / 2 ? x + y : x < y / 2 ? x : x - y;
1333
+ };
1334
+ m.AngNormalize = function(x) {
1335
+ var y = m.remainder(x, 360);
1336
+ return Math.abs(y) === 180 ? m.copysign(180, x) : y;
1337
+ };
1338
+ m.LatFix = function(x) {
1339
+ return Math.abs(x) > 90 ? NaN : x;
1340
+ };
1341
+ m.AngDiff = function(x, y) {
1342
+ var r = m.sum(m.remainder(-x, 360), m.remainder(y, 360)), d, e;
1343
+ r = m.sum(m.remainder(r.s, 360), r.t);
1344
+ d = r.s;
1345
+ e = r.t;
1346
+ if (d === 0 || Math.abs(d) === 180)
1347
+ d = m.copysign(d, e === 0 ? y - x : -e);
1348
+ return { d, e };
1349
+ };
1350
+ m.sincosd = function(x) {
1351
+ var d, r, q, s, c, sinx, cosx;
1352
+ d = x % 360;
1353
+ q = Math.round(d / 90);
1354
+ d -= 90 * q;
1355
+ r = d * this.degree;
1356
+ s = Math.sin(r);
1357
+ c = Math.cos(r);
1358
+ if (Math.abs(d) === 45) {
1359
+ c = Math.sqrt(0.5);
1360
+ s = m.copysign(c, r);
1361
+ } else if (Math.abs(d) === 30) {
1362
+ c = Math.sqrt(0.75);
1363
+ s = m.copysign(0.5, r);
1364
+ }
1365
+ switch (q & 3) {
1366
+ case 0:
1367
+ sinx = s;
1368
+ cosx = c;
1369
+ break;
1370
+ case 1:
1371
+ sinx = c;
1372
+ cosx = -s;
1373
+ break;
1374
+ case 2:
1375
+ sinx = -s;
1376
+ cosx = -c;
1377
+ break;
1378
+ default:
1379
+ sinx = -c;
1380
+ cosx = s;
1381
+ break;
1382
+ }
1383
+ cosx += 0;
1384
+ if (sinx === 0)
1385
+ sinx = m.copysign(sinx, x);
1386
+ return { s: sinx, c: cosx };
1387
+ };
1388
+ m.sincosde = function(x, t) {
1389
+ var d, r, q, s, c, sinx, cosx;
1390
+ d = x % 360;
1391
+ q = Math.round(d / 90);
1392
+ d = m.AngRound(d - 90 * q + t);
1393
+ r = d * this.degree;
1394
+ s = Math.sin(r);
1395
+ c = Math.cos(r);
1396
+ if (Math.abs(d) === 45) {
1397
+ c = Math.sqrt(0.5);
1398
+ s = m.copysign(c, r);
1399
+ } else if (Math.abs(d) === 30) {
1400
+ c = Math.sqrt(0.75);
1401
+ s = m.copysign(0.5, r);
1402
+ }
1403
+ switch (q & 3) {
1404
+ case 0:
1405
+ sinx = s;
1406
+ cosx = c;
1407
+ break;
1408
+ case 1:
1409
+ sinx = c;
1410
+ cosx = -s;
1411
+ break;
1412
+ case 2:
1413
+ sinx = -s;
1414
+ cosx = -c;
1415
+ break;
1416
+ default:
1417
+ sinx = -c;
1418
+ cosx = s;
1419
+ break;
1420
+ }
1421
+ cosx += 0;
1422
+ if (sinx === 0)
1423
+ sinx = m.copysign(sinx, x + t);
1424
+ return { s: sinx, c: cosx };
1425
+ };
1426
+ m.atan2d = function(y, x) {
1427
+ var q = 0, ang;
1428
+ if (Math.abs(y) > Math.abs(x)) {
1429
+ [y, x] = [x, y];
1430
+ q = 2;
1431
+ }
1432
+ if (m.copysign(1, x) < 0) {
1433
+ x = -x;
1434
+ ++q;
1435
+ }
1436
+ ang = Math.atan2(y, x) / this.degree;
1437
+ switch (q) {
1438
+ // Note that atan2d(-0.0, 1.0) will return -0. However, we expect that
1439
+ // atan2d will not be called with y = -0. If need be, include
1440
+ //
1441
+ // case 0: ang = 0 + ang; break;
1442
+ //
1443
+ // and handle mpfr as in AngRound.
1444
+ case 1:
1445
+ ang = m.copysign(180, y) - ang;
1446
+ break;
1447
+ case 2:
1448
+ ang = 90 - ang;
1449
+ break;
1450
+ case 3:
1451
+ ang = -90 + ang;
1452
+ break;
1453
+ default:
1454
+ break;
1455
+ }
1456
+ return ang;
1457
+ };
1458
+ })(geodesic.Math);
1459
+ (function(a, m) {
1460
+ "use strict";
1461
+ a.Accumulator = function(y) {
1462
+ this.Set(y);
1463
+ };
1464
+ a.Accumulator.prototype.Set = function(y) {
1465
+ if (!y)
1466
+ y = 0;
1467
+ if (y.constructor === a.Accumulator) {
1468
+ this._s = y._s;
1469
+ this._t = y._t;
1470
+ } else {
1471
+ this._s = y;
1472
+ this._t = 0;
1473
+ }
1474
+ };
1475
+ a.Accumulator.prototype.Add = function(y) {
1476
+ var u = m.sum(y, this._t), v = m.sum(u.s, this._s);
1477
+ u = u.t;
1478
+ this._s = v.s;
1479
+ this._t = v.t;
1480
+ if (this._s === 0)
1481
+ this._s = u;
1482
+ else
1483
+ this._t += u;
1484
+ };
1485
+ a.Accumulator.prototype.Sum = function(y) {
1486
+ var b;
1487
+ if (!y)
1488
+ return this._s;
1489
+ else {
1490
+ b = new a.Accumulator(this);
1491
+ b.Add(y);
1492
+ return b._s;
1493
+ }
1494
+ };
1495
+ a.Accumulator.prototype.Negate = function() {
1496
+ this._s *= -1;
1497
+ this._t *= -1;
1498
+ };
1499
+ a.Accumulator.prototype.Remainder = function(y) {
1500
+ this._s = m.remainder(this._s, y);
1501
+ this.Add(0);
1502
+ };
1503
+ })(geodesic.Accumulator, geodesic.Math);
1504
+ geodesic.Geodesic = {};
1505
+ geodesic.GeodesicLine = {};
1506
+ geodesic.PolygonArea = {};
1507
+ (function(g, l, p, m, c) {
1508
+ "use strict";
1509
+ var GEOGRAPHICLIB_GEODESIC_ORDER = 6, nA1_ = GEOGRAPHICLIB_GEODESIC_ORDER, nA2_ = GEOGRAPHICLIB_GEODESIC_ORDER, nA3_ = GEOGRAPHICLIB_GEODESIC_ORDER, nA3x_ = nA3_, nC3x_, nC4x_, maxit1_ = 20, maxit2_ = maxit1_ + m.digits + 10, tol0_ = m.epsilon, tol1_ = 200 * tol0_, tol2_ = Math.sqrt(tol0_), tolb_ = tol0_, xthresh_ = 1e3 * tol2_, CAP_NONE = 0, CAP_ALL = 31, OUT_ALL = 32640, astroid, A1m1f_coeff, C1f_coeff, C1pf_coeff, A2m1f_coeff, C2f_coeff, A3_coeff, C3_coeff, C4_coeff;
1510
+ g.tiny_ = Math.sqrt(Number.MIN_VALUE / Number.EPSILON);
1511
+ g.nC1_ = GEOGRAPHICLIB_GEODESIC_ORDER;
1512
+ g.nC1p_ = GEOGRAPHICLIB_GEODESIC_ORDER;
1513
+ g.nC2_ = GEOGRAPHICLIB_GEODESIC_ORDER;
1514
+ g.nC3_ = GEOGRAPHICLIB_GEODESIC_ORDER;
1515
+ g.nC4_ = GEOGRAPHICLIB_GEODESIC_ORDER;
1516
+ nC3x_ = g.nC3_ * (g.nC3_ - 1) / 2;
1517
+ nC4x_ = g.nC4_ * (g.nC4_ + 1) / 2;
1518
+ g.CAP_C1 = 1 << 0;
1519
+ g.CAP_C1p = 1 << 1;
1520
+ g.CAP_C2 = 1 << 2;
1521
+ g.CAP_C3 = 1 << 3;
1522
+ g.CAP_C4 = 1 << 4;
1523
+ g.NONE = 0;
1524
+ g.ARC = 1 << 6;
1525
+ g.LATITUDE = 1 << 7 | CAP_NONE;
1526
+ g.LONGITUDE = 1 << 8 | g.CAP_C3;
1527
+ g.AZIMUTH = 1 << 9 | CAP_NONE;
1528
+ g.DISTANCE = 1 << 10 | g.CAP_C1;
1529
+ g.STANDARD = g.LATITUDE | g.LONGITUDE | g.AZIMUTH | g.DISTANCE;
1530
+ g.DISTANCE_IN = 1 << 11 | g.CAP_C1 | g.CAP_C1p;
1531
+ g.REDUCEDLENGTH = 1 << 12 | g.CAP_C1 | g.CAP_C2;
1532
+ g.GEODESICSCALE = 1 << 13 | g.CAP_C1 | g.CAP_C2;
1533
+ g.AREA = 1 << 14 | g.CAP_C4;
1534
+ g.ALL = OUT_ALL | CAP_ALL;
1535
+ g.LONG_UNROLL = 1 << 15;
1536
+ g.OUT_MASK = OUT_ALL | g.LONG_UNROLL;
1537
+ g.SinCosSeries = function(sinp, sinx, cosx, c2, delta) {
1538
+ if (delta !== void 0) {
1539
+ var h = delta / 2, sh = Math.sin(h), ch = Math.cos(h);
1540
+ return -2 * g.SinCosSeries(false, cosx * ch - sinx * sh, sinx * ch + cosx * sh, c2.map(function(v, i) {
1541
+ return (i % 2 ? -v : v) * Math.sin((2 * i + 1) * h);
1542
+ }));
1543
+ }
1544
+ var k = c2.length, n = k - (sinp ? 1 : 0), ar = 2 * (cosx - sinx) * (cosx + sinx), y0 = n & 1 ? c2[--k] : 0, y1 = 0;
1545
+ n = Math.floor(n / 2);
1546
+ while (n--) {
1547
+ y1 = ar * y0 - y1 + c2[--k];
1548
+ y0 = ar * y1 - y0 + c2[--k];
1549
+ }
1550
+ return sinp ? 2 * sinx * cosx * y0 : (
1551
+ // sin(2 * x) * y0
1552
+ cosx * (y0 - y1)
1553
+ );
1554
+ };
1555
+ astroid = function(x, y) {
1556
+ var k, p2 = m.sq(x), q = m.sq(y), r = (p2 + q - 1) / 6, S, r2, r3, disc, u, T3, T, ang, v, uv, w;
1557
+ if (!(q === 0 && r <= 0)) {
1558
+ S = p2 * q / 4;
1559
+ r2 = m.sq(r);
1560
+ r3 = r * r2;
1561
+ disc = S * (S + 2 * r3);
1562
+ u = r;
1563
+ if (disc >= 0) {
1564
+ T3 = S + r3;
1565
+ T3 += T3 < 0 ? -Math.sqrt(disc) : Math.sqrt(disc);
1566
+ T = m.cbrt(T3);
1567
+ u += T + (T !== 0 ? r2 / T : 0);
1568
+ } else {
1569
+ ang = Math.atan2(Math.sqrt(-disc), -(S + r3));
1570
+ u += 2 * r * Math.cos(ang / 3);
1571
+ }
1572
+ v = Math.sqrt(m.sq(u) + q);
1573
+ uv = u < 0 ? q / (v - u) : u + v;
1574
+ w = (uv - q) / (2 * v);
1575
+ k = uv / (Math.sqrt(uv + m.sq(w)) + w);
1576
+ } else {
1577
+ k = 0;
1578
+ }
1579
+ return k;
1580
+ };
1581
+ A1m1f_coeff = [
1582
+ // (1-eps)*A1-1, polynomial in eps2 of order 3
1583
+ 1,
1584
+ 4,
1585
+ 64,
1586
+ 0,
1587
+ 256
1588
+ ];
1589
+ g.A1m1f = function(eps) {
1590
+ var p2 = Math.floor(nA1_ / 2), t = m.polyval(p2, A1m1f_coeff, 0, m.sq(eps)) / A1m1f_coeff[p2 + 1];
1591
+ return (t + eps) / (1 - eps);
1592
+ };
1593
+ C1f_coeff = [
1594
+ // C1[1]/eps^1, polynomial in eps2 of order 2
1595
+ -1,
1596
+ 6,
1597
+ -16,
1598
+ 32,
1599
+ // C1[2]/eps^2, polynomial in eps2 of order 2
1600
+ -9,
1601
+ 64,
1602
+ -128,
1603
+ 2048,
1604
+ // C1[3]/eps^3, polynomial in eps2 of order 1
1605
+ 9,
1606
+ -16,
1607
+ 768,
1608
+ // C1[4]/eps^4, polynomial in eps2 of order 1
1609
+ 3,
1610
+ -5,
1611
+ 512,
1612
+ // C1[5]/eps^5, polynomial in eps2 of order 0
1613
+ -7,
1614
+ 1280,
1615
+ // C1[6]/eps^6, polynomial in eps2 of order 0
1616
+ -7,
1617
+ 2048
1618
+ ];
1619
+ g.C1f = function(eps, c2) {
1620
+ var eps2 = m.sq(eps), d = eps, o = 0, l2, p2;
1621
+ for (l2 = 1; l2 <= g.nC1_; ++l2) {
1622
+ p2 = Math.floor((g.nC1_ - l2) / 2);
1623
+ c2[l2] = d * m.polyval(p2, C1f_coeff, o, eps2) / C1f_coeff[o + p2 + 1];
1624
+ o += p2 + 2;
1625
+ d *= eps;
1626
+ }
1627
+ };
1628
+ C1pf_coeff = [
1629
+ // C1p[1]/eps^1, polynomial in eps2 of order 2
1630
+ 205,
1631
+ -432,
1632
+ 768,
1633
+ 1536,
1634
+ // C1p[2]/eps^2, polynomial in eps2 of order 2
1635
+ 4005,
1636
+ -4736,
1637
+ 3840,
1638
+ 12288,
1639
+ // C1p[3]/eps^3, polynomial in eps2 of order 1
1640
+ -225,
1641
+ 116,
1642
+ 384,
1643
+ // C1p[4]/eps^4, polynomial in eps2 of order 1
1644
+ -7173,
1645
+ 2695,
1646
+ 7680,
1647
+ // C1p[5]/eps^5, polynomial in eps2 of order 0
1648
+ 3467,
1649
+ 7680,
1650
+ // C1p[6]/eps^6, polynomial in eps2 of order 0
1651
+ 38081,
1652
+ 61440
1653
+ ];
1654
+ g.C1pf = function(eps, c2) {
1655
+ var eps2 = m.sq(eps), d = eps, o = 0, l2, p2;
1656
+ for (l2 = 1; l2 <= g.nC1p_; ++l2) {
1657
+ p2 = Math.floor((g.nC1p_ - l2) / 2);
1658
+ c2[l2] = d * m.polyval(p2, C1pf_coeff, o, eps2) / C1pf_coeff[o + p2 + 1];
1659
+ o += p2 + 2;
1660
+ d *= eps;
1661
+ }
1662
+ };
1663
+ A2m1f_coeff = [
1664
+ // (eps+1)*A2-1, polynomial in eps2 of order 3
1665
+ -11,
1666
+ -28,
1667
+ -192,
1668
+ 0,
1669
+ 256
1670
+ ];
1671
+ g.A2m1f = function(eps) {
1672
+ var p2 = Math.floor(nA2_ / 2), t = m.polyval(p2, A2m1f_coeff, 0, m.sq(eps)) / A2m1f_coeff[p2 + 1];
1673
+ return (t - eps) / (1 + eps);
1674
+ };
1675
+ C2f_coeff = [
1676
+ // C2[1]/eps^1, polynomial in eps2 of order 2
1677
+ 1,
1678
+ 2,
1679
+ 16,
1680
+ 32,
1681
+ // C2[2]/eps^2, polynomial in eps2 of order 2
1682
+ 35,
1683
+ 64,
1684
+ 384,
1685
+ 2048,
1686
+ // C2[3]/eps^3, polynomial in eps2 of order 1
1687
+ 15,
1688
+ 80,
1689
+ 768,
1690
+ // C2[4]/eps^4, polynomial in eps2 of order 1
1691
+ 7,
1692
+ 35,
1693
+ 512,
1694
+ // C2[5]/eps^5, polynomial in eps2 of order 0
1695
+ 63,
1696
+ 1280,
1697
+ // C2[6]/eps^6, polynomial in eps2 of order 0
1698
+ 77,
1699
+ 2048
1700
+ ];
1701
+ g.C2f = function(eps, c2) {
1702
+ var eps2 = m.sq(eps), d = eps, o = 0, l2, p2;
1703
+ for (l2 = 1; l2 <= g.nC2_; ++l2) {
1704
+ p2 = Math.floor((g.nC2_ - l2) / 2);
1705
+ c2[l2] = d * m.polyval(p2, C2f_coeff, o, eps2) / C2f_coeff[o + p2 + 1];
1706
+ o += p2 + 2;
1707
+ d *= eps;
1708
+ }
1709
+ };
1710
+ g.Geodesic = function(a, f) {
1711
+ this.a = a;
1712
+ this.f = f;
1713
+ this._f1 = 1 - this.f;
1714
+ this._e2 = this.f * (2 - this.f);
1715
+ this._ep2 = this._e2 / m.sq(this._f1);
1716
+ this._n = this.f / (2 - this.f);
1717
+ this._b = this.a * this._f1;
1718
+ this._c2 = (m.sq(this.a) + m.sq(this._b) * (this._e2 === 0 ? 1 : (this._e2 > 0 ? m.atanh(Math.sqrt(this._e2)) : Math.atan(Math.sqrt(-this._e2))) / Math.sqrt(Math.abs(this._e2)))) / 2;
1719
+ this._etol2 = 0.1 * tol2_ / Math.sqrt(Math.max(1e-3, Math.abs(this.f)) * Math.min(1, 1 - this.f / 2) / 2);
1720
+ if (!(isFinite(this.a) && this.a > 0))
1721
+ throw new Error("Equatorial radius is not positive");
1722
+ if (!(isFinite(this._b) && this._b > 0))
1723
+ throw new Error("Polar semi-axis is not positive");
1724
+ this._A3x = new Array(nA3x_);
1725
+ this._C3x = new Array(nC3x_);
1726
+ this._C4x = new Array(nC4x_);
1727
+ this.A3coeff();
1728
+ this.C3coeff();
1729
+ this.C4coeff();
1730
+ };
1731
+ A3_coeff = [
1732
+ // A3, coeff of eps^5, polynomial in n of order 0
1733
+ -3,
1734
+ 128,
1735
+ // A3, coeff of eps^4, polynomial in n of order 1
1736
+ -2,
1737
+ -3,
1738
+ 64,
1739
+ // A3, coeff of eps^3, polynomial in n of order 2
1740
+ -1,
1741
+ -3,
1742
+ -1,
1743
+ 16,
1744
+ // A3, coeff of eps^2, polynomial in n of order 2
1745
+ 3,
1746
+ -1,
1747
+ -2,
1748
+ 8,
1749
+ // A3, coeff of eps^1, polynomial in n of order 1
1750
+ 1,
1751
+ -1,
1752
+ 2,
1753
+ // A3, coeff of eps^0, polynomial in n of order 0
1754
+ 1,
1755
+ 1
1756
+ ];
1757
+ g.Geodesic.prototype.A3coeff = function() {
1758
+ var o = 0, k = 0, j, p2;
1759
+ for (j = nA3_ - 1; j >= 0; --j) {
1760
+ p2 = Math.min(nA3_ - j - 1, j);
1761
+ this._A3x[k++] = m.polyval(p2, A3_coeff, o, this._n) / A3_coeff[o + p2 + 1];
1762
+ o += p2 + 2;
1763
+ }
1764
+ };
1765
+ C3_coeff = [
1766
+ // C3[1], coeff of eps^5, polynomial in n of order 0
1767
+ 3,
1768
+ 128,
1769
+ // C3[1], coeff of eps^4, polynomial in n of order 1
1770
+ 2,
1771
+ 5,
1772
+ 128,
1773
+ // C3[1], coeff of eps^3, polynomial in n of order 2
1774
+ -1,
1775
+ 3,
1776
+ 3,
1777
+ 64,
1778
+ // C3[1], coeff of eps^2, polynomial in n of order 2
1779
+ -1,
1780
+ 0,
1781
+ 1,
1782
+ 8,
1783
+ // C3[1], coeff of eps^1, polynomial in n of order 1
1784
+ -1,
1785
+ 1,
1786
+ 4,
1787
+ // C3[2], coeff of eps^5, polynomial in n of order 0
1788
+ 5,
1789
+ 256,
1790
+ // C3[2], coeff of eps^4, polynomial in n of order 1
1791
+ 1,
1792
+ 3,
1793
+ 128,
1794
+ // C3[2], coeff of eps^3, polynomial in n of order 2
1795
+ -3,
1796
+ -2,
1797
+ 3,
1798
+ 64,
1799
+ // C3[2], coeff of eps^2, polynomial in n of order 2
1800
+ 1,
1801
+ -3,
1802
+ 2,
1803
+ 32,
1804
+ // C3[3], coeff of eps^5, polynomial in n of order 0
1805
+ 7,
1806
+ 512,
1807
+ // C3[3], coeff of eps^4, polynomial in n of order 1
1808
+ -10,
1809
+ 9,
1810
+ 384,
1811
+ // C3[3], coeff of eps^3, polynomial in n of order 2
1812
+ 5,
1813
+ -9,
1814
+ 5,
1815
+ 192,
1816
+ // C3[4], coeff of eps^5, polynomial in n of order 0
1817
+ 7,
1818
+ 512,
1819
+ // C3[4], coeff of eps^4, polynomial in n of order 1
1820
+ -14,
1821
+ 7,
1822
+ 512,
1823
+ // C3[5], coeff of eps^5, polynomial in n of order 0
1824
+ 21,
1825
+ 2560
1826
+ ];
1827
+ g.Geodesic.prototype.C3coeff = function() {
1828
+ var o = 0, k = 0, l2, j, p2;
1829
+ for (l2 = 1; l2 < g.nC3_; ++l2) {
1830
+ for (j = g.nC3_ - 1; j >= l2; --j) {
1831
+ p2 = Math.min(g.nC3_ - j - 1, j);
1832
+ this._C3x[k++] = m.polyval(p2, C3_coeff, o, this._n) / C3_coeff[o + p2 + 1];
1833
+ o += p2 + 2;
1834
+ }
1835
+ }
1836
+ };
1837
+ C4_coeff = [
1838
+ // C4[0], coeff of eps^5, polynomial in n of order 0
1839
+ 97,
1840
+ 15015,
1841
+ // C4[0], coeff of eps^4, polynomial in n of order 1
1842
+ 1088,
1843
+ 156,
1844
+ 45045,
1845
+ // C4[0], coeff of eps^3, polynomial in n of order 2
1846
+ -224,
1847
+ -4784,
1848
+ 1573,
1849
+ 45045,
1850
+ // C4[0], coeff of eps^2, polynomial in n of order 3
1851
+ -10656,
1852
+ 14144,
1853
+ -4576,
1854
+ -858,
1855
+ 45045,
1856
+ // C4[0], coeff of eps^1, polynomial in n of order 4
1857
+ 64,
1858
+ 624,
1859
+ -4576,
1860
+ 6864,
1861
+ -3003,
1862
+ 15015,
1863
+ // C4[0], coeff of eps^0, polynomial in n of order 5
1864
+ 100,
1865
+ 208,
1866
+ 572,
1867
+ 3432,
1868
+ -12012,
1869
+ 30030,
1870
+ 45045,
1871
+ // C4[1], coeff of eps^5, polynomial in n of order 0
1872
+ 1,
1873
+ 9009,
1874
+ // C4[1], coeff of eps^4, polynomial in n of order 1
1875
+ -2944,
1876
+ 468,
1877
+ 135135,
1878
+ // C4[1], coeff of eps^3, polynomial in n of order 2
1879
+ 5792,
1880
+ 1040,
1881
+ -1287,
1882
+ 135135,
1883
+ // C4[1], coeff of eps^2, polynomial in n of order 3
1884
+ 5952,
1885
+ -11648,
1886
+ 9152,
1887
+ -2574,
1888
+ 135135,
1889
+ // C4[1], coeff of eps^1, polynomial in n of order 4
1890
+ -64,
1891
+ -624,
1892
+ 4576,
1893
+ -6864,
1894
+ 3003,
1895
+ 135135,
1896
+ // C4[2], coeff of eps^5, polynomial in n of order 0
1897
+ 8,
1898
+ 10725,
1899
+ // C4[2], coeff of eps^4, polynomial in n of order 1
1900
+ 1856,
1901
+ -936,
1902
+ 225225,
1903
+ // C4[2], coeff of eps^3, polynomial in n of order 2
1904
+ -8448,
1905
+ 4992,
1906
+ -1144,
1907
+ 225225,
1908
+ // C4[2], coeff of eps^2, polynomial in n of order 3
1909
+ -1440,
1910
+ 4160,
1911
+ -4576,
1912
+ 1716,
1913
+ 225225,
1914
+ // C4[3], coeff of eps^5, polynomial in n of order 0
1915
+ -136,
1916
+ 63063,
1917
+ // C4[3], coeff of eps^4, polynomial in n of order 1
1918
+ 1024,
1919
+ -208,
1920
+ 105105,
1921
+ // C4[3], coeff of eps^3, polynomial in n of order 2
1922
+ 3584,
1923
+ -3328,
1924
+ 1144,
1925
+ 315315,
1926
+ // C4[4], coeff of eps^5, polynomial in n of order 0
1927
+ -128,
1928
+ 135135,
1929
+ // C4[4], coeff of eps^4, polynomial in n of order 1
1930
+ -2560,
1931
+ 832,
1932
+ 405405,
1933
+ // C4[5], coeff of eps^5, polynomial in n of order 0
1934
+ 128,
1935
+ 99099
1936
+ ];
1937
+ g.Geodesic.prototype.C4coeff = function() {
1938
+ var o = 0, k = 0, l2, j, p2;
1939
+ for (l2 = 0; l2 < g.nC4_; ++l2) {
1940
+ for (j = g.nC4_ - 1; j >= l2; --j) {
1941
+ p2 = g.nC4_ - j - 1;
1942
+ this._C4x[k++] = m.polyval(p2, C4_coeff, o, this._n) / C4_coeff[o + p2 + 1];
1943
+ o += p2 + 2;
1944
+ }
1945
+ }
1946
+ };
1947
+ g.Geodesic.prototype.A3f = function(eps) {
1948
+ return m.polyval(nA3x_ - 1, this._A3x, 0, eps);
1949
+ };
1950
+ g.Geodesic.prototype.C3f = function(eps, c2) {
1951
+ var mult = 1, o = 0, l2, p2;
1952
+ for (l2 = 1; l2 < g.nC3_; ++l2) {
1953
+ p2 = g.nC3_ - l2 - 1;
1954
+ mult *= eps;
1955
+ c2[l2] = mult * m.polyval(p2, this._C3x, o, eps);
1956
+ o += p2 + 1;
1957
+ }
1958
+ };
1959
+ g.Geodesic.prototype.C4f = function(eps, c2) {
1960
+ var mult = 1, o = 0, l2, p2;
1961
+ for (l2 = 0; l2 < g.nC4_; ++l2) {
1962
+ p2 = g.nC4_ - l2 - 1;
1963
+ c2[l2] = mult * m.polyval(p2, this._C4x, o, eps);
1964
+ o += p2 + 1;
1965
+ mult *= eps;
1966
+ }
1967
+ };
1968
+ g.Geodesic.prototype.Lengths = function(eps, sig12, ssig1, csig1, dn1, ssig2, csig2, dn2, cbet1, cbet2, outmask, C1a, C2a) {
1969
+ outmask &= g.OUT_MASK;
1970
+ var vals = {}, m0x = 0, J12 = 0, A1 = 0, A2 = 0, B1, B2, l2, csig12, t;
1971
+ if (outmask & (g.DISTANCE | g.REDUCEDLENGTH | g.GEODESICSCALE)) {
1972
+ A1 = g.A1m1f(eps);
1973
+ g.C1f(eps, C1a);
1974
+ if (outmask & (g.REDUCEDLENGTH | g.GEODESICSCALE)) {
1975
+ A2 = g.A2m1f(eps);
1976
+ g.C2f(eps, C2a);
1977
+ m0x = A1 - A2;
1978
+ A2 = 1 + A2;
1979
+ }
1980
+ A1 = 1 + A1;
1981
+ }
1982
+ if (outmask & g.DISTANCE) {
1983
+ B1 = g.SinCosSeries(true, ssig2, csig2, C1a) - g.SinCosSeries(true, ssig1, csig1, C1a);
1984
+ vals.s12b = A1 * (sig12 + B1);
1985
+ if (outmask & (g.REDUCEDLENGTH | g.GEODESICSCALE)) {
1986
+ B2 = g.SinCosSeries(true, ssig2, csig2, C2a) - g.SinCosSeries(true, ssig1, csig1, C2a);
1987
+ J12 = m0x * sig12 + (A1 * B1 - A2 * B2);
1988
+ }
1989
+ } else if (outmask & (g.REDUCEDLENGTH | g.GEODESICSCALE)) {
1990
+ for (l2 = 1; l2 <= g.nC2_; ++l2)
1991
+ C2a[l2] = A1 * C1a[l2] - A2 * C2a[l2];
1992
+ J12 = m0x * sig12 + (g.SinCosSeries(true, ssig2, csig2, C2a) - g.SinCosSeries(true, ssig1, csig1, C2a));
1993
+ }
1994
+ if (outmask & g.REDUCEDLENGTH) {
1995
+ vals.m0 = m0x;
1996
+ vals.m12b = dn2 * (csig1 * ssig2) - dn1 * (ssig1 * csig2) - csig1 * csig2 * J12;
1997
+ } else
1998
+ vals.m12b = NaN;
1999
+ if (outmask & g.GEODESICSCALE) {
2000
+ csig12 = csig1 * csig2 + ssig1 * ssig2;
2001
+ t = this._ep2 * (cbet1 - cbet2) * (cbet1 + cbet2) / (dn1 + dn2);
2002
+ vals.M12 = csig12 + (t * ssig2 - csig2 * J12) * ssig1 / dn1;
2003
+ vals.M21 = csig12 - (t * ssig1 - csig1 * J12) * ssig2 / dn2;
2004
+ }
2005
+ return vals;
2006
+ };
2007
+ g.Geodesic.prototype.InverseStart = function(sbet1, cbet1, dn1, sbet2, cbet2, dn2, lam12, slam12, clam12, C1a, C2a) {
2008
+ var vals = {}, sbet12 = sbet2 * cbet1 - cbet2 * sbet1, cbet12 = cbet2 * cbet1 + sbet2 * sbet1, sbet12a, shortline, omg12, sbetm2, somg12, comg12, t, ssig12, csig12, x, y, lamscale, betscale, k2, eps, cbet12a, bet12a, m12b, m0, nvals, k, omg12a, lam12x;
2009
+ vals.sig12 = -1;
2010
+ sbet12a = sbet2 * cbet1;
2011
+ sbet12a += cbet2 * sbet1;
2012
+ shortline = cbet12 >= 0 && sbet12 < 0.5 && cbet2 * lam12 < 0.5;
2013
+ if (shortline) {
2014
+ sbetm2 = m.sq(sbet1 + sbet2);
2015
+ sbetm2 /= sbetm2 + m.sq(cbet1 + cbet2);
2016
+ vals.dnm = Math.sqrt(1 + this._ep2 * sbetm2);
2017
+ omg12 = lam12 / (this._f1 * vals.dnm);
2018
+ somg12 = Math.sin(omg12);
2019
+ comg12 = Math.cos(omg12);
2020
+ } else {
2021
+ somg12 = slam12;
2022
+ comg12 = clam12;
2023
+ }
2024
+ vals.salp1 = cbet2 * somg12;
2025
+ vals.calp1 = comg12 >= 0 ? sbet12 + cbet2 * sbet1 * m.sq(somg12) / (1 + comg12) : sbet12a - cbet2 * sbet1 * m.sq(somg12) / (1 - comg12);
2026
+ ssig12 = m.hypot(vals.salp1, vals.calp1);
2027
+ csig12 = sbet1 * sbet2 + cbet1 * cbet2 * comg12;
2028
+ if (shortline && ssig12 < this._etol2) {
2029
+ vals.salp2 = cbet1 * somg12;
2030
+ vals.calp2 = sbet12 - cbet1 * sbet2 * (comg12 >= 0 ? m.sq(somg12) / (1 + comg12) : 1 - comg12);
2031
+ t = m.hypot(vals.salp2, vals.calp2);
2032
+ vals.salp2 /= t;
2033
+ vals.calp2 /= t;
2034
+ vals.sig12 = Math.atan2(ssig12, csig12);
2035
+ } else if (Math.abs(this._n) > 0.1 || // Skip astroid calc if too eccentric
2036
+ csig12 >= 0 || ssig12 >= 6 * Math.abs(this._n) * Math.PI * m.sq(cbet1)) {
2037
+ } else {
2038
+ lam12x = Math.atan2(-slam12, -clam12);
2039
+ if (this.f >= 0) {
2040
+ k2 = m.sq(sbet1) * this._ep2;
2041
+ eps = k2 / (2 * (1 + Math.sqrt(1 + k2)) + k2);
2042
+ lamscale = this.f * cbet1 * this.A3f(eps) * Math.PI;
2043
+ betscale = lamscale * cbet1;
2044
+ x = lam12x / lamscale;
2045
+ y = sbet12a / betscale;
2046
+ } else {
2047
+ cbet12a = cbet2 * cbet1 - sbet2 * sbet1;
2048
+ bet12a = Math.atan2(sbet12a, cbet12a);
2049
+ nvals = this.Lengths(this._n, Math.PI + bet12a, sbet1, -cbet1, dn1, sbet2, cbet2, dn2, cbet1, cbet2, g.REDUCEDLENGTH, C1a, C2a);
2050
+ m12b = nvals.m12b;
2051
+ m0 = nvals.m0;
2052
+ x = -1 + m12b / (cbet1 * cbet2 * m0 * Math.PI);
2053
+ betscale = x < -0.01 ? sbet12a / x : -this.f * m.sq(cbet1) * Math.PI;
2054
+ lamscale = betscale / cbet1;
2055
+ y = lam12 / lamscale;
2056
+ }
2057
+ if (y > -tol1_ && x > -1 - xthresh_) {
2058
+ if (this.f >= 0) {
2059
+ vals.salp1 = Math.min(1, -x);
2060
+ vals.calp1 = -Math.sqrt(1 - m.sq(vals.salp1));
2061
+ } else {
2062
+ vals.calp1 = Math.max(x > -tol1_ ? 0 : -1, x);
2063
+ vals.salp1 = Math.sqrt(1 - m.sq(vals.calp1));
2064
+ }
2065
+ } else {
2066
+ k = astroid(x, y);
2067
+ omg12a = lamscale * (this.f >= 0 ? -x * k / (1 + k) : -y * (1 + k) / k);
2068
+ somg12 = Math.sin(omg12a);
2069
+ comg12 = -Math.cos(omg12a);
2070
+ vals.salp1 = cbet2 * somg12;
2071
+ vals.calp1 = sbet12a - cbet2 * sbet1 * m.sq(somg12) / (1 - comg12);
2072
+ }
2073
+ }
2074
+ if (!(vals.salp1 <= 0)) {
2075
+ t = m.hypot(vals.salp1, vals.calp1);
2076
+ vals.salp1 /= t;
2077
+ vals.calp1 /= t;
2078
+ } else {
2079
+ vals.salp1 = 1;
2080
+ vals.calp1 = 0;
2081
+ }
2082
+ return vals;
2083
+ };
2084
+ g.Geodesic.prototype.Lambda12 = function(sbet1, cbet1, dn1, sbet2, cbet2, dn2, salp1, calp1, slam120, clam120, diffp, C1a, C2a, C3a) {
2085
+ var vals = {}, t, salp0, calp0, somg1, comg1, somg2, comg2, somg12, comg12, B312, eta, k2, nvals;
2086
+ if (sbet1 === 0 && calp1 === 0)
2087
+ calp1 = -g.tiny_;
2088
+ salp0 = salp1 * cbet1;
2089
+ calp0 = m.hypot(calp1, salp1 * sbet1);
2090
+ vals.ssig1 = sbet1;
2091
+ somg1 = salp0 * sbet1;
2092
+ vals.csig1 = comg1 = calp1 * cbet1;
2093
+ t = m.hypot(vals.ssig1, vals.csig1);
2094
+ vals.ssig1 /= t;
2095
+ vals.csig1 /= t;
2096
+ vals.salp2 = cbet2 !== cbet1 ? salp0 / cbet2 : salp1;
2097
+ vals.calp2 = cbet2 !== cbet1 || Math.abs(sbet2) !== -sbet1 ? Math.sqrt(m.sq(calp1 * cbet1) + (cbet1 < -sbet1 ? (cbet2 - cbet1) * (cbet1 + cbet2) : (sbet1 - sbet2) * (sbet1 + sbet2))) / cbet2 : Math.abs(calp1);
2098
+ vals.ssig2 = sbet2;
2099
+ somg2 = salp0 * sbet2;
2100
+ vals.csig2 = comg2 = vals.calp2 * cbet2;
2101
+ t = m.hypot(vals.ssig2, vals.csig2);
2102
+ vals.ssig2 /= t;
2103
+ vals.csig2 /= t;
2104
+ vals.sig12 = Math.atan2(Math.max(0, vals.csig1 * vals.ssig2 - vals.ssig1 * vals.csig2), vals.csig1 * vals.csig2 + vals.ssig1 * vals.ssig2);
2105
+ somg12 = Math.max(0, comg1 * somg2 - somg1 * comg2);
2106
+ comg12 = comg1 * comg2 + somg1 * somg2;
2107
+ eta = Math.atan2(somg12 * clam120 - comg12 * slam120, comg12 * clam120 + somg12 * slam120);
2108
+ k2 = m.sq(calp0) * this._ep2;
2109
+ vals.eps = k2 / (2 * (1 + Math.sqrt(1 + k2)) + k2);
2110
+ this.C3f(vals.eps, C3a);
2111
+ B312 = g.SinCosSeries(true, vals.ssig2, vals.csig2, C3a) - g.SinCosSeries(true, vals.ssig1, vals.csig1, C3a);
2112
+ vals.domg12 = -this.f * this.A3f(vals.eps) * salp0 * (vals.sig12 + B312);
2113
+ vals.lam12 = eta + vals.domg12;
2114
+ if (diffp) {
2115
+ if (vals.calp2 === 0)
2116
+ vals.dlam12 = -2 * this._f1 * dn1 / sbet1;
2117
+ else {
2118
+ nvals = this.Lengths(vals.eps, vals.sig12, vals.ssig1, vals.csig1, dn1, vals.ssig2, vals.csig2, dn2, cbet1, cbet2, g.REDUCEDLENGTH, C1a, C2a);
2119
+ vals.dlam12 = nvals.m12b;
2120
+ vals.dlam12 *= this._f1 / (vals.calp2 * cbet2);
2121
+ }
2122
+ }
2123
+ return vals;
2124
+ };
2125
+ g.Geodesic.prototype.Inverse = function(lat1, lon1, lat2, lon2, outmask) {
2126
+ var r, vals;
2127
+ if (!outmask)
2128
+ outmask = g.STANDARD;
2129
+ if (outmask === g.LONG_UNROLL)
2130
+ outmask |= g.STANDARD;
2131
+ outmask &= g.OUT_MASK;
2132
+ r = this.InverseInt(lat1, lon1, lat2, lon2, outmask);
2133
+ vals = r.vals;
2134
+ if (outmask & g.AZIMUTH) {
2135
+ vals.azi1 = m.atan2d(r.salp1, r.calp1);
2136
+ vals.azi2 = m.atan2d(r.salp2, r.calp2);
2137
+ }
2138
+ return vals;
2139
+ };
2140
+ g.Geodesic.prototype.InverseInt = function(lat1, lon1, lat2, lon2, outmask) {
2141
+ var vals = {}, lon12, lon12s, lonsign, t, swapp, latsign, sbet1, cbet1, sbet2, cbet2, s12x, m12x, dn1, dn2, lam12, slam12, clam12, sig12, calp1, salp1, calp2, salp2, C1a, C2a, C3a, meridian, nvals, ssig1, csig1, ssig2, csig2, eps, omg12, dnm, numit, salp1a, calp1a, salp1b, calp1b, tripn, tripb, v, dv, dalp1, sdalp1, cdalp1, nsalp1, lengthmask, salp0, calp0, alp12, k2, A4, C4a, B41, B42, somg12, comg12, domg12, dbet1, dbet2, salp12, calp12, sdomg12, cdomg12;
2142
+ vals.lat1 = lat1 = m.LatFix(lat1);
2143
+ vals.lat2 = lat2 = m.LatFix(lat2);
2144
+ lat1 = m.AngRound(lat1);
2145
+ lat2 = m.AngRound(lat2);
2146
+ lon12 = m.AngDiff(lon1, lon2);
2147
+ lon12s = lon12.e;
2148
+ lon12 = lon12.d;
2149
+ if (outmask & g.LONG_UNROLL) {
2150
+ vals.lon1 = lon1;
2151
+ vals.lon2 = lon1 + lon12 + lon12s;
2152
+ } else {
2153
+ vals.lon1 = m.AngNormalize(lon1);
2154
+ vals.lon2 = m.AngNormalize(lon2);
2155
+ }
2156
+ lonsign = m.copysign(1, lon12);
2157
+ lon12 *= lonsign;
2158
+ lon12s *= lonsign;
2159
+ lam12 = lon12 * m.degree;
2160
+ t = m.sincosde(lon12, lon12s);
2161
+ slam12 = t.s;
2162
+ clam12 = t.c;
2163
+ lon12s = 180 - lon12 - lon12s;
2164
+ swapp = Math.abs(lat1) < Math.abs(lat2) || isNaN(lat2) ? -1 : 1;
2165
+ if (swapp < 0) {
2166
+ lonsign *= -1;
2167
+ [lat2, lat1] = [lat1, lat2];
2168
+ }
2169
+ latsign = m.copysign(1, -lat1);
2170
+ lat1 *= latsign;
2171
+ lat2 *= latsign;
2172
+ t = m.sincosd(lat1);
2173
+ sbet1 = this._f1 * t.s;
2174
+ cbet1 = t.c;
2175
+ t = m.hypot(sbet1, cbet1);
2176
+ sbet1 /= t;
2177
+ cbet1 /= t;
2178
+ cbet1 = Math.max(g.tiny_, cbet1);
2179
+ t = m.sincosd(lat2);
2180
+ sbet2 = this._f1 * t.s;
2181
+ cbet2 = t.c;
2182
+ t = m.hypot(sbet2, cbet2);
2183
+ sbet2 /= t;
2184
+ cbet2 /= t;
2185
+ cbet2 = Math.max(g.tiny_, cbet2);
2186
+ if (cbet1 < -sbet1) {
2187
+ if (cbet2 === cbet1)
2188
+ sbet2 = m.copysign(sbet1, sbet2);
2189
+ } else {
2190
+ if (Math.abs(sbet2) === -sbet1)
2191
+ cbet2 = cbet1;
2192
+ }
2193
+ dn1 = Math.sqrt(1 + this._ep2 * m.sq(sbet1));
2194
+ dn2 = Math.sqrt(1 + this._ep2 * m.sq(sbet2));
2195
+ C1a = new Array(g.nC1_ + 1);
2196
+ C2a = new Array(g.nC2_ + 1);
2197
+ C3a = new Array(g.nC3_);
2198
+ meridian = lat1 === -90 || slam12 === 0;
2199
+ if (meridian) {
2200
+ calp1 = clam12;
2201
+ salp1 = slam12;
2202
+ calp2 = 1;
2203
+ salp2 = 0;
2204
+ ssig1 = sbet1;
2205
+ csig1 = calp1 * cbet1;
2206
+ ssig2 = sbet2;
2207
+ csig2 = calp2 * cbet2;
2208
+ sig12 = Math.atan2(Math.max(0, csig1 * ssig2 - ssig1 * csig2), csig1 * csig2 + ssig1 * ssig2);
2209
+ nvals = this.Lengths(this._n, sig12, ssig1, csig1, dn1, ssig2, csig2, dn2, cbet1, cbet2, outmask | g.DISTANCE | g.REDUCEDLENGTH, C1a, C2a);
2210
+ s12x = nvals.s12b;
2211
+ m12x = nvals.m12b;
2212
+ if (outmask & g.GEODESICSCALE) {
2213
+ vals.M12 = nvals.M12;
2214
+ vals.M21 = nvals.M21;
2215
+ }
2216
+ if (sig12 < tol2_ || m12x >= 0) {
2217
+ if (sig12 < 3 * g.tiny_ || // Prevent negative s12 or m12 for short lines
2218
+ sig12 < tol0_ && (s12x < 0 || m12x < 0))
2219
+ sig12 = m12x = s12x = 0;
2220
+ m12x *= this._b;
2221
+ s12x *= this._b;
2222
+ vals.a12 = sig12 / m.degree;
2223
+ } else
2224
+ meridian = false;
2225
+ }
2226
+ somg12 = 2;
2227
+ if (!meridian && sbet1 === 0 && // and sbet2 == 0
2228
+ (this.f <= 0 || lon12s >= this.f * 180)) {
2229
+ calp1 = calp2 = 0;
2230
+ salp1 = salp2 = 1;
2231
+ s12x = this.a * lam12;
2232
+ sig12 = omg12 = lam12 / this._f1;
2233
+ m12x = this._b * Math.sin(sig12);
2234
+ if (outmask & g.GEODESICSCALE)
2235
+ vals.M12 = vals.M21 = Math.cos(sig12);
2236
+ vals.a12 = lon12 / this._f1;
2237
+ } else if (!meridian) {
2238
+ nvals = this.InverseStart(sbet1, cbet1, dn1, sbet2, cbet2, dn2, lam12, slam12, clam12, C1a, C2a);
2239
+ sig12 = nvals.sig12;
2240
+ salp1 = nvals.salp1;
2241
+ calp1 = nvals.calp1;
2242
+ if (sig12 >= 0) {
2243
+ salp2 = nvals.salp2;
2244
+ calp2 = nvals.calp2;
2245
+ dnm = nvals.dnm;
2246
+ s12x = sig12 * this._b * dnm;
2247
+ m12x = m.sq(dnm) * this._b * Math.sin(sig12 / dnm);
2248
+ if (outmask & g.GEODESICSCALE)
2249
+ vals.M12 = vals.M21 = Math.cos(sig12 / dnm);
2250
+ vals.a12 = sig12 / m.degree;
2251
+ omg12 = lam12 / (this._f1 * dnm);
2252
+ } else {
2253
+ numit = 0;
2254
+ salp1a = g.tiny_;
2255
+ calp1a = 1;
2256
+ salp1b = g.tiny_;
2257
+ calp1b = -1;
2258
+ for (tripn = false, tripb = false; ; ++numit) {
2259
+ nvals = this.Lambda12(sbet1, cbet1, dn1, sbet2, cbet2, dn2, salp1, calp1, slam12, clam12, numit < maxit1_, C1a, C2a, C3a);
2260
+ v = nvals.lam12;
2261
+ salp2 = nvals.salp2;
2262
+ calp2 = nvals.calp2;
2263
+ sig12 = nvals.sig12;
2264
+ ssig1 = nvals.ssig1;
2265
+ csig1 = nvals.csig1;
2266
+ ssig2 = nvals.ssig2;
2267
+ csig2 = nvals.csig2;
2268
+ eps = nvals.eps;
2269
+ domg12 = nvals.domg12;
2270
+ dv = nvals.dlam12;
2271
+ if (tripb || !(Math.abs(v) >= (tripn ? 8 : 1) * tol0_) || numit == maxit2_)
2272
+ break;
2273
+ if (v > 0 && (numit < maxit1_ || calp1 / salp1 > calp1b / salp1b)) {
2274
+ salp1b = salp1;
2275
+ calp1b = calp1;
2276
+ } else if (v < 0 && (numit < maxit1_ || calp1 / salp1 < calp1a / salp1a)) {
2277
+ salp1a = salp1;
2278
+ calp1a = calp1;
2279
+ }
2280
+ if (numit < maxit1_ && dv > 0) {
2281
+ dalp1 = -v / dv;
2282
+ if (Math.abs(dalp1) < Math.PI) {
2283
+ sdalp1 = Math.sin(dalp1);
2284
+ cdalp1 = Math.cos(dalp1);
2285
+ nsalp1 = salp1 * cdalp1 + calp1 * sdalp1;
2286
+ if (nsalp1 > 0) {
2287
+ calp1 = calp1 * cdalp1 - salp1 * sdalp1;
2288
+ salp1 = nsalp1;
2289
+ t = m.hypot(salp1, calp1);
2290
+ salp1 /= t;
2291
+ calp1 /= t;
2292
+ tripn = Math.abs(v) <= 16 * tol0_;
2293
+ continue;
2294
+ }
2295
+ }
2296
+ }
2297
+ salp1 = (salp1a + salp1b) / 2;
2298
+ calp1 = (calp1a + calp1b) / 2;
2299
+ t = m.hypot(salp1, calp1);
2300
+ salp1 /= t;
2301
+ calp1 /= t;
2302
+ tripn = false;
2303
+ tripb = Math.abs(salp1a - salp1) + (calp1a - calp1) < tolb_ || Math.abs(salp1 - salp1b) + (calp1 - calp1b) < tolb_;
2304
+ }
2305
+ lengthmask = outmask | (outmask & (g.REDUCEDLENGTH | g.GEODESICSCALE) ? g.DISTANCE : g.NONE);
2306
+ nvals = this.Lengths(eps, sig12, ssig1, csig1, dn1, ssig2, csig2, dn2, cbet1, cbet2, lengthmask, C1a, C2a);
2307
+ s12x = nvals.s12b;
2308
+ m12x = nvals.m12b;
2309
+ if (outmask & g.GEODESICSCALE) {
2310
+ vals.M12 = nvals.M12;
2311
+ vals.M21 = nvals.M21;
2312
+ }
2313
+ m12x *= this._b;
2314
+ s12x *= this._b;
2315
+ vals.a12 = sig12 / m.degree;
2316
+ if (outmask & g.AREA) {
2317
+ sdomg12 = Math.sin(domg12);
2318
+ cdomg12 = Math.cos(domg12);
2319
+ somg12 = slam12 * cdomg12 - clam12 * sdomg12;
2320
+ comg12 = clam12 * cdomg12 + slam12 * sdomg12;
2321
+ }
2322
+ }
2323
+ }
2324
+ if (outmask & g.DISTANCE)
2325
+ vals.s12 = 0 + s12x;
2326
+ if (outmask & g.REDUCEDLENGTH)
2327
+ vals.m12 = 0 + m12x;
2328
+ if (outmask & g.AREA) {
2329
+ salp0 = salp1 * cbet1;
2330
+ calp0 = m.hypot(calp1, salp1 * sbet1);
2331
+ if (calp0 !== 0 && salp0 !== 0) {
2332
+ ssig1 = sbet1;
2333
+ csig1 = calp1 * cbet1;
2334
+ ssig2 = sbet2;
2335
+ csig2 = calp2 * cbet2;
2336
+ k2 = m.sq(calp0) * this._ep2;
2337
+ eps = k2 / (2 * (1 + Math.sqrt(1 + k2)) + k2);
2338
+ A4 = m.sq(this.a) * calp0 * salp0 * this._e2;
2339
+ t = m.hypot(ssig1, csig1);
2340
+ ssig1 /= t;
2341
+ csig1 /= t;
2342
+ t = m.hypot(ssig2, csig2);
2343
+ ssig2 /= t;
2344
+ csig2 /= t;
2345
+ C4a = new Array(g.nC4_);
2346
+ this.C4f(eps, C4a);
2347
+ B41 = g.SinCosSeries(false, ssig1, csig1, C4a);
2348
+ B42 = g.SinCosSeries(false, ssig2, csig2, C4a);
2349
+ vals.S12 = A4 * (sig12 < 0.01 ? g.SinCosSeries(false, ssig1, csig1, C4a, sig12) : B42 - B41);
2350
+ } else
2351
+ vals.S12 = 0;
2352
+ if (!meridian && somg12 == 2) {
2353
+ somg12 = Math.sin(omg12);
2354
+ comg12 = Math.cos(omg12);
2355
+ }
2356
+ if (!meridian && comg12 > -0.7071 && // Long difference not too big
2357
+ sbet2 - sbet1 < 1.75) {
2358
+ domg12 = 1 + comg12;
2359
+ dbet1 = 1 + cbet1;
2360
+ dbet2 = 1 + cbet2;
2361
+ alp12 = 2 * Math.atan2(somg12 * (sbet1 * dbet2 + sbet2 * dbet1), domg12 * (sbet1 * sbet2 + dbet1 * dbet2));
2362
+ } else {
2363
+ salp12 = salp2 * calp1 - calp2 * salp1;
2364
+ calp12 = calp2 * calp1 + salp2 * salp1;
2365
+ if (salp12 === 0 && calp12 < 0) {
2366
+ salp12 = g.tiny_ * calp1;
2367
+ calp12 = -1;
2368
+ }
2369
+ alp12 = Math.atan2(salp12, calp12);
2370
+ }
2371
+ vals.S12 += this._c2 * alp12;
2372
+ vals.S12 *= swapp * lonsign * latsign;
2373
+ vals.S12 += 0;
2374
+ }
2375
+ if (swapp < 0) {
2376
+ [salp2, salp1] = [salp1, salp2];
2377
+ [calp2, calp1] = [calp1, calp2];
2378
+ if (outmask & g.GEODESICSCALE) {
2379
+ [vals.M21, vals.M12] = [vals.M12, vals.M21];
2380
+ }
2381
+ }
2382
+ salp1 *= swapp * lonsign;
2383
+ calp1 *= swapp * latsign;
2384
+ salp2 *= swapp * lonsign;
2385
+ calp2 *= swapp * latsign;
2386
+ return {
2387
+ vals,
2388
+ salp1,
2389
+ calp1,
2390
+ salp2,
2391
+ calp2
2392
+ };
2393
+ };
2394
+ g.Geodesic.prototype.GenDirect = function(lat1, lon1, azi1, arcmode, s12_a12, outmask) {
2395
+ var line;
2396
+ if (!outmask)
2397
+ outmask = g.STANDARD;
2398
+ else if (outmask === g.LONG_UNROLL)
2399
+ outmask |= g.STANDARD;
2400
+ if (!arcmode)
2401
+ outmask |= g.DISTANCE_IN;
2402
+ line = new l.GeodesicLine(this, lat1, lon1, azi1, outmask);
2403
+ return line.GenPosition(arcmode, s12_a12, outmask);
2404
+ };
2405
+ g.Geodesic.prototype.Direct = function(lat1, lon1, azi1, s12, outmask) {
2406
+ return this.GenDirect(lat1, lon1, azi1, false, s12, outmask);
2407
+ };
2408
+ g.Geodesic.prototype.ArcDirect = function(lat1, lon1, azi1, a12, outmask) {
2409
+ return this.GenDirect(lat1, lon1, azi1, true, a12, outmask);
2410
+ };
2411
+ g.Geodesic.prototype.Line = function(lat1, lon1, azi1, caps) {
2412
+ return new l.GeodesicLine(this, lat1, lon1, azi1, caps);
2413
+ };
2414
+ g.Geodesic.prototype.DirectLine = function(lat1, lon1, azi1, s12, caps) {
2415
+ return this.GenDirectLine(lat1, lon1, azi1, false, s12, caps);
2416
+ };
2417
+ g.Geodesic.prototype.ArcDirectLine = function(lat1, lon1, azi1, a12, caps) {
2418
+ return this.GenDirectLine(lat1, lon1, azi1, true, a12, caps);
2419
+ };
2420
+ g.Geodesic.prototype.GenDirectLine = function(lat1, lon1, azi1, arcmode, s12_a12, caps) {
2421
+ var t;
2422
+ if (!caps)
2423
+ caps = g.STANDARD | g.DISTANCE_IN;
2424
+ if (!arcmode)
2425
+ caps |= g.DISTANCE_IN;
2426
+ t = new l.GeodesicLine(this, lat1, lon1, azi1, caps);
2427
+ t.GenSetDistance(arcmode, s12_a12);
2428
+ return t;
2429
+ };
2430
+ g.Geodesic.prototype.InverseLine = function(lat1, lon1, lat2, lon2, caps) {
2431
+ var r, t, azi1;
2432
+ if (!caps)
2433
+ caps = g.STANDARD | g.DISTANCE_IN;
2434
+ r = this.InverseInt(lat1, lon1, lat2, lon2, g.ARC);
2435
+ azi1 = m.atan2d(r.salp1, r.calp1);
2436
+ if (caps & (g.OUT_MASK & g.DISTANCE_IN))
2437
+ caps |= g.DISTANCE;
2438
+ t = new l.GeodesicLine(this, lat1, lon1, azi1, caps, r.salp1, r.calp1);
2439
+ t.SetArc(r.vals.a12);
2440
+ return t;
2441
+ };
2442
+ g.Geodesic.prototype.Polygon = function(polyline) {
2443
+ return new p.PolygonArea(this, polyline);
2444
+ };
2445
+ g.WGS84 = new g.Geodesic(c.WGS84.a, c.WGS84.f);
2446
+ })(geodesic.Geodesic, geodesic.GeodesicLine, geodesic.PolygonArea, geodesic.Math, geodesic.Constants);
2447
+ (function(g, l, m) {
2448
+ "use strict";
2449
+ l.GeodesicLine = function(geod, lat1, lon1, azi1, caps, salp1, calp1) {
2450
+ var t, cbet1, sbet1, eps, s, c;
2451
+ if (!caps)
2452
+ caps = g.STANDARD | g.DISTANCE_IN;
2453
+ this.a = geod.a;
2454
+ this.f = geod.f;
2455
+ this._b = geod._b;
2456
+ this._c2 = geod._c2;
2457
+ this._f1 = geod._f1;
2458
+ this.caps = caps | g.LATITUDE | g.AZIMUTH | g.LONG_UNROLL;
2459
+ this.lat1 = m.LatFix(lat1);
2460
+ this.lon1 = lon1;
2461
+ if (typeof salp1 === "undefined" || typeof calp1 === "undefined") {
2462
+ this.azi1 = m.AngNormalize(azi1);
2463
+ t = m.sincosd(m.AngRound(this.azi1));
2464
+ this.salp1 = t.s;
2465
+ this.calp1 = t.c;
2466
+ } else {
2467
+ this.azi1 = azi1;
2468
+ this.salp1 = salp1;
2469
+ this.calp1 = calp1;
2470
+ }
2471
+ t = m.sincosd(m.AngRound(this.lat1));
2472
+ sbet1 = this._f1 * t.s;
2473
+ cbet1 = t.c;
2474
+ t = m.hypot(sbet1, cbet1);
2475
+ sbet1 /= t;
2476
+ cbet1 /= t;
2477
+ cbet1 = Math.max(g.tiny_, cbet1);
2478
+ this._dn1 = Math.sqrt(1 + geod._ep2 * m.sq(sbet1));
2479
+ this._salp0 = this.salp1 * cbet1;
2480
+ this._calp0 = m.hypot(this.calp1, this.salp1 * sbet1);
2481
+ this._ssig1 = sbet1;
2482
+ this._somg1 = this._salp0 * sbet1;
2483
+ this._csig1 = this._comg1 = sbet1 !== 0 || this.calp1 !== 0 ? cbet1 * this.calp1 : 1;
2484
+ t = m.hypot(this._ssig1, this._csig1);
2485
+ this._ssig1 /= t;
2486
+ this._csig1 /= t;
2487
+ this._k2 = m.sq(this._calp0) * geod._ep2;
2488
+ eps = this._k2 / (2 * (1 + Math.sqrt(1 + this._k2)) + this._k2);
2489
+ if (this.caps & g.CAP_C1) {
2490
+ this._A1m1 = g.A1m1f(eps);
2491
+ this._C1a = new Array(g.nC1_ + 1);
2492
+ g.C1f(eps, this._C1a);
2493
+ this._B11 = g.SinCosSeries(true, this._ssig1, this._csig1, this._C1a);
2494
+ s = Math.sin(this._B11);
2495
+ c = Math.cos(this._B11);
2496
+ this._stau1 = this._ssig1 * c + this._csig1 * s;
2497
+ this._ctau1 = this._csig1 * c - this._ssig1 * s;
2498
+ }
2499
+ if (this.caps & g.CAP_C1p) {
2500
+ this._C1pa = new Array(g.nC1p_ + 1);
2501
+ g.C1pf(eps, this._C1pa);
2502
+ }
2503
+ if (this.caps & g.CAP_C2) {
2504
+ this._A2m1 = g.A2m1f(eps);
2505
+ this._C2a = new Array(g.nC2_ + 1);
2506
+ g.C2f(eps, this._C2a);
2507
+ this._B21 = g.SinCosSeries(true, this._ssig1, this._csig1, this._C2a);
2508
+ }
2509
+ if (this.caps & g.CAP_C3) {
2510
+ this._C3a = new Array(g.nC3_);
2511
+ geod.C3f(eps, this._C3a);
2512
+ this._A3c = -this.f * this._salp0 * geod.A3f(eps);
2513
+ this._B31 = g.SinCosSeries(true, this._ssig1, this._csig1, this._C3a);
2514
+ }
2515
+ if (this.caps & g.CAP_C4) {
2516
+ this._C4a = new Array(g.nC4_);
2517
+ geod.C4f(eps, this._C4a);
2518
+ this._A4 = m.sq(this.a) * this._calp0 * this._salp0 * geod._e2;
2519
+ this._B41 = g.SinCosSeries(false, this._ssig1, this._csig1, this._C4a);
2520
+ }
2521
+ this.a13 = this.s13 = NaN;
2522
+ };
2523
+ l.GeodesicLine.prototype.GenPosition = function(arcmode, s12_a12, outmask) {
2524
+ var vals = {}, sig12, ssig12, csig12, B12, AB1, ssig2, csig2, tau12, s, c, serr, omg12, lam12, lon12, E, sbet2, cbet2, somg2, comg2, salp2, calp2, dn2, B22, AB2, J12, t, B42, salp12, calp12;
2525
+ if (!outmask)
2526
+ outmask = g.STANDARD;
2527
+ else if (outmask === g.LONG_UNROLL)
2528
+ outmask |= g.STANDARD;
2529
+ outmask &= this.caps & g.OUT_MASK;
2530
+ vals.lat1 = this.lat1;
2531
+ vals.azi1 = this.azi1;
2532
+ vals.lon1 = outmask & g.LONG_UNROLL ? this.lon1 : m.AngNormalize(this.lon1);
2533
+ if (arcmode)
2534
+ vals.a12 = s12_a12;
2535
+ else
2536
+ vals.s12 = s12_a12;
2537
+ if (!(arcmode || this.caps & g.DISTANCE_IN & g.OUT_MASK)) {
2538
+ vals.a12 = NaN;
2539
+ return vals;
2540
+ }
2541
+ B12 = 0;
2542
+ AB1 = 0;
2543
+ if (arcmode) {
2544
+ sig12 = s12_a12 * m.degree;
2545
+ t = m.sincosd(s12_a12);
2546
+ ssig12 = t.s;
2547
+ csig12 = t.c;
2548
+ } else {
2549
+ tau12 = s12_a12 / (this._b * (1 + this._A1m1));
2550
+ s = Math.sin(tau12);
2551
+ c = Math.cos(tau12);
2552
+ B12 = -g.SinCosSeries(true, this._stau1 * c + this._ctau1 * s, this._ctau1 * c - this._stau1 * s, this._C1pa);
2553
+ sig12 = tau12 - (B12 - this._B11);
2554
+ ssig12 = Math.sin(sig12);
2555
+ csig12 = Math.cos(sig12);
2556
+ if (Math.abs(this.f) > 0.01) {
2557
+ ssig2 = this._ssig1 * csig12 + this._csig1 * ssig12;
2558
+ csig2 = this._csig1 * csig12 - this._ssig1 * ssig12;
2559
+ B12 = g.SinCosSeries(true, ssig2, csig2, this._C1a);
2560
+ serr = (1 + this._A1m1) * (sig12 + (B12 - this._B11)) - s12_a12 / this._b;
2561
+ sig12 = sig12 - serr / Math.sqrt(1 + this._k2 * m.sq(ssig2));
2562
+ ssig12 = Math.sin(sig12);
2563
+ csig12 = Math.cos(sig12);
2564
+ }
2565
+ }
2566
+ ssig2 = this._ssig1 * csig12 + this._csig1 * ssig12;
2567
+ csig2 = this._csig1 * csig12 - this._ssig1 * ssig12;
2568
+ dn2 = Math.sqrt(1 + this._k2 * m.sq(ssig2));
2569
+ if (outmask & (g.DISTANCE | g.REDUCEDLENGTH | g.GEODESICSCALE)) {
2570
+ if (arcmode || Math.abs(this.f) > 0.01)
2571
+ B12 = g.SinCosSeries(true, ssig2, csig2, this._C1a);
2572
+ AB1 = (1 + this._A1m1) * (B12 - this._B11);
2573
+ }
2574
+ sbet2 = this._calp0 * ssig2;
2575
+ cbet2 = m.hypot(this._salp0, this._calp0 * csig2);
2576
+ if (cbet2 === 0)
2577
+ cbet2 = csig2 = g.tiny_;
2578
+ salp2 = this._salp0;
2579
+ calp2 = this._calp0 * csig2;
2580
+ if (arcmode && outmask & g.DISTANCE)
2581
+ vals.s12 = this._b * ((1 + this._A1m1) * sig12 + AB1);
2582
+ if (outmask & g.LONGITUDE) {
2583
+ somg2 = this._salp0 * ssig2;
2584
+ comg2 = csig2;
2585
+ E = m.copysign(1, this._salp0);
2586
+ omg12 = outmask & g.LONG_UNROLL ? E * (sig12 - (Math.atan2(ssig2, csig2) - Math.atan2(this._ssig1, this._csig1)) + (Math.atan2(E * somg2, comg2) - Math.atan2(E * this._somg1, this._comg1))) : Math.atan2(somg2 * this._comg1 - comg2 * this._somg1, comg2 * this._comg1 + somg2 * this._somg1);
2587
+ lam12 = omg12 + this._A3c * (sig12 + (g.SinCosSeries(true, ssig2, csig2, this._C3a) - this._B31));
2588
+ lon12 = lam12 / m.degree;
2589
+ vals.lon2 = outmask & g.LONG_UNROLL ? this.lon1 + lon12 : m.AngNormalize(m.AngNormalize(this.lon1) + m.AngNormalize(lon12));
2590
+ }
2591
+ if (outmask & g.LATITUDE)
2592
+ vals.lat2 = m.atan2d(sbet2, this._f1 * cbet2);
2593
+ if (outmask & g.AZIMUTH)
2594
+ vals.azi2 = m.atan2d(salp2, calp2);
2595
+ if (outmask & (g.REDUCEDLENGTH | g.GEODESICSCALE)) {
2596
+ B22 = g.SinCosSeries(true, ssig2, csig2, this._C2a);
2597
+ AB2 = (1 + this._A2m1) * (B22 - this._B21);
2598
+ J12 = (this._A1m1 - this._A2m1) * sig12 + (AB1 - AB2);
2599
+ if (outmask & g.REDUCEDLENGTH)
2600
+ vals.m12 = this._b * (dn2 * (this._csig1 * ssig2) - this._dn1 * (this._ssig1 * csig2) - this._csig1 * csig2 * J12);
2601
+ if (outmask & g.GEODESICSCALE) {
2602
+ t = this._k2 * (ssig2 - this._ssig1) * (ssig2 + this._ssig1) / (this._dn1 + dn2);
2603
+ vals.M12 = csig12 + (t * ssig2 - csig2 * J12) * this._ssig1 / this._dn1;
2604
+ vals.M21 = csig12 - (t * this._ssig1 - this._csig1 * J12) * ssig2 / dn2;
2605
+ }
2606
+ }
2607
+ if (outmask & g.AREA) {
2608
+ B42 = g.SinCosSeries(false, ssig2, csig2, this._C4a);
2609
+ if (this._calp0 === 0 || this._salp0 === 0) {
2610
+ salp12 = salp2 * this.calp1 - calp2 * this.salp1;
2611
+ calp12 = calp2 * this.calp1 + salp2 * this.salp1;
2612
+ } else {
2613
+ salp12 = this._calp0 * this._salp0 * (csig12 <= 0 ? this._csig1 * (1 - csig12) + ssig12 * this._ssig1 : ssig12 * (this._csig1 * ssig12 / (1 + csig12) + this._ssig1));
2614
+ calp12 = m.sq(this._salp0) + m.sq(this._calp0) * this._csig1 * csig2;
2615
+ }
2616
+ vals.S12 = this._c2 * Math.atan2(salp12, calp12) + this._A4 * (Math.abs(sig12) < 0.01 ? g.SinCosSeries(false, this._ssig1, this._csig1, this._C4a, sig12) : B42 - this._B41);
2617
+ }
2618
+ if (!arcmode)
2619
+ vals.a12 = sig12 / m.degree;
2620
+ return vals;
2621
+ };
2622
+ l.GeodesicLine.prototype.Position = function(s12, outmask) {
2623
+ return this.GenPosition(false, s12, outmask);
2624
+ };
2625
+ l.GeodesicLine.prototype.ArcPosition = function(a12, outmask) {
2626
+ return this.GenPosition(true, a12, outmask);
2627
+ };
2628
+ l.GeodesicLine.prototype.GenSetDistance = function(arcmode, s13_a13) {
2629
+ if (arcmode)
2630
+ this.SetArc(s13_a13);
2631
+ else
2632
+ this.SetDistance(s13_a13);
2633
+ };
2634
+ l.GeodesicLine.prototype.SetDistance = function(s13) {
2635
+ var r;
2636
+ this.s13 = s13;
2637
+ r = this.GenPosition(false, this.s13, g.ARC);
2638
+ this.a13 = 0 + r.a12;
2639
+ };
2640
+ l.GeodesicLine.prototype.SetArc = function(a13) {
2641
+ var r;
2642
+ this.a13 = a13;
2643
+ r = this.GenPosition(true, this.a13, g.DISTANCE);
2644
+ this.s13 = 0 + r.s12;
2645
+ };
2646
+ })(geodesic.Geodesic, geodesic.GeodesicLine, geodesic.Math);
2647
+
2648
+ // dist/ellipsoid-geodesic.js
2649
+ var library = geodesic.Geodesic;
2650
+ var EllipsoidGeodesic = class {
2651
+ constructor({ semiMajorAxis: a, semiMinorAxis: b }) {
2652
+ this.engine = createGeodesicEngine({ semiMajorAxis: a, semiMinorAxis: b });
2653
+ }
2654
+ /** Total area in squared axis units, with the same normalization as S12. */
2655
+ get surfaceArea() {
2656
+ return 4 * Math.PI * this.engine._c2;
2657
+ }
2658
+ inverse(lat1, lon1, lat2, lon2, options = {}) {
2659
+ validatePoint(lat1, lon1);
2660
+ validatePoint(lat2, lon2);
2661
+ return this.engine.Inverse(lat1, lon1, lat2, lon2, outputMask(options));
2662
+ }
2663
+ direct(latitude, longitude, azimuth, distance, options = {}) {
2664
+ return this.line(latitude, longitude, azimuth, options).position(distance);
2665
+ }
2666
+ arcDirect(latitude, longitude, azimuth, arc, options = {}) {
2667
+ return this.line(latitude, longitude, azimuth, options).arcPosition(arc);
2668
+ }
2669
+ line(latitude, longitude, azimuth, options = {}) {
2670
+ validatePoint(latitude, longitude);
2671
+ validateFinite(azimuth);
2672
+ const selectedMask = outputMask(options);
2673
+ const line = this.engine.Line(latitude, longitude, azimuth, selectedMask | library.DISTANCE_IN);
2674
+ return {
2675
+ position(distance) {
2676
+ validateFinite(distance);
2677
+ return line.Position(distance, selectedMask);
2678
+ },
2679
+ arcPosition(arc) {
2680
+ validateFinite(arc);
2681
+ return line.ArcPosition(arc, selectedMask);
2682
+ }
2683
+ };
2684
+ }
2685
+ };
2686
+ function validatePoint(latitude, longitude) {
2687
+ if (!(Number.isFinite(latitude) && Math.abs(latitude) <= 90 && Number.isFinite(longitude))) {
2688
+ throw new Error("Invalid geodesic coordinates");
2689
+ }
2690
+ }
2691
+ function outputMask(options) {
2692
+ return library.ALL & ~(options.area ? 0 : library.AREA) | (options.unrollLongitude ? library.LONG_UNROLL : 0);
2693
+ }
2694
+ function validateFinite(value) {
2695
+ if (!Number.isFinite(value))
2696
+ throw new Error("Geodesic axes, azimuth, distance and arc must be finite");
2697
+ }
2698
+ var nonAreaGeodesicMask = library.ALL & ~library.AREA;
2699
+ function createGeodesicEngine({ semiMajorAxis: a, semiMinorAxis: b }) {
2700
+ validateFinite(a);
2701
+ validateFinite(b);
2702
+ return new library.Geodesic(a, (a - b) / a);
2703
+ }
2704
+
2705
+ // dist/geodesic-path.js
2706
+ var wgs84;
2707
+ var GeodesicPath = class {
2708
+ constructor(start, end, options = {}) {
2709
+ validateGeographicPosition(start);
2710
+ validateGeographicPosition(end);
2711
+ if (start.length !== end.length)
2712
+ throw new RangeError("Geodesic endpoint dimensions must match");
2713
+ const solver = options.geodesic || getDefaultGeodesic();
2714
+ const inverse = solver.inverse(start[1], start[0], end[1], end[0], { unrollLongitude: true });
2715
+ if (!Number.isFinite(inverse.s12) || inverse.s12 < 0 || !Number.isFinite(inverse.azi1) || !Number.isFinite(inverse.lon2)) {
2716
+ throw new RangeError("Unresolved geodesic path");
2717
+ }
2718
+ this.size = start.length;
2719
+ this.length = inverse.s12;
2720
+ this.first = Object.freeze(Array.from(start));
2721
+ const last = Array.from(end);
2722
+ last[0] = inverse.lon2;
2723
+ if (this.length === 0) {
2724
+ last[0] = start[0];
2725
+ last[1] = start[1];
2726
+ }
2727
+ this.last = Object.freeze(last);
2728
+ this.line = solver.line(start[1], start[0], inverse.azi1, { unrollLongitude: true });
2729
+ }
2730
+ get start() {
2731
+ return this.first.slice();
2732
+ }
2733
+ get end() {
2734
+ return this.last.slice();
2735
+ }
2736
+ sample(fraction, result = new Array(this.size)) {
2737
+ if (!Number.isFinite(fraction) || fraction < 0 || fraction > 1) {
2738
+ throw new RangeError("Geodesic fraction must be in [0, 1]");
2739
+ }
2740
+ if (result.length !== this.size)
2741
+ throw new RangeError("Invalid geodesic sample output length");
2742
+ let longitude;
2743
+ let latitude;
2744
+ if (fraction === 0 || this.length === 0) {
2745
+ longitude = this.first[0];
2746
+ latitude = this.first[1];
2747
+ } else if (fraction === 1) {
2748
+ longitude = this.last[0];
2749
+ latitude = this.last[1];
2750
+ } else {
2751
+ const value = this.line.position(this.length * fraction);
2752
+ longitude = value.lon2;
2753
+ latitude = value.lat2;
2754
+ }
2755
+ const height = this.size === 3 ? this.first[2] * (1 - fraction) + this.last[2] * fraction : 0;
2756
+ if (![longitude, latitude, height].every(Number.isFinite) || result instanceof Float32Array && ![longitude, latitude, height].every((value) => Number.isFinite(Math.fround(value)))) {
2757
+ throw new RangeError("Unrepresentable geodesic sample");
2758
+ }
2759
+ result[0] = longitude;
2760
+ result[1] = latitude;
2761
+ if (this.size === 3)
2762
+ result[2] = height;
2763
+ return result;
2764
+ }
2765
+ sampleByDistance(distance, result = new Array(this.size)) {
2766
+ if (!Number.isFinite(distance) || distance < 0 || distance > this.length) {
2767
+ throw new RangeError("Distance must be within the geodesic path");
2768
+ }
2769
+ return this.sample(this.length === 0 ? 0 : distance / this.length, result);
2770
+ }
2771
+ };
2772
+ function validateGeographicPosition(point) {
2773
+ if (point.length !== 2 && point.length !== 3 || !Array.from(point).every(Number.isFinite) || Math.abs(point[1]) > 90) {
2774
+ throw new RangeError("Expected finite longitude/latitude[/height], latitude in [-90, 90]");
2775
+ }
2776
+ }
2777
+ function getDefaultGeodesic() {
2778
+ if (!wgs84) {
2779
+ wgs84 = new EllipsoidGeodesic({ semiMajorAxis: WGS84_RADIUS_X, semiMinorAxis: WGS84_RADIUS_Z });
2780
+ }
2781
+ return wgs84;
2782
+ }
2783
+
2784
+ // dist/subdivide-geodesic-polyline.js
2785
+ function subdivideGeodesicPolyline(input, options) {
2786
+ const { geodesic: geodesic2, size = 2, maxSurfaceDistance = Infinity, ...subdivision } = options;
2787
+ if (size !== 2 && size !== 3 || !Number.isSafeInteger(input.length) || input.length < 0 || input.length % size !== 0) {
2788
+ throw new RangeError("Expected packed longitude/latitude[/height] positions");
2789
+ }
2790
+ const maxVertices = subdivision.maxVertices ?? 65536;
2791
+ if (!Number.isSafeInteger(maxVertices) || maxVertices < 1 || maxVertices > 4294967295 || input.length / size > maxVertices) {
2792
+ throw new RangeError("Invalid or exceeded maxVertices");
2793
+ }
2794
+ if (!(maxSurfaceDistance > 0) || maxSurfaceDistance !== Infinity && !Number.isFinite(maxSurfaceDistance)) {
2795
+ throw new RangeError("maxSurfaceDistance must be positive");
2796
+ }
2797
+ const positions = Array.from(input);
2798
+ for (let i = 0; i < positions.length; i += size)
2799
+ validateGeographicPosition(positions.slice(i, i + size));
2800
+ const paths = [];
2801
+ for (let i = size; i < positions.length; i += size) {
2802
+ const path = new GeodesicPath(positions.slice(i - size, i), positions.slice(i, i + size), {
2803
+ geodesic: geodesic2
2804
+ });
2805
+ paths.push(path);
2806
+ const end = path.end;
2807
+ for (let component = 0; component < size; component++)
2808
+ positions[i + component] = end[component];
2809
+ }
2810
+ return (0, import_polygon2.subdividePolyline)(positions, {
2811
+ ...subdivision,
2812
+ size,
2813
+ maxSegmentLength: maxSurfaceDistance,
2814
+ createEdgeSampler: (_start, _end, index) => paths[index]
2815
+ });
2816
+ }
2817
+
2818
+ // dist/subdivide-rhumb-polyline.js
2819
+ var import_polygon3 = require("@math.gl/geometry/polygon");
2820
+
2821
+ // dist/ellipsoid-helpers/rhumb-pole-distance.js
2822
+ var Q = 10n ** 48n;
2823
+ var PI = 3141592653589793238462643383279502884197169399375n;
2824
+ var mul = (x, y) => x * y / Q;
2825
+ var div = (x, y) => x * Q / y;
2826
+ function exact(x) {
2827
+ const bytes = new DataView(new ArrayBuffer(8));
2828
+ bytes.setFloat64(0, x);
2829
+ const bits = bytes.getBigUint64(0), exponent = Number(bits >> 52n & 2047n);
2830
+ const mantissa = bits & (1n << 52n) - 1n | (exponent ? 1n << 52n : 0n);
2831
+ const shift2 = exponent ? exponent - 1075 : -1074;
2832
+ const value = shift2 >= 0 ? mantissa * Q << BigInt(shift2) : mantissa * Q >> BigInt(-shift2);
2833
+ return bits >> 63n ? -value : value;
2834
+ }
2835
+ function sc(x) {
2836
+ let s = x, c = Q, ts = x, tc = Q;
2837
+ const square = mul(x, x);
2838
+ for (let n = 1n; n < 160n; n++) {
2839
+ ts = -mul(ts, square) / (2n * n * (2n * n + 1n));
2840
+ tc = -mul(tc, square) / ((2n * n - 1n) * (2n * n));
2841
+ s += ts;
2842
+ c += tc;
2843
+ if (ts === 0n && tc === 0n)
2844
+ break;
2845
+ }
2846
+ return [s, c];
2847
+ }
2848
+ function remainingPoleDistance(a, b, latitude, azimuth, distance, sign) {
2849
+ const unit = 2 ** Math.floor(Math.log2(a));
2850
+ a /= unit;
2851
+ b /= unit;
2852
+ distance /= unit;
2853
+ const ratio2 = div(exact(b), exact(a));
2854
+ const theta = mul(90n * Q - BigInt(sign) * exact(latitude), PI) / 180n;
2855
+ const [s, c] = sc(theta), prolate = ratio2 > Q;
2856
+ const square = mul(ratio2, ratio2);
2857
+ const k = prolate ? Q - div(Q, square) : Q - square;
2858
+ const z = prolate ? s : c, other = prolate ? c : s;
2859
+ const zz = mul(z, z);
2860
+ let integral = theta, total = theta, coefficient = Q, power = z;
2861
+ for (let n = 1n; n < 480n; n++) {
2862
+ integral = ((2n * n - 1n) * integral + (prolate ? -1n : 1n) * mul(power, other)) / (2n * n);
2863
+ coefficient = mul(coefficient, k) * (2n * n + 1n) / (2n * n);
2864
+ const term = mul(coefficient, integral);
2865
+ total += term;
2866
+ power = mul(power, zz);
2867
+ if (term === 0n)
2868
+ break;
2869
+ }
2870
+ const gap = prolate ? div(total, ratio2) : mul(total, square);
2871
+ const angle2 = mul(exact(azimuth % 360), PI) / 180n;
2872
+ const north = mul(div(exact(distance), exact(a)), sc(angle2)[1]);
2873
+ return Number(gap - BigInt(sign) * north) / Number(Q);
2874
+ }
2875
+
2876
+ // dist/ellipsoid-metrics.js
2877
+ var DEG = Math.PI / 180;
2878
+ var NODES = [
2879
+ 0.09501250983763744,
2880
+ 0.2816035507792589,
2881
+ 0.4580167776572274,
2882
+ 0.6178762444026438,
2883
+ 0.755404408355003,
2884
+ 0.8656312023878318,
2885
+ 0.9445750230732326,
2886
+ 0.9894009349916499
2887
+ ];
2888
+ var WEIGHTS = [
2889
+ 0.1894506104550685,
2890
+ 0.1826034150449236,
2891
+ 0.16915651939500254,
2892
+ 0.14959598881657674,
2893
+ 0.12462897125553388,
2894
+ 0.09515851168249279,
2895
+ 0.06225352393864789,
2896
+ 0.027152459411754096
2897
+ ];
2898
+ var KINDS = [
2899
+ "geocentric",
2900
+ "parametric",
2901
+ "rectifying",
2902
+ "authalic",
2903
+ "conformal",
2904
+ "isometric"
2905
+ ];
2906
+ var EllipsoidMetrics = class {
2907
+ constructor({ semiMajorAxis: a, semiMinorAxis: b }) {
2908
+ const r = b / a;
2909
+ if (!(Number.isFinite(a) && Number.isFinite(b) && a > 0 && b > 0 && r >= 0.5 && r <= 2)) {
2910
+ throw new Error("Ellipsoid metrics require finite positive axes with 0.5 <= b/a <= 2");
2911
+ }
2912
+ this.semiMajorAxis = a;
2913
+ this.semiMinorAxis = b;
2914
+ this.ratio = r;
2915
+ this.e2 = (1 - r) * (1 + r);
2916
+ this.qPole = 1 + r * r * this.eccentricIntegral(1);
2917
+ this.quarter = integrate((t) => this.meridianIntegrand(t), 0, Math.PI / 2);
2918
+ this.quarterMeridian = a * this.quarter;
2919
+ this.surfaceArea = 2 * Math.PI * a * a * this.qPole;
2920
+ this.volume = 4 * Math.PI / 3 * a * b * a;
2921
+ if (![this.quarterMeridian, this.surfaceArea, this.volume].every((v) => Number.isFinite(v) && v > 0)) {
2922
+ throw new Error("Ellipsoid metrics exceed representable length/area/volume range");
2923
+ }
2924
+ Object.freeze(this);
2925
+ }
2926
+ meridianDistance(latitude) {
2927
+ validateLatitude(latitude);
2928
+ return Math.sign(latitude) * this.semiMajorAxis * this.meridian(Math.abs(latitude));
2929
+ }
2930
+ meridionalCurvatureRadius(latitude) {
2931
+ validateLatitude(latitude);
2932
+ return this.semiMajorAxis * this.meridianIntegrand(latitude * DEG);
2933
+ }
2934
+ transverseCurvatureRadius(latitude) {
2935
+ validateLatitude(latitude);
2936
+ const [s, c] = sincos(latitude);
2937
+ return this.semiMajorAxis / Math.hypot(c, this.ratio * s);
2938
+ }
2939
+ normalCurvatureRadius(latitude, azimuth) {
2940
+ if (!Number.isFinite(azimuth))
2941
+ throw new Error("Azimuth must be finite");
2942
+ const [s, c] = sincos(azimuth % 180);
2943
+ return 1 / (c * c / this.meridionalCurvatureRadius(latitude) + s * s / this.transverseCurvatureRadius(latitude));
2944
+ }
2945
+ latitudeToAuxiliary(latitude, kind) {
2946
+ validateKind(kind);
2947
+ validateLatitude(latitude);
2948
+ if (latitude === 0)
2949
+ return latitude;
2950
+ if (Math.abs(latitude) === 90)
2951
+ return kind === "isometric" ? Math.sign(latitude) * Infinity : latitude;
2952
+ if (this.ratio === 1 && kind !== "isometric")
2953
+ return latitude;
2954
+ const sign = Math.sign(latitude);
2955
+ const phi = Math.abs(latitude);
2956
+ const [s, c] = sincos(phi);
2957
+ switch (kind) {
2958
+ case "geocentric":
2959
+ return sign * angle(this.ratio * this.ratio * s, c);
2960
+ case "parametric":
2961
+ return sign * angle(this.ratio * s, c);
2962
+ case "rectifying":
2963
+ return sign * (phi <= 45 ? this.meridian(phi) / this.quarter * 90 : 90 - integrate((t) => this.meridianIntegrand(Math.PI / 2 - t), 0, (90 - phi) * DEG) / this.quarter * 90);
2964
+ case "authalic": {
2965
+ if (phi <= 45) {
2966
+ const q = this.ratio ** 2 * (s / (c * c + (this.ratio * s) ** 2) + this.eccentricIntegral(s));
2967
+ return sign * Math.asin(q / this.qPole) / DEG;
2968
+ }
2969
+ const cap = integrate((t) => {
2970
+ const st = Math.sin(t), ct = Math.cos(t);
2971
+ const d = st * st + (this.ratio * ct) ** 2;
2972
+ return 2 * this.ratio ** 2 * st / (d * d);
2973
+ }, 0, (90 - phi) * DEG);
2974
+ return sign * (90 - 2 * Math.asin(Math.sqrt(cap / (2 * this.qPole))) / DEG);
2975
+ }
2976
+ default: {
2977
+ const psi = Math.asinh(s / c) - this.e2 * this.eccentricIntegral(s);
2978
+ return sign * (kind === "isometric" ? psi / DEG : psi < 1 ? Math.atan(Math.sinh(psi)) / DEG : 90 - 2 * Math.atan(Math.exp(-psi)) / DEG);
2979
+ }
2980
+ }
2981
+ }
2982
+ latitudeFromAuxiliary(latitude, kind) {
2983
+ validateKind(kind);
2984
+ if (kind === "isometric" && Math.abs(latitude) === Infinity)
2985
+ return Math.sign(latitude) * 90;
2986
+ if (kind !== "isometric")
2987
+ validateLatitude(latitude);
2988
+ else if (!Number.isFinite(latitude))
2989
+ throw new Error("Isometric latitude must be finite or a pole infinity");
2990
+ if (latitude === 0)
2991
+ return latitude;
2992
+ if (kind !== "isometric" && Math.abs(latitude) === 90)
2993
+ return latitude;
2994
+ if (this.ratio === 1 && kind !== "isometric")
2995
+ return latitude;
2996
+ const sign = Math.sign(latitude), target = Math.abs(latitude);
2997
+ if (kind === "geocentric" || kind === "parametric") {
2998
+ const [s, c] = sincos(target);
2999
+ return sign * angle(s, c * (kind === "geocentric" ? this.ratio ** 2 : this.ratio));
3000
+ }
3001
+ let lo = 0, hi = 90;
3002
+ for (let i = 0; i < 64; ++i) {
3003
+ const mid = (lo + hi) / 2;
3004
+ if (mid === lo || mid === hi)
3005
+ break;
3006
+ if (this.latitudeToAuxiliary(mid, kind) < target)
3007
+ lo = mid;
3008
+ else
3009
+ hi = mid;
3010
+ }
3011
+ return sign * ((lo + hi) / 2);
3012
+ }
3013
+ eccentricIntegral(s) {
3014
+ const e = Math.sqrt(Math.abs(this.e2));
3015
+ return e === 0 ? s : (this.e2 > 0 ? Math.atanh(e * s) : Math.atan(e * s)) / e;
3016
+ }
3017
+ meridianIntegrand(t) {
3018
+ return this.ratio ** 2 / Math.hypot(Math.cos(t), this.ratio * Math.sin(t)) ** 3;
3019
+ }
3020
+ meridian(phi) {
3021
+ return phi <= 45 ? integrate((t) => this.meridianIntegrand(t), 0, phi * DEG) : this.quarter - integrate((t) => this.meridianIntegrand(Math.PI / 2 - t), 0, (90 - phi) * DEG);
3022
+ }
3023
+ };
3024
+ function validateLatitude(value) {
3025
+ if (!(Number.isFinite(value) && Math.abs(value) <= 90))
3026
+ throw new Error("Latitude must be in [-90, 90] degrees");
3027
+ }
3028
+ function validateKind(kind) {
3029
+ if (!KINDS.includes(kind))
3030
+ throw new Error("Unknown auxiliary latitude");
3031
+ }
3032
+ function sincos(degrees2) {
3033
+ const a = Math.abs(degrees2);
3034
+ if (a <= 45)
3035
+ return [Math.sin(degrees2 * DEG), Math.cos(degrees2 * DEG)];
3036
+ return [Math.sign(degrees2) * Math.cos((90 - a) * DEG), Math.sin((90 - a) * DEG)];
3037
+ }
3038
+ function angle(s, c) {
3039
+ return s > c ? 90 - Math.atan2(c, s) / DEG : Math.atan2(s, c) / DEG;
3040
+ }
3041
+ function integrate(f, lo, hi) {
3042
+ let sum = 0;
3043
+ for (let j = 0; j < 8; ++j) {
3044
+ const h = (hi - lo) / 16, mid = lo + (2 * j + 1) * h;
3045
+ let part = 0;
3046
+ for (let i = 0; i < 8; ++i)
3047
+ part += WEIGHTS[i] * (f(mid - h * NODES[i]) + f(mid + h * NODES[i]));
3048
+ sum += h * part;
3049
+ }
3050
+ return sum;
3051
+ }
3052
+
3053
+ // dist/ellipsoid-rhumb.js
3054
+ var RhumbDomainError = class extends RangeError {
3055
+ constructor(reason) {
3056
+ super(reason === "pole" ? "Rhumb longitude/bearing is undefined at an exact pole" : "Rhumb crosses a pole; continuation longitude is undefined");
3057
+ this.reason = reason;
3058
+ this.name = "RhumbDomainError";
3059
+ }
3060
+ };
3061
+ var DEG2 = Math.PI / 180;
3062
+ var EllipsoidRhumb = class {
3063
+ constructor({ semiMajorAxis: a, semiMinorAxis: b }) {
3064
+ if (!(Number.isFinite(a) && Number.isFinite(b) && a > 0 && b > 0))
3065
+ throw new RangeError("Rhumbs require finite positive axes");
3066
+ this.a = a;
3067
+ this.b = b;
3068
+ this.r = b / a;
3069
+ this.metrics = new EllipsoidMetrics({ semiMajorAxis: 1, semiMinorAxis: this.r });
3070
+ this.surfaceArea = a * this.metrics.surfaceArea * a;
3071
+ if (!(Number.isFinite(this.surfaceArea) && this.surfaceArea > 0))
3072
+ throw new RangeError("Rhumb surface area is unrepresentable");
3073
+ Object.freeze(this);
3074
+ }
3075
+ inverse(lat1, lon1, lat2, lon2, options = {}) {
3076
+ validateRhumbPoint(lat1, lon1);
3077
+ validateRhumbPoint(lat2, lon2);
3078
+ const turns = options.longitudeTurns ?? 0;
3079
+ if (!Number.isSafeInteger(turns))
3080
+ throw new RangeError("Rhumb longitudeTurns must be a safe integer");
3081
+ const longitude = angleDifference(lon1, lon2) + 360 * turns;
3082
+ if (!Number.isFinite(longitude))
3083
+ throw new RangeError("Unrepresentable rhumb winding");
3084
+ const dphi = (lat2 - lat1) * DEG2;
3085
+ const [meanM, meanP] = this.means(lat1, lat2);
3086
+ const dx = longitude * DEG2 * meanM / meanP;
3087
+ const distance = this.a * Math.hypot(dphi * meanM, dx);
3088
+ const azi = Math.atan2(longitude * DEG2, dphi * meanP) / DEG2;
3089
+ const result = {
3090
+ lat1,
3091
+ lon1,
3092
+ lat2,
3093
+ lon2: options.unrollLongitude ? lon1 + longitude : normalize(lon2),
3094
+ azi12: azi,
3095
+ s12: distance
3096
+ };
3097
+ if (options.area)
3098
+ result.S12 = this.area(lat1, lat2, longitude * DEG2);
3099
+ if (!Number.isFinite(distance))
3100
+ throw new RangeError("Unrepresentable rhumb distance");
3101
+ return result;
3102
+ }
3103
+ direct(latitude, longitude, azimuth, distance, options = {}) {
3104
+ return this.line(latitude, longitude, azimuth, options).position(distance);
3105
+ }
3106
+ line(latitude, longitude, azimuth, options = {}) {
3107
+ validateRhumbPoint(latitude, longitude);
3108
+ if (!Number.isFinite(azimuth))
3109
+ throw new RangeError("Rhumb azimuth must be finite");
3110
+ const [sa, ca] = sincosDegrees(azimuth);
3111
+ const area = Boolean(options.area), unroll = Boolean(options.unrollLongitude);
3112
+ const azi = normalize(azimuth);
3113
+ return {
3114
+ position: (distance) => {
3115
+ if (!Number.isFinite(distance))
3116
+ throw new RangeError("Rhumb distance must be finite");
3117
+ const delta = distance / this.a;
3118
+ if (!Number.isFinite(delta))
3119
+ throw new RangeError("Unrepresentable rhumb distance");
3120
+ const north = delta * ca;
3121
+ let poleDistance;
3122
+ if (north !== 0) {
3123
+ const gap = north > 0 ? this.meridianDelta(latitude, 90) : this.meridianDelta(-90, latitude);
3124
+ poleDistance = gap - Math.abs(north);
3125
+ if (Math.abs(poleDistance) < 1e-4 * gap)
3126
+ poleDistance = remainingPoleDistance(this.a, this.b, latitude, azimuth, distance, Math.sign(north));
3127
+ if (poleDistance < 0)
3128
+ throw new RhumbDomainError("pole-crossing");
3129
+ if (poleDistance === 0)
3130
+ throw new RhumbDomainError("pole");
3131
+ }
3132
+ const polar = north === 0 ? void 0 : this.polarEndpoint(latitude, north, poleDistance);
3133
+ const lat2 = north === 0 ? latitude : (polar == null ? void 0 : polar.latitude) ?? this.inverseMeridian(latitude, north);
3134
+ if (Math.abs(lat2) === 90)
3135
+ throw new RhumbDomainError("pole");
3136
+ const [meanM, meanP] = (polar == null ? void 0 : polar.means) ?? this.means(latitude, lat2);
3137
+ const dlon = delta * sa * meanP / meanM / DEG2;
3138
+ const lon2 = unroll ? longitude + dlon : normalize(normalize(longitude) + dlon);
3139
+ if (!Number.isFinite(lon2))
3140
+ throw new RangeError("Unrepresentable rhumb longitude");
3141
+ const result = {
3142
+ lat1: latitude,
3143
+ lon1: longitude,
3144
+ lat2,
3145
+ lon2,
3146
+ azi12: azi,
3147
+ s12: distance
3148
+ };
3149
+ if (area)
3150
+ result.S12 = this.area(latitude, lat2, dlon * DEG2, polar == null ? void 0 : polar.psi);
3151
+ return result;
3152
+ }
3153
+ };
3154
+ }
3155
+ means(lat1, lat2) {
3156
+ const d = (lat2 - lat1) * DEG2;
3157
+ const mid = (lat1 + lat2) / 2;
3158
+ const meanM = this.meridianMean(lat1, lat2);
3159
+ const cmin = Math.min(latitudeSinCos(lat1)[1], latitudeSinCos(lat2)[1]);
3160
+ const meanP = Math.abs(d) < 0.25 * cmin ? integrate((t) => {
3161
+ const [s, c] = latitudeSinCos(mid + t * (lat2 - lat1) / 2);
3162
+ return this.r ** 2 / (c * (c * c + (this.r * s) ** 2));
3163
+ }, -1, 1) / 2 : (this.psi(lat2) - this.psi(lat1)) / d;
3164
+ return [meanM, meanP];
3165
+ }
3166
+ psi(latitude) {
3167
+ return this.metrics.latitudeToAuxiliary(latitude, "isometric") * DEG2;
3168
+ }
3169
+ polarEndpoint(latitude, north, poleDistance) {
3170
+ const sign = Math.abs(latitude) > 80 && Math.abs(north) < Math.abs(this.meridianDelta(0, latitude)) ? Math.sign(latitude) : Math.sign(north), theta1 = (90 - sign * latitude) * DEG2, limit = 10 * DEG2;
3171
+ const density = (theta2) => this.r ** 2 / Math.hypot(Math.sin(theta2), this.r * Math.cos(theta2)) ** 3;
3172
+ const gap = (theta2) => integrate(density, 0, theta2);
3173
+ const target = sign === Math.sign(north) ? poleDistance : this.meridianDelta(sign > 0 ? latitude : -90, sign > 0 ? 90 : latitude) - sign * north;
3174
+ if (!(target > 0 && target < gap(limit)))
3175
+ return void 0;
3176
+ let lo = 0, hi = limit, theta = target * this.r;
3177
+ if (!(theta > lo && theta < hi))
3178
+ theta = theta1;
3179
+ for (let i = 0; i < 64; i++) {
3180
+ const residual = gap(theta) - target;
3181
+ if (residual === 0)
3182
+ break;
3183
+ if (residual < 0)
3184
+ lo = theta;
3185
+ else
3186
+ hi = theta;
3187
+ const next = theta - residual / density(theta);
3188
+ if (next === theta)
3189
+ break;
3190
+ theta = next > lo && next < hi ? next : (lo + hi) / 2;
3191
+ if (theta === lo || theta === hi)
3192
+ break;
3193
+ if (i === 63)
3194
+ throw new Error("Rhumb polar meridian inversion did not converge");
3195
+ }
3196
+ const span = theta - theta1, mid = (theta + theta1) / 2;
3197
+ const meanM = integrate((t) => density(mid + t * span / 2), -1, 1) / 2;
3198
+ const meanP = Math.abs(span) < 0.25 * Math.min(Math.sin(theta), Math.sin(theta1)) ? integrate((t) => {
3199
+ const x = mid + t * span / 2, c = Math.sin(x), s = Math.cos(x);
3200
+ return this.r ** 2 / (c * (c * c + (this.r * s) ** 2));
3201
+ }, -1, 1) / 2 : -(this.polarPsi(theta) - this.polarPsi(theta1)) / span;
3202
+ return {
3203
+ latitude: sign * (90 - theta / DEG2),
3204
+ means: [meanM, meanP],
3205
+ psi: sign * this.polarPsi(theta)
3206
+ };
3207
+ }
3208
+ polarPsi(theta) {
3209
+ const s = Math.cos(theta), c = Math.sin(theta), e2 = (1 - this.r) * (1 + this.r), e = Math.sqrt(Math.abs(e2));
3210
+ const I = e === 0 ? s : (e2 > 0 ? Math.atanh(e * s) : Math.atan(e * s)) / e;
3211
+ return Math.asinh(s / c) - e2 * I;
3212
+ }
3213
+ meridianMean(lat1, lat2) {
3214
+ const mid = (lat1 + lat2) / 2;
3215
+ return integrate((t) => {
3216
+ const [s, c] = latitudeSinCos(mid + t * (lat2 - lat1) / 2);
3217
+ return this.r ** 2 / Math.hypot(c, this.r * s) ** 3;
3218
+ }, -1, 1) / 2;
3219
+ }
3220
+ meridianDelta(lat1, lat2) {
3221
+ return (lat2 - lat1) * DEG2 * this.meridianMean(lat1, lat2);
3222
+ }
3223
+ inverseMeridian(start, displacement) {
3224
+ let lo = -90, hi = 90;
3225
+ let phi = start + displacement / this.metrics.meridionalCurvatureRadius(start) / DEG2;
3226
+ if (!(phi > lo && phi < hi))
3227
+ phi = (start + Math.sign(displacement) * 90) / 2;
3228
+ for (let i = 0; i < 64; i++) {
3229
+ const residual = this.meridianDelta(start, phi) - displacement;
3230
+ if (residual === 0)
3231
+ return phi;
3232
+ if (residual < 0)
3233
+ lo = phi;
3234
+ else
3235
+ hi = phi;
3236
+ const next = phi - residual / this.metrics.meridionalCurvatureRadius(phi) / DEG2;
3237
+ if (next === phi)
3238
+ return phi;
3239
+ phi = next > lo && next < hi ? next : (lo + hi) / 2;
3240
+ if (phi === lo || phi === hi) {
3241
+ const candidates = [lo, hi].filter((v) => Math.abs(v) < 90);
3242
+ return candidates.reduce((best, v) => Math.abs(this.meridianDelta(start, v) - displacement) < Math.abs(this.meridianDelta(start, best) - displacement) ? v : best);
3243
+ }
3244
+ }
3245
+ throw new Error("Rhumb meridian inversion did not converge");
3246
+ }
3247
+ inversePsi(psi) {
3248
+ let lo = -90, hi = 90, phi = Math.atan(Math.sinh(psi)) / DEG2;
3249
+ if (Math.abs(phi) === 90)
3250
+ phi = Math.sign(psi) * (90 - 2 ** -46);
3251
+ for (let i = 0; i < 32; i++) {
3252
+ const value = this.psi(phi) - psi;
3253
+ if (value === 0)
3254
+ return phi;
3255
+ if (value < 0)
3256
+ lo = phi;
3257
+ else
3258
+ hi = phi;
3259
+ const [s, c] = latitudeSinCos(phi);
3260
+ const next = phi - value * c * (c * c + (this.r * s) ** 2) / this.r ** 2 / DEG2;
3261
+ if (next === phi)
3262
+ return phi;
3263
+ phi = next > lo && next < hi ? next : (lo + hi) / 2;
3264
+ if (phi === lo || phi === hi)
3265
+ return phi;
3266
+ }
3267
+ throw new Error("Rhumb isometric inversion did not converge");
3268
+ }
3269
+ potential(latitude) {
3270
+ const [s, c] = latitudeSinCos(latitude), e2 = (1 - this.r) * (1 + this.r), e = Math.sqrt(Math.abs(e2));
3271
+ const I = e === 0 ? s : (e2 > 0 ? Math.atanh(e * s) : Math.atan(e * s)) / e;
3272
+ return this.r ** 2 * (s / (c * c + (this.r * s) ** 2) + I) / 2;
3273
+ }
3274
+ area(lat1, lat2, dlon, endpointPsi) {
3275
+ if (dlon === 0 || lat1 === -lat2)
3276
+ return 0;
3277
+ if (lat1 === lat2) {
3278
+ const value2 = this.a * dlon * (this.a * this.potential(lat1));
3279
+ if (!Number.isFinite(value2))
3280
+ throw new RangeError("Unrepresentable rhumb area");
3281
+ return value2;
3282
+ }
3283
+ const p1 = this.psi(lat1), p2 = endpointPsi ?? this.psi(lat2), mid = (p1 + p2) / 2, half = (p2 - p1) / 2;
3284
+ const pieces = Math.max(1, Math.ceil(Math.abs(p2 - p1) / 2));
3285
+ let sum = 0;
3286
+ for (let j = 0; j < pieces; j++)
3287
+ sum += integrate((t) => this.potential(this.inversePsi(mid + half * t)), -1 + 2 * j / pieces, -1 + 2 * (j + 1) / pieces);
3288
+ const value = this.a * dlon * (this.a * (sum / 2));
3289
+ if (!Number.isFinite(value))
3290
+ throw new RangeError("Unrepresentable rhumb area");
3291
+ return value;
3292
+ }
3293
+ };
3294
+ function validateRhumbPoint(latitude, longitude) {
3295
+ if (!(Number.isFinite(latitude) && Math.abs(latitude) <= 90 && Number.isFinite(longitude)))
3296
+ throw new RangeError("Rhumb coordinates require finite longitude and latitude in [-90,90]");
3297
+ if (Math.abs(latitude) === 90)
3298
+ throw new RhumbDomainError("pole");
3299
+ }
3300
+ function latitudeSinCos(phi) {
3301
+ const p = Math.abs(phi);
3302
+ return p <= 45 ? [Math.sin(phi * DEG2), Math.cos(phi * DEG2)] : [Math.sign(phi) * Math.cos((90 - p) * DEG2), Math.sin((90 - p) * DEG2)];
3303
+ }
3304
+ function sincosDegrees(angle2) {
3305
+ const reduced = angle2 % 360, q = Math.round(reduced / 90), d = reduced - 90 * q, x = d * DEG2;
3306
+ const s = Math.sin(x), c = Math.cos(x);
3307
+ switch ((q % 4 + 4) % 4) {
3308
+ case 0:
3309
+ return [s, c];
3310
+ case 1:
3311
+ return [c, -s];
3312
+ case 2:
3313
+ return [-s, -c];
3314
+ default:
3315
+ return [-c, s];
3316
+ }
3317
+ }
3318
+ function normalize(angle2) {
3319
+ let a = angle2 % 360;
3320
+ if (a > 180)
3321
+ a -= 360;
3322
+ if (a < -180)
3323
+ a += 360;
3324
+ return a;
3325
+ }
3326
+ function angleDifference(a, b) {
3327
+ let [d, e] = twoSum(-normalize(a), normalize(b));
3328
+ [d, e] = twoSum(normalize(d), e);
3329
+ if (Math.abs(d) === 180)
3330
+ return (e === 0 ? b < a : e > 0) ? -180 : 180;
3331
+ return d === 0 ? b < a ? -0 : 0 : d;
3332
+ }
3333
+ function twoSum(a, b) {
3334
+ const s = a + b, v = s - a;
3335
+ return [s, a - (s - v) + (b - v)];
3336
+ }
3337
+
3338
+ // dist/rhumb-path.js
3339
+ var wgs842;
3340
+ function getDefaultRhumb() {
3341
+ if (!wgs842)
3342
+ wgs842 = new EllipsoidRhumb({ semiMajorAxis: WGS84_RADIUS_X, semiMinorAxis: WGS84_RADIUS_Z });
3343
+ return wgs842;
3344
+ }
3345
+ var RhumbPath = class {
3346
+ constructor(start, end, options = {}) {
3347
+ validateGeographicPosition(start);
3348
+ validateGeographicPosition(end);
3349
+ if (start.length !== end.length)
3350
+ throw new RangeError("Rhumb endpoint dimensions must match");
3351
+ const solver = options.rhumb || getDefaultRhumb();
3352
+ if (options.longitudeMode !== void 0 && !["shortest", "unrolled"].includes(options.longitudeMode) || options.longitudeMode === "unrolled" && options.longitudeTurns !== void 0)
3353
+ throw new RangeError("Choose explicit turns or unrolled endpoint longitudes");
3354
+ let inverse = solver.inverse(start[1], start[0], end[1], end[0], {
3355
+ longitudeTurns: options.longitudeTurns,
3356
+ unrollLongitude: true
3357
+ });
3358
+ if (options.longitudeMode === "unrolled") {
3359
+ const turns2 = Math.round((end[0] - inverse.lon2) / 360);
3360
+ if (turns2 !== 0)
3361
+ inverse = solver.inverse(start[1], start[0], end[1], end[0], {
3362
+ longitudeTurns: turns2,
3363
+ unrollLongitude: true
3364
+ });
3365
+ }
3366
+ if (![inverse.s12, inverse.azi12, inverse.lon2].every(Number.isFinite) || inverse.s12 < 0)
3367
+ throw new RangeError("Unresolved rhumb path");
3368
+ this.size = start.length;
3369
+ this.length = inverse.s12;
3370
+ this.first = Object.freeze(Array.from(start));
3371
+ const last = Array.from(end);
3372
+ const turns = Math.round((inverse.lon2 - end[0]) / 360);
3373
+ const endpoint = end[0] + 360 * turns;
3374
+ const retainsPhase = Number.isSafeInteger(turns) && Number.isFinite(endpoint) && Math.abs(endpoint - inverse.lon2) <= 4 * Number.EPSILON * Math.max(360, Math.abs(inverse.lon2));
3375
+ last[0] = inverse.s12 === 0 ? start[0] : retainsPhase ? endpoint : inverse.lon2;
3376
+ if (inverse.s12 === 0)
3377
+ last[1] = start[1];
3378
+ this.last = Object.freeze(last);
3379
+ this.line = solver.line(start[1], start[0], inverse.azi12, { unrollLongitude: true });
3380
+ }
3381
+ get start() {
3382
+ return this.first.slice();
3383
+ }
3384
+ get end() {
3385
+ return this.last.slice();
3386
+ }
3387
+ sample(fraction, result = new Array(this.size)) {
3388
+ if (!Number.isFinite(fraction) || fraction < 0 || fraction > 1)
3389
+ throw new RangeError("Rhumb fraction must be in [0, 1]");
3390
+ if (result.length !== this.size || ArrayBuffer.isView(result) && !(result instanceof Float32Array) && !(result instanceof Float64Array))
3391
+ throw new RangeError("Expected a floating rhumb output with matching dimensions");
3392
+ let longitude = this.first[0], latitude = this.first[1];
3393
+ if (fraction === 1) {
3394
+ longitude = this.last[0];
3395
+ latitude = this.last[1];
3396
+ } else if (fraction !== 0 && this.length !== 0) {
3397
+ const p = this.line.position(this.length * fraction);
3398
+ longitude = p.lon2;
3399
+ latitude = p.lat2;
3400
+ }
3401
+ const height = this.size === 3 ? this.first[2] * (1 - fraction) + this.last[2] * fraction : 0;
3402
+ const values = [longitude, latitude, height];
3403
+ if (!values.every(Number.isFinite) || result instanceof Float32Array && !values.every((x) => Number.isFinite(Math.fround(x))))
3404
+ throw new RangeError("Unrepresentable rhumb sample");
3405
+ result[0] = longitude;
3406
+ result[1] = latitude;
3407
+ if (this.size === 3)
3408
+ result[2] = height;
3409
+ return result;
3410
+ }
3411
+ sampleByDistance(distance, result = new Array(this.size)) {
3412
+ if (!Number.isFinite(distance) || distance < 0 || distance > this.length)
3413
+ throw new RangeError("Distance must be within the rhumb path");
3414
+ return this.sample(this.length === 0 ? 0 : distance / this.length, result);
3415
+ }
3416
+ };
3417
+
3418
+ // dist/subdivide-rhumb-polyline.js
3419
+ function subdivideRhumbPolyline(input, options) {
3420
+ const { rhumb, longitudeTurns, longitudeMode, size = 2, maxSurfaceDistance = Infinity, ...subdivision } = options;
3421
+ const maxVertices = subdivision.maxVertices ?? 65536;
3422
+ if (longitudeMode !== void 0 && !["shortest", "unrolled"].includes(longitudeMode) || longitudeMode === "unrolled" && longitudeTurns !== void 0 || size !== 2 && size !== 3 || !Number.isSafeInteger(input.length) || input.length < 0 || input.length % size !== 0 || !Number.isSafeInteger(maxVertices) || maxVertices < 1 || maxVertices > 4294967295 || input.length / size > maxVertices || !(maxSurfaceDistance > 0) || maxSurfaceDistance !== Infinity && !Number.isFinite(maxSurfaceDistance))
3423
+ throw new RangeError("Invalid rhumb subdivision dimensions or limits");
3424
+ const count = Math.max(0, input.length / size - 1);
3425
+ const turns = longitudeTurns ? Array.from(longitudeTurns) : void 0;
3426
+ if (turns && (turns.length !== count || !turns.every(Number.isSafeInteger)))
3427
+ throw new RangeError("Expected one integer longitudeTurns value per rhumb edge");
3428
+ const positions = Array.from(input);
3429
+ for (let i = 0; i < positions.length; i += size)
3430
+ validateGeographicPosition(positions.slice(i, i + size));
3431
+ const original = positions.slice();
3432
+ const paths = [];
3433
+ for (let i = size; i < positions.length; i += size) {
3434
+ const path = new RhumbPath(original.slice(i - size, i), original.slice(i, i + size), {
3435
+ rhumb,
3436
+ longitudeMode,
3437
+ longitudeTurns: turns == null ? void 0 : turns[paths.length]
3438
+ });
3439
+ const first = positions.slice(i - size, i);
3440
+ const worldTurns = Math.round((first[0] - original[i - size]) / 360);
3441
+ const offset2 = 360 * worldTurns;
3442
+ if (!Number.isSafeInteger(worldTurns) || original[i - size] + offset2 !== first[0])
3443
+ throw new RangeError("Unrepresentable rhumb longitude chart");
3444
+ const last = path.end;
3445
+ const endTurns = Math.round((last[0] - original[i]) / 360);
3446
+ const translated = last[0] + offset2;
3447
+ const endpoint = original[i] + (offset2 + 360 * endTurns);
3448
+ last[0] = Number.isSafeInteger(endTurns) && Number.isFinite(endpoint) && Math.abs(endpoint - translated) <= 4 * Number.EPSILON * Math.max(360, Math.abs(translated)) ? endpoint : translated;
3449
+ if (path.length === 0) {
3450
+ last[0] = first[0];
3451
+ last[1] = first[1];
3452
+ }
3453
+ const sample = (fraction) => {
3454
+ if (fraction === 0)
3455
+ return first.slice();
3456
+ if (fraction === 1)
3457
+ return last.slice();
3458
+ const p = path.sample(fraction);
3459
+ p[0] += offset2;
3460
+ return p;
3461
+ };
3462
+ paths.push({ length: path.length, sample });
3463
+ positions.splice(i, size, ...sample(1));
3464
+ }
3465
+ return (0, import_polygon3.subdividePolyline)(positions, {
3466
+ ...subdivision,
3467
+ size,
3468
+ maxSegmentLength: maxSurfaceDistance,
3469
+ createEdgeSampler: (_start, _end, index) => paths[index]
3470
+ });
3471
+ }
3472
+
3473
+ // dist/geographic-seams/types.js
3474
+ var GeographicSeamError = class extends RangeError {
3475
+ constructor(reason, message) {
3476
+ super(message);
3477
+ this.reason = reason;
3478
+ this.name = "GeographicSeamError";
3479
+ }
3480
+ };
3481
+
3482
+ // dist/geographic-seams/edge.js
3483
+ var ANGULAR_TOLERANCE = 1e-10;
3484
+ var MAX_LONGITUDE = 65536;
3485
+ var wgs843;
3486
+ function getDefaultGeodesic2() {
3487
+ if (!wgs843)
3488
+ wgs843 = new EllipsoidGeodesic({ semiMajorAxis: WGS84_RADIUS_X, semiMinorAxis: WGS84_RADIUS_Z });
3489
+ return wgs843;
3490
+ }
3491
+ var Context = class {
3492
+ constructor(options) {
3493
+ this.options = options;
3494
+ this.work = 0;
3495
+ this.vertices = 0;
3496
+ this.longitudeAliases = /* @__PURE__ */ new Map();
3497
+ this.options = { ...options };
3498
+ this.size = this.options.size ?? 2;
3499
+ this.right = this.options.seamLongitude ?? 180;
3500
+ this.left = this.right - 360;
3501
+ this.iterations = this.options.maxIterations ?? 64;
3502
+ this.maxVertices = this.options.maxVertices ?? 65536;
3503
+ this.maxWork = this.options.maxWork ?? 1e6;
3504
+ if (!["linear", "geodesic", "rhumb"].includes(this.options.edgeModel) || this.options.linearLongitude !== void 0 && !["supplied", "shortest"].includes(this.options.linearLongitude) || !Number.isSafeInteger(this.size) || this.size < 2 || this.size > 64 || !Number.isFinite(this.right) || Math.abs(this.right) > MAX_LONGITUDE || !Number.isSafeInteger(this.maxVertices) || this.maxVertices < 1 || this.maxVertices > 4294967295 || !Number.isSafeInteger(this.maxWork) || this.maxWork < 1 || this.maxWork > 1e8 || !Number.isInteger(this.iterations) || this.iterations < 1 || this.iterations > 128)
3505
+ throw new GeographicSeamError("input", "Invalid seam model, dimensions or limits");
3506
+ }
3507
+ tick(n = 1) {
3508
+ this.work += n;
3509
+ if (this.work > this.maxWork)
3510
+ throw new GeographicSeamError("limit", "Exceeded maxWork");
3511
+ }
3512
+ canonicalLongitude(longitude) {
3513
+ while (this.longitudeAliases.has(longitude)) {
3514
+ this.tick();
3515
+ longitude = this.longitudeAliases.get(longitude);
3516
+ }
3517
+ return longitude;
3518
+ }
3519
+ aliasLongitude(from, to) {
3520
+ const a = this.canonicalLongitude(from), b = this.canonicalLongitude(to);
3521
+ if (a !== b)
3522
+ this.longitudeAliases.set(a, b);
3523
+ }
3524
+ projectLongitude(longitude, shift2) {
3525
+ const world = Math.round((longitude - this.right) / 360);
3526
+ const translated = longitude === this.right + 360 * world ? this.right + 360 * (world + shift2 / 360) : longitude + shift2;
3527
+ return this.canonicalLongitude(translated);
3528
+ }
3529
+ addVertices(n) {
3530
+ this.vertices += n;
3531
+ if (this.vertices > this.maxVertices)
3532
+ throw new GeographicSeamError("limit", "Exceeded maxVertices");
3533
+ }
3534
+ read(input) {
3535
+ if (!Number.isSafeInteger(input.length) || input.length < 0 || input.length % this.size)
3536
+ throw new GeographicSeamError("input", "Invalid packed geographic positions or vertex limit");
3537
+ this.addVertices(input.length / this.size);
3538
+ const result = [];
3539
+ for (let i = 0; i < input.length; i += this.size) {
3540
+ this.tick();
3541
+ const p = Array.from({ length: this.size }, (_, k) => input[i + k]);
3542
+ if (!p.every(Number.isFinite) || Math.abs(p[0]) > MAX_LONGITUDE || Math.abs(p[1]) > 90)
3543
+ throw new GeographicSeamError("input", "Expected finite positions, latitude in [-90,90], |longitude| <= 65536");
3544
+ result.push(p);
3545
+ }
3546
+ return result;
3547
+ }
3548
+ };
3549
+ function same(a, b) {
3550
+ return a.length === b.length && a.every((x, i) => x === b[i]);
3551
+ }
3552
+ function shortDifference(delta) {
3553
+ const value = delta % 360;
3554
+ return value > 180 ? value - 360 : value < -180 ? value + 360 : value;
3555
+ }
3556
+ function shortLongitudeTurns(a, b) {
3557
+ const delta = b - a, virtual = delta - b;
3558
+ const low = b - (delta - virtual) + (-a - virtual);
3559
+ const remainder = delta % 360;
3560
+ let turns = -Math.trunc(delta / 360);
3561
+ if (remainder > 180 || remainder === 180 && low > 0)
3562
+ turns--;
3563
+ if (remainder < -180 || remainder === -180 && low < 0)
3564
+ turns++;
3565
+ return turns;
3566
+ }
3567
+ function oppositeMeridians(a, b) {
3568
+ const x = shortDifference(b), y = -shortDifference(a), sum = x + y, virtual = sum - x;
3569
+ return Math.abs(sum) === 180 && x - (sum - virtual) + (y - virtual) === 0;
3570
+ }
3571
+ function worldAt(x, context) {
3572
+ let world = Math.floor((x - context.right) / 360) + 1;
3573
+ while (x < context.right + 360 * (world - 1))
3574
+ world--;
3575
+ while (x >= context.right + 360 * world)
3576
+ world++;
3577
+ return world;
3578
+ }
3579
+ function chartPoint(point, world, context) {
3580
+ const p = point.slice();
3581
+ p[0] -= 360 * world;
3582
+ const onLeft = point[0] === context.right + 360 * (world - 1);
3583
+ const onRight = point[0] === context.right + 360 * world;
3584
+ if (onLeft)
3585
+ p[0] = context.left;
3586
+ if (onRight)
3587
+ p[0] = context.right;
3588
+ if (!onLeft && p[0] === context.left || !onRight && p[0] === context.right)
3589
+ throw new GeographicSeamError("precision", "Longitude displacement cannot be represented in this chart");
3590
+ return p;
3591
+ }
3592
+ function straight(a, b) {
3593
+ return { a, b, source: null, sample: (t) => a.map((x, i) => x * (1 - t) + b[i] * t) };
3594
+ }
3595
+ function slice(edge, lo, hi) {
3596
+ const a = lo === 0 ? edge.a : lo === 1 ? edge.b : edge.sample(lo);
3597
+ const b = hi === 0 ? edge.a : hi === 1 ? edge.b : edge.sample(hi);
3598
+ const source = edge.source && {
3599
+ ...edge.source,
3600
+ startFraction: edge.source.startFraction + (edge.source.endFraction - edge.source.startFraction) * lo,
3601
+ endFraction: edge.source.startFraction + (edge.source.endFraction - edge.source.startFraction) * hi
3602
+ };
3603
+ return {
3604
+ a,
3605
+ b,
3606
+ source,
3607
+ sample: (t) => t === 0 ? a.slice() : t === 1 ? b.slice() : edge.sample(lo + (hi - lo) * t)
3608
+ };
3609
+ }
3610
+ function shift(edge, delta) {
3611
+ const move = (p) => [p[0] + delta, ...p.slice(1)];
3612
+ return {
3613
+ a: move(edge.a),
3614
+ b: move(edge.b),
3615
+ source: edge.source && { ...edge.source, longitudeShift: edge.source.longitudeShift + delta },
3616
+ sample: (t) => move(edge.sample(t))
3617
+ };
3618
+ }
3619
+ function createEdges(start, end, originalStart, edgeIndex, ringIndex, turns, context, splitLatitude = true) {
3620
+ context.tick();
3621
+ const { edgeModel, linearLongitude = "supplied" } = context.options;
3622
+ if (!Number.isSafeInteger(turns) || Math.abs(turns) > 128 || turns !== 0 && edgeModel !== "rhumb")
3623
+ throw new GeographicSeamError("input", "Turns require rhumb edges and |turns| <= 128");
3624
+ let offset2 = 360 * Math.round((start[0] - originalStart[0]) / 360);
3625
+ const source = {
3626
+ ringIndex,
3627
+ edgeIndex,
3628
+ startFraction: 0,
3629
+ endFraction: 1,
3630
+ longitudeShift: offset2
3631
+ };
3632
+ const first = start.slice(), last = end.slice();
3633
+ let horizontal;
3634
+ let critical;
3635
+ let pole;
3636
+ if (edgeModel === "linear") {
3637
+ last[0] = end[0] + (offset2 + (linearLongitude === "shortest" ? 360 * shortLongitudeTurns(originalStart[0], end[0]) : 0));
3638
+ horizontal = (t) => [first[0] * (1 - t) + last[0] * t, first[1] * (1 - t) + last[1] * t];
3639
+ } else if (edgeModel === "rhumb") {
3640
+ context.tick(2);
3641
+ const path = new RhumbPath(originalStart.slice(0, 2), last.slice(0, 2), {
3642
+ rhumb: context.options.rhumb,
3643
+ longitudeTurns: turns
3644
+ });
3645
+ last[0] = end[0] + (360 * Math.round((path.end[0] - end[0]) / 360) + offset2);
3646
+ horizontal = (t) => {
3647
+ const p = path.sample(t);
3648
+ p[0] += offset2;
3649
+ return p;
3650
+ };
3651
+ } else {
3652
+ context.tick(3);
3653
+ const solver = context.options.geodesic || getDefaultGeodesic2();
3654
+ const path = new GeodesicPath(originalStart.slice(0, 2), last.slice(0, 2), { geodesic: solver });
3655
+ if (Math.abs(first[1]) === 90) {
3656
+ context.tick(2);
3657
+ const incomingChart = new GeodesicPath(first.slice(0, 2), last.slice(0, 2), {
3658
+ geodesic: solver
3659
+ });
3660
+ offset2 = 360 * Math.round((incomingChart.end[0] - path.end[0]) / 360);
3661
+ source.longitudeShift = offset2;
3662
+ }
3663
+ last[0] = end[0] + (360 * Math.round((path.end[0] - end[0]) / 360) + offset2);
3664
+ horizontal = (t) => {
3665
+ const p = path.sample(t);
3666
+ p[0] += offset2;
3667
+ return p;
3668
+ };
3669
+ if (Math.abs(first[1]) === 90)
3670
+ first[0] = last[0];
3671
+ if (Math.abs(last[1]) === 90)
3672
+ last[0] = first[0];
3673
+ const inverse = solver.inverse(originalStart[1], originalStart[0], end[1], end[0]);
3674
+ const c1 = Math.cos(inverse.azi1 * Math.PI / 180), c2 = Math.cos(inverse.azi2 * Math.PI / 180);
3675
+ if (path.length > 0 && oppositeMeridians(originalStart[0], end[0]) && (inverse.azi1 === 0 || Math.abs(inverse.azi1) === 180) && Math.abs(first[1]) !== 90 && Math.abs(last[1]) !== 90) {
3676
+ const latitude = c1 > 0 ? 90 : -90;
3677
+ context.tick(2);
3678
+ const fraction = solver.inverse(start[1], start[0], latitude, start[0]).s12 / path.length;
3679
+ if (fraction > 0 && fraction < 1 && Math.abs(path.sample(fraction)[1] - latitude) < ANGULAR_TOLERANCE)
3680
+ pole = { fraction, latitude };
3681
+ } else if (splitLatitude && c1 * c2 < 0 && path.length > 0) {
3682
+ context.tick();
3683
+ const line = solver.line(originalStart[1], originalStart[0], inverse.azi1, {
3684
+ unrollLongitude: true
3685
+ });
3686
+ let lo = 0, hi = 1;
3687
+ for (let i = 0; i < 64; i++) {
3688
+ context.tick();
3689
+ const mid = (lo + hi) / 2;
3690
+ const c = Math.cos(line.position(path.length * mid).azi2 * Math.PI / 180);
3691
+ if (c > 0 === c1 > 0)
3692
+ lo = mid;
3693
+ else
3694
+ hi = mid;
3695
+ }
3696
+ critical = (lo + hi) / 2;
3697
+ }
3698
+ }
3699
+ if (Math.abs(last[0]) > MAX_LONGITUDE)
3700
+ throw new GeographicSeamError("input", "Unrolled longitude exceeds the declared seam profile");
3701
+ const sample = (t) => {
3702
+ context.tick();
3703
+ const p = t === 0 ? first.slice(0, 2) : t === 1 ? last.slice(0, 2) : horizontal(t);
3704
+ for (let i = 2; i < first.length; i++)
3705
+ p[i] = first[i] * (1 - t) + last[i] * t;
3706
+ if (!p.every(Number.isFinite))
3707
+ throw new GeographicSeamError("precision", "Nonfinite edge sample");
3708
+ return p;
3709
+ };
3710
+ const edge = { a: first, b: last, source, sample };
3711
+ if (pole) {
3712
+ const incoming = slice(edge, 0, pole.fraction), outgoing = slice(edge, pole.fraction, 1);
3713
+ incoming.b = [first[0], pole.latitude, ...sample(pole.fraction).slice(2)];
3714
+ outgoing.a = [last[0], pole.latitude, ...incoming.b.slice(2)];
3715
+ const incomingSample = incoming.sample, outgoingSample = outgoing.sample;
3716
+ incoming.sample = (t) => t === 1 ? incoming.b.slice() : incomingSample(t);
3717
+ outgoing.sample = (t) => t === 0 ? outgoing.a.slice() : outgoingSample(t);
3718
+ return [incoming, straight(incoming.b, outgoing.a), outgoing];
3719
+ }
3720
+ return critical !== void 0 && critical > 0 && critical < 1 ? [slice(edge, 0, critical), slice(edge, critical, 1)] : [edge];
3721
+ }
3722
+ function root(edge, axis, value, context) {
3723
+ if (edge.a[axis] === value)
3724
+ return 0;
3725
+ if (edge.b[axis] === value)
3726
+ return 1;
3727
+ if (!(value > Math.min(edge.a[axis], edge.b[axis]) && value < Math.max(edge.a[axis], edge.b[axis])))
3728
+ throw new GeographicSeamError("precision", "Unbracketed seam root");
3729
+ let lo = 0, hi = 1, a = edge.a, b = edge.b;
3730
+ for (let i = 0; i < context.iterations; i++) {
3731
+ context.tick();
3732
+ const t = (lo + hi) / 2, p = edge.sample(t);
3733
+ if (p[axis] === value)
3734
+ return t;
3735
+ if (hi - lo <= 4 * Number.EPSILON && Math.abs(a[0] - b[0]) * Math.max(Math.abs(Math.cos(a[1] * Math.PI / 180)), Math.abs(Math.cos(b[1] * Math.PI / 180))) <= ANGULAR_TOLERANCE && Math.abs(a[1] - b[1]) <= ANGULAR_TOLERANCE)
3736
+ return t;
3737
+ if (t === lo || t === hi)
3738
+ break;
3739
+ if (p[axis] < value === edge.a[axis] < edge.b[axis]) {
3740
+ lo = t;
3741
+ a = p;
3742
+ } else {
3743
+ hi = t;
3744
+ b = p;
3745
+ }
3746
+ }
3747
+ throw new GeographicSeamError("precision", "Seam root exhausted its precision/iteration budget");
3748
+ }
3749
+ function cut(edge, context) {
3750
+ const low = Math.min(edge.a[0], edge.b[0]), high = Math.max(edge.a[0], edge.b[0]);
3751
+ const fractions = [0, 1];
3752
+ for (let k = worldAt(low, context); context.right + 360 * k < high; k++) {
3753
+ context.tick();
3754
+ fractions.push(root(edge, 0, context.right + 360 * k, context));
3755
+ if (fractions.length > context.maxVertices)
3756
+ throw new GeographicSeamError("limit", "Too many seam crossings");
3757
+ }
3758
+ fractions.sort((a, b) => a - b);
3759
+ const result = [];
3760
+ for (let i = 1; i < fractions.length; i++) {
3761
+ context.tick();
3762
+ context.addVertices(2);
3763
+ const piece = slice(edge, fractions[i - 1], fractions[i]);
3764
+ for (const p of [piece.a, piece.b]) {
3765
+ const k = Math.round((p[0] - context.right) / 360), boundary = context.right + 360 * k;
3766
+ if (fractions[i - 1] !== 0 && p === piece.a || fractions[i] !== 1 && p === piece.b)
3767
+ p[0] = boundary;
3768
+ }
3769
+ const onBoundary = (x) => x === context.right + 360 * Math.round((x - context.right) / 360);
3770
+ const reference = !onBoundary(piece.a[0]) ? piece.a[0] : !onBoundary(piece.b[0]) ? piece.b[0] : (piece.a[0] + piece.b[0]) / 2;
3771
+ const world = worldAt(reference, context);
3772
+ const shifted = shift(piece, -360 * world);
3773
+ shifted.a = chartPoint(piece.a, world, context);
3774
+ shifted.b = chartPoint(piece.b, world, context);
3775
+ const previousSample = shifted.sample;
3776
+ shifted.sample = (t) => t === 0 ? shifted.a.slice() : t === 1 ? shifted.b.slice() : previousSample(t);
3777
+ result.push({ edge: shifted, world });
3778
+ }
3779
+ return result;
3780
+ }
3781
+
3782
+ // dist/geographic-seams/polygon.js
3783
+ function winding(edges, point, context, side, generatedBoundary = true, longitudeShift = 0) {
3784
+ let value = 0, boundary = false;
3785
+ for (const edge of edges) {
3786
+ context.tick();
3787
+ const a = edge.a, b = edge.b;
3788
+ if (a[1] === b[1]) {
3789
+ if ((generatedBoundary || edge.source) && point[1] === a[1] && point[0] >= Math.min(context.projectLongitude(a[0], longitudeShift), context.projectLongitude(b[0], longitudeShift)) && point[0] <= Math.max(context.projectLongitude(a[0], longitudeShift), context.projectLongitude(b[0], longitudeShift)))
3790
+ boundary = true;
3791
+ continue;
3792
+ }
3793
+ if (point[1] >= Math.min(a[1], b[1]) && point[1] <= Math.max(a[1], b[1])) {
3794
+ const t = root(edge, 1, point[1], context), x = context.projectLongitude(edge.sample(t)[0], longitudeShift);
3795
+ if ((generatedBoundary || edge.source) && Math.abs(x - point[0]) <= ANGULAR_TOLERANCE)
3796
+ boundary = true;
3797
+ if (a[1] > point[1] !== b[1] > point[1] && (side === "left" ? x >= point[0] : x > point[0]))
3798
+ value += b[1] > a[1] ? 1 : -1;
3799
+ }
3800
+ }
3801
+ return { value, boundary };
3802
+ }
3803
+ function contains(ring, p, context, side) {
3804
+ context.tick();
3805
+ for (let k = Math.ceil((ring.min - p[0]) / 360) - 1; k <= Math.floor((ring.max - p[0]) / 360) + 1; k++) {
3806
+ context.tick();
3807
+ if (winding(ring.membership, p, context, side, false, -360 * k).value !== 0)
3808
+ return true;
3809
+ }
3810
+ return false;
3811
+ }
3812
+ function filled(rings, p, context, side) {
3813
+ return contains(rings[0], p, context, side) && !rings.slice(1).some((r) => contains(r, p, context, side));
3814
+ }
3815
+ function prepare(input, index, context) {
3816
+ const positions = context.read(input.positions);
3817
+ if (positions.length > 1 && positions[0][0] === positions[positions.length - 1][0] && positions[0][1] === positions[positions.length - 1][1]) {
3818
+ if (!same(positions[0], positions[positions.length - 1]))
3819
+ throw new GeographicSeamError("input", "Closing polygon attributes must match");
3820
+ positions.pop();
3821
+ }
3822
+ if (new Set(positions.map((p) => `${p[0]},${p[1]}`)).size < 3)
3823
+ throw new GeographicSeamError("topology", "Polygon ring needs three distinct positions");
3824
+ const turns = input.longitudeTurns ? Array.from(input.longitudeTurns) : new Array(positions.length).fill(0);
3825
+ if (turns.length !== positions.length)
3826
+ throw new GeographicSeamError("input", "Expected a turn count per ring edge");
3827
+ const edges = [];
3828
+ let cursor = positions[0];
3829
+ for (let i = 0; i < positions.length; i++) {
3830
+ const end = positions[(i + 1) % positions.length];
3831
+ const pieces = createEdges(cursor, end, positions[i], i, index, turns[i], context);
3832
+ if (edges.length && !same(cursor, pieces[0].a)) {
3833
+ if (Math.abs(cursor[1]) !== 90 || cursor[1] !== pieces[0].a[1])
3834
+ throw new GeographicSeamError("precision", "Discontinuous ring edge");
3835
+ edges.push(straight(cursor, pieces[0].a));
3836
+ }
3837
+ for (const edge of pieces) {
3838
+ if (edge.a[0] === edge.b[0] && edge.a[1] === edge.b[1]) {
3839
+ if (!same(edge.a, edge.b))
3840
+ throw new GeographicSeamError("topology", "Zero-length polygon edge changes attributes");
3841
+ } else
3842
+ edges.push(edge);
3843
+ }
3844
+ cursor = pieces[pieces.length - 1].b;
3845
+ }
3846
+ if (!edges.length)
3847
+ throw new GeographicSeamError("topology", "Empty polygon boundary");
3848
+ const first = edges[0].a;
3849
+ if (Math.abs(first[1]) === 90) {
3850
+ const closing = first.slice();
3851
+ closing[0] += 360 * Math.round((cursor[0] - first[0]) / 360);
3852
+ if (!same(cursor, closing))
3853
+ edges.push(straight(cursor, closing));
3854
+ cursor = closing;
3855
+ }
3856
+ const turnsAround = Math.round((cursor[0] - first[0]) / 360);
3857
+ if (Math.abs(cursor[0] - first[0] - 360 * turnsAround) > ANGULAR_TOLERANCE || cursor[1] !== first[1] || Math.abs(turnsAround) > 1)
3858
+ throw new GeographicSeamError("topology", "Unsupported ring winding");
3859
+ let min = Infinity, max = -Infinity;
3860
+ for (const e of edges) {
3861
+ min = Math.min(min, e.a[0], e.b[0]);
3862
+ max = Math.max(max, e.a[0], e.b[0]);
3863
+ }
3864
+ if (max - min > 360 + ANGULAR_TOLERANCE)
3865
+ throw new GeographicSeamError("topology", "Ring exceeds a single longitude chart");
3866
+ const membership = edges.slice();
3867
+ const poleAttributes = input.poleAttributes ? Array.from(input.poleAttributes) : [];
3868
+ if (turnsAround !== 0) {
3869
+ if (!["north", "south"].includes(input.pole) || edges.some((e) => Math.abs(e.a[1]) === 90 || (e.b[0] - e.a[0]) * turnsAround < 0))
3870
+ throw new GeographicSeamError("topology", "Polar rings require an explicit pole and monotone longitude winding");
3871
+ if (poleAttributes.length !== context.size - 2 || !poleAttributes.every(Number.isFinite))
3872
+ throw new GeographicSeamError("input", "Explicit poleAttributes are required for polar attributes");
3873
+ const latitude = input.pole === "north" ? 90 : -90;
3874
+ const a = [cursor[0], latitude, ...poleAttributes], b = [first[0], latitude, ...poleAttributes];
3875
+ membership.push(straight(cursor, a), straight(a, b), straight(b, first));
3876
+ } else if (input.pole !== void 0 || poleAttributes.length) {
3877
+ throw new GeographicSeamError("input", "Pole selection applies only to once-winding polar rings");
3878
+ }
3879
+ return { edges, membership, min, max, pole: input.pole, poleAttributes };
3880
+ }
3881
+ function reverse(edge) {
3882
+ return {
3883
+ a: edge.b,
3884
+ b: edge.a,
3885
+ sample: (t) => edge.sample(1 - t),
3886
+ source: edge.source && {
3887
+ ...edge.source,
3888
+ startFraction: edge.source.endFraction,
3889
+ endFraction: edge.source.startFraction
3890
+ }
3891
+ };
3892
+ }
3893
+ function canonicalAlias(edge, context) {
3894
+ const move = (p) => {
3895
+ const longitude = context.canonicalLongitude(p[0]);
3896
+ return longitude === p[0] ? p : [longitude, ...p.slice(1)];
3897
+ };
3898
+ return { ...edge, a: move(edge.a), b: move(edge.b), sample: (t) => move(edge.sample(t)) };
3899
+ }
3900
+ function interior(edges, context) {
3901
+ const ys = Array.from(new Set(edges.flatMap((e) => [e.a[1], e.b[1]]))).sort((a, b) => a - b);
3902
+ let index = 1;
3903
+ for (let i = 2; i < ys.length; i++)
3904
+ if (ys[i] - ys[i - 1] > ys[index] - ys[index - 1])
3905
+ index = i;
3906
+ if (ys.length < 2 || ys[index] - ys[index - 1] < 8 * ANGULAR_TOLERANCE)
3907
+ throw new GeographicSeamError("precision", "Polygon height below the topology budget");
3908
+ const y = (ys[index] + ys[index - 1]) / 2, xs = [];
3909
+ for (const edge of edges) {
3910
+ context.tick();
3911
+ if (edge.a[1] > y !== edge.b[1] > y)
3912
+ xs.push(edge.sample(root(edge, 1, y, context))[0]);
3913
+ }
3914
+ xs.sort((a, b) => a - b);
3915
+ for (let i = 1; i < xs.length; i++) {
3916
+ context.tick();
3917
+ if (xs[i] - xs[i - 1] < 8 * ANGULAR_TOLERANCE)
3918
+ continue;
3919
+ const point = [(xs[i] + xs[i - 1]) / 2, y], w = winding(edges, point, context);
3920
+ if (w.value && !w.boundary) {
3921
+ if (Math.abs(w.value) !== 1)
3922
+ throw new GeographicSeamError("topology", "Non-simple polygon winding");
3923
+ return { point, sign: Math.sign(w.value) };
3924
+ }
3925
+ }
3926
+ throw new GeographicSeamError("topology", "No resolvable polygon interior");
3927
+ }
3928
+ function output(edges, sign, context) {
3929
+ if (interior(edges, context).sign !== sign)
3930
+ edges = edges.slice().reverse().map(reverse);
3931
+ context.addVertices(edges.length + 1);
3932
+ return {
3933
+ positions: new Float64Array([...edges.flatMap((e) => e.a), ...edges[0].a]),
3934
+ edges: edges.map((e) => e.source && { ...e.source })
3935
+ };
3936
+ }
3937
+ function splitGeographicPolygon(inputs, options) {
3938
+ const context = new Context(options);
3939
+ if (!inputs.length)
3940
+ return [];
3941
+ context.tick(inputs.length);
3942
+ const rings = inputs.map((ring, i) => prepare(ring, i, context));
3943
+ const graph = [], nodes = /* @__PURE__ */ new Map();
3944
+ const key = (p) => `${p[0]},${p[1]}`;
3945
+ const add = (edge) => {
3946
+ context.tick();
3947
+ if (edge.a[0] === edge.b[0] && edge.a[1] === edge.b[1])
3948
+ return;
3949
+ const id = graph.length;
3950
+ graph.push(edge);
3951
+ for (const p of [edge.a, edge.b]) {
3952
+ const k = key(p), node = nodes.get(k);
3953
+ if (node) {
3954
+ if (!same(node.p, p))
3955
+ throw new GeographicSeamError("topology", "Touching boundaries have inconsistent attributes");
3956
+ node.edges.push(id);
3957
+ } else
3958
+ nodes.set(k, { p, edges: [id] });
3959
+ }
3960
+ };
3961
+ const pieces = [];
3962
+ const meridians = /* @__PURE__ */ new Map();
3963
+ for (const ring of rings) {
3964
+ if (ring.max - ring.min === 360) {
3965
+ const low = chartPoint([ring.min, 0], worldAt(ring.min, context), context)[0];
3966
+ const high = chartPoint([ring.max, 0], worldAt(ring.max, context), context)[0];
3967
+ const roundoff = 4 * Number.EPSILON * Math.max(360, Math.abs(ring.min), Math.abs(ring.max), Math.abs(context.left), Math.abs(context.right));
3968
+ if (Math.abs(high - low) > Math.min(roundoff, ANGULAR_TOLERANCE))
3969
+ throw new GeographicSeamError("precision", "Unresolvable full-width longitude alias");
3970
+ if (high === context.left)
3971
+ context.aliasLongitude(low, high);
3972
+ else
3973
+ context.aliasLongitude(high, low);
3974
+ }
3975
+ }
3976
+ for (const ring of rings) {
3977
+ for (const original of ring.edges)
3978
+ for (const { edge: part } of cut(original, context)) {
3979
+ const edge = canonicalAlias(part, context);
3980
+ pieces.push(edge);
3981
+ if (edge.a[0] === edge.b[0]) {
3982
+ const events = meridians.get(edge.a[0]) || /* @__PURE__ */ new Set();
3983
+ events.add(edge.a[1]);
3984
+ events.add(edge.b[1]);
3985
+ meridians.set(edge.a[0], events);
3986
+ }
3987
+ }
3988
+ }
3989
+ for (const edge of pieces) {
3990
+ if (edge.a[0] !== edge.b[0]) {
3991
+ add(edge);
3992
+ continue;
3993
+ }
3994
+ const fractions = [0, 1];
3995
+ const latitudes = /* @__PURE__ */ new Map();
3996
+ for (const y of meridians.get(edge.a[0])) {
3997
+ context.tick();
3998
+ if (y > Math.min(edge.a[1], edge.b[1]) && y < Math.max(edge.a[1], edge.b[1])) {
3999
+ const fraction = root(edge, 1, y, context);
4000
+ if (latitudes.has(fraction) && latitudes.get(fraction) !== y)
4001
+ throw new GeographicSeamError("precision", "Unresolvable meridian event separation");
4002
+ fractions.push(fraction);
4003
+ latitudes.set(fraction, y);
4004
+ }
4005
+ }
4006
+ fractions.sort((a, b) => a - b);
4007
+ for (let i = 1; i < fractions.length; i++) {
4008
+ context.tick();
4009
+ const piece = slice(edge, fractions[i - 1], fractions[i]);
4010
+ if (latitudes.has(fractions[i - 1]))
4011
+ piece.a[1] = latitudes.get(fractions[i - 1]);
4012
+ if (latitudes.has(fractions[i]))
4013
+ piece.b[1] = latitudes.get(fractions[i]);
4014
+ if (fractions.length > 2)
4015
+ context.addVertices(2);
4016
+ const x = piece.a[0], latitude = (piece.a[1] + piece.b[1]) / 2;
4017
+ const seam = x === context.left;
4018
+ const ring = piece.source && rings[piece.source.ringIndex];
4019
+ if (ring && ring.max - ring.min >= 360 - ANGULAR_TOLERANCE && contains(ring, [x, latitude], context, seam ? "right" : "left") && contains(ring, [seam ? context.right : x, latitude], context, seam ? "left" : "right"))
4020
+ continue;
4021
+ const left = filled(rings, [x, latitude], context, seam ? "right" : "left");
4022
+ const right = filled(rings, [seam ? context.right : x, latitude], context, seam ? "left" : "right");
4023
+ if (left && right)
4024
+ continue;
4025
+ if (!left && !right)
4026
+ throw new GeographicSeamError("topology", "Unresolvable meridian-coincident boundary");
4027
+ if (seam && !left) {
4028
+ const assigned = shift(piece, 360), sample = assigned.sample;
4029
+ assigned.a[0] = assigned.b[0] = context.right;
4030
+ assigned.sample = (t) => {
4031
+ const p = sample(t);
4032
+ p[0] = context.right;
4033
+ return p;
4034
+ };
4035
+ add(assigned);
4036
+ } else
4037
+ add(piece);
4038
+ }
4039
+ }
4040
+ const pole = rings[0].pole;
4041
+ if (pole && !rings.slice(1).some((r) => r.pole === pole)) {
4042
+ const latitude = pole === "north" ? 90 : -90;
4043
+ add(straight([context.left, latitude, ...rings[0].poleAttributes], [context.right, latitude, ...rings[0].poleAttributes]));
4044
+ }
4045
+ for (const boundary of [context.left, context.right]) {
4046
+ const boundaryNodes = Array.from(nodes.values()).filter((n) => n.p[0] === boundary).sort((a, b) => a.p[1] - b.p[1]);
4047
+ const aligned = graph.filter((e) => e.a[0] === boundary && e.b[0] === boundary);
4048
+ for (let i = 1; i < boundaryNodes.length; i++) {
4049
+ context.tick();
4050
+ const a = boundaryNodes[i - 1].p, b = boundaryNodes[i].p, latitude = (a[1] + b[1]) / 2;
4051
+ if (latitude === a[1] || latitude === b[1])
4052
+ throw new GeographicSeamError("precision", "Unresolvable seam event separation");
4053
+ if (filled(rings, [boundary, latitude], context, boundary === context.left ? "right" : "left") && !aligned.some((e) => {
4054
+ context.tick();
4055
+ return latitude > Math.min(e.a[1], e.b[1]) && latitude < Math.max(e.a[1], e.b[1]);
4056
+ }))
4057
+ add(straight(a, b));
4058
+ }
4059
+ }
4060
+ for (const node of nodes.values())
4061
+ if (node.edges.length !== 2)
4062
+ throw new GeographicSeamError("topology", "Touching, coincident or unresolved polygon boundaries");
4063
+ const used = /* @__PURE__ */ new Set(), cycles = [];
4064
+ for (let seed = 0; seed < graph.length; seed++) {
4065
+ if (used.has(seed))
4066
+ continue;
4067
+ const cycle = [], start = key(graph[seed].a);
4068
+ let id = seed, current = start;
4069
+ do {
4070
+ context.tick();
4071
+ if (used.has(id))
4072
+ throw new GeographicSeamError("topology", "Non-simple boundary graph");
4073
+ used.add(id);
4074
+ const edge = key(graph[id].a) === current ? graph[id] : reverse(graph[id]);
4075
+ cycle.push(edge);
4076
+ current = key(edge.b);
4077
+ const adjacent = nodes.get(current).edges;
4078
+ id = adjacent[0] === id ? adjacent[1] : adjacent[0];
4079
+ } while (current !== start);
4080
+ if (cycle.length < 3)
4081
+ throw new GeographicSeamError("topology", "Degenerate polygon component");
4082
+ cycles.push(cycle);
4083
+ }
4084
+ const parents = cycles.map((cycle, i) => {
4085
+ const containers = [];
4086
+ for (let j = 0; j < cycles.length; j++)
4087
+ if (j !== i) {
4088
+ const w = winding(cycles[j], cycle[0].a, context);
4089
+ if (w.boundary)
4090
+ throw new GeographicSeamError("topology", "Polygon components touch");
4091
+ if (w.value)
4092
+ containers.push(j);
4093
+ }
4094
+ if (containers.length > 1)
4095
+ throw new GeographicSeamError("topology", "Nested holes or overlapping polygon components");
4096
+ return containers[0];
4097
+ });
4098
+ const sign = interior(rings[0].membership, context).sign;
4099
+ const result = [], groups = /* @__PURE__ */ new Map();
4100
+ for (let i = 0; i < cycles.length; i++)
4101
+ if (parents[i] === void 0) {
4102
+ if (cycles[i].every((e) => e.source && e.source.ringIndex !== 0))
4103
+ throw new GeographicSeamError("topology", "Hole is outside the outer ring");
4104
+ const polygon = { rings: [output(cycles[i], sign, context)] };
4105
+ result.push(polygon);
4106
+ groups.set(i, polygon);
4107
+ }
4108
+ for (let i = 0; i < cycles.length; i++)
4109
+ if (parents[i] !== void 0) {
4110
+ const group = groups.get(parents[i]);
4111
+ if (!group)
4112
+ throw new GeographicSeamError("topology", "Nested polygon rings");
4113
+ group.rings.push(output(cycles[i], -sign, context));
4114
+ }
4115
+ return result;
4116
+ }
4117
+
4118
+ // dist/geographic-seams.js
4119
+ function splitGeographicPolyline(input, options) {
4120
+ const context = new Context(options), points = context.read(input);
4121
+ const turns = options.longitudeTurns ? Array.from(options.longitudeTurns) : new Array(Math.max(0, points.length - 1)).fill(0);
4122
+ if (turns.length !== Math.max(0, points.length - 1))
4123
+ throw new GeographicSeamError("input", "Expected one turn count per line edge");
4124
+ if (!points.length)
4125
+ return [];
4126
+ if (points.length === 1) {
4127
+ context.addVertices(1);
4128
+ const world = worldAt(points[0][0], context), p = chartPoint(points[0], world, context);
4129
+ return [{ positions: new Float64Array(p), edges: [], world }];
4130
+ }
4131
+ const parts = [];
4132
+ let cursor = points[0];
4133
+ for (let i = 1; i < points.length; i++) {
4134
+ const edges = createEdges(cursor, points[i], points[i - 1], i - 1, 0, turns[i - 1], context, false);
4135
+ for (const original of edges) {
4136
+ if (!original.source)
4137
+ continue;
4138
+ for (const { edge, world } of cut(original, context)) {
4139
+ const previous = parts[parts.length - 1];
4140
+ if (previous && previous.world === world && same(previous.points[previous.points.length - 1], edge.a)) {
4141
+ previous.points.push(edge.b);
4142
+ previous.edges.push(edge.source);
4143
+ } else
4144
+ parts.push({ points: [edge.a, edge.b], edges: [edge.source], world });
4145
+ }
4146
+ }
4147
+ cursor = edges[edges.length - 1].b;
4148
+ }
4149
+ return parts.map((part) => ({
4150
+ positions: new Float64Array(part.points.flat()),
4151
+ edges: part.edges,
4152
+ world: part.world
4153
+ }));
4154
+ }
4155
+ //# sourceMappingURL=globe.cjs.map