@math.gl/geospatial 5.0.0-alpha.19 → 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.
- package/GEOGRAPHICLIB-LICENSE.txt +27 -0
- package/LICENSE +264 -73
- package/README.md +6 -1
- package/THIRD-PARTY-NOTICES.md +95 -0
- package/dist/constants.js +1 -1
- package/dist/constants.js.map +1 -1
- package/dist/discontinuous/air-ocean-mesh.d.ts +15 -0
- package/dist/discontinuous/air-ocean-mesh.d.ts.map +1 -0
- package/dist/discontinuous/air-ocean-mesh.js +75 -0
- package/dist/discontinuous/air-ocean-mesh.js.map +1 -0
- package/dist/discontinuous/albers-usa.d.ts +9 -0
- package/dist/discontinuous/albers-usa.d.ts.map +1 -0
- package/dist/discontinuous/albers-usa.js +105 -0
- package/dist/discontinuous/albers-usa.js.map +1 -0
- package/dist/discontinuous/cap-map.d.ts +23 -0
- package/dist/discontinuous/cap-map.d.ts.map +1 -0
- package/dist/discontinuous/cap-map.js +314 -0
- package/dist/discontinuous/cap-map.js.map +1 -0
- package/dist/discontinuous/elastic/data.d.ts +26 -0
- package/dist/discontinuous/elastic/data.d.ts.map +1 -0
- package/dist/discontinuous/elastic/data.js +72 -0
- package/dist/discontinuous/elastic/data.js.map +1 -0
- package/dist/discontinuous/elastic/elasticI.d.ts +3 -0
- package/dist/discontinuous/elastic/elasticI.d.ts.map +1 -0
- package/dist/discontinuous/elastic/elasticI.js +5233 -0
- package/dist/discontinuous/elastic/elasticI.js.map +1 -0
- package/dist/discontinuous/elastic/elasticII.d.ts +3 -0
- package/dist/discontinuous/elastic/elasticII.d.ts.map +1 -0
- package/dist/discontinuous/elastic/elasticII.js +18162 -0
- package/dist/discontinuous/elastic/elasticII.js.map +1 -0
- package/dist/discontinuous/elastic/elasticIII.d.ts +3 -0
- package/dist/discontinuous/elastic/elasticIII.d.ts.map +1 -0
- package/dist/discontinuous/elastic/elasticIII.js +29566 -0
- package/dist/discontinuous/elastic/elasticIII.js.map +1 -0
- package/dist/discontinuous/elastic/geometry.d.ts +22 -0
- package/dist/discontinuous/elastic/geometry.d.ts.map +1 -0
- package/dist/discontinuous/elastic/geometry.js +131 -0
- package/dist/discontinuous/elastic/geometry.js.map +1 -0
- package/dist/discontinuous/elastic/grid.d.ts +15 -0
- package/dist/discontinuous/elastic/grid.d.ts.map +1 -0
- package/dist/discontinuous/elastic/grid.js +177 -0
- package/dist/discontinuous/elastic/grid.js.map +1 -0
- package/dist/discontinuous/elastic/map.d.ts +8 -0
- package/dist/discontinuous/elastic/map.d.ts.map +1 -0
- package/dist/discontinuous/elastic/map.js +260 -0
- package/dist/discontinuous/elastic/map.js.map +1 -0
- package/dist/discontinuous/gray-fuller.d.ts +5 -0
- package/dist/discontinuous/gray-fuller.d.ts.map +1 -0
- package/dist/discontinuous/gray-fuller.js +36 -0
- package/dist/discontinuous/gray-fuller.js.map +1 -0
- package/dist/discontinuous/gringorten-kernel.d.ts +5 -0
- package/dist/discontinuous/gringorten-kernel.d.ts.map +1 -0
- package/dist/discontinuous/gringorten-kernel.js +94 -0
- package/dist/discontinuous/gringorten-kernel.js.map +1 -0
- package/dist/discontinuous/healpix.d.ts +13 -0
- package/dist/discontinuous/healpix.d.ts.map +1 -0
- package/dist/discontinuous/healpix.js +61 -0
- package/dist/discontinuous/healpix.js.map +1 -0
- package/dist/discontinuous/layout.d.ts +72 -0
- package/dist/discontinuous/layout.d.ts.map +1 -0
- package/dist/discontinuous/layout.js +114 -0
- package/dist/discontinuous/layout.js.map +1 -0
- package/dist/discontinuous/map-engine.d.ts +197 -0
- package/dist/discontinuous/map-engine.d.ts.map +1 -0
- package/dist/discontinuous/map-engine.js +356 -0
- package/dist/discontinuous/map-engine.js.map +1 -0
- package/dist/discontinuous/map-layout.d.ts +93 -0
- package/dist/discontinuous/map-layout.d.ts.map +1 -0
- package/dist/discontinuous/map-layout.js +490 -0
- package/dist/discontinuous/map-layout.js.map +1 -0
- package/dist/discontinuous/map-transition.d.ts +42 -0
- package/dist/discontinuous/map-transition.d.ts.map +1 -0
- package/dist/discontinuous/map-transition.js +283 -0
- package/dist/discontinuous/map-transition.js.map +1 -0
- package/dist/discontinuous/math.d.ts +19 -0
- package/dist/discontinuous/math.d.ts.map +1 -0
- package/dist/discontinuous/math.js +65 -0
- package/dist/discontinuous/math.js.map +1 -0
- package/dist/discontinuous/mercator-map.d.ts +22 -0
- package/dist/discontinuous/mercator-map.d.ts.map +1 -0
- package/dist/discontinuous/mercator-map.js +130 -0
- package/dist/discontinuous/mercator-map.js.map +1 -0
- package/dist/discontinuous/myriahedral/graticule.d.ts +6 -0
- package/dist/discontinuous/myriahedral/graticule.d.ts.map +1 -0
- package/dist/discontinuous/myriahedral/graticule.js +37 -0
- package/dist/discontinuous/myriahedral/graticule.js.map +1 -0
- package/dist/discontinuous/myriahedral/mesh.d.ts +18 -0
- package/dist/discontinuous/myriahedral/mesh.d.ts.map +1 -0
- package/dist/discontinuous/myriahedral/mesh.js +131 -0
- package/dist/discontinuous/myriahedral/mesh.js.map +1 -0
- package/dist/discontinuous/myriahedral/unfold.d.ts +36 -0
- package/dist/discontinuous/myriahedral/unfold.d.ts.map +1 -0
- package/dist/discontinuous/myriahedral/unfold.js +172 -0
- package/dist/discontinuous/myriahedral/unfold.js.map +1 -0
- package/dist/discontinuous/myriahedral.d.ts +56 -0
- package/dist/discontinuous/myriahedral.d.ts.map +1 -0
- package/dist/discontinuous/myriahedral.js +204 -0
- package/dist/discontinuous/myriahedral.js.map +1 -0
- package/dist/discontinuous/petroff.d.ts +8 -0
- package/dist/discontinuous/petroff.d.ts.map +1 -0
- package/dist/discontinuous/petroff.js +159 -0
- package/dist/discontinuous/petroff.js.map +1 -0
- package/dist/discontinuous/polyhedral.d.ts +8 -0
- package/dist/discontinuous/polyhedral.d.ts.map +1 -0
- package/dist/discontinuous/polyhedral.js +117 -0
- package/dist/discontinuous/polyhedral.js.map +1 -0
- package/dist/discontinuous/prepare-features.d.ts +78 -0
- package/dist/discontinuous/prepare-features.d.ts.map +1 -0
- package/dist/discontinuous/prepare-features.js +146 -0
- package/dist/discontinuous/prepare-features.js.map +1 -0
- package/dist/discontinuous/presets.d.ts +71 -0
- package/dist/discontinuous/presets.d.ts.map +1 -0
- package/dist/discontinuous/presets.js +372 -0
- package/dist/discontinuous/presets.js.map +1 -0
- package/dist/discontinuous/projection-catalog.d.ts +33 -0
- package/dist/discontinuous/projection-catalog.d.ts.map +1 -0
- package/dist/discontinuous/projection-catalog.js +96 -0
- package/dist/discontinuous/projection-catalog.js.map +1 -0
- package/dist/discontinuous/quincuncial-kernel.d.ts +9 -0
- package/dist/discontinuous/quincuncial-kernel.d.ts.map +1 -0
- package/dist/discontinuous/quincuncial-kernel.js +139 -0
- package/dist/discontinuous/quincuncial-kernel.js.map +1 -0
- package/dist/discontinuous/quincuncial-star.d.ts +29 -0
- package/dist/discontinuous/quincuncial-star.d.ts.map +1 -0
- package/dist/discontinuous/quincuncial-star.js +307 -0
- package/dist/discontinuous/quincuncial-star.js.map +1 -0
- package/dist/discontinuous/regional-map.d.ts +18 -0
- package/dist/discontinuous/regional-map.d.ts.map +1 -0
- package/dist/discontinuous/regional-map.js +193 -0
- package/dist/discontinuous/regional-map.js.map +1 -0
- package/dist/discontinuous/retroazimuthal-map.d.ts +6 -0
- package/dist/discontinuous/retroazimuthal-map.d.ts.map +1 -0
- package/dist/discontinuous/retroazimuthal-map.js +52 -0
- package/dist/discontinuous/retroazimuthal-map.js.map +1 -0
- package/dist/discontinuous/rotated-map.d.ts +31 -0
- package/dist/discontinuous/rotated-map.d.ts.map +1 -0
- package/dist/discontinuous/rotated-map.js +66 -0
- package/dist/discontinuous/rotated-map.js.map +1 -0
- package/dist/discontinuous/snyder-mesh.d.ts +11 -0
- package/dist/discontinuous/snyder-mesh.d.ts.map +1 -0
- package/dist/discontinuous/snyder-mesh.js +88 -0
- package/dist/discontinuous/snyder-mesh.js.map +1 -0
- package/dist/discontinuous/snyder.d.ts +16 -0
- package/dist/discontinuous/snyder.d.ts.map +1 -0
- package/dist/discontinuous/snyder.js +153 -0
- package/dist/discontinuous/snyder.js.map +1 -0
- package/dist/discontinuous/spherical-clip/cartesian.d.ts +8 -0
- package/dist/discontinuous/spherical-clip/cartesian.d.ts.map +1 -0
- package/dist/discontinuous/spherical-clip/cartesian.js +34 -0
- package/dist/discontinuous/spherical-clip/cartesian.js.map +1 -0
- package/dist/discontinuous/spherical-clip/circle.d.ts +2 -0
- package/dist/discontinuous/spherical-clip/circle.d.ts.map +1 -0
- package/dist/discontinuous/spherical-clip/circle.js +34 -0
- package/dist/discontinuous/spherical-clip/circle.js.map +1 -0
- package/dist/discontinuous/spherical-clip/clip-buffer.d.ts +9 -0
- package/dist/discontinuous/spherical-clip/clip-buffer.d.ts.map +1 -0
- package/dist/discontinuous/spherical-clip/clip-buffer.js +28 -0
- package/dist/discontinuous/spherical-clip/clip-buffer.js.map +1 -0
- package/dist/discontinuous/spherical-clip/clip-circle.d.ts +9 -0
- package/dist/discontinuous/spherical-clip/clip-circle.d.ts.map +1 -0
- package/dist/discontinuous/spherical-clip/clip-circle.js +160 -0
- package/dist/discontinuous/spherical-clip/clip-circle.js.map +1 -0
- package/dist/discontinuous/spherical-clip/clip-index.d.ts +9 -0
- package/dist/discontinuous/spherical-clip/clip-index.d.ts.map +1 -0
- package/dist/discontinuous/spherical-clip/clip-index.js +117 -0
- package/dist/discontinuous/spherical-clip/clip-index.js.map +1 -0
- package/dist/discontinuous/spherical-clip/clip-rejoin.d.ts +2 -0
- package/dist/discontinuous/spherical-clip/clip-rejoin.d.ts.map +1 -0
- package/dist/discontinuous/spherical-clip/clip-rejoin.js +99 -0
- package/dist/discontinuous/spherical-clip/clip-rejoin.js.map +1 -0
- package/dist/discontinuous/spherical-clip/helpers.d.ts +8 -0
- package/dist/discontinuous/spherical-clip/helpers.d.ts.map +1 -0
- package/dist/discontinuous/spherical-clip/helpers.js +21 -0
- package/dist/discontinuous/spherical-clip/helpers.js.map +1 -0
- package/dist/discontinuous/spherical-clip/math.d.ts +26 -0
- package/dist/discontinuous/spherical-clip/math.d.ts.map +1 -0
- package/dist/discontinuous/spherical-clip/math.js +39 -0
- package/dist/discontinuous/spherical-clip/math.js.map +1 -0
- package/dist/discontinuous/spherical-clip/noop.d.ts +2 -0
- package/dist/discontinuous/spherical-clip/noop.d.ts.map +1 -0
- package/dist/discontinuous/spherical-clip/noop.js +6 -0
- package/dist/discontinuous/spherical-clip/noop.js.map +1 -0
- package/dist/discontinuous/spherical-clip/pointEqual.d.ts +2 -0
- package/dist/discontinuous/spherical-clip/pointEqual.d.ts.map +1 -0
- package/dist/discontinuous/spherical-clip/pointEqual.js +9 -0
- package/dist/discontinuous/spherical-clip/pointEqual.js.map +1 -0
- package/dist/discontinuous/spherical-clip/polygonContains.d.ts +2 -0
- package/dist/discontinuous/spherical-clip/polygonContains.d.ts.map +1 -0
- package/dist/discontinuous/spherical-clip/polygonContains.js +52 -0
- package/dist/discontinuous/spherical-clip/polygonContains.js.map +1 -0
- package/dist/discontinuous/world-composite-kernels.d.ts +11 -0
- package/dist/discontinuous/world-composite-kernels.d.ts.map +1 -0
- package/dist/discontinuous/world-composite-kernels.js +30 -0
- package/dist/discontinuous/world-composite-kernels.js.map +1 -0
- package/dist/discontinuous/world-kernels/airy.d.ts +5 -0
- package/dist/discontinuous/world-kernels/airy.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/airy.js +28 -0
- package/dist/discontinuous/world-kernels/airy.js.map +1 -0
- package/dist/discontinuous/world-kernels/aitoff.d.ts +5 -0
- package/dist/discontinuous/world-kernels/aitoff.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/aitoff.js +26 -0
- package/dist/discontinuous/world-kernels/aitoff.js.map +1 -0
- package/dist/discontinuous/world-kernels/armadillo.d.ts +5 -0
- package/dist/discontinuous/world-kernels/armadillo.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/armadillo.js +28 -0
- package/dist/discontinuous/world-kernels/armadillo.js.map +1 -0
- package/dist/discontinuous/world-kernels/august.d.ts +5 -0
- package/dist/discontinuous/world-kernels/august.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/august.js +21 -0
- package/dist/discontinuous/world-kernels/august.js.map +1 -0
- package/dist/discontinuous/world-kernels/baker.d.ts +5 -0
- package/dist/discontinuous/world-kernels/baker.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/baker.js +29 -0
- package/dist/discontinuous/world-kernels/baker.js.map +1 -0
- package/dist/discontinuous/world-kernels/bertin.d.ts +5 -0
- package/dist/discontinuous/world-kernels/bertin.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/bertin.js +32 -0
- package/dist/discontinuous/world-kernels/bertin.js.map +1 -0
- package/dist/discontinuous/world-kernels/boggs.d.ts +5 -0
- package/dist/discontinuous/world-kernels/boggs.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/boggs.js +24 -0
- package/dist/discontinuous/world-kernels/boggs.js.map +1 -0
- package/dist/discontinuous/world-kernels/bonne.d.ts +3 -0
- package/dist/discontinuous/world-kernels/bonne.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/bonne.js +22 -0
- package/dist/discontinuous/world-kernels/bonne.js.map +1 -0
- package/dist/discontinuous/world-kernels/bottomley.d.ts +5 -0
- package/dist/discontinuous/world-kernels/bottomley.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/bottomley.js +18 -0
- package/dist/discontinuous/world-kernels/bottomley.js.map +1 -0
- package/dist/discontinuous/world-kernels/bromley.d.ts +5 -0
- package/dist/discontinuous/world-kernels/bromley.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/bromley.js +9 -0
- package/dist/discontinuous/world-kernels/bromley.js.map +1 -0
- package/dist/discontinuous/world-kernels/chamberlin.d.ts +2 -0
- package/dist/discontinuous/world-kernels/chamberlin.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/chamberlin.js +81 -0
- package/dist/discontinuous/world-kernels/chamberlin.js.map +1 -0
- package/dist/discontinuous/world-kernels/collignon.d.ts +5 -0
- package/dist/discontinuous/world-kernels/collignon.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/collignon.js +15 -0
- package/dist/discontinuous/world-kernels/collignon.js.map +1 -0
- package/dist/discontinuous/world-kernels/craig.d.ts +5 -0
- package/dist/discontinuous/world-kernels/craig.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/craig.js +30 -0
- package/dist/discontinuous/world-kernels/craig.js.map +1 -0
- package/dist/discontinuous/world-kernels/craster.d.ts +5 -0
- package/dist/discontinuous/world-kernels/craster.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/craster.js +15 -0
- package/dist/discontinuous/world-kernels/craster.js.map +1 -0
- package/dist/discontinuous/world-kernels/cylindricalEqualArea.d.ts +5 -0
- package/dist/discontinuous/world-kernels/cylindricalEqualArea.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/cylindricalEqualArea.js +17 -0
- package/dist/discontinuous/world-kernels/cylindricalEqualArea.js.map +1 -0
- package/dist/discontinuous/world-kernels/cylindricalStereographic.d.ts +5 -0
- package/dist/discontinuous/world-kernels/cylindricalStereographic.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/cylindricalStereographic.js +17 -0
- package/dist/discontinuous/world-kernels/cylindricalStereographic.js.map +1 -0
- package/dist/discontinuous/world-kernels/d3-geo-raw.d.ts +9 -0
- package/dist/discontinuous/world-kernels/d3-geo-raw.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/d3-geo-raw.js +21 -0
- package/dist/discontinuous/world-kernels/d3-geo-raw.js.map +1 -0
- package/dist/discontinuous/world-kernels/eckert1.d.ts +5 -0
- package/dist/discontinuous/world-kernels/eckert1.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/eckert1.js +15 -0
- package/dist/discontinuous/world-kernels/eckert1.js.map +1 -0
- package/dist/discontinuous/world-kernels/eckert2.d.ts +5 -0
- package/dist/discontinuous/world-kernels/eckert2.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/eckert2.js +15 -0
- package/dist/discontinuous/world-kernels/eckert2.js.map +1 -0
- package/dist/discontinuous/world-kernels/eckert3.d.ts +5 -0
- package/dist/discontinuous/world-kernels/eckert3.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/eckert3.js +15 -0
- package/dist/discontinuous/world-kernels/eckert3.js.map +1 -0
- package/dist/discontinuous/world-kernels/eckert4.d.ts +5 -0
- package/dist/discontinuous/world-kernels/eckert4.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/eckert4.js +20 -0
- package/dist/discontinuous/world-kernels/eckert4.js.map +1 -0
- package/dist/discontinuous/world-kernels/eckert5.d.ts +5 -0
- package/dist/discontinuous/world-kernels/eckert5.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/eckert5.js +14 -0
- package/dist/discontinuous/world-kernels/eckert5.js.map +1 -0
- package/dist/discontinuous/world-kernels/eckert6.d.ts +5 -0
- package/dist/discontinuous/world-kernels/eckert6.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/eckert6.js +19 -0
- package/dist/discontinuous/world-kernels/eckert6.js.map +1 -0
- package/dist/discontinuous/world-kernels/eisenlohr.d.ts +5 -0
- package/dist/discontinuous/world-kernels/eisenlohr.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/eisenlohr.js +41 -0
- package/dist/discontinuous/world-kernels/eisenlohr.js.map +1 -0
- package/dist/discontinuous/world-kernels/fahey.d.ts +5 -0
- package/dist/discontinuous/world-kernels/fahey.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/fahey.js +16 -0
- package/dist/discontinuous/world-kernels/fahey.js.map +1 -0
- package/dist/discontinuous/world-kernels/foucaut.d.ts +5 -0
- package/dist/discontinuous/world-kernels/foucaut.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/foucaut.js +15 -0
- package/dist/discontinuous/world-kernels/foucaut.js.map +1 -0
- package/dist/discontinuous/world-kernels/foucautSinusoidal.d.ts +5 -0
- package/dist/discontinuous/world-kernels/foucautSinusoidal.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/foucautSinusoidal.js +27 -0
- package/dist/discontinuous/world-kernels/foucautSinusoidal.js.map +1 -0
- package/dist/discontinuous/world-kernels/ginzburg4.d.ts +5 -0
- package/dist/discontinuous/world-kernels/ginzburg4.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/ginzburg4.js +8 -0
- package/dist/discontinuous/world-kernels/ginzburg4.js.map +1 -0
- package/dist/discontinuous/world-kernels/ginzburg5.d.ts +5 -0
- package/dist/discontinuous/world-kernels/ginzburg5.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/ginzburg5.js +8 -0
- package/dist/discontinuous/world-kernels/ginzburg5.js.map +1 -0
- package/dist/discontinuous/world-kernels/ginzburg6.d.ts +5 -0
- package/dist/discontinuous/world-kernels/ginzburg6.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/ginzburg6.js +9 -0
- package/dist/discontinuous/world-kernels/ginzburg6.js.map +1 -0
- package/dist/discontinuous/world-kernels/ginzburg8.d.ts +5 -0
- package/dist/discontinuous/world-kernels/ginzburg8.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/ginzburg8.js +28 -0
- package/dist/discontinuous/world-kernels/ginzburg8.js.map +1 -0
- package/dist/discontinuous/world-kernels/ginzburg9.d.ts +5 -0
- package/dist/discontinuous/world-kernels/ginzburg9.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/ginzburg9.js +8 -0
- package/dist/discontinuous/world-kernels/ginzburg9.js.map +1 -0
- package/dist/discontinuous/world-kernels/ginzburgPolyconic.d.ts +5 -0
- package/dist/discontinuous/world-kernels/ginzburgPolyconic.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/ginzburgPolyconic.js +29 -0
- package/dist/discontinuous/world-kernels/ginzburgPolyconic.js.map +1 -0
- package/dist/discontinuous/world-kernels/hammer.d.ts +3 -0
- package/dist/discontinuous/world-kernels/hammer.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/hammer.js +34 -0
- package/dist/discontinuous/world-kernels/hammer.js.map +1 -0
- package/dist/discontinuous/world-kernels/hammerRetroazimuthal.d.ts +5 -0
- package/dist/discontinuous/world-kernels/hammerRetroazimuthal.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/hammerRetroazimuthal.js +37 -0
- package/dist/discontinuous/world-kernels/hammerRetroazimuthal.js.map +1 -0
- package/dist/discontinuous/world-kernels/hill.d.ts +5 -0
- package/dist/discontinuous/world-kernels/hill.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/hill.js +36 -0
- package/dist/discontinuous/world-kernels/hill.js.map +1 -0
- package/dist/discontinuous/world-kernels/homolosine.d.ts +5 -0
- package/dist/discontinuous/world-kernels/homolosine.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/homolosine.js +22 -0
- package/dist/discontinuous/world-kernels/homolosine.js.map +1 -0
- package/dist/discontinuous/world-kernels/hufnagel.d.ts +5 -0
- package/dist/discontinuous/world-kernels/hufnagel.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/hufnagel.js +53 -0
- package/dist/discontinuous/world-kernels/hufnagel.js.map +1 -0
- package/dist/discontinuous/world-kernels/hyperelliptical.d.ts +5 -0
- package/dist/discontinuous/world-kernels/hyperelliptical.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/hyperelliptical.js +47 -0
- package/dist/discontinuous/world-kernels/hyperelliptical.js.map +1 -0
- package/dist/discontinuous/world-kernels/integrate.d.ts +2 -0
- package/dist/discontinuous/world-kernels/integrate.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/integrate.js +82 -0
- package/dist/discontinuous/world-kernels/integrate.js.map +1 -0
- package/dist/discontinuous/world-kernels/kavrayskiy7.d.ts +5 -0
- package/dist/discontinuous/world-kernels/kavrayskiy7.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/kavrayskiy7.js +13 -0
- package/dist/discontinuous/world-kernels/kavrayskiy7.js.map +1 -0
- package/dist/discontinuous/world-kernels/lagrange.d.ts +5 -0
- package/dist/discontinuous/world-kernels/lagrange.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/lagrange.js +27 -0
- package/dist/discontinuous/world-kernels/lagrange.js.map +1 -0
- package/dist/discontinuous/world-kernels/larrivee.d.ts +5 -0
- package/dist/discontinuous/world-kernels/larrivee.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/larrivee.js +26 -0
- package/dist/discontinuous/world-kernels/larrivee.js.map +1 -0
- package/dist/discontinuous/world-kernels/laskowski.d.ts +5 -0
- package/dist/discontinuous/world-kernels/laskowski.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/laskowski.js +31 -0
- package/dist/discontinuous/world-kernels/laskowski.js.map +1 -0
- package/dist/discontinuous/world-kernels/littrow.d.ts +5 -0
- package/dist/discontinuous/world-kernels/littrow.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/littrow.js +13 -0
- package/dist/discontinuous/world-kernels/littrow.js.map +1 -0
- package/dist/discontinuous/world-kernels/loximuthal.d.ts +5 -0
- package/dist/discontinuous/world-kernels/loximuthal.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/loximuthal.js +30 -0
- package/dist/discontinuous/world-kernels/loximuthal.js.map +1 -0
- package/dist/discontinuous/world-kernels/math.d.ts +36 -0
- package/dist/discontinuous/world-kernels/math.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/math.js +63 -0
- package/dist/discontinuous/world-kernels/math.js.map +1 -0
- package/dist/discontinuous/world-kernels/miller.d.ts +5 -0
- package/dist/discontinuous/world-kernels/miller.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/miller.js +13 -0
- package/dist/discontinuous/world-kernels/miller.js.map +1 -0
- package/dist/discontinuous/world-kernels/modifiedStereographic.d.ts +18 -0
- package/dist/discontinuous/world-kernels/modifiedStereographic.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/modifiedStereographic.js +79 -0
- package/dist/discontinuous/world-kernels/modifiedStereographic.js.map +1 -0
- package/dist/discontinuous/world-kernels/mollweide.d.ts +10 -0
- package/dist/discontinuous/world-kernels/mollweide.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/mollweide.js +24 -0
- package/dist/discontinuous/world-kernels/mollweide.js.map +1 -0
- package/dist/discontinuous/world-kernels/mtFlatPolarParabolic.d.ts +5 -0
- package/dist/discontinuous/world-kernels/mtFlatPolarParabolic.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/mtFlatPolarParabolic.js +19 -0
- package/dist/discontinuous/world-kernels/mtFlatPolarParabolic.js.map +1 -0
- package/dist/discontinuous/world-kernels/mtFlatPolarQuartic.d.ts +5 -0
- package/dist/discontinuous/world-kernels/mtFlatPolarQuartic.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/mtFlatPolarQuartic.js +26 -0
- package/dist/discontinuous/world-kernels/mtFlatPolarQuartic.js.map +1 -0
- package/dist/discontinuous/world-kernels/mtFlatPolarSinusoidal.d.ts +5 -0
- package/dist/discontinuous/world-kernels/mtFlatPolarSinusoidal.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/mtFlatPolarSinusoidal.js +22 -0
- package/dist/discontinuous/world-kernels/mtFlatPolarSinusoidal.js.map +1 -0
- package/dist/discontinuous/world-kernels/naturalEarth2.d.ts +5 -0
- package/dist/discontinuous/world-kernels/naturalEarth2.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/naturalEarth2.js +37 -0
- package/dist/discontinuous/world-kernels/naturalEarth2.js.map +1 -0
- package/dist/discontinuous/world-kernels/nellHammer.d.ts +5 -0
- package/dist/discontinuous/world-kernels/nellHammer.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/nellHammer.js +18 -0
- package/dist/discontinuous/world-kernels/nellHammer.js.map +1 -0
- package/dist/discontinuous/world-kernels/newton.d.ts +3 -0
- package/dist/discontinuous/world-kernels/newton.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/newton.js +65 -0
- package/dist/discontinuous/world-kernels/newton.js.map +1 -0
- package/dist/discontinuous/world-kernels/nicolosi.d.ts +5 -0
- package/dist/discontinuous/world-kernels/nicolosi.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/nicolosi.js +38 -0
- package/dist/discontinuous/world-kernels/nicolosi.js.map +1 -0
- package/dist/discontinuous/world-kernels/patterson.d.ts +5 -0
- package/dist/discontinuous/world-kernels/patterson.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/patterson.js +32 -0
- package/dist/discontinuous/world-kernels/patterson.js.map +1 -0
- package/dist/discontinuous/world-kernels/polyconic.d.ts +5 -0
- package/dist/discontinuous/world-kernels/polyconic.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/polyconic.js +30 -0
- package/dist/discontinuous/world-kernels/polyconic.js.map +1 -0
- package/dist/discontinuous/world-kernels/rectangularPolyconic.d.ts +5 -0
- package/dist/discontinuous/world-kernels/rectangularPolyconic.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/rectangularPolyconic.js +31 -0
- package/dist/discontinuous/world-kernels/rectangularPolyconic.js.map +1 -0
- package/dist/discontinuous/world-kernels/robinson.d.ts +5 -0
- package/dist/discontinuous/world-kernels/robinson.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/robinson.js +63 -0
- package/dist/discontinuous/world-kernels/robinson.js.map +1 -0
- package/dist/discontinuous/world-kernels/satellite.d.ts +5 -0
- package/dist/discontinuous/world-kernels/satellite.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/satellite.js +32 -0
- package/dist/discontinuous/world-kernels/satellite.js.map +1 -0
- package/dist/discontinuous/world-kernels/sinuMollweide.d.ts +7 -0
- package/dist/discontinuous/world-kernels/sinuMollweide.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/sinuMollweide.js +20 -0
- package/dist/discontinuous/world-kernels/sinuMollweide.js.map +1 -0
- package/dist/discontinuous/world-kernels/sinusoidal.d.ts +5 -0
- package/dist/discontinuous/world-kernels/sinusoidal.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/sinusoidal.js +13 -0
- package/dist/discontinuous/world-kernels/sinusoidal.js.map +1 -0
- package/dist/discontinuous/world-kernels/times.d.ts +5 -0
- package/dist/discontinuous/world-kernels/times.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/times.js +15 -0
- package/dist/discontinuous/world-kernels/times.js.map +1 -0
- package/dist/discontinuous/world-kernels/twoPointEquidistant.d.ts +3 -0
- package/dist/discontinuous/world-kernels/twoPointEquidistant.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/twoPointEquidistant.js +28 -0
- package/dist/discontinuous/world-kernels/twoPointEquidistant.js.map +1 -0
- package/dist/discontinuous/world-kernels/vanDerGrinten.d.ts +5 -0
- package/dist/discontinuous/world-kernels/vanDerGrinten.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/vanDerGrinten.js +30 -0
- package/dist/discontinuous/world-kernels/vanDerGrinten.js.map +1 -0
- package/dist/discontinuous/world-kernels/vanDerGrinten2.d.ts +5 -0
- package/dist/discontinuous/world-kernels/vanDerGrinten2.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/vanDerGrinten2.js +25 -0
- package/dist/discontinuous/world-kernels/vanDerGrinten2.js.map +1 -0
- package/dist/discontinuous/world-kernels/vanDerGrinten3.d.ts +5 -0
- package/dist/discontinuous/world-kernels/vanDerGrinten3.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/vanDerGrinten3.js +22 -0
- package/dist/discontinuous/world-kernels/vanDerGrinten3.js.map +1 -0
- package/dist/discontinuous/world-kernels/vanDerGrinten4.d.ts +5 -0
- package/dist/discontinuous/world-kernels/vanDerGrinten4.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/vanDerGrinten4.js +38 -0
- package/dist/discontinuous/world-kernels/vanDerGrinten4.js.map +1 -0
- package/dist/discontinuous/world-kernels/wagner.d.ts +5 -0
- package/dist/discontinuous/world-kernels/wagner.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/wagner.js +44 -0
- package/dist/discontinuous/world-kernels/wagner.js.map +1 -0
- package/dist/discontinuous/world-kernels/wagner4.d.ts +5 -0
- package/dist/discontinuous/world-kernels/wagner4.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/wagner4.js +10 -0
- package/dist/discontinuous/world-kernels/wagner4.js.map +1 -0
- package/dist/discontinuous/world-kernels/wagner6.d.ts +5 -0
- package/dist/discontinuous/world-kernels/wagner6.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/wagner6.js +13 -0
- package/dist/discontinuous/world-kernels/wagner6.js.map +1 -0
- package/dist/discontinuous/world-kernels/wiechel.d.ts +5 -0
- package/dist/discontinuous/world-kernels/wiechel.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/wiechel.js +15 -0
- package/dist/discontinuous/world-kernels/wiechel.js.map +1 -0
- package/dist/discontinuous/world-kernels/winkel3.d.ts +5 -0
- package/dist/discontinuous/world-kernels/winkel3.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels/winkel3.js +20 -0
- package/dist/discontinuous/world-kernels/winkel3.js.map +1 -0
- package/dist/discontinuous/world-kernels.d.ts +150 -0
- package/dist/discontinuous/world-kernels.d.ts.map +1 -0
- package/dist/discontinuous/world-kernels.js +215 -0
- package/dist/discontinuous/world-kernels.js.map +1 -0
- package/dist/discontinuous/world-map.d.ts +25 -0
- package/dist/discontinuous/world-map.d.ts.map +1 -0
- package/dist/discontinuous/world-map.js +187 -0
- package/dist/discontinuous/world-map.js.map +1 -0
- package/dist/discontinuous.cjs +7037 -0
- package/dist/discontinuous.cjs.map +6 -0
- package/dist/discontinuous.d.ts +50 -0
- package/dist/discontinuous.d.ts.map +1 -0
- package/dist/discontinuous.js +35 -0
- package/dist/discontinuous.js.map +1 -0
- package/dist/elastic.cjs +52991 -0
- package/dist/elastic.cjs.map +6 -0
- package/dist/elastic.d.ts +5 -0
- package/dist/elastic.d.ts.map +1 -0
- package/dist/elastic.js +8 -0
- package/dist/elastic.js.map +1 -0
- package/dist/ellipsoid-geodesic.d.ts +62 -0
- package/dist/ellipsoid-geodesic.d.ts.map +1 -0
- package/dist/ellipsoid-geodesic.js +69 -0
- package/dist/ellipsoid-geodesic.js.map +1 -0
- package/dist/ellipsoid-helpers/ellipsoid-transform.d.ts.map +1 -1
- package/dist/ellipsoid-helpers/ellipsoid-transform.js +15 -5
- package/dist/ellipsoid-helpers/ellipsoid-transform.js.map +1 -1
- package/dist/ellipsoid-helpers/exact-nearest-surface.d.ts +16 -0
- package/dist/ellipsoid-helpers/exact-nearest-surface.d.ts.map +1 -0
- package/dist/ellipsoid-helpers/exact-nearest-surface.js +108 -0
- package/dist/ellipsoid-helpers/exact-nearest-surface.js.map +1 -0
- package/dist/ellipsoid-helpers/intersection-bounds.d.ts +18 -0
- package/dist/ellipsoid-helpers/intersection-bounds.d.ts.map +1 -0
- package/dist/ellipsoid-helpers/intersection-bounds.js +60 -0
- package/dist/ellipsoid-helpers/intersection-bounds.js.map +1 -0
- package/dist/ellipsoid-helpers/nearest-surface.d.ts +12 -0
- package/dist/ellipsoid-helpers/nearest-surface.d.ts.map +1 -0
- package/dist/ellipsoid-helpers/nearest-surface.js +127 -0
- package/dist/ellipsoid-helpers/nearest-surface.js.map +1 -0
- package/dist/ellipsoid-helpers/rhumb-pole-distance.d.ts +3 -0
- package/dist/ellipsoid-helpers/rhumb-pole-distance.d.ts.map +1 -0
- package/dist/ellipsoid-helpers/rhumb-pole-distance.js +63 -0
- package/dist/ellipsoid-helpers/rhumb-pole-distance.js.map +1 -0
- package/dist/ellipsoid-helpers/scale-to-geodetic-surface.d.ts.map +1 -1
- package/dist/ellipsoid-helpers/scale-to-geodetic-surface.js +14 -78
- package/dist/ellipsoid-helpers/scale-to-geodetic-surface.js.map +1 -1
- package/dist/ellipsoid-helpers/surface-polygon.d.ts +65 -0
- package/dist/ellipsoid-helpers/surface-polygon.d.ts.map +1 -0
- package/dist/ellipsoid-helpers/surface-polygon.js +159 -0
- package/dist/ellipsoid-helpers/surface-polygon.js.map +1 -0
- package/dist/ellipsoid-helpers/tangent-plane-numerics.d.ts +7 -0
- package/dist/ellipsoid-helpers/tangent-plane-numerics.d.ts.map +1 -0
- package/dist/ellipsoid-helpers/tangent-plane-numerics.js +88 -0
- package/dist/ellipsoid-helpers/tangent-plane-numerics.js.map +1 -0
- package/dist/ellipsoid-metrics.d.ts +31 -0
- package/dist/ellipsoid-metrics.d.ts.map +1 -0
- package/dist/ellipsoid-metrics.js +186 -0
- package/dist/ellipsoid-metrics.js.map +1 -0
- package/dist/ellipsoid-rhumb.d.ts +52 -0
- package/dist/ellipsoid-rhumb.d.ts.map +1 -0
- package/dist/ellipsoid-rhumb.js +321 -0
- package/dist/ellipsoid-rhumb.js.map +1 -0
- package/dist/ellipsoid-tangent-plane.d.ts +29 -7
- package/dist/ellipsoid-tangent-plane.d.ts.map +1 -1
- package/dist/ellipsoid-tangent-plane.js +177 -29
- package/dist/ellipsoid-tangent-plane.js.map +1 -1
- package/dist/ellipsoid-transforms.d.ts +12 -0
- package/dist/ellipsoid-transforms.d.ts.map +1 -0
- package/dist/ellipsoid-transforms.js +15 -0
- package/dist/ellipsoid-transforms.js.map +1 -0
- package/dist/ellipsoid.d.ts +2 -12
- package/dist/ellipsoid.d.ts.map +1 -1
- package/dist/ellipsoid.js +167 -73
- package/dist/ellipsoid.js.map +1 -1
- package/dist/entries/ellipsoid.cjs +3640 -302
- package/dist/entries/ellipsoid.cjs.map +3 -3
- package/dist/entries/ellipsoid.d.ts +21 -0
- package/dist/entries/ellipsoid.d.ts.map +1 -1
- package/dist/entries/ellipsoid.js +10 -0
- package/dist/entries/ellipsoid.js.map +1 -1
- package/dist/expressions.cjs +442 -244
- package/dist/expressions.cjs.map +3 -3
- package/dist/expressions.d.ts.map +1 -1
- package/dist/expressions.js +2 -1
- package/dist/expressions.js.map +1 -1
- package/dist/geoarrow/builder-entry.cjs.map +1 -1
- package/dist/geoarrow/codecs.d.ts.map +1 -1
- package/dist/geoarrow/codecs.js +3 -8
- package/dist/geoarrow/codecs.js.map +1 -1
- package/dist/geoarrow/index.cjs +34 -9
- package/dist/geoarrow/index.cjs.map +1 -1
- package/dist/geoarrow/index.d.ts +1 -1
- package/dist/geoarrow/index.d.ts.map +1 -1
- package/dist/geoarrow/index.js +1 -1
- package/dist/geoarrow/index.js.map +1 -1
- package/dist/geoarrow/tessellation-entry.cjs.map +1 -1
- package/dist/geoarrow/types.d.ts +8 -0
- package/dist/geoarrow/types.d.ts.map +1 -1
- package/dist/geoarrow/types.js +30 -0
- package/dist/geoarrow/types.js.map +1 -1
- package/dist/geoarrow/wkb-entry.cjs +14 -9
- package/dist/geoarrow/wkb-entry.cjs.map +1 -1
- package/dist/geodesic-exact/area.d.ts +5 -0
- package/dist/geodesic-exact/area.d.ts.map +1 -0
- package/dist/geodesic-exact/area.js +56 -0
- package/dist/geodesic-exact/area.js.map +1 -0
- package/dist/geodesic-exact/inverse-engine.d.ts +57 -0
- package/dist/geodesic-exact/inverse-engine.d.ts.map +1 -0
- package/dist/geodesic-exact/inverse-engine.js +56 -0
- package/dist/geodesic-exact/inverse-engine.js.map +1 -0
- package/dist/geodesic-exact/polygon.d.ts +12 -0
- package/dist/geodesic-exact/polygon.d.ts.map +1 -0
- package/dist/geodesic-exact/polygon.js +27 -0
- package/dist/geodesic-exact/polygon.js.map +1 -0
- package/dist/geodesic-exact/quadrature.d.ts +9 -0
- package/dist/geodesic-exact/quadrature.d.ts.map +1 -0
- package/dist/geodesic-exact/quadrature.js +62 -0
- package/dist/geodesic-exact/quadrature.js.map +1 -0
- package/dist/geodesic-exact.cjs +1871 -0
- package/dist/geodesic-exact.cjs.map +6 -0
- package/dist/geodesic-exact.d.ts +23 -0
- package/dist/geodesic-exact.d.ts.map +1 -0
- package/dist/geodesic-exact.js +210 -0
- package/dist/geodesic-exact.js.map +1 -0
- package/dist/geodesic-intersections.d.ts +83 -0
- package/dist/geodesic-intersections.d.ts.map +1 -0
- package/dist/geodesic-intersections.js +451 -0
- package/dist/geodesic-intersections.js.map +1 -0
- package/dist/geodesic-path.d.ts +28 -0
- package/dist/geodesic-path.d.ts.map +1 -0
- package/dist/geodesic-path.js +102 -0
- package/dist/geodesic-path.js.map +1 -0
- package/dist/geodesic-polygon.d.ts +11 -0
- package/dist/geodesic-polygon.d.ts.map +1 -0
- package/dist/geodesic-polygon.js +16 -0
- package/dist/geodesic-polygon.js.map +1 -0
- package/dist/geographic-seams/edge.d.ts +46 -0
- package/dist/geographic-seams/edge.d.ts.map +1 -0
- package/dist/geographic-seams/edge.js +362 -0
- package/dist/geographic-seams/edge.js.map +1 -0
- package/dist/geographic-seams/polygon.d.ts +8 -0
- package/dist/geographic-seams/polygon.d.ts.map +1 -0
- package/dist/geographic-seams/polygon.js +381 -0
- package/dist/geographic-seams/polygon.js.map +1 -0
- package/dist/geographic-seams/types.d.ts +59 -0
- package/dist/geographic-seams/types.d.ts.map +1 -0
- package/dist/geographic-seams/types.js +8 -0
- package/dist/geographic-seams/types.js.map +1 -0
- package/dist/geographic-seams.d.ts +12 -0
- package/dist/geographic-seams.d.ts.map +1 -0
- package/dist/geographic-seams.js +54 -0
- package/dist/geographic-seams.js.map +1 -0
- package/dist/globe.cjs +3520 -367
- package/dist/globe.cjs.map +3 -3
- package/dist/globe.d.ts +6 -0
- package/dist/globe.d.ts.map +1 -1
- package/dist/globe.js +3 -0
- package/dist/globe.js.map +1 -1
- package/dist/index.cjs +4495 -378
- package/dist/index.cjs.map +3 -3
- package/dist/lng-lat-rectangle.js +1 -1
- package/dist/lng-lat-rectangle.js.map +1 -1
- package/dist/local-reference-frame.d.ts +57 -0
- package/dist/local-reference-frame.d.ts.map +1 -0
- package/dist/local-reference-frame.js +247 -0
- package/dist/local-reference-frame.js.map +1 -0
- package/dist/make-obb-from-region.js +1 -1
- package/dist/make-obb-from-region.js.map +1 -1
- package/dist/projection/experimental/authalic-latitude.d.ts +7 -0
- package/dist/projection/experimental/authalic-latitude.d.ts.map +1 -0
- package/dist/projection/experimental/authalic-latitude.js +51 -0
- package/dist/projection/experimental/authalic-latitude.js.map +1 -0
- package/dist/projection/experimental/common/adjust_lat.js +2 -2
- package/dist/projection/experimental/common/adjust_lat.js.map +1 -1
- package/dist/projection/experimental/common/adjust_lon.js +1 -1
- package/dist/projection/experimental/common/adjust_lon.js.map +1 -1
- package/dist/projection/experimental/common/asinhy.js +1 -1
- package/dist/projection/experimental/common/asinhy.js.map +1 -1
- package/dist/projection/experimental/common/asinz.js +1 -1
- package/dist/projection/experimental/common/asinz.js.map +1 -1
- package/dist/projection/experimental/common/authlat.js +1 -1
- package/dist/projection/experimental/common/authlat.js.map +1 -1
- package/dist/projection/experimental/common/authset.js +1 -1
- package/dist/projection/experimental/common/authset.js.map +1 -1
- package/dist/projection/experimental/common/clens.js +1 -1
- package/dist/projection/experimental/common/clens.js.map +1 -1
- package/dist/projection/experimental/common/clens_cmplx.js +1 -1
- package/dist/projection/experimental/common/clens_cmplx.js.map +1 -1
- package/dist/projection/experimental/common/constants.js +1 -1
- package/dist/projection/experimental/common/constants.js.map +1 -1
- package/dist/projection/experimental/common/cosh.js +1 -1
- package/dist/projection/experimental/common/cosh.js.map +1 -1
- package/dist/projection/experimental/common/e0fn.js +1 -1
- package/dist/projection/experimental/common/e0fn.js.map +1 -1
- package/dist/projection/experimental/common/e1fn.js +1 -1
- package/dist/projection/experimental/common/e1fn.js.map +1 -1
- package/dist/projection/experimental/common/e2fn.js +1 -1
- package/dist/projection/experimental/common/e2fn.js.map +1 -1
- package/dist/projection/experimental/common/e3fn.js +1 -1
- package/dist/projection/experimental/common/e3fn.js.map +1 -1
- package/dist/projection/experimental/common/fL.js +1 -1
- package/dist/projection/experimental/common/fL.js.map +1 -1
- package/dist/projection/experimental/common/gN.js +1 -1
- package/dist/projection/experimental/common/gN.js.map +1 -1
- package/dist/projection/experimental/common/gatg.js +1 -1
- package/dist/projection/experimental/common/gatg.js.map +1 -1
- package/dist/projection/experimental/common/hypot.js +1 -1
- package/dist/projection/experimental/common/hypot.js.map +1 -1
- package/dist/projection/experimental/common/imlfn.js +1 -1
- package/dist/projection/experimental/common/imlfn.js.map +1 -1
- package/dist/projection/experimental/common/invlatiso.js +1 -1
- package/dist/projection/experimental/common/invlatiso.js.map +1 -1
- package/dist/projection/experimental/common/iqsfnz.js +1 -1
- package/dist/projection/experimental/common/iqsfnz.js.map +1 -1
- package/dist/projection/experimental/common/latiso.js +1 -1
- package/dist/projection/experimental/common/latiso.js.map +1 -1
- package/dist/projection/experimental/common/log1py.js +1 -1
- package/dist/projection/experimental/common/log1py.js.map +1 -1
- package/dist/projection/experimental/common/mlfn.js +1 -1
- package/dist/projection/experimental/common/mlfn.js.map +1 -1
- package/dist/projection/experimental/common/msfnz.js +1 -1
- package/dist/projection/experimental/common/msfnz.js.map +1 -1
- package/dist/projection/experimental/common/phi2z.js +1 -1
- package/dist/projection/experimental/common/phi2z.js.map +1 -1
- package/dist/projection/experimental/common/pj_enfn.js +1 -1
- package/dist/projection/experimental/common/pj_enfn.js.map +1 -1
- package/dist/projection/experimental/common/pj_inv_mlfn.js +1 -1
- package/dist/projection/experimental/common/pj_inv_mlfn.js.map +1 -1
- package/dist/projection/experimental/common/pj_mlfn.js +1 -1
- package/dist/projection/experimental/common/pj_mlfn.js.map +1 -1
- package/dist/projection/experimental/common/qsfnz.js +1 -1
- package/dist/projection/experimental/common/qsfnz.js.map +1 -1
- package/dist/projection/experimental/common/sign.js +1 -1
- package/dist/projection/experimental/common/sign.js.map +1 -1
- package/dist/projection/experimental/common/sinh.js +1 -1
- package/dist/projection/experimental/common/sinh.js.map +1 -1
- package/dist/projection/experimental/common/srat.js +1 -1
- package/dist/projection/experimental/common/srat.js.map +1 -1
- package/dist/projection/experimental/common/tsfnz.d.ts.map +1 -1
- package/dist/projection/experimental/common/tsfnz.js +6 -6
- package/dist/projection/experimental/common/tsfnz.js.map +1 -1
- package/dist/projection/experimental/common/vincenty.js +1 -1
- package/dist/projection/experimental/common/vincenty.js.map +1 -1
- package/dist/projection/experimental/crs/datum-table.js +1 -1
- package/dist/projection/experimental/crs/datum-table.js.map +1 -1
- package/dist/projection/experimental/crs/ellipsoid-table.js +1 -1
- package/dist/projection/experimental/crs/ellipsoid-table.js.map +1 -1
- package/dist/projection/experimental/crs/primemeridian-table.js +1 -1
- package/dist/projection/experimental/crs/primemeridian-table.js.map +1 -1
- package/dist/projection/experimental/crs/structured.js +1 -1
- package/dist/projection/experimental/crs/structured.js.map +1 -1
- package/dist/projection/experimental/crs/wkt.js +1 -1
- package/dist/projection/experimental/crs/wkt.js.map +1 -1
- package/dist/projection/experimental/datum.js +1 -1
- package/dist/projection/experimental/datum.js.map +1 -1
- package/dist/projection/experimental/ellipsoidal-gnomonic.d.ts +10 -0
- package/dist/projection/experimental/ellipsoidal-gnomonic.d.ts.map +1 -0
- package/dist/projection/experimental/ellipsoidal-gnomonic.js +59 -0
- package/dist/projection/experimental/ellipsoidal-gnomonic.js.map +1 -0
- package/dist/projection/experimental/entries/projections/aea.cjs +34 -27
- package/dist/projection/experimental/entries/projections/aea.cjs.map +2 -2
- package/dist/projection/experimental/entries/projections/aeqd.cjs +9 -9
- package/dist/projection/experimental/entries/projections/aeqd.cjs.map +3 -3
- package/dist/projection/experimental/entries/projections/bonne.cjs +1 -1
- package/dist/projection/experimental/entries/projections/bonne.cjs.map +1 -1
- package/dist/projection/experimental/entries/projections/cass.cjs +1 -1
- package/dist/projection/experimental/entries/projections/cass.cjs.map +1 -1
- package/dist/projection/experimental/entries/projections/eck6.cjs +5 -2
- package/dist/projection/experimental/entries/projections/eck6.cjs.map +1 -1
- package/dist/projection/experimental/entries/projections/eqdc.cjs +1 -1
- package/dist/projection/experimental/entries/projections/eqdc.cjs.map +1 -1
- package/dist/projection/experimental/entries/projections/eqearth.cjs +10 -1
- package/dist/projection/experimental/entries/projections/eqearth.cjs.map +1 -1
- package/dist/projection/experimental/entries/projections/equi.cjs +2 -0
- package/dist/projection/experimental/entries/projections/equi.cjs.map +1 -1
- package/dist/projection/experimental/entries/projections/gnom.cjs +1461 -4
- package/dist/projection/experimental/entries/projections/gnom.cjs.map +3 -3
- package/dist/projection/experimental/entries/projections/krovak.cjs +1 -1
- package/dist/projection/experimental/entries/projections/krovak.cjs.map +1 -1
- package/dist/projection/experimental/entries/projections/laea.cjs +82 -46
- package/dist/projection/experimental/entries/projections/laea.cjs.map +2 -2
- package/dist/projection/experimental/entries/projections/lcc.cjs +7 -12
- package/dist/projection/experimental/entries/projections/lcc.cjs.map +2 -2
- package/dist/projection/experimental/entries/projections/moll.cjs +46 -39
- package/dist/projection/experimental/entries/projections/moll.cjs.map +1 -1
- package/dist/projection/experimental/entries/projections/omerc.cjs +6 -8
- package/dist/projection/experimental/entries/projections/omerc.cjs.map +2 -2
- package/dist/projection/experimental/entries/projections/ortho.cjs +52 -106
- package/dist/projection/experimental/entries/projections/ortho.cjs.map +2 -2
- package/dist/projection/experimental/entries/projections/poly.cjs +83 -49
- package/dist/projection/experimental/entries/projections/poly.cjs.map +3 -3
- package/dist/projection/experimental/entries/projections/qsc.cjs +31 -50
- package/dist/projection/experimental/entries/projections/qsc.cjs.map +1 -1
- package/dist/projection/experimental/entries/projections/sinu.cjs +5 -2
- package/dist/projection/experimental/entries/projections/sinu.cjs.map +1 -1
- package/dist/projection/experimental/entries/projections/somerc.cjs +22 -29
- package/dist/projection/experimental/entries/projections/somerc.cjs.map +1 -1
- package/dist/projection/experimental/entries/projections/stere.cjs +19 -6
- package/dist/projection/experimental/entries/projections/stere.cjs.map +2 -2
- package/dist/projection/experimental/entries/projections/sterea.cjs +9 -1
- package/dist/projection/experimental/entries/projections/sterea.cjs.map +2 -2
- package/dist/projection/experimental/entries/projections/tpers.cjs.map +1 -1
- package/dist/projection/experimental/grids/geotiff.js +1 -1
- package/dist/projection/experimental/grids/geotiff.js.map +1 -1
- package/dist/projection/experimental/grids/ntv2.js +1 -1
- package/dist/projection/experimental/grids/ntv2.js.map +1 -1
- package/dist/projection/experimental/index.cjs +1870 -365
- package/dist/projection/experimental/index.cjs.map +3 -3
- package/dist/projection/experimental/inverse-spherical-latitude.d.ts +2 -0
- package/dist/projection/experimental/inverse-spherical-latitude.d.ts.map +1 -0
- package/dist/projection/experimental/inverse-spherical-latitude.js +11 -0
- package/dist/projection/experimental/inverse-spherical-latitude.js.map +1 -0
- package/dist/projection/experimental/kernels/aea.d.ts.map +1 -1
- package/dist/projection/experimental/kernels/aea.js +11 -29
- package/dist/projection/experimental/kernels/aea.js.map +1 -1
- package/dist/projection/experimental/kernels/aeqd.d.ts.map +1 -1
- package/dist/projection/experimental/kernels/aeqd.js +3 -3
- package/dist/projection/experimental/kernels/aeqd.js.map +1 -1
- package/dist/projection/experimental/kernels/bonne.js +1 -1
- package/dist/projection/experimental/kernels/bonne.js.map +1 -1
- package/dist/projection/experimental/kernels/cass.js +1 -1
- package/dist/projection/experimental/kernels/cass.js.map +1 -1
- package/dist/projection/experimental/kernels/cea.js +1 -1
- package/dist/projection/experimental/kernels/cea.js.map +1 -1
- package/dist/projection/experimental/kernels/eck6.js +1 -1
- package/dist/projection/experimental/kernels/eck6.js.map +1 -1
- package/dist/projection/experimental/kernels/eqdc.js +1 -1
- package/dist/projection/experimental/kernels/eqdc.js.map +1 -1
- package/dist/projection/experimental/kernels/eqearth.d.ts.map +1 -1
- package/dist/projection/experimental/kernels/eqearth.js +13 -2
- package/dist/projection/experimental/kernels/eqearth.js.map +1 -1
- package/dist/projection/experimental/kernels/equi.d.ts.map +1 -1
- package/dist/projection/experimental/kernels/equi.js +3 -1
- package/dist/projection/experimental/kernels/equi.js.map +1 -1
- package/dist/projection/experimental/kernels/etmerc.js +1 -1
- package/dist/projection/experimental/kernels/etmerc.js.map +1 -1
- package/dist/projection/experimental/kernels/gauss.js +1 -1
- package/dist/projection/experimental/kernels/gauss.js.map +1 -1
- package/dist/projection/experimental/kernels/geos.js +1 -1
- package/dist/projection/experimental/kernels/geos.js.map +1 -1
- package/dist/projection/experimental/kernels/gnom.d.ts +2 -0
- package/dist/projection/experimental/kernels/gnom.d.ts.map +1 -1
- package/dist/projection/experimental/kernels/gnom.js +8 -1
- package/dist/projection/experimental/kernels/gnom.js.map +1 -1
- package/dist/projection/experimental/kernels/gstmerc.js +1 -1
- package/dist/projection/experimental/kernels/gstmerc.js.map +1 -1
- package/dist/projection/experimental/kernels/krovak.js +2 -2
- package/dist/projection/experimental/kernels/krovak.js.map +1 -1
- package/dist/projection/experimental/kernels/laea.d.ts +0 -1
- package/dist/projection/experimental/kernels/laea.d.ts.map +1 -1
- package/dist/projection/experimental/kernels/laea.js +33 -15
- package/dist/projection/experimental/kernels/laea.js.map +1 -1
- package/dist/projection/experimental/kernels/lcc.d.ts.map +1 -1
- package/dist/projection/experimental/kernels/lcc.js +2 -7
- package/dist/projection/experimental/kernels/lcc.js.map +1 -1
- package/dist/projection/experimental/kernels/mill.js +1 -1
- package/dist/projection/experimental/kernels/mill.js.map +1 -1
- package/dist/projection/experimental/kernels/moll.d.ts.map +1 -1
- package/dist/projection/experimental/kernels/moll.js +65 -50
- package/dist/projection/experimental/kernels/moll.js.map +1 -1
- package/dist/projection/experimental/kernels/nzmg.js +1 -1
- package/dist/projection/experimental/kernels/nzmg.js.map +1 -1
- package/dist/projection/experimental/kernels/omerc.js +1 -1
- package/dist/projection/experimental/kernels/omerc.js.map +1 -1
- package/dist/projection/experimental/kernels/ortho.d.ts +6 -5
- package/dist/projection/experimental/kernels/ortho.d.ts.map +1 -1
- package/dist/projection/experimental/kernels/ortho.js +35 -83
- package/dist/projection/experimental/kernels/ortho.js.map +1 -1
- package/dist/projection/experimental/kernels/poly.d.ts +2 -5
- package/dist/projection/experimental/kernels/poly.d.ts.map +1 -1
- package/dist/projection/experimental/kernels/poly.js +83 -31
- package/dist/projection/experimental/kernels/poly.js.map +1 -1
- package/dist/projection/experimental/kernels/qsc.d.ts.map +1 -1
- package/dist/projection/experimental/kernels/qsc.js +37 -52
- package/dist/projection/experimental/kernels/qsc.js.map +1 -1
- package/dist/projection/experimental/kernels/robin.js +1 -1
- package/dist/projection/experimental/kernels/robin.js.map +1 -1
- package/dist/projection/experimental/kernels/sinu.d.ts.map +1 -1
- package/dist/projection/experimental/kernels/sinu.js +5 -2
- package/dist/projection/experimental/kernels/sinu.js.map +1 -1
- package/dist/projection/experimental/kernels/somerc.d.ts +2 -2
- package/dist/projection/experimental/kernels/somerc.d.ts.map +1 -1
- package/dist/projection/experimental/kernels/somerc.js +35 -37
- package/dist/projection/experimental/kernels/somerc.js.map +1 -1
- package/dist/projection/experimental/kernels/stere.d.ts.map +1 -1
- package/dist/projection/experimental/kernels/stere.js +15 -3
- package/dist/projection/experimental/kernels/stere.js.map +1 -1
- package/dist/projection/experimental/kernels/sterea.d.ts.map +1 -1
- package/dist/projection/experimental/kernels/sterea.js +4 -2
- package/dist/projection/experimental/kernels/sterea.js.map +1 -1
- package/dist/projection/experimental/kernels/tmerc.js +1 -1
- package/dist/projection/experimental/kernels/tmerc.js.map +1 -1
- package/dist/projection/experimental/kernels/tpers.js +1 -1
- package/dist/projection/experimental/kernels/tpers.js.map +1 -1
- package/dist/projection/experimental/kernels/vandg.js +1 -1
- package/dist/projection/experimental/kernels/vandg.js.map +1 -1
- package/dist/projection/experimental/kinematic-helmert.js +1 -1
- package/dist/projection/experimental/kinematic-helmert.js.map +1 -1
- package/dist/projection/experimental/projections/gnom.d.ts.map +1 -1
- package/dist/projection/experimental/projections/gnom.js +4 -2
- package/dist/projection/experimental/projections/gnom.js.map +1 -1
- package/dist/projection/experimental/projections/laea.js +3 -3
- package/dist/projection/experimental/projections/laea.js.map +1 -1
- package/dist/projection/experimental/projections/ortho.js +4 -4
- package/dist/projection/experimental/projections/ortho.js.map +1 -1
- package/dist/projection/experimental/rendering-profile/azimuthal-rendering-bounds.d.ts +7 -0
- package/dist/projection/experimental/rendering-profile/azimuthal-rendering-bounds.d.ts.map +1 -1
- package/dist/projection/experimental/rendering-profile/azimuthal-rendering-bounds.js +42 -2
- package/dist/projection/experimental/rendering-profile/azimuthal-rendering-bounds.js.map +1 -1
- package/dist/projection/index.cjs +1870 -365
- package/dist/projection/index.cjs.map +3 -3
- package/dist/rhumb-path.d.ts +28 -0
- package/dist/rhumb-path.d.ts.map +1 -0
- package/dist/rhumb-path.js +100 -0
- package/dist/rhumb-path.js.map +1 -0
- package/dist/rhumb-polygon.d.ts +11 -0
- package/dist/rhumb-polygon.d.ts.map +1 -0
- package/dist/rhumb-polygon.js +19 -0
- package/dist/rhumb-polygon.js.map +1 -0
- package/dist/subdivide-geodesic-polyline.d.ts +15 -0
- package/dist/subdivide-geodesic-polyline.d.ts.map +1 -0
- package/dist/subdivide-geodesic-polyline.js +52 -0
- package/dist/subdivide-geodesic-polyline.js.map +1 -0
- package/dist/subdivide-rhumb-polyline.d.ts +12 -0
- package/dist/subdivide-rhumb-polyline.d.ts.map +1 -0
- package/dist/subdivide-rhumb-polyline.js +82 -0
- package/dist/subdivide-rhumb-polyline.js.map +1 -0
- package/dist/triaxial/integrate.d.ts +2 -0
- package/dist/triaxial/integrate.d.ts.map +1 -0
- package/dist/triaxial/integrate.js +76 -0
- package/dist/triaxial/integrate.js.map +1 -0
- package/dist/triaxial.cjs +204 -0
- package/dist/triaxial.cjs.map +6 -0
- package/dist/triaxial.d.ts +38 -0
- package/dist/triaxial.d.ts.map +1 -0
- package/dist/triaxial.js +121 -0
- package/dist/triaxial.js.map +1 -0
- package/dist/vendor/geographiclib-geodesic/runtime.d.ts +9 -0
- package/dist/vendor/geographiclib-geodesic/runtime.d.ts.map +1 -0
- package/dist/vendor/geographiclib-geodesic/runtime.js +2244 -0
- package/dist/vendor/geographiclib-geodesic/runtime.js.map +1 -0
- package/dist/wkb/index.cjs +7 -2
- package/dist/wkb/index.cjs.map +1 -1
- package/dist/wkb/wkb-builder.d.ts.map +1 -1
- package/dist/wkb/wkb-builder.js +9 -2
- package/dist/wkb/wkb-builder.js.map +1 -1
- package/package.json +30 -6
- package/projection/THIRD-PARTY-NOTICES.md +58 -11
- package/src/constants.ts +1 -1
- package/src/discontinuous/AIR-OCEAN-LICENSE.txt +26 -0
- package/src/discontinuous/D3-LICENSE.txt +37 -0
- package/src/discontinuous/PETROFF-LICENSE.txt +55 -0
- package/src/discontinuous/PROJ-LICENSE.txt +34 -0
- package/src/discontinuous/air-ocean-mesh.ts +86 -0
- package/src/discontinuous/albers-usa.ts +181 -0
- package/src/discontinuous/cap-map.ts +406 -0
- package/src/discontinuous/elastic/README.md +20 -0
- package/src/discontinuous/elastic/UNLICENSE.txt +24 -0
- package/src/discontinuous/elastic/data.ts +86 -0
- package/src/discontinuous/elastic/elasticI.ts +5238 -0
- package/src/discontinuous/elastic/elasticII.ts +18167 -0
- package/src/discontinuous/elastic/elasticIII.ts +29571 -0
- package/src/discontinuous/elastic/geometry.ts +172 -0
- package/src/discontinuous/elastic/grid.ts +194 -0
- package/src/discontinuous/elastic/map.ts +317 -0
- package/src/discontinuous/gray-fuller.ts +38 -0
- package/src/discontinuous/gringorten-kernel.ts +160 -0
- package/src/discontinuous/healpix.ts +61 -0
- package/src/discontinuous/layout.ts +177 -0
- package/src/discontinuous/map-engine.ts +528 -0
- package/src/discontinuous/map-layout.ts +605 -0
- package/src/discontinuous/map-transition.ts +339 -0
- package/src/discontinuous/math.ts +67 -0
- package/src/discontinuous/mercator-map.ts +155 -0
- package/src/discontinuous/myriahedral/graticule.ts +40 -0
- package/src/discontinuous/myriahedral/mesh.ts +138 -0
- package/src/discontinuous/myriahedral/unfold.ts +208 -0
- package/src/discontinuous/myriahedral.ts +285 -0
- package/src/discontinuous/petroff.ts +178 -0
- package/src/discontinuous/polyhedral.ts +138 -0
- package/src/discontinuous/prepare-features.ts +239 -0
- package/src/discontinuous/presets.ts +450 -0
- package/src/discontinuous/projection-catalog.ts +132 -0
- package/src/discontinuous/quincuncial-kernel.ts +173 -0
- package/src/discontinuous/quincuncial-star.ts +328 -0
- package/src/discontinuous/regional-map.ts +228 -0
- package/src/discontinuous/retroazimuthal-map.ts +52 -0
- package/src/discontinuous/rotated-map.ts +86 -0
- package/src/discontinuous/snyder-mesh.ts +88 -0
- package/src/discontinuous/snyder.ts +171 -0
- package/src/discontinuous/spherical-clip/D3-GEO-LICENSE.txt +34 -0
- package/src/discontinuous/spherical-clip/README.md +16 -0
- package/src/discontinuous/spherical-clip/cartesian.js +43 -0
- package/src/discontinuous/spherical-clip/circle.js +35 -0
- package/src/discontinuous/spherical-clip/clip-buffer.js +29 -0
- package/src/discontinuous/spherical-clip/clip-circle.js +197 -0
- package/src/discontinuous/spherical-clip/clip-index.js +140 -0
- package/src/discontinuous/spherical-clip/clip-rejoin.js +111 -0
- package/src/discontinuous/spherical-clip/helpers.js +20 -0
- package/src/discontinuous/spherical-clip/math.js +45 -0
- package/src/discontinuous/spherical-clip/noop.js +6 -0
- package/src/discontinuous/spherical-clip/pointEqual.js +10 -0
- package/src/discontinuous/spherical-clip/polygonContains.js +96 -0
- package/src/discontinuous/world-composite-kernels.ts +30 -0
- package/src/discontinuous/world-kernels/INTEGRATE-LICENSE.txt +21 -0
- package/src/discontinuous/world-kernels/README.md +24 -0
- package/src/discontinuous/world-kernels/airy.js +43 -0
- package/src/discontinuous/world-kernels/aitoff.js +48 -0
- package/src/discontinuous/world-kernels/armadillo.js +51 -0
- package/src/discontinuous/world-kernels/august.js +36 -0
- package/src/discontinuous/world-kernels/baker.js +50 -0
- package/src/discontinuous/world-kernels/bertin.js +41 -0
- package/src/discontinuous/world-kernels/boggs.js +32 -0
- package/src/discontinuous/world-kernels/bonne.js +27 -0
- package/src/discontinuous/world-kernels/bottomley.js +25 -0
- package/src/discontinuous/world-kernels/bromley.js +10 -0
- package/src/discontinuous/world-kernels/chamberlin.js +97 -0
- package/src/discontinuous/world-kernels/collignon.js +17 -0
- package/src/discontinuous/world-kernels/craig.js +33 -0
- package/src/discontinuous/world-kernels/craster.js +18 -0
- package/src/discontinuous/world-kernels/cylindricalEqualArea.js +21 -0
- package/src/discontinuous/world-kernels/cylindricalStereographic.js +21 -0
- package/src/discontinuous/world-kernels/d3-geo-raw.js +26 -0
- package/src/discontinuous/world-kernels/eckert1.js +18 -0
- package/src/discontinuous/world-kernels/eckert2.js +17 -0
- package/src/discontinuous/world-kernels/eckert3.js +17 -0
- package/src/discontinuous/world-kernels/eckert4.js +24 -0
- package/src/discontinuous/world-kernels/eckert5.js +17 -0
- package/src/discontinuous/world-kernels/eckert6.js +22 -0
- package/src/discontinuous/world-kernels/eisenlohr.js +88 -0
- package/src/discontinuous/world-kernels/fahey.js +19 -0
- package/src/discontinuous/world-kernels/foucaut.js +20 -0
- package/src/discontinuous/world-kernels/foucautSinusoidal.js +38 -0
- package/src/discontinuous/world-kernels/ginzburg4.js +17 -0
- package/src/discontinuous/world-kernels/ginzburg5.js +17 -0
- package/src/discontinuous/world-kernels/ginzburg6.js +19 -0
- package/src/discontinuous/world-kernels/ginzburg8.js +34 -0
- package/src/discontinuous/world-kernels/ginzburg9.js +17 -0
- package/src/discontinuous/world-kernels/ginzburgPolyconic.js +64 -0
- package/src/discontinuous/world-kernels/hammer.js +37 -0
- package/src/discontinuous/world-kernels/hammerRetroazimuthal.js +63 -0
- package/src/discontinuous/world-kernels/hill.js +57 -0
- package/src/discontinuous/world-kernels/homolosine.js +24 -0
- package/src/discontinuous/world-kernels/hufnagel.js +68 -0
- package/src/discontinuous/world-kernels/hyperelliptical.js +56 -0
- package/src/discontinuous/world-kernels/integrate.js +99 -0
- package/src/discontinuous/world-kernels/kavrayskiy7.js +15 -0
- package/src/discontinuous/world-kernels/lagrange.js +32 -0
- package/src/discontinuous/world-kernels/larrivee.js +43 -0
- package/src/discontinuous/world-kernels/laskowski.js +50 -0
- package/src/discontinuous/world-kernels/littrow.js +19 -0
- package/src/discontinuous/world-kernels/loximuthal.js +38 -0
- package/src/discontinuous/world-kernels/math.js +98 -0
- package/src/discontinuous/world-kernels/miller.js +15 -0
- package/src/discontinuous/world-kernels/modifiedStereographic.js +112 -0
- package/src/discontinuous/world-kernels/mollweide.js +30 -0
- package/src/discontinuous/world-kernels/mtFlatPolarParabolic.js +23 -0
- package/src/discontinuous/world-kernels/mtFlatPolarQuartic.js +29 -0
- package/src/discontinuous/world-kernels/mtFlatPolarSinusoidal.js +25 -0
- package/src/discontinuous/world-kernels/naturalEarth2.js +46 -0
- package/src/discontinuous/world-kernels/nellHammer.js +20 -0
- package/src/discontinuous/world-kernels/newton.js +77 -0
- package/src/discontinuous/world-kernels/nicolosi.js +60 -0
- package/src/discontinuous/world-kernels/patterson.js +45 -0
- package/src/discontinuous/world-kernels/polyconic.js +36 -0
- package/src/discontinuous/world-kernels/rectangularPolyconic.js +41 -0
- package/src/discontinuous/world-kernels/robinson.js +88 -0
- package/src/discontinuous/world-kernels/satellite.js +44 -0
- package/src/discontinuous/world-kernels/sinuMollweide.js +24 -0
- package/src/discontinuous/world-kernels/sinusoidal.js +15 -0
- package/src/discontinuous/world-kernels/times.js +19 -0
- package/src/discontinuous/world-kernels/twoPointEquidistant.js +41 -0
- package/src/discontinuous/world-kernels/vanDerGrinten.js +48 -0
- package/src/discontinuous/world-kernels/vanDerGrinten2.js +32 -0
- package/src/discontinuous/world-kernels/vanDerGrinten3.js +24 -0
- package/src/discontinuous/world-kernels/vanDerGrinten4.js +70 -0
- package/src/discontinuous/world-kernels/wagner.js +61 -0
- package/src/discontinuous/world-kernels/wagner4.js +13 -0
- package/src/discontinuous/world-kernels/wagner6.js +15 -0
- package/src/discontinuous/world-kernels/wiechel.js +25 -0
- package/src/discontinuous/world-kernels/winkel3.js +45 -0
- package/src/discontinuous/world-kernels.ts +249 -0
- package/src/discontinuous/world-map.ts +257 -0
- package/src/discontinuous.ts +134 -0
- package/src/elastic.ts +7 -0
- package/src/ellipsoid-geodesic.ts +159 -0
- package/src/ellipsoid-helpers/ellipsoid-transform.ts +17 -5
- package/src/ellipsoid-helpers/exact-nearest-surface.ts +118 -0
- package/src/ellipsoid-helpers/intersection-bounds.ts +85 -0
- package/src/ellipsoid-helpers/nearest-surface.ts +157 -0
- package/src/ellipsoid-helpers/rhumb-pole-distance.ts +76 -0
- package/src/ellipsoid-helpers/scale-to-geodetic-surface.ts +14 -107
- package/src/ellipsoid-helpers/surface-polygon.ts +210 -0
- package/src/ellipsoid-helpers/tangent-plane-numerics.ts +124 -0
- package/src/ellipsoid-metrics.ts +225 -0
- package/src/ellipsoid-rhumb.ts +404 -0
- package/src/ellipsoid-tangent-plane.ts +232 -36
- package/src/ellipsoid-transforms.ts +61 -0
- package/src/ellipsoid.ts +210 -126
- package/src/entries/ellipsoid.ts +36 -0
- package/src/expressions.ts +2 -1
- package/src/geoarrow/codecs.ts +3 -9
- package/src/geoarrow/index.ts +3 -1
- package/src/geoarrow/types.ts +40 -0
- package/src/geodesic-exact/area.ts +70 -0
- package/src/geodesic-exact/inverse-engine.ts +166 -0
- package/src/geodesic-exact/polygon.ts +36 -0
- package/src/geodesic-exact/quadrature.ts +60 -0
- package/src/geodesic-exact.ts +290 -0
- package/src/geodesic-intersections.ts +598 -0
- package/src/geodesic-path.ts +128 -0
- package/src/geodesic-polygon.ts +19 -0
- package/src/geographic-seams/edge.ts +406 -0
- package/src/geographic-seams/polygon.ts +478 -0
- package/src/geographic-seams/types.ts +67 -0
- package/src/geographic-seams.ts +81 -0
- package/src/globe.ts +17 -0
- package/src/lng-lat-rectangle.ts +1 -1
- package/src/local-reference-frame.ts +320 -0
- package/src/make-obb-from-region.ts +1 -1
- package/src/projection/experimental/authalic-latitude.ts +49 -0
- package/src/projection/experimental/common/adjust_lat.ts +2 -2
- package/src/projection/experimental/common/adjust_lon.ts +1 -1
- package/src/projection/experimental/common/asinhy.ts +1 -1
- package/src/projection/experimental/common/asinz.ts +1 -1
- package/src/projection/experimental/common/authlat.ts +1 -1
- package/src/projection/experimental/common/authset.ts +1 -1
- package/src/projection/experimental/common/clens.ts +1 -1
- package/src/projection/experimental/common/clens_cmplx.ts +1 -1
- package/src/projection/experimental/common/constants.ts +1 -1
- package/src/projection/experimental/common/cosh.ts +1 -1
- package/src/projection/experimental/common/e0fn.ts +1 -1
- package/src/projection/experimental/common/e1fn.ts +1 -1
- package/src/projection/experimental/common/e2fn.ts +1 -1
- package/src/projection/experimental/common/e3fn.ts +1 -1
- package/src/projection/experimental/common/fL.ts +1 -1
- package/src/projection/experimental/common/gN.ts +1 -1
- package/src/projection/experimental/common/gatg.ts +1 -1
- package/src/projection/experimental/common/hypot.ts +1 -1
- package/src/projection/experimental/common/imlfn.ts +1 -1
- package/src/projection/experimental/common/invlatiso.ts +1 -1
- package/src/projection/experimental/common/iqsfnz.ts +1 -1
- package/src/projection/experimental/common/latiso.ts +1 -1
- package/src/projection/experimental/common/log1py.ts +1 -1
- package/src/projection/experimental/common/mlfn.ts +1 -1
- package/src/projection/experimental/common/msfnz.ts +1 -1
- package/src/projection/experimental/common/phi2z.ts +1 -1
- package/src/projection/experimental/common/pj_enfn.ts +1 -1
- package/src/projection/experimental/common/pj_inv_mlfn.ts +1 -1
- package/src/projection/experimental/common/pj_mlfn.ts +1 -1
- package/src/projection/experimental/common/qsfnz.ts +1 -1
- package/src/projection/experimental/common/sign.ts +1 -1
- package/src/projection/experimental/common/sinh.ts +1 -1
- package/src/projection/experimental/common/srat.ts +1 -1
- package/src/projection/experimental/common/tsfnz.ts +8 -7
- package/src/projection/experimental/common/vincenty.ts +1 -1
- package/src/projection/experimental/crs/datum-table.ts +1 -1
- package/src/projection/experimental/crs/ellipsoid-table.ts +1 -1
- package/src/projection/experimental/crs/primemeridian-table.ts +1 -1
- package/src/projection/experimental/crs/structured.ts +1 -1
- package/src/projection/experimental/crs/wkt.ts +1 -1
- package/src/projection/experimental/datum.ts +1 -1
- package/src/projection/experimental/ellipsoidal-gnomonic.ts +83 -0
- package/src/projection/experimental/exact-helmert.ts +1 -1
- package/src/projection/experimental/grids/geotiff.ts +1 -1
- package/src/projection/experimental/grids/grid.ts +1 -1
- package/src/projection/experimental/grids/ntv2.ts +1 -1
- package/src/projection/experimental/helmert-flat.ts +1 -1
- package/src/projection/experimental/inverse-spherical-latitude.ts +19 -0
- package/src/projection/experimental/kernels/aea.ts +10 -31
- package/src/projection/experimental/kernels/aeqd.ts +3 -3
- package/src/projection/experimental/kernels/bonne.ts +1 -1
- package/src/projection/experimental/kernels/cass.ts +1 -1
- package/src/projection/experimental/kernels/cea.ts +1 -1
- package/src/projection/experimental/kernels/eck6.ts +1 -1
- package/src/projection/experimental/kernels/eqdc.ts +1 -1
- package/src/projection/experimental/kernels/eqearth.ts +12 -2
- package/src/projection/experimental/kernels/equi.ts +3 -1
- package/src/projection/experimental/kernels/etmerc.ts +1 -1
- package/src/projection/experimental/kernels/gauss.ts +1 -1
- package/src/projection/experimental/kernels/geos.ts +1 -1
- package/src/projection/experimental/kernels/gnom.ts +11 -1
- package/src/projection/experimental/kernels/gstmerc.ts +1 -1
- package/src/projection/experimental/kernels/krovak.ts +2 -2
- package/src/projection/experimental/kernels/laea.ts +39 -16
- package/src/projection/experimental/kernels/lcc.ts +2 -8
- package/src/projection/experimental/kernels/mill.ts +1 -1
- package/src/projection/experimental/kernels/moll.ts +62 -58
- package/src/projection/experimental/kernels/nzmg.ts +1 -1
- package/src/projection/experimental/kernels/omerc.ts +1 -1
- package/src/projection/experimental/kernels/ortho.ts +38 -92
- package/src/projection/experimental/kernels/poly.ts +97 -36
- package/src/projection/experimental/kernels/qsc.ts +40 -50
- package/src/projection/experimental/kernels/robin.ts +1 -1
- package/src/projection/experimental/kernels/sinu.ts +4 -2
- package/src/projection/experimental/kernels/somerc.ts +45 -55
- package/src/projection/experimental/kernels/stere.ts +31 -3
- package/src/projection/experimental/kernels/sterea.ts +4 -2
- package/src/projection/experimental/kernels/tmerc.ts +1 -1
- package/src/projection/experimental/kernels/tpers.ts +1 -1
- package/src/projection/experimental/kernels/vandg.ts +1 -1
- package/src/projection/experimental/kinematic-helmert-flat.ts +1 -1
- package/src/projection/experimental/kinematic-helmert.ts +1 -1
- package/src/projection/experimental/projection-pipeline.ts +1 -1
- package/src/projection/experimental/projections/gnom.ts +22 -5
- package/src/projection/experimental/projections/laea.ts +3 -3
- package/src/projection/experimental/projections/ob-tran.ts +1 -1
- package/src/projection/experimental/projections/ortho.ts +4 -4
- package/src/projection/experimental/rendering-profile/azimuthal-rendering-bounds.ts +72 -2
- package/src/rhumb-path.ts +128 -0
- package/src/rhumb-polygon.ts +24 -0
- package/src/subdivide-geodesic-polyline.ts +74 -0
- package/src/subdivide-rhumb-polyline.ts +108 -0
- package/src/triaxial/integrate.ts +82 -0
- package/src/triaxial.ts +172 -0
- package/src/type-utils.ts +1 -1
- package/src/vendor/geographiclib-geodesic/README.md +21 -0
- package/src/vendor/geographiclib-geodesic/runtime.js +2338 -0
- package/src/wkb/wkb-builder.ts +11 -2
|
@@ -656,10 +656,10 @@ function numberParameter(parameters, name, fallback) {
|
|
|
656
656
|
return number2;
|
|
657
657
|
}
|
|
658
658
|
function latitudeParameter(parameters, name) {
|
|
659
|
-
const
|
|
660
|
-
if (Math.abs(
|
|
659
|
+
const degrees2 = numberParameter(parameters, name, 0);
|
|
660
|
+
if (Math.abs(degrees2) >= 90)
|
|
661
661
|
throw new Error(`+${name} must be between -90 and 90 degrees`);
|
|
662
|
-
return
|
|
662
|
+
return degrees2 * DEGREES_TO_RADIANS;
|
|
663
663
|
}
|
|
664
664
|
function wrapLongitude(longitude, over = false) {
|
|
665
665
|
if (over || Math.abs(longitude) <= Math.PI)
|
|
@@ -2416,11 +2416,11 @@ var equidistantCylindrical = {
|
|
|
2416
2416
|
var ORIGIN_PARAMETERS = ["lon_0", "lat_0", "x_0", "y_0"];
|
|
2417
2417
|
var SCALE_PARAMETERS = ["k", "k_0"];
|
|
2418
2418
|
function angleParameter(parameters, name, fallback = 0) {
|
|
2419
|
-
const
|
|
2420
|
-
if (name !== "lon_0" && Math.abs(
|
|
2419
|
+
const degrees2 = numberParameter(parameters, name, fallback);
|
|
2420
|
+
if (name !== "lon_0" && Math.abs(degrees2) > 90) {
|
|
2421
2421
|
throw new Error("Latitude parameter must be between -90 and 90 degrees: +" + name);
|
|
2422
2422
|
}
|
|
2423
|
-
return
|
|
2423
|
+
return degrees2 * DEGREES_TO_RADIANS;
|
|
2424
2424
|
}
|
|
2425
2425
|
function flagParameter(parameters, name) {
|
|
2426
2426
|
const present = Object.prototype.hasOwnProperty.call(parameters, name);
|
|
@@ -2487,6 +2487,12 @@ function msfnz_default(eccent, sinphi, cosphi) {
|
|
|
2487
2487
|
return cosphi / Math.sqrt(1 - con * con);
|
|
2488
2488
|
}
|
|
2489
2489
|
|
|
2490
|
+
// dist/projection/experimental/common/tsfnz.js
|
|
2491
|
+
function tsfnz_default(eccent, phi, sinphi) {
|
|
2492
|
+
const cosphi = Math.cos(phi);
|
|
2493
|
+
return Math.exp(eccent * Math.atanh(eccent * sinphi)) * (sinphi > 0 ? cosphi / (1 + sinphi) : (1 - sinphi) / cosphi);
|
|
2494
|
+
}
|
|
2495
|
+
|
|
2490
2496
|
// dist/projection/experimental/common/constants.js
|
|
2491
2497
|
var EPSLN = 1e-10;
|
|
2492
2498
|
var HALF_PI = Math.PI / 2;
|
|
@@ -2497,14 +2503,6 @@ var D2R = Math.PI / 180;
|
|
|
2497
2503
|
var R2D = 180 / Math.PI;
|
|
2498
2504
|
var SEC_TO_RAD = Math.PI / (180 * 3600);
|
|
2499
2505
|
|
|
2500
|
-
// dist/projection/experimental/common/tsfnz.js
|
|
2501
|
-
function tsfnz_default(eccent, phi, sinphi) {
|
|
2502
|
-
var con = eccent * sinphi;
|
|
2503
|
-
var com = 0.5 * eccent;
|
|
2504
|
-
con = Math.pow((1 - con) / (1 + con), com);
|
|
2505
|
-
return Math.tan(0.5 * (HALF_PI - phi)) / con;
|
|
2506
|
-
}
|
|
2507
|
-
|
|
2508
2506
|
// dist/projection/experimental/common/sign.js
|
|
2509
2507
|
function sign_default(x) {
|
|
2510
2508
|
return x < 0 ? -1 : 1;
|
|
@@ -2570,13 +2568,10 @@ function initialize(state) {
|
|
|
2570
2568
|
function forward(state, p) {
|
|
2571
2569
|
var lon = p.x;
|
|
2572
2570
|
var lat = p.y;
|
|
2573
|
-
if (Math.abs(2 * Math.abs(lat) - Math.PI) <= EPSLN) {
|
|
2574
|
-
lat = sign_default(lat) * (HALF_PI - 2 * EPSLN);
|
|
2575
|
-
}
|
|
2576
2571
|
var con = Math.abs(Math.abs(lat) - HALF_PI);
|
|
2577
2572
|
var ts, rh1;
|
|
2578
2573
|
if (con > EPSLN) {
|
|
2579
|
-
ts = tsfnz_default(state.e, lat, Math.sin(lat));
|
|
2574
|
+
ts = state.sphere ? 1 / Math.tan(Math.PI / 4 + lat / 2) : tsfnz_default(state.e, lat, Math.sin(lat));
|
|
2580
2575
|
rh1 = state.a * state.f0 * Math.pow(ts, state.ns);
|
|
2581
2576
|
} else {
|
|
2582
2577
|
con = lat * state.ns;
|
|
@@ -2673,12 +2668,35 @@ function qsfnz_default(eccent, sinphi) {
|
|
|
2673
2668
|
}
|
|
2674
2669
|
}
|
|
2675
2670
|
|
|
2676
|
-
// dist/projection/experimental/common/
|
|
2677
|
-
function
|
|
2678
|
-
|
|
2679
|
-
|
|
2671
|
+
// dist/projection/experimental/common/iqsfnz.js
|
|
2672
|
+
function iqsfnz_default(eccent, q) {
|
|
2673
|
+
var temp = 1 - (1 - eccent * eccent) / (2 * eccent) * Math.log((1 - eccent) / (1 + eccent));
|
|
2674
|
+
const roundoff = 4 * Number.EPSILON * temp;
|
|
2675
|
+
if (Math.abs(q) > temp + roundoff)
|
|
2676
|
+
return NaN;
|
|
2677
|
+
if (Math.abs(Math.abs(q) - temp) <= roundoff) {
|
|
2678
|
+
if (q < 0) {
|
|
2679
|
+
return -1 * HALF_PI;
|
|
2680
|
+
} else {
|
|
2681
|
+
return HALF_PI;
|
|
2682
|
+
}
|
|
2680
2683
|
}
|
|
2681
|
-
|
|
2684
|
+
var phi = Math.asin(0.5 * q);
|
|
2685
|
+
var dphi;
|
|
2686
|
+
var sin_phi;
|
|
2687
|
+
var cos_phi;
|
|
2688
|
+
var con;
|
|
2689
|
+
for (var i = 0; i < 30; i++) {
|
|
2690
|
+
sin_phi = Math.sin(phi);
|
|
2691
|
+
cos_phi = Math.cos(phi);
|
|
2692
|
+
con = eccent * sin_phi;
|
|
2693
|
+
dphi = Math.pow(1 - con * con, 2) / (2 * cos_phi) * (q / (1 - eccent * eccent) - sin_phi / (1 - con * con) + 0.5 / eccent * Math.log((1 - con) / (1 + con)));
|
|
2694
|
+
phi += dphi;
|
|
2695
|
+
if (Math.abs(dphi) <= 1e-10) {
|
|
2696
|
+
return phi;
|
|
2697
|
+
}
|
|
2698
|
+
}
|
|
2699
|
+
return NaN;
|
|
2682
2700
|
}
|
|
2683
2701
|
|
|
2684
2702
|
// dist/projection/experimental/kernels/aea.js
|
|
@@ -2743,36 +2761,20 @@ function inverse2(state, p) {
|
|
|
2743
2761
|
}
|
|
2744
2762
|
con = rh1 * state.ns0 / state.a;
|
|
2745
2763
|
if (state.sphere) {
|
|
2746
|
-
|
|
2764
|
+
const sinLatitude = (state.c - con * con) / (2 * state.ns0);
|
|
2765
|
+
if (Math.abs(sinLatitude) > 1 + 8 * Number.EPSILON)
|
|
2766
|
+
return null;
|
|
2767
|
+
lat = Math.asin(Math.max(-1, Math.min(1, sinLatitude)));
|
|
2747
2768
|
} else {
|
|
2748
2769
|
qs = (state.c - con * con) / state.ns0;
|
|
2749
|
-
|
|
2770
|
+
const poleQ = qsfnz_default(state.e3, 1);
|
|
2771
|
+
lat = Math.abs(Math.abs(qs) - poleQ) <= 16 * Number.EPSILON * poleQ ? Math.sign(qs) * Math.PI / 2 : iqsfnz_default(state.e3, qs);
|
|
2750
2772
|
}
|
|
2751
2773
|
lon = adjust_lon_default(theta / state.ns0 + state.long0, state.over);
|
|
2752
2774
|
p.x = lon;
|
|
2753
2775
|
p.y = lat;
|
|
2754
2776
|
return p;
|
|
2755
2777
|
}
|
|
2756
|
-
function phi1z(eccent, qs) {
|
|
2757
|
-
var sinphi, cosphi, con, com, dphi;
|
|
2758
|
-
var phi = asinz_default(0.5 * qs);
|
|
2759
|
-
if (eccent < EPSLN) {
|
|
2760
|
-
return phi;
|
|
2761
|
-
}
|
|
2762
|
-
var eccnts = eccent * eccent;
|
|
2763
|
-
for (var i = 1; i <= 25; i++) {
|
|
2764
|
-
sinphi = Math.sin(phi);
|
|
2765
|
-
cosphi = Math.cos(phi);
|
|
2766
|
-
con = eccent * sinphi;
|
|
2767
|
-
com = 1 - con * con;
|
|
2768
|
-
dphi = 0.5 * com * com / cosphi * (qs / (1 - eccnts) - sinphi / com + 0.5 / eccent * Math.log((1 - con) / (1 + con)));
|
|
2769
|
-
phi = phi + dphi;
|
|
2770
|
-
if (Math.abs(dphi) <= 1e-7) {
|
|
2771
|
-
return phi;
|
|
2772
|
-
}
|
|
2773
|
-
}
|
|
2774
|
-
return null;
|
|
2775
|
-
}
|
|
2776
2778
|
function createState2(base) {
|
|
2777
2779
|
const state = {
|
|
2778
2780
|
...base,
|
|
@@ -2866,7 +2868,7 @@ function pj_inv_mlfn_default(arg, es, en) {
|
|
|
2866
2868
|
|
|
2867
2869
|
// dist/projection/experimental/common/adjust_lat.js
|
|
2868
2870
|
function adjust_lat_default(x) {
|
|
2869
|
-
return Math.abs(x)
|
|
2871
|
+
return Math.abs(x) <= HALF_PI ? x : x - sign_default(x) * Math.PI;
|
|
2870
2872
|
}
|
|
2871
2873
|
|
|
2872
2874
|
// dist/projection/experimental/kernels/eqdc.js
|
|
@@ -2976,6 +2978,50 @@ var equidistantConic = {
|
|
|
2976
2978
|
}
|
|
2977
2979
|
};
|
|
2978
2980
|
|
|
2981
|
+
// dist/projection/experimental/authalic-latitude.js
|
|
2982
|
+
function authalicPoleDifference(e, latitude) {
|
|
2983
|
+
const sin = Math.abs(Math.sin(latitude));
|
|
2984
|
+
const cos = Math.cos(latitude);
|
|
2985
|
+
const delta = cos * cos / (1 + sin);
|
|
2986
|
+
if (e === 0)
|
|
2987
|
+
return 2 * delta;
|
|
2988
|
+
const es = e * e;
|
|
2989
|
+
return delta * (1 + es * sin) / (1 - es * sin * sin) + (1 - es) / e * Math.atanh(e * delta / (1 - es * sin));
|
|
2990
|
+
}
|
|
2991
|
+
function authalicLatitude(e, qp, latitude) {
|
|
2992
|
+
if (latitude === 0 || e === 0)
|
|
2993
|
+
return latitude;
|
|
2994
|
+
const fraction = authalicPoleDifference(e, latitude) / qp;
|
|
2995
|
+
return Math.atan2(Math.sign(latitude) * (1 - fraction), Math.sqrt(fraction * (2 - fraction)));
|
|
2996
|
+
}
|
|
2997
|
+
function inverseAuthalicLatitude(e, qp, beta) {
|
|
2998
|
+
if (e === 0 || beta === 0 || Math.abs(beta) === Math.PI / 2)
|
|
2999
|
+
return beta;
|
|
3000
|
+
const sinBeta = Math.abs(Math.sin(beta));
|
|
3001
|
+
const cosBeta = Math.cos(beta);
|
|
3002
|
+
const target = qp * cosBeta * cosBeta / (1 + sinBeta);
|
|
3003
|
+
let latitude = Math.abs(beta);
|
|
3004
|
+
const es = e * e;
|
|
3005
|
+
let lower = 0;
|
|
3006
|
+
let upper = Math.PI / 2;
|
|
3007
|
+
for (let i = 0; i < 48; i++) {
|
|
3008
|
+
const sin = Math.sin(latitude);
|
|
3009
|
+
const denominator = 1 - es * sin * sin;
|
|
3010
|
+
const derivative = 2 * (1 - es) * Math.cos(latitude) / (denominator * denominator);
|
|
3011
|
+
const residual = authalicPoleDifference(e, latitude) - target;
|
|
3012
|
+
const step = residual / derivative;
|
|
3013
|
+
if (Math.abs(step) < 2e-15)
|
|
3014
|
+
return Math.sign(beta) * latitude;
|
|
3015
|
+
if (residual > 0)
|
|
3016
|
+
lower = latitude;
|
|
3017
|
+
else
|
|
3018
|
+
upper = latitude;
|
|
3019
|
+
const candidate = latitude + step;
|
|
3020
|
+
latitude = candidate > lower && candidate < upper ? candidate : (lower + upper) / 2;
|
|
3021
|
+
}
|
|
3022
|
+
throw new Error("Authalic latitude inverse did not converge");
|
|
3023
|
+
}
|
|
3024
|
+
|
|
2979
3025
|
// dist/projection/experimental/rendering-profile/spherical-rendering-domain.js
|
|
2980
3026
|
function geographicVector(longitude, latitude) {
|
|
2981
3027
|
return [
|
|
@@ -3152,6 +3198,25 @@ function sphericalAzimuthalBounds(base, parameters, domain, kind) {
|
|
|
3152
3198
|
const factor = base.a * (kind === "stere" ? 2 * base.k0 : 1);
|
|
3153
3199
|
return envelope(add([base.x0, base.x0], scale(range(east), factor)), add([base.y0, base.y0], scale(range(north), factor)));
|
|
3154
3200
|
}
|
|
3201
|
+
function orthographicBounds(base, parameters, domain) {
|
|
3202
|
+
const sin0 = Math.sin(base.lat0);
|
|
3203
|
+
const cos0 = Math.cos(base.lat0);
|
|
3204
|
+
const latitudeSin = sphericalRange([0, 0, 1], parameters, domain);
|
|
3205
|
+
if (Math.abs(sin0) < 1e-15 && (!domain || Math.abs(domain.distance - Math.PI / 2) < 1e-15)) {
|
|
3206
|
+
const x = (maximize) => {
|
|
3207
|
+
const extremum = sphericalExtremum([0, 1, 0], parameters, domain, maximize);
|
|
3208
|
+
return extremum.value / Math.sqrt(1 - base.es * Math.sin(extremum.point[1]) ** 2);
|
|
3209
|
+
};
|
|
3210
|
+
const y = (sin) => (1 - base.es) * sin / Math.sqrt(1 - base.es * sin * sin);
|
|
3211
|
+
return envelope(add([base.x0, base.x0], scale([x(false), x(true)], base.a * base.k0)), add([base.y0, base.y0], scale([y(latitudeSin[0]), y(latitudeSin[1])], base.a * base.k0)));
|
|
3212
|
+
}
|
|
3213
|
+
const squareMin = latitudeSin[0] <= 0 && latitudeSin[1] >= 0 ? 0 : Math.min(latitudeSin[0] ** 2, latitudeSin[1] ** 2);
|
|
3214
|
+
const squareMax = Math.max(latitudeSin[0] ** 2, latitudeSin[1] ** 2);
|
|
3215
|
+
const nu = ordered(1 / Math.sqrt(1 - base.es * squareMin), 1 / Math.sqrt(1 - base.es * squareMax));
|
|
3216
|
+
const factor = base.a * base.k0;
|
|
3217
|
+
const yShift = base.es * sin0 * cos0 / Math.sqrt(1 - base.es * sin0 * sin0);
|
|
3218
|
+
return envelope(add([base.x0, base.x0], scale(multiply(sphericalRange([0, 1, 0], parameters, domain), nu), factor)), add([base.y0 + factor * yShift, base.y0 + factor * yShift], scale(multiply(sphericalRange([-sin0, 0, (1 - base.es) * cos0], parameters, domain), nu), factor)));
|
|
3219
|
+
}
|
|
3155
3220
|
function equidistantAzimuthalBounds(base, parameters, domain) {
|
|
3156
3221
|
const minimum = sphericalRange([Math.cos(base.lat0), 0, Math.sin(base.lat0)], parameters, domain)[0];
|
|
3157
3222
|
const radius2 = base.a / Math.sqrt(1 - base.es) * Math.acos(Math.max(-1, Math.min(1, minimum)));
|
|
@@ -3204,32 +3269,24 @@ function perspectiveBounds(base, p, tilt, azimuth, parameters, domain) {
|
|
|
3204
3269
|
const y = sphericalRatioRange(up, denominator, cw * p, parameters, domain);
|
|
3205
3270
|
return envelope(add([base.x0, base.x0], scale(x, base.a * (p - 1) * cw)), add([base.y0, base.y0], scale(y, base.a * (p - 1))));
|
|
3206
3271
|
}
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
var APA = [];
|
|
3218
|
-
APA[0] = es * P00;
|
|
3219
|
-
t = es * es;
|
|
3220
|
-
APA[0] += t * P01;
|
|
3221
|
-
APA[1] = t * P10;
|
|
3222
|
-
t *= es;
|
|
3223
|
-
APA[0] += t * P02;
|
|
3224
|
-
APA[1] += t * P11;
|
|
3225
|
-
APA[2] = t * P20;
|
|
3226
|
-
return APA;
|
|
3272
|
+
function ellipsoidalGnomonicBounds(base, region, domain) {
|
|
3273
|
+
const dot2 = sphericalRange([Math.cos(base.lat0), 0, Math.sin(base.lat0)], region, domain)[0];
|
|
3274
|
+
const angle = Math.acos(Math.max(-1, Math.min(1, dot2)));
|
|
3275
|
+
const q = 1 - base.es;
|
|
3276
|
+
const distance = base.a * angle / Math.sqrt(q);
|
|
3277
|
+
const scale2 = Math.cos(angle / q);
|
|
3278
|
+
if (!(scale2 > 0))
|
|
3279
|
+
throw new Error("Gnomonic rendering coverage approaches its ellipsoidal horizon");
|
|
3280
|
+
const radius2 = distance / scale2;
|
|
3281
|
+
return envelope([base.x0 - radius2, base.x0 + radius2], [base.y0 - radius2, base.y0 + radius2]);
|
|
3227
3282
|
}
|
|
3228
3283
|
|
|
3229
|
-
// dist/projection/experimental/
|
|
3230
|
-
function
|
|
3231
|
-
|
|
3232
|
-
|
|
3284
|
+
// dist/projection/experimental/inverse-spherical-latitude.js
|
|
3285
|
+
function inverseSphericalLatitude(sin0, cos0, sinDistance, cosDistance, x, y, radius2) {
|
|
3286
|
+
const east = x * sinDistance / radius2;
|
|
3287
|
+
const meridian = cosDistance * cos0 - y * sinDistance * sin0 / radius2;
|
|
3288
|
+
const vertical = cosDistance * sin0 + y * sinDistance * cos0 / radius2;
|
|
3289
|
+
return Math.atan2(vertical, Math.hypot(east, meridian));
|
|
3233
3290
|
}
|
|
3234
3291
|
|
|
3235
3292
|
// dist/projection/experimental/kernels/laea.js
|
|
@@ -3250,7 +3307,6 @@ function initialize4(state) {
|
|
|
3250
3307
|
var sinphi;
|
|
3251
3308
|
state.qp = qsfnz_default(state.e, 1);
|
|
3252
3309
|
state.mmf = 0.5 / (1 - state.es);
|
|
3253
|
-
state.apa = authset(state.es);
|
|
3254
3310
|
switch (state.mode) {
|
|
3255
3311
|
case N_POLE:
|
|
3256
3312
|
state.dd = 1;
|
|
@@ -3321,7 +3377,8 @@ function forward4(state, p) {
|
|
|
3321
3377
|
q = qsfnz_default(state.e, sinphi);
|
|
3322
3378
|
if (state.mode === OBLIQ || state.mode === EQUIT) {
|
|
3323
3379
|
sinb = q / state.qp;
|
|
3324
|
-
|
|
3380
|
+
const poleFraction = authalicPoleDifference(state.e, phi) / state.qp;
|
|
3381
|
+
cosb = Math.sqrt(poleFraction * (2 - poleFraction));
|
|
3325
3382
|
}
|
|
3326
3383
|
switch (state.mode) {
|
|
3327
3384
|
case OBLIQ:
|
|
@@ -3332,11 +3389,11 @@ function forward4(state, p) {
|
|
|
3332
3389
|
break;
|
|
3333
3390
|
case N_POLE:
|
|
3334
3391
|
b = HALF_PI + phi;
|
|
3335
|
-
q = state.qp -
|
|
3392
|
+
q = phi >= 0 ? authalicPoleDifference(state.e, phi) : 2 * state.qp - authalicPoleDifference(state.e, phi);
|
|
3336
3393
|
break;
|
|
3337
3394
|
case S_POLE:
|
|
3338
3395
|
b = phi - HALF_PI;
|
|
3339
|
-
q = state.qp
|
|
3396
|
+
q = phi <= 0 ? authalicPoleDifference(state.e, phi) : 2 * state.qp - authalicPoleDifference(state.e, phi);
|
|
3340
3397
|
break;
|
|
3341
3398
|
}
|
|
3342
3399
|
if (Math.abs(b) < EPSLN) {
|
|
@@ -3380,22 +3437,22 @@ function inverse4(state, p) {
|
|
|
3380
3437
|
var cosz = 0, rh, sinz = 0;
|
|
3381
3438
|
rh = Math.sqrt(x * x + y * y);
|
|
3382
3439
|
phi = rh * 0.5;
|
|
3383
|
-
if (phi > 1) {
|
|
3440
|
+
if (phi > 1 + 8 * Number.EPSILON) {
|
|
3384
3441
|
return null;
|
|
3385
3442
|
}
|
|
3386
|
-
phi = 2 * Math.asin(phi);
|
|
3443
|
+
phi = 2 * Math.asin(Math.min(1, phi));
|
|
3387
3444
|
if (state.mode === OBLIQ || state.mode === EQUIT) {
|
|
3388
3445
|
sinz = Math.sin(phi);
|
|
3389
3446
|
cosz = Math.cos(phi);
|
|
3390
3447
|
}
|
|
3391
3448
|
switch (state.mode) {
|
|
3392
3449
|
case EQUIT:
|
|
3393
|
-
phi = Math.abs(rh) <= EPSLN ? 0 :
|
|
3450
|
+
phi = Math.abs(rh) <= EPSLN ? 0 : inverseSphericalLatitude(0, 1, sinz, cosz, x, y, rh);
|
|
3394
3451
|
x *= sinz;
|
|
3395
3452
|
y = cosz * rh;
|
|
3396
3453
|
break;
|
|
3397
3454
|
case OBLIQ:
|
|
3398
|
-
phi = Math.abs(rh) <= EPSLN ? state.lat0 :
|
|
3455
|
+
phi = Math.abs(rh) <= EPSLN ? state.lat0 : inverseSphericalLatitude(state.sinph0, state.cosph0, sinz, cosz, x, y, rh);
|
|
3399
3456
|
x *= sinz * state.cosph0;
|
|
3400
3457
|
y = (cosz - Math.sin(phi) * state.sinph0) * rh;
|
|
3401
3458
|
break;
|
|
@@ -3419,9 +3476,15 @@ function inverse4(state, p) {
|
|
|
3419
3476
|
p.y = state.lat0;
|
|
3420
3477
|
return p;
|
|
3421
3478
|
}
|
|
3422
|
-
|
|
3479
|
+
const sinHalfCe = 0.5 * rho / state.rq;
|
|
3480
|
+
if (sinHalfCe > 1 + 8 * Number.EPSILON)
|
|
3481
|
+
return null;
|
|
3482
|
+
sCe = 2 * Math.asin(Math.min(1, sinHalfCe));
|
|
3423
3483
|
cCe = Math.cos(sCe);
|
|
3424
|
-
|
|
3484
|
+
sCe = Math.sin(sCe);
|
|
3485
|
+
const beta = inverseSphericalLatitude(state.mode === OBLIQ ? state.sinb1 : 0, state.mode === OBLIQ ? state.cosb1 : 1, sCe, cCe, x, y, rho);
|
|
3486
|
+
phi = inverseAuthalicLatitude(state.e, state.qp, beta);
|
|
3487
|
+
x *= sCe;
|
|
3425
3488
|
if (state.mode === OBLIQ) {
|
|
3426
3489
|
ab = cCe * state.sinb1 + y * sCe * state.cosb1 / rho;
|
|
3427
3490
|
q = state.qp * ab;
|
|
@@ -3447,7 +3510,13 @@ function inverse4(state, p) {
|
|
|
3447
3510
|
}
|
|
3448
3511
|
}
|
|
3449
3512
|
lam = Math.atan2(x, y);
|
|
3450
|
-
|
|
3513
|
+
if (Math.abs(ab) > 1 + 8 * Number.EPSILON)
|
|
3514
|
+
return null;
|
|
3515
|
+
if (state.mode === N_POLE || state.mode === S_POLE) {
|
|
3516
|
+
const fraction = Math.max(0, Math.min(2, q / state.qp));
|
|
3517
|
+
const beta = Math.atan2(ab, Math.sqrt(fraction * (2 - fraction)));
|
|
3518
|
+
phi = inverseAuthalicLatitude(state.e, state.qp, beta);
|
|
3519
|
+
}
|
|
3451
3520
|
}
|
|
3452
3521
|
p.x = adjust_lon_default(state.long0 + lam, state.over);
|
|
3453
3522
|
p.y = phi;
|
|
@@ -3459,7 +3528,6 @@ function createState4(base) {
|
|
|
3459
3528
|
mode: 0,
|
|
3460
3529
|
qp: 0,
|
|
3461
3530
|
mmf: 0,
|
|
3462
|
-
apa: [],
|
|
3463
3531
|
dd: 0,
|
|
3464
3532
|
rq: 0,
|
|
3465
3533
|
xmf: 0,
|
|
@@ -3481,7 +3549,7 @@ var lambertAzimuthalEqualArea = {
|
|
|
3481
3549
|
create(context) {
|
|
3482
3550
|
const base = kernelParameters(context);
|
|
3483
3551
|
const state = createState4(base);
|
|
3484
|
-
return withAngularRenderingProfile(guardAzimuthalDomain(base, bindKernel("laea", state, forward4, inverse4)), base, Math.PI * 179 / 180, (region, domain) => equalAreaAzimuthalBounds(base, base.sphere ? 1 : state.xmf || Math.sqrt(state.qp / 2), base.sphere ? 1 : state.ymf || Math.sqrt(state.qp / 2), region, domain, base.sphere ? base.lat0 :
|
|
3552
|
+
return withAngularRenderingProfile(guardAzimuthalDomain(base, bindKernel("laea", state, forward4, inverse4)), base, Math.PI * 179 / 180, (region, domain) => equalAreaAzimuthalBounds(base, base.sphere ? 1 : state.xmf || Math.sqrt(state.qp / 2), base.sphere ? 1 : state.ymf || Math.sqrt(state.qp / 2), region, domain, base.sphere ? base.lat0 : authalicLatitude(base.e, state.qp, base.lat0), base.sphere ? (latitude) => latitude : (latitude) => authalicLatitude(base.e, state.qp, latitude)));
|
|
3485
3553
|
}
|
|
3486
3554
|
};
|
|
3487
3555
|
|
|
@@ -3531,6 +3599,13 @@ function forward5(state, p) {
|
|
|
3531
3599
|
p.y = NaN;
|
|
3532
3600
|
return p;
|
|
3533
3601
|
}
|
|
3602
|
+
if (state.sphere && Math.abs(state.coslat0) <= EPSLN) {
|
|
3603
|
+
const sign = state.lat0 > 0 ? 1 : -1;
|
|
3604
|
+
const radius2 = 2 * state.a * state.k0 * Math.tan(Math.PI / 4 - sign * lat / 2);
|
|
3605
|
+
p.x = state.x0 + radius2 * Math.sin(dlon);
|
|
3606
|
+
p.y = state.y0 - sign * radius2 * Math.cos(dlon);
|
|
3607
|
+
return p;
|
|
3608
|
+
}
|
|
3534
3609
|
if (state.sphere) {
|
|
3535
3610
|
A = 2 * state.k0 / (1 + state.sinlat0 * sinlat + state.coslat0 * coslat * Math.cos(dlon));
|
|
3536
3611
|
p.x = state.a * A * coslat * Math.sin(dlon) + state.x0;
|
|
@@ -3571,7 +3646,7 @@ function inverse5(state, p) {
|
|
|
3571
3646
|
p.y = lat;
|
|
3572
3647
|
return p;
|
|
3573
3648
|
}
|
|
3574
|
-
lat =
|
|
3649
|
+
lat = inverseSphericalLatitude(state.sinlat0, state.coslat0, Math.sin(c), Math.cos(c), p.x, p.y, rh);
|
|
3575
3650
|
if (Math.abs(state.coslat0) < EPSLN) {
|
|
3576
3651
|
if (state.lat0 > 0) {
|
|
3577
3652
|
lon = adjust_lon_default(state.long0 + Math.atan2(p.x, -1 * p.y), state.over);
|
|
@@ -3604,7 +3679,7 @@ function inverse5(state, p) {
|
|
|
3604
3679
|
if (rh <= EPSLN) {
|
|
3605
3680
|
Chi = state.X0;
|
|
3606
3681
|
} else {
|
|
3607
|
-
Chi =
|
|
3682
|
+
Chi = inverseSphericalLatitude(state.sinX0, state.cosX0, Math.sin(ce), Math.cos(ce), p.x, p.y, rh);
|
|
3608
3683
|
lon = adjust_lon_default(state.long0 + Math.atan2(p.x * Math.sin(ce), rh * state.cosX0 * Math.cos(ce) - p.y * state.sinX0 * Math.sin(ce)), state.over);
|
|
3609
3684
|
}
|
|
3610
3685
|
lat = -1 * phi2z_default(state.e, Math.tan(0.5 * (HALF_PI + Chi)));
|
|
@@ -3747,7 +3822,7 @@ function inverse7(state, p) {
|
|
|
3747
3822
|
var c = 2 * Math.atan2(rho, state.R2);
|
|
3748
3823
|
sinc = Math.sin(c);
|
|
3749
3824
|
cosc = Math.cos(c);
|
|
3750
|
-
lat =
|
|
3825
|
+
lat = inverseSphericalLatitude(state.sinc0, state.cosc0, sinc, cosc, p.x, p.y, rho);
|
|
3751
3826
|
lon = Math.atan2(p.x * sinc, rho * state.cosc0 * cosc - p.y * state.sinc0 * sinc);
|
|
3752
3827
|
} else {
|
|
3753
3828
|
lat = state.phic0;
|
|
@@ -3979,7 +4054,7 @@ function inverse8(state, p) {
|
|
|
3979
4054
|
if (Math.abs(rh) <= EPSLN) {
|
|
3980
4055
|
lat = state.lat0;
|
|
3981
4056
|
} else {
|
|
3982
|
-
lat =
|
|
4057
|
+
lat = inverseSphericalLatitude(state.sin_p12, state.cos_p12, sinz, cosz, p.x, p.y, rh);
|
|
3983
4058
|
con = Math.abs(state.lat0) - HALF_PI;
|
|
3984
4059
|
if (Math.abs(con) <= EPSLN) {
|
|
3985
4060
|
if (state.lat0 >= 0) {
|
|
@@ -4854,37 +4929,6 @@ var cassiniSoldner = {
|
|
|
4854
4929
|
}
|
|
4855
4930
|
};
|
|
4856
4931
|
|
|
4857
|
-
// dist/projection/experimental/common/iqsfnz.js
|
|
4858
|
-
function iqsfnz_default(eccent, q) {
|
|
4859
|
-
var temp = 1 - (1 - eccent * eccent) / (2 * eccent) * Math.log((1 - eccent) / (1 + eccent));
|
|
4860
|
-
const roundoff = 4 * Number.EPSILON * temp;
|
|
4861
|
-
if (Math.abs(q) > temp + roundoff)
|
|
4862
|
-
return NaN;
|
|
4863
|
-
if (Math.abs(Math.abs(q) - temp) <= roundoff) {
|
|
4864
|
-
if (q < 0) {
|
|
4865
|
-
return -1 * HALF_PI;
|
|
4866
|
-
} else {
|
|
4867
|
-
return HALF_PI;
|
|
4868
|
-
}
|
|
4869
|
-
}
|
|
4870
|
-
var phi = Math.asin(0.5 * q);
|
|
4871
|
-
var dphi;
|
|
4872
|
-
var sin_phi;
|
|
4873
|
-
var cos_phi;
|
|
4874
|
-
var con;
|
|
4875
|
-
for (var i = 0; i < 30; i++) {
|
|
4876
|
-
sin_phi = Math.sin(phi);
|
|
4877
|
-
cos_phi = Math.cos(phi);
|
|
4878
|
-
con = eccent * sin_phi;
|
|
4879
|
-
dphi = Math.pow(1 - con * con, 2) / (2 * cos_phi) * (q / (1 - eccent * eccent) - sin_phi / (1 - con * con) + 0.5 / eccent * Math.log((1 - con) / (1 + con)));
|
|
4880
|
-
phi += dphi;
|
|
4881
|
-
if (Math.abs(dphi) <= 1e-10) {
|
|
4882
|
-
return phi;
|
|
4883
|
-
}
|
|
4884
|
-
}
|
|
4885
|
-
return NaN;
|
|
4886
|
-
}
|
|
4887
|
-
|
|
4888
4932
|
// dist/projection/experimental/kernels/cea.js
|
|
4889
4933
|
function initialize13(state) {
|
|
4890
4934
|
if (!state.sphere) {
|
|
@@ -4947,6 +4991,14 @@ var cylindricalEqualArea = {
|
|
|
4947
4991
|
}
|
|
4948
4992
|
};
|
|
4949
4993
|
|
|
4994
|
+
// dist/projection/experimental/common/asinz.js
|
|
4995
|
+
function asinz_default(x) {
|
|
4996
|
+
if (Math.abs(x) > 1) {
|
|
4997
|
+
x = x > 1 ? 1 : -1;
|
|
4998
|
+
}
|
|
4999
|
+
return Math.asin(x);
|
|
5000
|
+
}
|
|
5001
|
+
|
|
4950
5002
|
// dist/projection/experimental/kernels/sinu.js
|
|
4951
5003
|
var MAX_ITER3 = 20;
|
|
4952
5004
|
function initialize14(state) {
|
|
@@ -5001,7 +5053,10 @@ function inverse14(state, p) {
|
|
|
5001
5053
|
lat /= state.C_y;
|
|
5002
5054
|
lon = lon / (state.C_x * (state.m + Math.cos(lat)));
|
|
5003
5055
|
if (state.m) {
|
|
5004
|
-
|
|
5056
|
+
const sinLatitude = (state.m * lat + Math.sin(lat)) / state.n;
|
|
5057
|
+
if (Math.abs(sinLatitude) > 1 + 8 * Number.EPSILON)
|
|
5058
|
+
return null;
|
|
5059
|
+
lat = asinz_default(sinLatitude);
|
|
5005
5060
|
} else if (state.n !== 1) {
|
|
5006
5061
|
lat = asinz_default(Math.sin(lat) / state.n);
|
|
5007
5062
|
}
|
|
@@ -5059,6 +5114,33 @@ var eckertVI = {
|
|
|
5059
5114
|
}
|
|
5060
5115
|
};
|
|
5061
5116
|
|
|
5117
|
+
// dist/projection/experimental/common/authset.js
|
|
5118
|
+
var P00 = 0.3333333333333333;
|
|
5119
|
+
var P01 = 0.17222222222222222;
|
|
5120
|
+
var P02 = 0.10257936507936508;
|
|
5121
|
+
var P10 = 0.06388888888888888;
|
|
5122
|
+
var P11 = 0.0664021164021164;
|
|
5123
|
+
var P20 = 0.016415012942191543;
|
|
5124
|
+
function authset(es) {
|
|
5125
|
+
var t;
|
|
5126
|
+
var APA = [];
|
|
5127
|
+
APA[0] = es * P00;
|
|
5128
|
+
t = es * es;
|
|
5129
|
+
APA[0] += t * P01;
|
|
5130
|
+
APA[1] = t * P10;
|
|
5131
|
+
t *= es;
|
|
5132
|
+
APA[0] += t * P02;
|
|
5133
|
+
APA[1] += t * P11;
|
|
5134
|
+
APA[2] = t * P20;
|
|
5135
|
+
return APA;
|
|
5136
|
+
}
|
|
5137
|
+
|
|
5138
|
+
// dist/projection/experimental/common/authlat.js
|
|
5139
|
+
function authlat(beta, APA) {
|
|
5140
|
+
var t = beta + beta;
|
|
5141
|
+
return beta + APA[0] * Math.sin(t) + APA[1] * Math.sin(t + t) + APA[2] * Math.sin(t + t + t);
|
|
5142
|
+
}
|
|
5143
|
+
|
|
5062
5144
|
// dist/projection/experimental/kernels/eqearth.js
|
|
5063
5145
|
var A1 = 1.340264;
|
|
5064
5146
|
var A2 = -0.081106;
|
|
@@ -5100,6 +5182,11 @@ function inverse16(state, p) {
|
|
|
5100
5182
|
p.x /= state.rqda;
|
|
5101
5183
|
p.y /= state.rqda;
|
|
5102
5184
|
}
|
|
5185
|
+
const poleParam = Math.PI / 3;
|
|
5186
|
+
const poleSq = poleParam * poleParam;
|
|
5187
|
+
const poleY = poleParam * (A1 + A2 * poleSq + poleSq ** 3 * (A3 + A4 * poleSq));
|
|
5188
|
+
if (Math.abs(p.y) > poleY + 8 * Number.EPSILON * poleY)
|
|
5189
|
+
return null;
|
|
5103
5190
|
var EPS = 1e-9, NITER = 12, paramLat = p.y, paramLatSq, paramLatPow6, fy, fpy, dlat, i;
|
|
5104
5191
|
for (i = 0; i < NITER; ++i) {
|
|
5105
5192
|
paramLatSq = paramLat * paramLat;
|
|
@@ -5114,7 +5201,11 @@ function inverse16(state, p) {
|
|
|
5114
5201
|
paramLatSq = paramLat * paramLat;
|
|
5115
5202
|
paramLatPow6 = paramLatSq * paramLatSq * paramLatSq;
|
|
5116
5203
|
p.x = M * p.x * (A1 + 3 * A2 * paramLatSq + paramLatPow6 * (7 * A3 + 9 * A4 * paramLatSq)) / Math.cos(paramLat);
|
|
5117
|
-
|
|
5204
|
+
const sinBeta = Math.sin(paramLat) / M;
|
|
5205
|
+
const poleRoundoff = 8 * Number.EPSILON;
|
|
5206
|
+
if (Math.abs(sinBeta) > 1 + poleRoundoff)
|
|
5207
|
+
return null;
|
|
5208
|
+
p.y = Math.abs(sinBeta) >= 1 - poleRoundoff ? Math.sign(sinBeta) * Math.PI / 2 : Math.asin(sinBeta);
|
|
5118
5209
|
if (state.es !== 0) {
|
|
5119
5210
|
p.y = authlat(p.y, state.apa);
|
|
5120
5211
|
}
|
|
@@ -5186,6 +5277,8 @@ function inverse17(state, p) {
|
|
|
5186
5277
|
p.x -= state.x0;
|
|
5187
5278
|
p.y -= state.y0;
|
|
5188
5279
|
var lat = p.y / state.a;
|
|
5280
|
+
if (Math.abs(lat) > Math.PI / 2 && Math.abs(lat) <= Math.PI / 2 + 8 * Number.EPSILON)
|
|
5281
|
+
lat = Math.sign(lat) * Math.PI / 2;
|
|
5189
5282
|
var lon = adjust_lon_default(state.long0 + p.x / (state.a * Math.cos(state.lat0)), state.over);
|
|
5190
5283
|
p.x = lon;
|
|
5191
5284
|
p.y = lat;
|
|
@@ -5448,14 +5541,1458 @@ var geostationary = {
|
|
|
5448
5541
|
}
|
|
5449
5542
|
};
|
|
5450
5543
|
|
|
5544
|
+
// dist/vendor/geographiclib-geodesic/runtime.js
|
|
5545
|
+
var geodesic = {};
|
|
5546
|
+
geodesic.Constants = {};
|
|
5547
|
+
geodesic.Math = {};
|
|
5548
|
+
geodesic.Accumulator = {};
|
|
5549
|
+
(function(c) {
|
|
5550
|
+
"use strict";
|
|
5551
|
+
c.WGS84 = { a: 6378137, f: 1 / 298.257223563 };
|
|
5552
|
+
c.version = {
|
|
5553
|
+
major: 2,
|
|
5554
|
+
minor: 2,
|
|
5555
|
+
patch: 0
|
|
5556
|
+
};
|
|
5557
|
+
c.version_string = "2.2.0";
|
|
5558
|
+
})(geodesic.Constants);
|
|
5559
|
+
(function(m) {
|
|
5560
|
+
"use strict";
|
|
5561
|
+
m.digits = 53;
|
|
5562
|
+
m.epsilon = Math.pow(0.5, m.digits - 1);
|
|
5563
|
+
m.degree = Math.PI / 180;
|
|
5564
|
+
m.sq = function(x) {
|
|
5565
|
+
return x * x;
|
|
5566
|
+
};
|
|
5567
|
+
m.hypot = function(x, y) {
|
|
5568
|
+
return Math.sqrt(x * x + y * y);
|
|
5569
|
+
};
|
|
5570
|
+
m.cbrt = Math.cbrt || function(x) {
|
|
5571
|
+
var y = Math.pow(Math.abs(x), 1 / 3);
|
|
5572
|
+
return x > 0 ? y : x < 0 ? -y : x;
|
|
5573
|
+
};
|
|
5574
|
+
m.log1p = Math.log1p || function(x) {
|
|
5575
|
+
var y = 1 + x, z = y - 1;
|
|
5576
|
+
return z === 0 ? x : x * Math.log(y) / z;
|
|
5577
|
+
};
|
|
5578
|
+
m.atanh = Math.atanh || function(x) {
|
|
5579
|
+
var y = Math.abs(x);
|
|
5580
|
+
y = m.log1p(2 * y / (1 - y)) / 2;
|
|
5581
|
+
return x > 0 ? y : x < 0 ? -y : x;
|
|
5582
|
+
};
|
|
5583
|
+
m.copysign = function(x, y) {
|
|
5584
|
+
return Math.abs(x) * (y < 0 || y === 0 && 1 / y < 0 ? -1 : 1);
|
|
5585
|
+
};
|
|
5586
|
+
m.sum = function(u, v) {
|
|
5587
|
+
var s = u + v, up = s - v, vpp = s - up, t;
|
|
5588
|
+
up -= u;
|
|
5589
|
+
vpp -= v;
|
|
5590
|
+
t = s ? 0 - (up + vpp) : s;
|
|
5591
|
+
return { s, t };
|
|
5592
|
+
};
|
|
5593
|
+
m.polyval = function(N, p, s, x) {
|
|
5594
|
+
var y = N < 0 ? 0 : p[s++];
|
|
5595
|
+
while (--N >= 0)
|
|
5596
|
+
y = y * x + p[s++];
|
|
5597
|
+
return y;
|
|
5598
|
+
};
|
|
5599
|
+
m.AngRound = function(x) {
|
|
5600
|
+
var z = 1 / 16, y = Math.abs(x);
|
|
5601
|
+
y = y < z ? z - (z - y) : y;
|
|
5602
|
+
return m.copysign(y, x);
|
|
5603
|
+
};
|
|
5604
|
+
m.remainder = function(x, y) {
|
|
5605
|
+
x %= y;
|
|
5606
|
+
return x < -y / 2 ? x + y : x < y / 2 ? x : x - y;
|
|
5607
|
+
};
|
|
5608
|
+
m.AngNormalize = function(x) {
|
|
5609
|
+
var y = m.remainder(x, 360);
|
|
5610
|
+
return Math.abs(y) === 180 ? m.copysign(180, x) : y;
|
|
5611
|
+
};
|
|
5612
|
+
m.LatFix = function(x) {
|
|
5613
|
+
return Math.abs(x) > 90 ? NaN : x;
|
|
5614
|
+
};
|
|
5615
|
+
m.AngDiff = function(x, y) {
|
|
5616
|
+
var r = m.sum(m.remainder(-x, 360), m.remainder(y, 360)), d, e;
|
|
5617
|
+
r = m.sum(m.remainder(r.s, 360), r.t);
|
|
5618
|
+
d = r.s;
|
|
5619
|
+
e = r.t;
|
|
5620
|
+
if (d === 0 || Math.abs(d) === 180)
|
|
5621
|
+
d = m.copysign(d, e === 0 ? y - x : -e);
|
|
5622
|
+
return { d, e };
|
|
5623
|
+
};
|
|
5624
|
+
m.sincosd = function(x) {
|
|
5625
|
+
var d, r, q, s, c, sinx, cosx;
|
|
5626
|
+
d = x % 360;
|
|
5627
|
+
q = Math.round(d / 90);
|
|
5628
|
+
d -= 90 * q;
|
|
5629
|
+
r = d * this.degree;
|
|
5630
|
+
s = Math.sin(r);
|
|
5631
|
+
c = Math.cos(r);
|
|
5632
|
+
if (Math.abs(d) === 45) {
|
|
5633
|
+
c = Math.sqrt(0.5);
|
|
5634
|
+
s = m.copysign(c, r);
|
|
5635
|
+
} else if (Math.abs(d) === 30) {
|
|
5636
|
+
c = Math.sqrt(0.75);
|
|
5637
|
+
s = m.copysign(0.5, r);
|
|
5638
|
+
}
|
|
5639
|
+
switch (q & 3) {
|
|
5640
|
+
case 0:
|
|
5641
|
+
sinx = s;
|
|
5642
|
+
cosx = c;
|
|
5643
|
+
break;
|
|
5644
|
+
case 1:
|
|
5645
|
+
sinx = c;
|
|
5646
|
+
cosx = -s;
|
|
5647
|
+
break;
|
|
5648
|
+
case 2:
|
|
5649
|
+
sinx = -s;
|
|
5650
|
+
cosx = -c;
|
|
5651
|
+
break;
|
|
5652
|
+
default:
|
|
5653
|
+
sinx = -c;
|
|
5654
|
+
cosx = s;
|
|
5655
|
+
break;
|
|
5656
|
+
}
|
|
5657
|
+
cosx += 0;
|
|
5658
|
+
if (sinx === 0)
|
|
5659
|
+
sinx = m.copysign(sinx, x);
|
|
5660
|
+
return { s: sinx, c: cosx };
|
|
5661
|
+
};
|
|
5662
|
+
m.sincosde = function(x, t) {
|
|
5663
|
+
var d, r, q, s, c, sinx, cosx;
|
|
5664
|
+
d = x % 360;
|
|
5665
|
+
q = Math.round(d / 90);
|
|
5666
|
+
d = m.AngRound(d - 90 * q + t);
|
|
5667
|
+
r = d * this.degree;
|
|
5668
|
+
s = Math.sin(r);
|
|
5669
|
+
c = Math.cos(r);
|
|
5670
|
+
if (Math.abs(d) === 45) {
|
|
5671
|
+
c = Math.sqrt(0.5);
|
|
5672
|
+
s = m.copysign(c, r);
|
|
5673
|
+
} else if (Math.abs(d) === 30) {
|
|
5674
|
+
c = Math.sqrt(0.75);
|
|
5675
|
+
s = m.copysign(0.5, r);
|
|
5676
|
+
}
|
|
5677
|
+
switch (q & 3) {
|
|
5678
|
+
case 0:
|
|
5679
|
+
sinx = s;
|
|
5680
|
+
cosx = c;
|
|
5681
|
+
break;
|
|
5682
|
+
case 1:
|
|
5683
|
+
sinx = c;
|
|
5684
|
+
cosx = -s;
|
|
5685
|
+
break;
|
|
5686
|
+
case 2:
|
|
5687
|
+
sinx = -s;
|
|
5688
|
+
cosx = -c;
|
|
5689
|
+
break;
|
|
5690
|
+
default:
|
|
5691
|
+
sinx = -c;
|
|
5692
|
+
cosx = s;
|
|
5693
|
+
break;
|
|
5694
|
+
}
|
|
5695
|
+
cosx += 0;
|
|
5696
|
+
if (sinx === 0)
|
|
5697
|
+
sinx = m.copysign(sinx, x + t);
|
|
5698
|
+
return { s: sinx, c: cosx };
|
|
5699
|
+
};
|
|
5700
|
+
m.atan2d = function(y, x) {
|
|
5701
|
+
var q = 0, ang;
|
|
5702
|
+
if (Math.abs(y) > Math.abs(x)) {
|
|
5703
|
+
[y, x] = [x, y];
|
|
5704
|
+
q = 2;
|
|
5705
|
+
}
|
|
5706
|
+
if (m.copysign(1, x) < 0) {
|
|
5707
|
+
x = -x;
|
|
5708
|
+
++q;
|
|
5709
|
+
}
|
|
5710
|
+
ang = Math.atan2(y, x) / this.degree;
|
|
5711
|
+
switch (q) {
|
|
5712
|
+
// Note that atan2d(-0.0, 1.0) will return -0. However, we expect that
|
|
5713
|
+
// atan2d will not be called with y = -0. If need be, include
|
|
5714
|
+
//
|
|
5715
|
+
// case 0: ang = 0 + ang; break;
|
|
5716
|
+
//
|
|
5717
|
+
// and handle mpfr as in AngRound.
|
|
5718
|
+
case 1:
|
|
5719
|
+
ang = m.copysign(180, y) - ang;
|
|
5720
|
+
break;
|
|
5721
|
+
case 2:
|
|
5722
|
+
ang = 90 - ang;
|
|
5723
|
+
break;
|
|
5724
|
+
case 3:
|
|
5725
|
+
ang = -90 + ang;
|
|
5726
|
+
break;
|
|
5727
|
+
default:
|
|
5728
|
+
break;
|
|
5729
|
+
}
|
|
5730
|
+
return ang;
|
|
5731
|
+
};
|
|
5732
|
+
})(geodesic.Math);
|
|
5733
|
+
(function(a, m) {
|
|
5734
|
+
"use strict";
|
|
5735
|
+
a.Accumulator = function(y) {
|
|
5736
|
+
this.Set(y);
|
|
5737
|
+
};
|
|
5738
|
+
a.Accumulator.prototype.Set = function(y) {
|
|
5739
|
+
if (!y)
|
|
5740
|
+
y = 0;
|
|
5741
|
+
if (y.constructor === a.Accumulator) {
|
|
5742
|
+
this._s = y._s;
|
|
5743
|
+
this._t = y._t;
|
|
5744
|
+
} else {
|
|
5745
|
+
this._s = y;
|
|
5746
|
+
this._t = 0;
|
|
5747
|
+
}
|
|
5748
|
+
};
|
|
5749
|
+
a.Accumulator.prototype.Add = function(y) {
|
|
5750
|
+
var u = m.sum(y, this._t), v = m.sum(u.s, this._s);
|
|
5751
|
+
u = u.t;
|
|
5752
|
+
this._s = v.s;
|
|
5753
|
+
this._t = v.t;
|
|
5754
|
+
if (this._s === 0)
|
|
5755
|
+
this._s = u;
|
|
5756
|
+
else
|
|
5757
|
+
this._t += u;
|
|
5758
|
+
};
|
|
5759
|
+
a.Accumulator.prototype.Sum = function(y) {
|
|
5760
|
+
var b;
|
|
5761
|
+
if (!y)
|
|
5762
|
+
return this._s;
|
|
5763
|
+
else {
|
|
5764
|
+
b = new a.Accumulator(this);
|
|
5765
|
+
b.Add(y);
|
|
5766
|
+
return b._s;
|
|
5767
|
+
}
|
|
5768
|
+
};
|
|
5769
|
+
a.Accumulator.prototype.Negate = function() {
|
|
5770
|
+
this._s *= -1;
|
|
5771
|
+
this._t *= -1;
|
|
5772
|
+
};
|
|
5773
|
+
a.Accumulator.prototype.Remainder = function(y) {
|
|
5774
|
+
this._s = m.remainder(this._s, y);
|
|
5775
|
+
this.Add(0);
|
|
5776
|
+
};
|
|
5777
|
+
})(geodesic.Accumulator, geodesic.Math);
|
|
5778
|
+
geodesic.Geodesic = {};
|
|
5779
|
+
geodesic.GeodesicLine = {};
|
|
5780
|
+
geodesic.PolygonArea = {};
|
|
5781
|
+
(function(g, l, p, m, c) {
|
|
5782
|
+
"use strict";
|
|
5783
|
+
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;
|
|
5784
|
+
g.tiny_ = Math.sqrt(Number.MIN_VALUE / Number.EPSILON);
|
|
5785
|
+
g.nC1_ = GEOGRAPHICLIB_GEODESIC_ORDER;
|
|
5786
|
+
g.nC1p_ = GEOGRAPHICLIB_GEODESIC_ORDER;
|
|
5787
|
+
g.nC2_ = GEOGRAPHICLIB_GEODESIC_ORDER;
|
|
5788
|
+
g.nC3_ = GEOGRAPHICLIB_GEODESIC_ORDER;
|
|
5789
|
+
g.nC4_ = GEOGRAPHICLIB_GEODESIC_ORDER;
|
|
5790
|
+
nC3x_ = g.nC3_ * (g.nC3_ - 1) / 2;
|
|
5791
|
+
nC4x_ = g.nC4_ * (g.nC4_ + 1) / 2;
|
|
5792
|
+
g.CAP_C1 = 1 << 0;
|
|
5793
|
+
g.CAP_C1p = 1 << 1;
|
|
5794
|
+
g.CAP_C2 = 1 << 2;
|
|
5795
|
+
g.CAP_C3 = 1 << 3;
|
|
5796
|
+
g.CAP_C4 = 1 << 4;
|
|
5797
|
+
g.NONE = 0;
|
|
5798
|
+
g.ARC = 1 << 6;
|
|
5799
|
+
g.LATITUDE = 1 << 7 | CAP_NONE;
|
|
5800
|
+
g.LONGITUDE = 1 << 8 | g.CAP_C3;
|
|
5801
|
+
g.AZIMUTH = 1 << 9 | CAP_NONE;
|
|
5802
|
+
g.DISTANCE = 1 << 10 | g.CAP_C1;
|
|
5803
|
+
g.STANDARD = g.LATITUDE | g.LONGITUDE | g.AZIMUTH | g.DISTANCE;
|
|
5804
|
+
g.DISTANCE_IN = 1 << 11 | g.CAP_C1 | g.CAP_C1p;
|
|
5805
|
+
g.REDUCEDLENGTH = 1 << 12 | g.CAP_C1 | g.CAP_C2;
|
|
5806
|
+
g.GEODESICSCALE = 1 << 13 | g.CAP_C1 | g.CAP_C2;
|
|
5807
|
+
g.AREA = 1 << 14 | g.CAP_C4;
|
|
5808
|
+
g.ALL = OUT_ALL | CAP_ALL;
|
|
5809
|
+
g.LONG_UNROLL = 1 << 15;
|
|
5810
|
+
g.OUT_MASK = OUT_ALL | g.LONG_UNROLL;
|
|
5811
|
+
g.SinCosSeries = function(sinp, sinx, cosx, c2, delta) {
|
|
5812
|
+
if (delta !== void 0) {
|
|
5813
|
+
var h = delta / 2, sh = Math.sin(h), ch = Math.cos(h);
|
|
5814
|
+
return -2 * g.SinCosSeries(false, cosx * ch - sinx * sh, sinx * ch + cosx * sh, c2.map(function(v, i) {
|
|
5815
|
+
return (i % 2 ? -v : v) * Math.sin((2 * i + 1) * h);
|
|
5816
|
+
}));
|
|
5817
|
+
}
|
|
5818
|
+
var k = c2.length, n = k - (sinp ? 1 : 0), ar = 2 * (cosx - sinx) * (cosx + sinx), y0 = n & 1 ? c2[--k] : 0, y1 = 0;
|
|
5819
|
+
n = Math.floor(n / 2);
|
|
5820
|
+
while (n--) {
|
|
5821
|
+
y1 = ar * y0 - y1 + c2[--k];
|
|
5822
|
+
y0 = ar * y1 - y0 + c2[--k];
|
|
5823
|
+
}
|
|
5824
|
+
return sinp ? 2 * sinx * cosx * y0 : (
|
|
5825
|
+
// sin(2 * x) * y0
|
|
5826
|
+
cosx * (y0 - y1)
|
|
5827
|
+
);
|
|
5828
|
+
};
|
|
5829
|
+
astroid = function(x, y) {
|
|
5830
|
+
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;
|
|
5831
|
+
if (!(q === 0 && r <= 0)) {
|
|
5832
|
+
S = p2 * q / 4;
|
|
5833
|
+
r2 = m.sq(r);
|
|
5834
|
+
r3 = r * r2;
|
|
5835
|
+
disc = S * (S + 2 * r3);
|
|
5836
|
+
u = r;
|
|
5837
|
+
if (disc >= 0) {
|
|
5838
|
+
T3 = S + r3;
|
|
5839
|
+
T3 += T3 < 0 ? -Math.sqrt(disc) : Math.sqrt(disc);
|
|
5840
|
+
T = m.cbrt(T3);
|
|
5841
|
+
u += T + (T !== 0 ? r2 / T : 0);
|
|
5842
|
+
} else {
|
|
5843
|
+
ang = Math.atan2(Math.sqrt(-disc), -(S + r3));
|
|
5844
|
+
u += 2 * r * Math.cos(ang / 3);
|
|
5845
|
+
}
|
|
5846
|
+
v = Math.sqrt(m.sq(u) + q);
|
|
5847
|
+
uv = u < 0 ? q / (v - u) : u + v;
|
|
5848
|
+
w = (uv - q) / (2 * v);
|
|
5849
|
+
k = uv / (Math.sqrt(uv + m.sq(w)) + w);
|
|
5850
|
+
} else {
|
|
5851
|
+
k = 0;
|
|
5852
|
+
}
|
|
5853
|
+
return k;
|
|
5854
|
+
};
|
|
5855
|
+
A1m1f_coeff = [
|
|
5856
|
+
// (1-eps)*A1-1, polynomial in eps2 of order 3
|
|
5857
|
+
1,
|
|
5858
|
+
4,
|
|
5859
|
+
64,
|
|
5860
|
+
0,
|
|
5861
|
+
256
|
|
5862
|
+
];
|
|
5863
|
+
g.A1m1f = function(eps) {
|
|
5864
|
+
var p2 = Math.floor(nA1_ / 2), t = m.polyval(p2, A1m1f_coeff, 0, m.sq(eps)) / A1m1f_coeff[p2 + 1];
|
|
5865
|
+
return (t + eps) / (1 - eps);
|
|
5866
|
+
};
|
|
5867
|
+
C1f_coeff = [
|
|
5868
|
+
// C1[1]/eps^1, polynomial in eps2 of order 2
|
|
5869
|
+
-1,
|
|
5870
|
+
6,
|
|
5871
|
+
-16,
|
|
5872
|
+
32,
|
|
5873
|
+
// C1[2]/eps^2, polynomial in eps2 of order 2
|
|
5874
|
+
-9,
|
|
5875
|
+
64,
|
|
5876
|
+
-128,
|
|
5877
|
+
2048,
|
|
5878
|
+
// C1[3]/eps^3, polynomial in eps2 of order 1
|
|
5879
|
+
9,
|
|
5880
|
+
-16,
|
|
5881
|
+
768,
|
|
5882
|
+
// C1[4]/eps^4, polynomial in eps2 of order 1
|
|
5883
|
+
3,
|
|
5884
|
+
-5,
|
|
5885
|
+
512,
|
|
5886
|
+
// C1[5]/eps^5, polynomial in eps2 of order 0
|
|
5887
|
+
-7,
|
|
5888
|
+
1280,
|
|
5889
|
+
// C1[6]/eps^6, polynomial in eps2 of order 0
|
|
5890
|
+
-7,
|
|
5891
|
+
2048
|
|
5892
|
+
];
|
|
5893
|
+
g.C1f = function(eps, c2) {
|
|
5894
|
+
var eps2 = m.sq(eps), d = eps, o = 0, l2, p2;
|
|
5895
|
+
for (l2 = 1; l2 <= g.nC1_; ++l2) {
|
|
5896
|
+
p2 = Math.floor((g.nC1_ - l2) / 2);
|
|
5897
|
+
c2[l2] = d * m.polyval(p2, C1f_coeff, o, eps2) / C1f_coeff[o + p2 + 1];
|
|
5898
|
+
o += p2 + 2;
|
|
5899
|
+
d *= eps;
|
|
5900
|
+
}
|
|
5901
|
+
};
|
|
5902
|
+
C1pf_coeff = [
|
|
5903
|
+
// C1p[1]/eps^1, polynomial in eps2 of order 2
|
|
5904
|
+
205,
|
|
5905
|
+
-432,
|
|
5906
|
+
768,
|
|
5907
|
+
1536,
|
|
5908
|
+
// C1p[2]/eps^2, polynomial in eps2 of order 2
|
|
5909
|
+
4005,
|
|
5910
|
+
-4736,
|
|
5911
|
+
3840,
|
|
5912
|
+
12288,
|
|
5913
|
+
// C1p[3]/eps^3, polynomial in eps2 of order 1
|
|
5914
|
+
-225,
|
|
5915
|
+
116,
|
|
5916
|
+
384,
|
|
5917
|
+
// C1p[4]/eps^4, polynomial in eps2 of order 1
|
|
5918
|
+
-7173,
|
|
5919
|
+
2695,
|
|
5920
|
+
7680,
|
|
5921
|
+
// C1p[5]/eps^5, polynomial in eps2 of order 0
|
|
5922
|
+
3467,
|
|
5923
|
+
7680,
|
|
5924
|
+
// C1p[6]/eps^6, polynomial in eps2 of order 0
|
|
5925
|
+
38081,
|
|
5926
|
+
61440
|
|
5927
|
+
];
|
|
5928
|
+
g.C1pf = function(eps, c2) {
|
|
5929
|
+
var eps2 = m.sq(eps), d = eps, o = 0, l2, p2;
|
|
5930
|
+
for (l2 = 1; l2 <= g.nC1p_; ++l2) {
|
|
5931
|
+
p2 = Math.floor((g.nC1p_ - l2) / 2);
|
|
5932
|
+
c2[l2] = d * m.polyval(p2, C1pf_coeff, o, eps2) / C1pf_coeff[o + p2 + 1];
|
|
5933
|
+
o += p2 + 2;
|
|
5934
|
+
d *= eps;
|
|
5935
|
+
}
|
|
5936
|
+
};
|
|
5937
|
+
A2m1f_coeff = [
|
|
5938
|
+
// (eps+1)*A2-1, polynomial in eps2 of order 3
|
|
5939
|
+
-11,
|
|
5940
|
+
-28,
|
|
5941
|
+
-192,
|
|
5942
|
+
0,
|
|
5943
|
+
256
|
|
5944
|
+
];
|
|
5945
|
+
g.A2m1f = function(eps) {
|
|
5946
|
+
var p2 = Math.floor(nA2_ / 2), t = m.polyval(p2, A2m1f_coeff, 0, m.sq(eps)) / A2m1f_coeff[p2 + 1];
|
|
5947
|
+
return (t - eps) / (1 + eps);
|
|
5948
|
+
};
|
|
5949
|
+
C2f_coeff = [
|
|
5950
|
+
// C2[1]/eps^1, polynomial in eps2 of order 2
|
|
5951
|
+
1,
|
|
5952
|
+
2,
|
|
5953
|
+
16,
|
|
5954
|
+
32,
|
|
5955
|
+
// C2[2]/eps^2, polynomial in eps2 of order 2
|
|
5956
|
+
35,
|
|
5957
|
+
64,
|
|
5958
|
+
384,
|
|
5959
|
+
2048,
|
|
5960
|
+
// C2[3]/eps^3, polynomial in eps2 of order 1
|
|
5961
|
+
15,
|
|
5962
|
+
80,
|
|
5963
|
+
768,
|
|
5964
|
+
// C2[4]/eps^4, polynomial in eps2 of order 1
|
|
5965
|
+
7,
|
|
5966
|
+
35,
|
|
5967
|
+
512,
|
|
5968
|
+
// C2[5]/eps^5, polynomial in eps2 of order 0
|
|
5969
|
+
63,
|
|
5970
|
+
1280,
|
|
5971
|
+
// C2[6]/eps^6, polynomial in eps2 of order 0
|
|
5972
|
+
77,
|
|
5973
|
+
2048
|
|
5974
|
+
];
|
|
5975
|
+
g.C2f = function(eps, c2) {
|
|
5976
|
+
var eps2 = m.sq(eps), d = eps, o = 0, l2, p2;
|
|
5977
|
+
for (l2 = 1; l2 <= g.nC2_; ++l2) {
|
|
5978
|
+
p2 = Math.floor((g.nC2_ - l2) / 2);
|
|
5979
|
+
c2[l2] = d * m.polyval(p2, C2f_coeff, o, eps2) / C2f_coeff[o + p2 + 1];
|
|
5980
|
+
o += p2 + 2;
|
|
5981
|
+
d *= eps;
|
|
5982
|
+
}
|
|
5983
|
+
};
|
|
5984
|
+
g.Geodesic = function(a, f) {
|
|
5985
|
+
this.a = a;
|
|
5986
|
+
this.f = f;
|
|
5987
|
+
this._f1 = 1 - this.f;
|
|
5988
|
+
this._e2 = this.f * (2 - this.f);
|
|
5989
|
+
this._ep2 = this._e2 / m.sq(this._f1);
|
|
5990
|
+
this._n = this.f / (2 - this.f);
|
|
5991
|
+
this._b = this.a * this._f1;
|
|
5992
|
+
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;
|
|
5993
|
+
this._etol2 = 0.1 * tol2_ / Math.sqrt(Math.max(1e-3, Math.abs(this.f)) * Math.min(1, 1 - this.f / 2) / 2);
|
|
5994
|
+
if (!(isFinite(this.a) && this.a > 0))
|
|
5995
|
+
throw new Error("Equatorial radius is not positive");
|
|
5996
|
+
if (!(isFinite(this._b) && this._b > 0))
|
|
5997
|
+
throw new Error("Polar semi-axis is not positive");
|
|
5998
|
+
this._A3x = new Array(nA3x_);
|
|
5999
|
+
this._C3x = new Array(nC3x_);
|
|
6000
|
+
this._C4x = new Array(nC4x_);
|
|
6001
|
+
this.A3coeff();
|
|
6002
|
+
this.C3coeff();
|
|
6003
|
+
this.C4coeff();
|
|
6004
|
+
};
|
|
6005
|
+
A3_coeff = [
|
|
6006
|
+
// A3, coeff of eps^5, polynomial in n of order 0
|
|
6007
|
+
-3,
|
|
6008
|
+
128,
|
|
6009
|
+
// A3, coeff of eps^4, polynomial in n of order 1
|
|
6010
|
+
-2,
|
|
6011
|
+
-3,
|
|
6012
|
+
64,
|
|
6013
|
+
// A3, coeff of eps^3, polynomial in n of order 2
|
|
6014
|
+
-1,
|
|
6015
|
+
-3,
|
|
6016
|
+
-1,
|
|
6017
|
+
16,
|
|
6018
|
+
// A3, coeff of eps^2, polynomial in n of order 2
|
|
6019
|
+
3,
|
|
6020
|
+
-1,
|
|
6021
|
+
-2,
|
|
6022
|
+
8,
|
|
6023
|
+
// A3, coeff of eps^1, polynomial in n of order 1
|
|
6024
|
+
1,
|
|
6025
|
+
-1,
|
|
6026
|
+
2,
|
|
6027
|
+
// A3, coeff of eps^0, polynomial in n of order 0
|
|
6028
|
+
1,
|
|
6029
|
+
1
|
|
6030
|
+
];
|
|
6031
|
+
g.Geodesic.prototype.A3coeff = function() {
|
|
6032
|
+
var o = 0, k = 0, j, p2;
|
|
6033
|
+
for (j = nA3_ - 1; j >= 0; --j) {
|
|
6034
|
+
p2 = Math.min(nA3_ - j - 1, j);
|
|
6035
|
+
this._A3x[k++] = m.polyval(p2, A3_coeff, o, this._n) / A3_coeff[o + p2 + 1];
|
|
6036
|
+
o += p2 + 2;
|
|
6037
|
+
}
|
|
6038
|
+
};
|
|
6039
|
+
C3_coeff = [
|
|
6040
|
+
// C3[1], coeff of eps^5, polynomial in n of order 0
|
|
6041
|
+
3,
|
|
6042
|
+
128,
|
|
6043
|
+
// C3[1], coeff of eps^4, polynomial in n of order 1
|
|
6044
|
+
2,
|
|
6045
|
+
5,
|
|
6046
|
+
128,
|
|
6047
|
+
// C3[1], coeff of eps^3, polynomial in n of order 2
|
|
6048
|
+
-1,
|
|
6049
|
+
3,
|
|
6050
|
+
3,
|
|
6051
|
+
64,
|
|
6052
|
+
// C3[1], coeff of eps^2, polynomial in n of order 2
|
|
6053
|
+
-1,
|
|
6054
|
+
0,
|
|
6055
|
+
1,
|
|
6056
|
+
8,
|
|
6057
|
+
// C3[1], coeff of eps^1, polynomial in n of order 1
|
|
6058
|
+
-1,
|
|
6059
|
+
1,
|
|
6060
|
+
4,
|
|
6061
|
+
// C3[2], coeff of eps^5, polynomial in n of order 0
|
|
6062
|
+
5,
|
|
6063
|
+
256,
|
|
6064
|
+
// C3[2], coeff of eps^4, polynomial in n of order 1
|
|
6065
|
+
1,
|
|
6066
|
+
3,
|
|
6067
|
+
128,
|
|
6068
|
+
// C3[2], coeff of eps^3, polynomial in n of order 2
|
|
6069
|
+
-3,
|
|
6070
|
+
-2,
|
|
6071
|
+
3,
|
|
6072
|
+
64,
|
|
6073
|
+
// C3[2], coeff of eps^2, polynomial in n of order 2
|
|
6074
|
+
1,
|
|
6075
|
+
-3,
|
|
6076
|
+
2,
|
|
6077
|
+
32,
|
|
6078
|
+
// C3[3], coeff of eps^5, polynomial in n of order 0
|
|
6079
|
+
7,
|
|
6080
|
+
512,
|
|
6081
|
+
// C3[3], coeff of eps^4, polynomial in n of order 1
|
|
6082
|
+
-10,
|
|
6083
|
+
9,
|
|
6084
|
+
384,
|
|
6085
|
+
// C3[3], coeff of eps^3, polynomial in n of order 2
|
|
6086
|
+
5,
|
|
6087
|
+
-9,
|
|
6088
|
+
5,
|
|
6089
|
+
192,
|
|
6090
|
+
// C3[4], coeff of eps^5, polynomial in n of order 0
|
|
6091
|
+
7,
|
|
6092
|
+
512,
|
|
6093
|
+
// C3[4], coeff of eps^4, polynomial in n of order 1
|
|
6094
|
+
-14,
|
|
6095
|
+
7,
|
|
6096
|
+
512,
|
|
6097
|
+
// C3[5], coeff of eps^5, polynomial in n of order 0
|
|
6098
|
+
21,
|
|
6099
|
+
2560
|
|
6100
|
+
];
|
|
6101
|
+
g.Geodesic.prototype.C3coeff = function() {
|
|
6102
|
+
var o = 0, k = 0, l2, j, p2;
|
|
6103
|
+
for (l2 = 1; l2 < g.nC3_; ++l2) {
|
|
6104
|
+
for (j = g.nC3_ - 1; j >= l2; --j) {
|
|
6105
|
+
p2 = Math.min(g.nC3_ - j - 1, j);
|
|
6106
|
+
this._C3x[k++] = m.polyval(p2, C3_coeff, o, this._n) / C3_coeff[o + p2 + 1];
|
|
6107
|
+
o += p2 + 2;
|
|
6108
|
+
}
|
|
6109
|
+
}
|
|
6110
|
+
};
|
|
6111
|
+
C4_coeff = [
|
|
6112
|
+
// C4[0], coeff of eps^5, polynomial in n of order 0
|
|
6113
|
+
97,
|
|
6114
|
+
15015,
|
|
6115
|
+
// C4[0], coeff of eps^4, polynomial in n of order 1
|
|
6116
|
+
1088,
|
|
6117
|
+
156,
|
|
6118
|
+
45045,
|
|
6119
|
+
// C4[0], coeff of eps^3, polynomial in n of order 2
|
|
6120
|
+
-224,
|
|
6121
|
+
-4784,
|
|
6122
|
+
1573,
|
|
6123
|
+
45045,
|
|
6124
|
+
// C4[0], coeff of eps^2, polynomial in n of order 3
|
|
6125
|
+
-10656,
|
|
6126
|
+
14144,
|
|
6127
|
+
-4576,
|
|
6128
|
+
-858,
|
|
6129
|
+
45045,
|
|
6130
|
+
// C4[0], coeff of eps^1, polynomial in n of order 4
|
|
6131
|
+
64,
|
|
6132
|
+
624,
|
|
6133
|
+
-4576,
|
|
6134
|
+
6864,
|
|
6135
|
+
-3003,
|
|
6136
|
+
15015,
|
|
6137
|
+
// C4[0], coeff of eps^0, polynomial in n of order 5
|
|
6138
|
+
100,
|
|
6139
|
+
208,
|
|
6140
|
+
572,
|
|
6141
|
+
3432,
|
|
6142
|
+
-12012,
|
|
6143
|
+
30030,
|
|
6144
|
+
45045,
|
|
6145
|
+
// C4[1], coeff of eps^5, polynomial in n of order 0
|
|
6146
|
+
1,
|
|
6147
|
+
9009,
|
|
6148
|
+
// C4[1], coeff of eps^4, polynomial in n of order 1
|
|
6149
|
+
-2944,
|
|
6150
|
+
468,
|
|
6151
|
+
135135,
|
|
6152
|
+
// C4[1], coeff of eps^3, polynomial in n of order 2
|
|
6153
|
+
5792,
|
|
6154
|
+
1040,
|
|
6155
|
+
-1287,
|
|
6156
|
+
135135,
|
|
6157
|
+
// C4[1], coeff of eps^2, polynomial in n of order 3
|
|
6158
|
+
5952,
|
|
6159
|
+
-11648,
|
|
6160
|
+
9152,
|
|
6161
|
+
-2574,
|
|
6162
|
+
135135,
|
|
6163
|
+
// C4[1], coeff of eps^1, polynomial in n of order 4
|
|
6164
|
+
-64,
|
|
6165
|
+
-624,
|
|
6166
|
+
4576,
|
|
6167
|
+
-6864,
|
|
6168
|
+
3003,
|
|
6169
|
+
135135,
|
|
6170
|
+
// C4[2], coeff of eps^5, polynomial in n of order 0
|
|
6171
|
+
8,
|
|
6172
|
+
10725,
|
|
6173
|
+
// C4[2], coeff of eps^4, polynomial in n of order 1
|
|
6174
|
+
1856,
|
|
6175
|
+
-936,
|
|
6176
|
+
225225,
|
|
6177
|
+
// C4[2], coeff of eps^3, polynomial in n of order 2
|
|
6178
|
+
-8448,
|
|
6179
|
+
4992,
|
|
6180
|
+
-1144,
|
|
6181
|
+
225225,
|
|
6182
|
+
// C4[2], coeff of eps^2, polynomial in n of order 3
|
|
6183
|
+
-1440,
|
|
6184
|
+
4160,
|
|
6185
|
+
-4576,
|
|
6186
|
+
1716,
|
|
6187
|
+
225225,
|
|
6188
|
+
// C4[3], coeff of eps^5, polynomial in n of order 0
|
|
6189
|
+
-136,
|
|
6190
|
+
63063,
|
|
6191
|
+
// C4[3], coeff of eps^4, polynomial in n of order 1
|
|
6192
|
+
1024,
|
|
6193
|
+
-208,
|
|
6194
|
+
105105,
|
|
6195
|
+
// C4[3], coeff of eps^3, polynomial in n of order 2
|
|
6196
|
+
3584,
|
|
6197
|
+
-3328,
|
|
6198
|
+
1144,
|
|
6199
|
+
315315,
|
|
6200
|
+
// C4[4], coeff of eps^5, polynomial in n of order 0
|
|
6201
|
+
-128,
|
|
6202
|
+
135135,
|
|
6203
|
+
// C4[4], coeff of eps^4, polynomial in n of order 1
|
|
6204
|
+
-2560,
|
|
6205
|
+
832,
|
|
6206
|
+
405405,
|
|
6207
|
+
// C4[5], coeff of eps^5, polynomial in n of order 0
|
|
6208
|
+
128,
|
|
6209
|
+
99099
|
|
6210
|
+
];
|
|
6211
|
+
g.Geodesic.prototype.C4coeff = function() {
|
|
6212
|
+
var o = 0, k = 0, l2, j, p2;
|
|
6213
|
+
for (l2 = 0; l2 < g.nC4_; ++l2) {
|
|
6214
|
+
for (j = g.nC4_ - 1; j >= l2; --j) {
|
|
6215
|
+
p2 = g.nC4_ - j - 1;
|
|
6216
|
+
this._C4x[k++] = m.polyval(p2, C4_coeff, o, this._n) / C4_coeff[o + p2 + 1];
|
|
6217
|
+
o += p2 + 2;
|
|
6218
|
+
}
|
|
6219
|
+
}
|
|
6220
|
+
};
|
|
6221
|
+
g.Geodesic.prototype.A3f = function(eps) {
|
|
6222
|
+
return m.polyval(nA3x_ - 1, this._A3x, 0, eps);
|
|
6223
|
+
};
|
|
6224
|
+
g.Geodesic.prototype.C3f = function(eps, c2) {
|
|
6225
|
+
var mult = 1, o = 0, l2, p2;
|
|
6226
|
+
for (l2 = 1; l2 < g.nC3_; ++l2) {
|
|
6227
|
+
p2 = g.nC3_ - l2 - 1;
|
|
6228
|
+
mult *= eps;
|
|
6229
|
+
c2[l2] = mult * m.polyval(p2, this._C3x, o, eps);
|
|
6230
|
+
o += p2 + 1;
|
|
6231
|
+
}
|
|
6232
|
+
};
|
|
6233
|
+
g.Geodesic.prototype.C4f = function(eps, c2) {
|
|
6234
|
+
var mult = 1, o = 0, l2, p2;
|
|
6235
|
+
for (l2 = 0; l2 < g.nC4_; ++l2) {
|
|
6236
|
+
p2 = g.nC4_ - l2 - 1;
|
|
6237
|
+
c2[l2] = mult * m.polyval(p2, this._C4x, o, eps);
|
|
6238
|
+
o += p2 + 1;
|
|
6239
|
+
mult *= eps;
|
|
6240
|
+
}
|
|
6241
|
+
};
|
|
6242
|
+
g.Geodesic.prototype.Lengths = function(eps, sig12, ssig1, csig1, dn1, ssig2, csig2, dn2, cbet1, cbet2, outmask, C1a, C2a) {
|
|
6243
|
+
outmask &= g.OUT_MASK;
|
|
6244
|
+
var vals = {}, m0x = 0, J12 = 0, A12 = 0, A22 = 0, B1, B2, l2, csig12, t;
|
|
6245
|
+
if (outmask & (g.DISTANCE | g.REDUCEDLENGTH | g.GEODESICSCALE)) {
|
|
6246
|
+
A12 = g.A1m1f(eps);
|
|
6247
|
+
g.C1f(eps, C1a);
|
|
6248
|
+
if (outmask & (g.REDUCEDLENGTH | g.GEODESICSCALE)) {
|
|
6249
|
+
A22 = g.A2m1f(eps);
|
|
6250
|
+
g.C2f(eps, C2a);
|
|
6251
|
+
m0x = A12 - A22;
|
|
6252
|
+
A22 = 1 + A22;
|
|
6253
|
+
}
|
|
6254
|
+
A12 = 1 + A12;
|
|
6255
|
+
}
|
|
6256
|
+
if (outmask & g.DISTANCE) {
|
|
6257
|
+
B1 = g.SinCosSeries(true, ssig2, csig2, C1a) - g.SinCosSeries(true, ssig1, csig1, C1a);
|
|
6258
|
+
vals.s12b = A12 * (sig12 + B1);
|
|
6259
|
+
if (outmask & (g.REDUCEDLENGTH | g.GEODESICSCALE)) {
|
|
6260
|
+
B2 = g.SinCosSeries(true, ssig2, csig2, C2a) - g.SinCosSeries(true, ssig1, csig1, C2a);
|
|
6261
|
+
J12 = m0x * sig12 + (A12 * B1 - A22 * B2);
|
|
6262
|
+
}
|
|
6263
|
+
} else if (outmask & (g.REDUCEDLENGTH | g.GEODESICSCALE)) {
|
|
6264
|
+
for (l2 = 1; l2 <= g.nC2_; ++l2)
|
|
6265
|
+
C2a[l2] = A12 * C1a[l2] - A22 * C2a[l2];
|
|
6266
|
+
J12 = m0x * sig12 + (g.SinCosSeries(true, ssig2, csig2, C2a) - g.SinCosSeries(true, ssig1, csig1, C2a));
|
|
6267
|
+
}
|
|
6268
|
+
if (outmask & g.REDUCEDLENGTH) {
|
|
6269
|
+
vals.m0 = m0x;
|
|
6270
|
+
vals.m12b = dn2 * (csig1 * ssig2) - dn1 * (ssig1 * csig2) - csig1 * csig2 * J12;
|
|
6271
|
+
} else
|
|
6272
|
+
vals.m12b = NaN;
|
|
6273
|
+
if (outmask & g.GEODESICSCALE) {
|
|
6274
|
+
csig12 = csig1 * csig2 + ssig1 * ssig2;
|
|
6275
|
+
t = this._ep2 * (cbet1 - cbet2) * (cbet1 + cbet2) / (dn1 + dn2);
|
|
6276
|
+
vals.M12 = csig12 + (t * ssig2 - csig2 * J12) * ssig1 / dn1;
|
|
6277
|
+
vals.M21 = csig12 - (t * ssig1 - csig1 * J12) * ssig2 / dn2;
|
|
6278
|
+
}
|
|
6279
|
+
return vals;
|
|
6280
|
+
};
|
|
6281
|
+
g.Geodesic.prototype.InverseStart = function(sbet1, cbet1, dn1, sbet2, cbet2, dn2, lam12, slam12, clam12, C1a, C2a) {
|
|
6282
|
+
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;
|
|
6283
|
+
vals.sig12 = -1;
|
|
6284
|
+
sbet12a = sbet2 * cbet1;
|
|
6285
|
+
sbet12a += cbet2 * sbet1;
|
|
6286
|
+
shortline = cbet12 >= 0 && sbet12 < 0.5 && cbet2 * lam12 < 0.5;
|
|
6287
|
+
if (shortline) {
|
|
6288
|
+
sbetm2 = m.sq(sbet1 + sbet2);
|
|
6289
|
+
sbetm2 /= sbetm2 + m.sq(cbet1 + cbet2);
|
|
6290
|
+
vals.dnm = Math.sqrt(1 + this._ep2 * sbetm2);
|
|
6291
|
+
omg12 = lam12 / (this._f1 * vals.dnm);
|
|
6292
|
+
somg12 = Math.sin(omg12);
|
|
6293
|
+
comg12 = Math.cos(omg12);
|
|
6294
|
+
} else {
|
|
6295
|
+
somg12 = slam12;
|
|
6296
|
+
comg12 = clam12;
|
|
6297
|
+
}
|
|
6298
|
+
vals.salp1 = cbet2 * somg12;
|
|
6299
|
+
vals.calp1 = comg12 >= 0 ? sbet12 + cbet2 * sbet1 * m.sq(somg12) / (1 + comg12) : sbet12a - cbet2 * sbet1 * m.sq(somg12) / (1 - comg12);
|
|
6300
|
+
ssig12 = m.hypot(vals.salp1, vals.calp1);
|
|
6301
|
+
csig12 = sbet1 * sbet2 + cbet1 * cbet2 * comg12;
|
|
6302
|
+
if (shortline && ssig12 < this._etol2) {
|
|
6303
|
+
vals.salp2 = cbet1 * somg12;
|
|
6304
|
+
vals.calp2 = sbet12 - cbet1 * sbet2 * (comg12 >= 0 ? m.sq(somg12) / (1 + comg12) : 1 - comg12);
|
|
6305
|
+
t = m.hypot(vals.salp2, vals.calp2);
|
|
6306
|
+
vals.salp2 /= t;
|
|
6307
|
+
vals.calp2 /= t;
|
|
6308
|
+
vals.sig12 = Math.atan2(ssig12, csig12);
|
|
6309
|
+
} else if (Math.abs(this._n) > 0.1 || // Skip astroid calc if too eccentric
|
|
6310
|
+
csig12 >= 0 || ssig12 >= 6 * Math.abs(this._n) * Math.PI * m.sq(cbet1)) {
|
|
6311
|
+
} else {
|
|
6312
|
+
lam12x = Math.atan2(-slam12, -clam12);
|
|
6313
|
+
if (this.f >= 0) {
|
|
6314
|
+
k2 = m.sq(sbet1) * this._ep2;
|
|
6315
|
+
eps = k2 / (2 * (1 + Math.sqrt(1 + k2)) + k2);
|
|
6316
|
+
lamscale = this.f * cbet1 * this.A3f(eps) * Math.PI;
|
|
6317
|
+
betscale = lamscale * cbet1;
|
|
6318
|
+
x = lam12x / lamscale;
|
|
6319
|
+
y = sbet12a / betscale;
|
|
6320
|
+
} else {
|
|
6321
|
+
cbet12a = cbet2 * cbet1 - sbet2 * sbet1;
|
|
6322
|
+
bet12a = Math.atan2(sbet12a, cbet12a);
|
|
6323
|
+
nvals = this.Lengths(this._n, Math.PI + bet12a, sbet1, -cbet1, dn1, sbet2, cbet2, dn2, cbet1, cbet2, g.REDUCEDLENGTH, C1a, C2a);
|
|
6324
|
+
m12b = nvals.m12b;
|
|
6325
|
+
m0 = nvals.m0;
|
|
6326
|
+
x = -1 + m12b / (cbet1 * cbet2 * m0 * Math.PI);
|
|
6327
|
+
betscale = x < -0.01 ? sbet12a / x : -this.f * m.sq(cbet1) * Math.PI;
|
|
6328
|
+
lamscale = betscale / cbet1;
|
|
6329
|
+
y = lam12 / lamscale;
|
|
6330
|
+
}
|
|
6331
|
+
if (y > -tol1_ && x > -1 - xthresh_) {
|
|
6332
|
+
if (this.f >= 0) {
|
|
6333
|
+
vals.salp1 = Math.min(1, -x);
|
|
6334
|
+
vals.calp1 = -Math.sqrt(1 - m.sq(vals.salp1));
|
|
6335
|
+
} else {
|
|
6336
|
+
vals.calp1 = Math.max(x > -tol1_ ? 0 : -1, x);
|
|
6337
|
+
vals.salp1 = Math.sqrt(1 - m.sq(vals.calp1));
|
|
6338
|
+
}
|
|
6339
|
+
} else {
|
|
6340
|
+
k = astroid(x, y);
|
|
6341
|
+
omg12a = lamscale * (this.f >= 0 ? -x * k / (1 + k) : -y * (1 + k) / k);
|
|
6342
|
+
somg12 = Math.sin(omg12a);
|
|
6343
|
+
comg12 = -Math.cos(omg12a);
|
|
6344
|
+
vals.salp1 = cbet2 * somg12;
|
|
6345
|
+
vals.calp1 = sbet12a - cbet2 * sbet1 * m.sq(somg12) / (1 - comg12);
|
|
6346
|
+
}
|
|
6347
|
+
}
|
|
6348
|
+
if (!(vals.salp1 <= 0)) {
|
|
6349
|
+
t = m.hypot(vals.salp1, vals.calp1);
|
|
6350
|
+
vals.salp1 /= t;
|
|
6351
|
+
vals.calp1 /= t;
|
|
6352
|
+
} else {
|
|
6353
|
+
vals.salp1 = 1;
|
|
6354
|
+
vals.calp1 = 0;
|
|
6355
|
+
}
|
|
6356
|
+
return vals;
|
|
6357
|
+
};
|
|
6358
|
+
g.Geodesic.prototype.Lambda12 = function(sbet1, cbet1, dn1, sbet2, cbet2, dn2, salp1, calp1, slam120, clam120, diffp, C1a, C2a, C3a) {
|
|
6359
|
+
var vals = {}, t, salp0, calp0, somg1, comg1, somg2, comg2, somg12, comg12, B312, eta, k2, nvals;
|
|
6360
|
+
if (sbet1 === 0 && calp1 === 0)
|
|
6361
|
+
calp1 = -g.tiny_;
|
|
6362
|
+
salp0 = salp1 * cbet1;
|
|
6363
|
+
calp0 = m.hypot(calp1, salp1 * sbet1);
|
|
6364
|
+
vals.ssig1 = sbet1;
|
|
6365
|
+
somg1 = salp0 * sbet1;
|
|
6366
|
+
vals.csig1 = comg1 = calp1 * cbet1;
|
|
6367
|
+
t = m.hypot(vals.ssig1, vals.csig1);
|
|
6368
|
+
vals.ssig1 /= t;
|
|
6369
|
+
vals.csig1 /= t;
|
|
6370
|
+
vals.salp2 = cbet2 !== cbet1 ? salp0 / cbet2 : salp1;
|
|
6371
|
+
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);
|
|
6372
|
+
vals.ssig2 = sbet2;
|
|
6373
|
+
somg2 = salp0 * sbet2;
|
|
6374
|
+
vals.csig2 = comg2 = vals.calp2 * cbet2;
|
|
6375
|
+
t = m.hypot(vals.ssig2, vals.csig2);
|
|
6376
|
+
vals.ssig2 /= t;
|
|
6377
|
+
vals.csig2 /= t;
|
|
6378
|
+
vals.sig12 = Math.atan2(Math.max(0, vals.csig1 * vals.ssig2 - vals.ssig1 * vals.csig2), vals.csig1 * vals.csig2 + vals.ssig1 * vals.ssig2);
|
|
6379
|
+
somg12 = Math.max(0, comg1 * somg2 - somg1 * comg2);
|
|
6380
|
+
comg12 = comg1 * comg2 + somg1 * somg2;
|
|
6381
|
+
eta = Math.atan2(somg12 * clam120 - comg12 * slam120, comg12 * clam120 + somg12 * slam120);
|
|
6382
|
+
k2 = m.sq(calp0) * this._ep2;
|
|
6383
|
+
vals.eps = k2 / (2 * (1 + Math.sqrt(1 + k2)) + k2);
|
|
6384
|
+
this.C3f(vals.eps, C3a);
|
|
6385
|
+
B312 = g.SinCosSeries(true, vals.ssig2, vals.csig2, C3a) - g.SinCosSeries(true, vals.ssig1, vals.csig1, C3a);
|
|
6386
|
+
vals.domg12 = -this.f * this.A3f(vals.eps) * salp0 * (vals.sig12 + B312);
|
|
6387
|
+
vals.lam12 = eta + vals.domg12;
|
|
6388
|
+
if (diffp) {
|
|
6389
|
+
if (vals.calp2 === 0)
|
|
6390
|
+
vals.dlam12 = -2 * this._f1 * dn1 / sbet1;
|
|
6391
|
+
else {
|
|
6392
|
+
nvals = this.Lengths(vals.eps, vals.sig12, vals.ssig1, vals.csig1, dn1, vals.ssig2, vals.csig2, dn2, cbet1, cbet2, g.REDUCEDLENGTH, C1a, C2a);
|
|
6393
|
+
vals.dlam12 = nvals.m12b;
|
|
6394
|
+
vals.dlam12 *= this._f1 / (vals.calp2 * cbet2);
|
|
6395
|
+
}
|
|
6396
|
+
}
|
|
6397
|
+
return vals;
|
|
6398
|
+
};
|
|
6399
|
+
g.Geodesic.prototype.Inverse = function(lat1, lon1, lat2, lon2, outmask) {
|
|
6400
|
+
var r, vals;
|
|
6401
|
+
if (!outmask)
|
|
6402
|
+
outmask = g.STANDARD;
|
|
6403
|
+
if (outmask === g.LONG_UNROLL)
|
|
6404
|
+
outmask |= g.STANDARD;
|
|
6405
|
+
outmask &= g.OUT_MASK;
|
|
6406
|
+
r = this.InverseInt(lat1, lon1, lat2, lon2, outmask);
|
|
6407
|
+
vals = r.vals;
|
|
6408
|
+
if (outmask & g.AZIMUTH) {
|
|
6409
|
+
vals.azi1 = m.atan2d(r.salp1, r.calp1);
|
|
6410
|
+
vals.azi2 = m.atan2d(r.salp2, r.calp2);
|
|
6411
|
+
}
|
|
6412
|
+
return vals;
|
|
6413
|
+
};
|
|
6414
|
+
g.Geodesic.prototype.InverseInt = function(lat1, lon1, lat2, lon2, outmask) {
|
|
6415
|
+
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, A42, C4a, B41, B42, somg12, comg12, domg12, dbet1, dbet2, salp12, calp12, sdomg12, cdomg12;
|
|
6416
|
+
vals.lat1 = lat1 = m.LatFix(lat1);
|
|
6417
|
+
vals.lat2 = lat2 = m.LatFix(lat2);
|
|
6418
|
+
lat1 = m.AngRound(lat1);
|
|
6419
|
+
lat2 = m.AngRound(lat2);
|
|
6420
|
+
lon12 = m.AngDiff(lon1, lon2);
|
|
6421
|
+
lon12s = lon12.e;
|
|
6422
|
+
lon12 = lon12.d;
|
|
6423
|
+
if (outmask & g.LONG_UNROLL) {
|
|
6424
|
+
vals.lon1 = lon1;
|
|
6425
|
+
vals.lon2 = lon1 + lon12 + lon12s;
|
|
6426
|
+
} else {
|
|
6427
|
+
vals.lon1 = m.AngNormalize(lon1);
|
|
6428
|
+
vals.lon2 = m.AngNormalize(lon2);
|
|
6429
|
+
}
|
|
6430
|
+
lonsign = m.copysign(1, lon12);
|
|
6431
|
+
lon12 *= lonsign;
|
|
6432
|
+
lon12s *= lonsign;
|
|
6433
|
+
lam12 = lon12 * m.degree;
|
|
6434
|
+
t = m.sincosde(lon12, lon12s);
|
|
6435
|
+
slam12 = t.s;
|
|
6436
|
+
clam12 = t.c;
|
|
6437
|
+
lon12s = 180 - lon12 - lon12s;
|
|
6438
|
+
swapp = Math.abs(lat1) < Math.abs(lat2) || isNaN(lat2) ? -1 : 1;
|
|
6439
|
+
if (swapp < 0) {
|
|
6440
|
+
lonsign *= -1;
|
|
6441
|
+
[lat2, lat1] = [lat1, lat2];
|
|
6442
|
+
}
|
|
6443
|
+
latsign = m.copysign(1, -lat1);
|
|
6444
|
+
lat1 *= latsign;
|
|
6445
|
+
lat2 *= latsign;
|
|
6446
|
+
t = m.sincosd(lat1);
|
|
6447
|
+
sbet1 = this._f1 * t.s;
|
|
6448
|
+
cbet1 = t.c;
|
|
6449
|
+
t = m.hypot(sbet1, cbet1);
|
|
6450
|
+
sbet1 /= t;
|
|
6451
|
+
cbet1 /= t;
|
|
6452
|
+
cbet1 = Math.max(g.tiny_, cbet1);
|
|
6453
|
+
t = m.sincosd(lat2);
|
|
6454
|
+
sbet2 = this._f1 * t.s;
|
|
6455
|
+
cbet2 = t.c;
|
|
6456
|
+
t = m.hypot(sbet2, cbet2);
|
|
6457
|
+
sbet2 /= t;
|
|
6458
|
+
cbet2 /= t;
|
|
6459
|
+
cbet2 = Math.max(g.tiny_, cbet2);
|
|
6460
|
+
if (cbet1 < -sbet1) {
|
|
6461
|
+
if (cbet2 === cbet1)
|
|
6462
|
+
sbet2 = m.copysign(sbet1, sbet2);
|
|
6463
|
+
} else {
|
|
6464
|
+
if (Math.abs(sbet2) === -sbet1)
|
|
6465
|
+
cbet2 = cbet1;
|
|
6466
|
+
}
|
|
6467
|
+
dn1 = Math.sqrt(1 + this._ep2 * m.sq(sbet1));
|
|
6468
|
+
dn2 = Math.sqrt(1 + this._ep2 * m.sq(sbet2));
|
|
6469
|
+
C1a = new Array(g.nC1_ + 1);
|
|
6470
|
+
C2a = new Array(g.nC2_ + 1);
|
|
6471
|
+
C3a = new Array(g.nC3_);
|
|
6472
|
+
meridian = lat1 === -90 || slam12 === 0;
|
|
6473
|
+
if (meridian) {
|
|
6474
|
+
calp1 = clam12;
|
|
6475
|
+
salp1 = slam12;
|
|
6476
|
+
calp2 = 1;
|
|
6477
|
+
salp2 = 0;
|
|
6478
|
+
ssig1 = sbet1;
|
|
6479
|
+
csig1 = calp1 * cbet1;
|
|
6480
|
+
ssig2 = sbet2;
|
|
6481
|
+
csig2 = calp2 * cbet2;
|
|
6482
|
+
sig12 = Math.atan2(Math.max(0, csig1 * ssig2 - ssig1 * csig2), csig1 * csig2 + ssig1 * ssig2);
|
|
6483
|
+
nvals = this.Lengths(this._n, sig12, ssig1, csig1, dn1, ssig2, csig2, dn2, cbet1, cbet2, outmask | g.DISTANCE | g.REDUCEDLENGTH, C1a, C2a);
|
|
6484
|
+
s12x = nvals.s12b;
|
|
6485
|
+
m12x = nvals.m12b;
|
|
6486
|
+
if (outmask & g.GEODESICSCALE) {
|
|
6487
|
+
vals.M12 = nvals.M12;
|
|
6488
|
+
vals.M21 = nvals.M21;
|
|
6489
|
+
}
|
|
6490
|
+
if (sig12 < tol2_ || m12x >= 0) {
|
|
6491
|
+
if (sig12 < 3 * g.tiny_ || // Prevent negative s12 or m12 for short lines
|
|
6492
|
+
sig12 < tol0_ && (s12x < 0 || m12x < 0))
|
|
6493
|
+
sig12 = m12x = s12x = 0;
|
|
6494
|
+
m12x *= this._b;
|
|
6495
|
+
s12x *= this._b;
|
|
6496
|
+
vals.a12 = sig12 / m.degree;
|
|
6497
|
+
} else
|
|
6498
|
+
meridian = false;
|
|
6499
|
+
}
|
|
6500
|
+
somg12 = 2;
|
|
6501
|
+
if (!meridian && sbet1 === 0 && // and sbet2 == 0
|
|
6502
|
+
(this.f <= 0 || lon12s >= this.f * 180)) {
|
|
6503
|
+
calp1 = calp2 = 0;
|
|
6504
|
+
salp1 = salp2 = 1;
|
|
6505
|
+
s12x = this.a * lam12;
|
|
6506
|
+
sig12 = omg12 = lam12 / this._f1;
|
|
6507
|
+
m12x = this._b * Math.sin(sig12);
|
|
6508
|
+
if (outmask & g.GEODESICSCALE)
|
|
6509
|
+
vals.M12 = vals.M21 = Math.cos(sig12);
|
|
6510
|
+
vals.a12 = lon12 / this._f1;
|
|
6511
|
+
} else if (!meridian) {
|
|
6512
|
+
nvals = this.InverseStart(sbet1, cbet1, dn1, sbet2, cbet2, dn2, lam12, slam12, clam12, C1a, C2a);
|
|
6513
|
+
sig12 = nvals.sig12;
|
|
6514
|
+
salp1 = nvals.salp1;
|
|
6515
|
+
calp1 = nvals.calp1;
|
|
6516
|
+
if (sig12 >= 0) {
|
|
6517
|
+
salp2 = nvals.salp2;
|
|
6518
|
+
calp2 = nvals.calp2;
|
|
6519
|
+
dnm = nvals.dnm;
|
|
6520
|
+
s12x = sig12 * this._b * dnm;
|
|
6521
|
+
m12x = m.sq(dnm) * this._b * Math.sin(sig12 / dnm);
|
|
6522
|
+
if (outmask & g.GEODESICSCALE)
|
|
6523
|
+
vals.M12 = vals.M21 = Math.cos(sig12 / dnm);
|
|
6524
|
+
vals.a12 = sig12 / m.degree;
|
|
6525
|
+
omg12 = lam12 / (this._f1 * dnm);
|
|
6526
|
+
} else {
|
|
6527
|
+
numit = 0;
|
|
6528
|
+
salp1a = g.tiny_;
|
|
6529
|
+
calp1a = 1;
|
|
6530
|
+
salp1b = g.tiny_;
|
|
6531
|
+
calp1b = -1;
|
|
6532
|
+
for (tripn = false, tripb = false; ; ++numit) {
|
|
6533
|
+
nvals = this.Lambda12(sbet1, cbet1, dn1, sbet2, cbet2, dn2, salp1, calp1, slam12, clam12, numit < maxit1_, C1a, C2a, C3a);
|
|
6534
|
+
v = nvals.lam12;
|
|
6535
|
+
salp2 = nvals.salp2;
|
|
6536
|
+
calp2 = nvals.calp2;
|
|
6537
|
+
sig12 = nvals.sig12;
|
|
6538
|
+
ssig1 = nvals.ssig1;
|
|
6539
|
+
csig1 = nvals.csig1;
|
|
6540
|
+
ssig2 = nvals.ssig2;
|
|
6541
|
+
csig2 = nvals.csig2;
|
|
6542
|
+
eps = nvals.eps;
|
|
6543
|
+
domg12 = nvals.domg12;
|
|
6544
|
+
dv = nvals.dlam12;
|
|
6545
|
+
if (tripb || !(Math.abs(v) >= (tripn ? 8 : 1) * tol0_) || numit == maxit2_)
|
|
6546
|
+
break;
|
|
6547
|
+
if (v > 0 && (numit < maxit1_ || calp1 / salp1 > calp1b / salp1b)) {
|
|
6548
|
+
salp1b = salp1;
|
|
6549
|
+
calp1b = calp1;
|
|
6550
|
+
} else if (v < 0 && (numit < maxit1_ || calp1 / salp1 < calp1a / salp1a)) {
|
|
6551
|
+
salp1a = salp1;
|
|
6552
|
+
calp1a = calp1;
|
|
6553
|
+
}
|
|
6554
|
+
if (numit < maxit1_ && dv > 0) {
|
|
6555
|
+
dalp1 = -v / dv;
|
|
6556
|
+
if (Math.abs(dalp1) < Math.PI) {
|
|
6557
|
+
sdalp1 = Math.sin(dalp1);
|
|
6558
|
+
cdalp1 = Math.cos(dalp1);
|
|
6559
|
+
nsalp1 = salp1 * cdalp1 + calp1 * sdalp1;
|
|
6560
|
+
if (nsalp1 > 0) {
|
|
6561
|
+
calp1 = calp1 * cdalp1 - salp1 * sdalp1;
|
|
6562
|
+
salp1 = nsalp1;
|
|
6563
|
+
t = m.hypot(salp1, calp1);
|
|
6564
|
+
salp1 /= t;
|
|
6565
|
+
calp1 /= t;
|
|
6566
|
+
tripn = Math.abs(v) <= 16 * tol0_;
|
|
6567
|
+
continue;
|
|
6568
|
+
}
|
|
6569
|
+
}
|
|
6570
|
+
}
|
|
6571
|
+
salp1 = (salp1a + salp1b) / 2;
|
|
6572
|
+
calp1 = (calp1a + calp1b) / 2;
|
|
6573
|
+
t = m.hypot(salp1, calp1);
|
|
6574
|
+
salp1 /= t;
|
|
6575
|
+
calp1 /= t;
|
|
6576
|
+
tripn = false;
|
|
6577
|
+
tripb = Math.abs(salp1a - salp1) + (calp1a - calp1) < tolb_ || Math.abs(salp1 - salp1b) + (calp1 - calp1b) < tolb_;
|
|
6578
|
+
}
|
|
6579
|
+
lengthmask = outmask | (outmask & (g.REDUCEDLENGTH | g.GEODESICSCALE) ? g.DISTANCE : g.NONE);
|
|
6580
|
+
nvals = this.Lengths(eps, sig12, ssig1, csig1, dn1, ssig2, csig2, dn2, cbet1, cbet2, lengthmask, C1a, C2a);
|
|
6581
|
+
s12x = nvals.s12b;
|
|
6582
|
+
m12x = nvals.m12b;
|
|
6583
|
+
if (outmask & g.GEODESICSCALE) {
|
|
6584
|
+
vals.M12 = nvals.M12;
|
|
6585
|
+
vals.M21 = nvals.M21;
|
|
6586
|
+
}
|
|
6587
|
+
m12x *= this._b;
|
|
6588
|
+
s12x *= this._b;
|
|
6589
|
+
vals.a12 = sig12 / m.degree;
|
|
6590
|
+
if (outmask & g.AREA) {
|
|
6591
|
+
sdomg12 = Math.sin(domg12);
|
|
6592
|
+
cdomg12 = Math.cos(domg12);
|
|
6593
|
+
somg12 = slam12 * cdomg12 - clam12 * sdomg12;
|
|
6594
|
+
comg12 = clam12 * cdomg12 + slam12 * sdomg12;
|
|
6595
|
+
}
|
|
6596
|
+
}
|
|
6597
|
+
}
|
|
6598
|
+
if (outmask & g.DISTANCE)
|
|
6599
|
+
vals.s12 = 0 + s12x;
|
|
6600
|
+
if (outmask & g.REDUCEDLENGTH)
|
|
6601
|
+
vals.m12 = 0 + m12x;
|
|
6602
|
+
if (outmask & g.AREA) {
|
|
6603
|
+
salp0 = salp1 * cbet1;
|
|
6604
|
+
calp0 = m.hypot(calp1, salp1 * sbet1);
|
|
6605
|
+
if (calp0 !== 0 && salp0 !== 0) {
|
|
6606
|
+
ssig1 = sbet1;
|
|
6607
|
+
csig1 = calp1 * cbet1;
|
|
6608
|
+
ssig2 = sbet2;
|
|
6609
|
+
csig2 = calp2 * cbet2;
|
|
6610
|
+
k2 = m.sq(calp0) * this._ep2;
|
|
6611
|
+
eps = k2 / (2 * (1 + Math.sqrt(1 + k2)) + k2);
|
|
6612
|
+
A42 = m.sq(this.a) * calp0 * salp0 * this._e2;
|
|
6613
|
+
t = m.hypot(ssig1, csig1);
|
|
6614
|
+
ssig1 /= t;
|
|
6615
|
+
csig1 /= t;
|
|
6616
|
+
t = m.hypot(ssig2, csig2);
|
|
6617
|
+
ssig2 /= t;
|
|
6618
|
+
csig2 /= t;
|
|
6619
|
+
C4a = new Array(g.nC4_);
|
|
6620
|
+
this.C4f(eps, C4a);
|
|
6621
|
+
B41 = g.SinCosSeries(false, ssig1, csig1, C4a);
|
|
6622
|
+
B42 = g.SinCosSeries(false, ssig2, csig2, C4a);
|
|
6623
|
+
vals.S12 = A42 * (sig12 < 0.01 ? g.SinCosSeries(false, ssig1, csig1, C4a, sig12) : B42 - B41);
|
|
6624
|
+
} else
|
|
6625
|
+
vals.S12 = 0;
|
|
6626
|
+
if (!meridian && somg12 == 2) {
|
|
6627
|
+
somg12 = Math.sin(omg12);
|
|
6628
|
+
comg12 = Math.cos(omg12);
|
|
6629
|
+
}
|
|
6630
|
+
if (!meridian && comg12 > -0.7071 && // Long difference not too big
|
|
6631
|
+
sbet2 - sbet1 < 1.75) {
|
|
6632
|
+
domg12 = 1 + comg12;
|
|
6633
|
+
dbet1 = 1 + cbet1;
|
|
6634
|
+
dbet2 = 1 + cbet2;
|
|
6635
|
+
alp12 = 2 * Math.atan2(somg12 * (sbet1 * dbet2 + sbet2 * dbet1), domg12 * (sbet1 * sbet2 + dbet1 * dbet2));
|
|
6636
|
+
} else {
|
|
6637
|
+
salp12 = salp2 * calp1 - calp2 * salp1;
|
|
6638
|
+
calp12 = calp2 * calp1 + salp2 * salp1;
|
|
6639
|
+
if (salp12 === 0 && calp12 < 0) {
|
|
6640
|
+
salp12 = g.tiny_ * calp1;
|
|
6641
|
+
calp12 = -1;
|
|
6642
|
+
}
|
|
6643
|
+
alp12 = Math.atan2(salp12, calp12);
|
|
6644
|
+
}
|
|
6645
|
+
vals.S12 += this._c2 * alp12;
|
|
6646
|
+
vals.S12 *= swapp * lonsign * latsign;
|
|
6647
|
+
vals.S12 += 0;
|
|
6648
|
+
}
|
|
6649
|
+
if (swapp < 0) {
|
|
6650
|
+
[salp2, salp1] = [salp1, salp2];
|
|
6651
|
+
[calp2, calp1] = [calp1, calp2];
|
|
6652
|
+
if (outmask & g.GEODESICSCALE) {
|
|
6653
|
+
[vals.M21, vals.M12] = [vals.M12, vals.M21];
|
|
6654
|
+
}
|
|
6655
|
+
}
|
|
6656
|
+
salp1 *= swapp * lonsign;
|
|
6657
|
+
calp1 *= swapp * latsign;
|
|
6658
|
+
salp2 *= swapp * lonsign;
|
|
6659
|
+
calp2 *= swapp * latsign;
|
|
6660
|
+
return {
|
|
6661
|
+
vals,
|
|
6662
|
+
salp1,
|
|
6663
|
+
calp1,
|
|
6664
|
+
salp2,
|
|
6665
|
+
calp2
|
|
6666
|
+
};
|
|
6667
|
+
};
|
|
6668
|
+
g.Geodesic.prototype.GenDirect = function(lat1, lon1, azi1, arcmode, s12_a12, outmask) {
|
|
6669
|
+
var line;
|
|
6670
|
+
if (!outmask)
|
|
6671
|
+
outmask = g.STANDARD;
|
|
6672
|
+
else if (outmask === g.LONG_UNROLL)
|
|
6673
|
+
outmask |= g.STANDARD;
|
|
6674
|
+
if (!arcmode)
|
|
6675
|
+
outmask |= g.DISTANCE_IN;
|
|
6676
|
+
line = new l.GeodesicLine(this, lat1, lon1, azi1, outmask);
|
|
6677
|
+
return line.GenPosition(arcmode, s12_a12, outmask);
|
|
6678
|
+
};
|
|
6679
|
+
g.Geodesic.prototype.Direct = function(lat1, lon1, azi1, s12, outmask) {
|
|
6680
|
+
return this.GenDirect(lat1, lon1, azi1, false, s12, outmask);
|
|
6681
|
+
};
|
|
6682
|
+
g.Geodesic.prototype.ArcDirect = function(lat1, lon1, azi1, a12, outmask) {
|
|
6683
|
+
return this.GenDirect(lat1, lon1, azi1, true, a12, outmask);
|
|
6684
|
+
};
|
|
6685
|
+
g.Geodesic.prototype.Line = function(lat1, lon1, azi1, caps) {
|
|
6686
|
+
return new l.GeodesicLine(this, lat1, lon1, azi1, caps);
|
|
6687
|
+
};
|
|
6688
|
+
g.Geodesic.prototype.DirectLine = function(lat1, lon1, azi1, s12, caps) {
|
|
6689
|
+
return this.GenDirectLine(lat1, lon1, azi1, false, s12, caps);
|
|
6690
|
+
};
|
|
6691
|
+
g.Geodesic.prototype.ArcDirectLine = function(lat1, lon1, azi1, a12, caps) {
|
|
6692
|
+
return this.GenDirectLine(lat1, lon1, azi1, true, a12, caps);
|
|
6693
|
+
};
|
|
6694
|
+
g.Geodesic.prototype.GenDirectLine = function(lat1, lon1, azi1, arcmode, s12_a12, caps) {
|
|
6695
|
+
var t;
|
|
6696
|
+
if (!caps)
|
|
6697
|
+
caps = g.STANDARD | g.DISTANCE_IN;
|
|
6698
|
+
if (!arcmode)
|
|
6699
|
+
caps |= g.DISTANCE_IN;
|
|
6700
|
+
t = new l.GeodesicLine(this, lat1, lon1, azi1, caps);
|
|
6701
|
+
t.GenSetDistance(arcmode, s12_a12);
|
|
6702
|
+
return t;
|
|
6703
|
+
};
|
|
6704
|
+
g.Geodesic.prototype.InverseLine = function(lat1, lon1, lat2, lon2, caps) {
|
|
6705
|
+
var r, t, azi1;
|
|
6706
|
+
if (!caps)
|
|
6707
|
+
caps = g.STANDARD | g.DISTANCE_IN;
|
|
6708
|
+
r = this.InverseInt(lat1, lon1, lat2, lon2, g.ARC);
|
|
6709
|
+
azi1 = m.atan2d(r.salp1, r.calp1);
|
|
6710
|
+
if (caps & (g.OUT_MASK & g.DISTANCE_IN))
|
|
6711
|
+
caps |= g.DISTANCE;
|
|
6712
|
+
t = new l.GeodesicLine(this, lat1, lon1, azi1, caps, r.salp1, r.calp1);
|
|
6713
|
+
t.SetArc(r.vals.a12);
|
|
6714
|
+
return t;
|
|
6715
|
+
};
|
|
6716
|
+
g.Geodesic.prototype.Polygon = function(polyline) {
|
|
6717
|
+
return new p.PolygonArea(this, polyline);
|
|
6718
|
+
};
|
|
6719
|
+
g.WGS84 = new g.Geodesic(c.WGS84.a, c.WGS84.f);
|
|
6720
|
+
})(geodesic.Geodesic, geodesic.GeodesicLine, geodesic.PolygonArea, geodesic.Math, geodesic.Constants);
|
|
6721
|
+
(function(g, l, m) {
|
|
6722
|
+
"use strict";
|
|
6723
|
+
l.GeodesicLine = function(geod, lat1, lon1, azi1, caps, salp1, calp1) {
|
|
6724
|
+
var t, cbet1, sbet1, eps, s, c;
|
|
6725
|
+
if (!caps)
|
|
6726
|
+
caps = g.STANDARD | g.DISTANCE_IN;
|
|
6727
|
+
this.a = geod.a;
|
|
6728
|
+
this.f = geod.f;
|
|
6729
|
+
this._b = geod._b;
|
|
6730
|
+
this._c2 = geod._c2;
|
|
6731
|
+
this._f1 = geod._f1;
|
|
6732
|
+
this.caps = caps | g.LATITUDE | g.AZIMUTH | g.LONG_UNROLL;
|
|
6733
|
+
this.lat1 = m.LatFix(lat1);
|
|
6734
|
+
this.lon1 = lon1;
|
|
6735
|
+
if (typeof salp1 === "undefined" || typeof calp1 === "undefined") {
|
|
6736
|
+
this.azi1 = m.AngNormalize(azi1);
|
|
6737
|
+
t = m.sincosd(m.AngRound(this.azi1));
|
|
6738
|
+
this.salp1 = t.s;
|
|
6739
|
+
this.calp1 = t.c;
|
|
6740
|
+
} else {
|
|
6741
|
+
this.azi1 = azi1;
|
|
6742
|
+
this.salp1 = salp1;
|
|
6743
|
+
this.calp1 = calp1;
|
|
6744
|
+
}
|
|
6745
|
+
t = m.sincosd(m.AngRound(this.lat1));
|
|
6746
|
+
sbet1 = this._f1 * t.s;
|
|
6747
|
+
cbet1 = t.c;
|
|
6748
|
+
t = m.hypot(sbet1, cbet1);
|
|
6749
|
+
sbet1 /= t;
|
|
6750
|
+
cbet1 /= t;
|
|
6751
|
+
cbet1 = Math.max(g.tiny_, cbet1);
|
|
6752
|
+
this._dn1 = Math.sqrt(1 + geod._ep2 * m.sq(sbet1));
|
|
6753
|
+
this._salp0 = this.salp1 * cbet1;
|
|
6754
|
+
this._calp0 = m.hypot(this.calp1, this.salp1 * sbet1);
|
|
6755
|
+
this._ssig1 = sbet1;
|
|
6756
|
+
this._somg1 = this._salp0 * sbet1;
|
|
6757
|
+
this._csig1 = this._comg1 = sbet1 !== 0 || this.calp1 !== 0 ? cbet1 * this.calp1 : 1;
|
|
6758
|
+
t = m.hypot(this._ssig1, this._csig1);
|
|
6759
|
+
this._ssig1 /= t;
|
|
6760
|
+
this._csig1 /= t;
|
|
6761
|
+
this._k2 = m.sq(this._calp0) * geod._ep2;
|
|
6762
|
+
eps = this._k2 / (2 * (1 + Math.sqrt(1 + this._k2)) + this._k2);
|
|
6763
|
+
if (this.caps & g.CAP_C1) {
|
|
6764
|
+
this._A1m1 = g.A1m1f(eps);
|
|
6765
|
+
this._C1a = new Array(g.nC1_ + 1);
|
|
6766
|
+
g.C1f(eps, this._C1a);
|
|
6767
|
+
this._B11 = g.SinCosSeries(true, this._ssig1, this._csig1, this._C1a);
|
|
6768
|
+
s = Math.sin(this._B11);
|
|
6769
|
+
c = Math.cos(this._B11);
|
|
6770
|
+
this._stau1 = this._ssig1 * c + this._csig1 * s;
|
|
6771
|
+
this._ctau1 = this._csig1 * c - this._ssig1 * s;
|
|
6772
|
+
}
|
|
6773
|
+
if (this.caps & g.CAP_C1p) {
|
|
6774
|
+
this._C1pa = new Array(g.nC1p_ + 1);
|
|
6775
|
+
g.C1pf(eps, this._C1pa);
|
|
6776
|
+
}
|
|
6777
|
+
if (this.caps & g.CAP_C2) {
|
|
6778
|
+
this._A2m1 = g.A2m1f(eps);
|
|
6779
|
+
this._C2a = new Array(g.nC2_ + 1);
|
|
6780
|
+
g.C2f(eps, this._C2a);
|
|
6781
|
+
this._B21 = g.SinCosSeries(true, this._ssig1, this._csig1, this._C2a);
|
|
6782
|
+
}
|
|
6783
|
+
if (this.caps & g.CAP_C3) {
|
|
6784
|
+
this._C3a = new Array(g.nC3_);
|
|
6785
|
+
geod.C3f(eps, this._C3a);
|
|
6786
|
+
this._A3c = -this.f * this._salp0 * geod.A3f(eps);
|
|
6787
|
+
this._B31 = g.SinCosSeries(true, this._ssig1, this._csig1, this._C3a);
|
|
6788
|
+
}
|
|
6789
|
+
if (this.caps & g.CAP_C4) {
|
|
6790
|
+
this._C4a = new Array(g.nC4_);
|
|
6791
|
+
geod.C4f(eps, this._C4a);
|
|
6792
|
+
this._A4 = m.sq(this.a) * this._calp0 * this._salp0 * geod._e2;
|
|
6793
|
+
this._B41 = g.SinCosSeries(false, this._ssig1, this._csig1, this._C4a);
|
|
6794
|
+
}
|
|
6795
|
+
this.a13 = this.s13 = NaN;
|
|
6796
|
+
};
|
|
6797
|
+
l.GeodesicLine.prototype.GenPosition = function(arcmode, s12_a12, outmask) {
|
|
6798
|
+
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;
|
|
6799
|
+
if (!outmask)
|
|
6800
|
+
outmask = g.STANDARD;
|
|
6801
|
+
else if (outmask === g.LONG_UNROLL)
|
|
6802
|
+
outmask |= g.STANDARD;
|
|
6803
|
+
outmask &= this.caps & g.OUT_MASK;
|
|
6804
|
+
vals.lat1 = this.lat1;
|
|
6805
|
+
vals.azi1 = this.azi1;
|
|
6806
|
+
vals.lon1 = outmask & g.LONG_UNROLL ? this.lon1 : m.AngNormalize(this.lon1);
|
|
6807
|
+
if (arcmode)
|
|
6808
|
+
vals.a12 = s12_a12;
|
|
6809
|
+
else
|
|
6810
|
+
vals.s12 = s12_a12;
|
|
6811
|
+
if (!(arcmode || this.caps & g.DISTANCE_IN & g.OUT_MASK)) {
|
|
6812
|
+
vals.a12 = NaN;
|
|
6813
|
+
return vals;
|
|
6814
|
+
}
|
|
6815
|
+
B12 = 0;
|
|
6816
|
+
AB1 = 0;
|
|
6817
|
+
if (arcmode) {
|
|
6818
|
+
sig12 = s12_a12 * m.degree;
|
|
6819
|
+
t = m.sincosd(s12_a12);
|
|
6820
|
+
ssig12 = t.s;
|
|
6821
|
+
csig12 = t.c;
|
|
6822
|
+
} else {
|
|
6823
|
+
tau12 = s12_a12 / (this._b * (1 + this._A1m1));
|
|
6824
|
+
s = Math.sin(tau12);
|
|
6825
|
+
c = Math.cos(tau12);
|
|
6826
|
+
B12 = -g.SinCosSeries(true, this._stau1 * c + this._ctau1 * s, this._ctau1 * c - this._stau1 * s, this._C1pa);
|
|
6827
|
+
sig12 = tau12 - (B12 - this._B11);
|
|
6828
|
+
ssig12 = Math.sin(sig12);
|
|
6829
|
+
csig12 = Math.cos(sig12);
|
|
6830
|
+
if (Math.abs(this.f) > 0.01) {
|
|
6831
|
+
ssig2 = this._ssig1 * csig12 + this._csig1 * ssig12;
|
|
6832
|
+
csig2 = this._csig1 * csig12 - this._ssig1 * ssig12;
|
|
6833
|
+
B12 = g.SinCosSeries(true, ssig2, csig2, this._C1a);
|
|
6834
|
+
serr = (1 + this._A1m1) * (sig12 + (B12 - this._B11)) - s12_a12 / this._b;
|
|
6835
|
+
sig12 = sig12 - serr / Math.sqrt(1 + this._k2 * m.sq(ssig2));
|
|
6836
|
+
ssig12 = Math.sin(sig12);
|
|
6837
|
+
csig12 = Math.cos(sig12);
|
|
6838
|
+
}
|
|
6839
|
+
}
|
|
6840
|
+
ssig2 = this._ssig1 * csig12 + this._csig1 * ssig12;
|
|
6841
|
+
csig2 = this._csig1 * csig12 - this._ssig1 * ssig12;
|
|
6842
|
+
dn2 = Math.sqrt(1 + this._k2 * m.sq(ssig2));
|
|
6843
|
+
if (outmask & (g.DISTANCE | g.REDUCEDLENGTH | g.GEODESICSCALE)) {
|
|
6844
|
+
if (arcmode || Math.abs(this.f) > 0.01)
|
|
6845
|
+
B12 = g.SinCosSeries(true, ssig2, csig2, this._C1a);
|
|
6846
|
+
AB1 = (1 + this._A1m1) * (B12 - this._B11);
|
|
6847
|
+
}
|
|
6848
|
+
sbet2 = this._calp0 * ssig2;
|
|
6849
|
+
cbet2 = m.hypot(this._salp0, this._calp0 * csig2);
|
|
6850
|
+
if (cbet2 === 0)
|
|
6851
|
+
cbet2 = csig2 = g.tiny_;
|
|
6852
|
+
salp2 = this._salp0;
|
|
6853
|
+
calp2 = this._calp0 * csig2;
|
|
6854
|
+
if (arcmode && outmask & g.DISTANCE)
|
|
6855
|
+
vals.s12 = this._b * ((1 + this._A1m1) * sig12 + AB1);
|
|
6856
|
+
if (outmask & g.LONGITUDE) {
|
|
6857
|
+
somg2 = this._salp0 * ssig2;
|
|
6858
|
+
comg2 = csig2;
|
|
6859
|
+
E = m.copysign(1, this._salp0);
|
|
6860
|
+
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);
|
|
6861
|
+
lam12 = omg12 + this._A3c * (sig12 + (g.SinCosSeries(true, ssig2, csig2, this._C3a) - this._B31));
|
|
6862
|
+
lon12 = lam12 / m.degree;
|
|
6863
|
+
vals.lon2 = outmask & g.LONG_UNROLL ? this.lon1 + lon12 : m.AngNormalize(m.AngNormalize(this.lon1) + m.AngNormalize(lon12));
|
|
6864
|
+
}
|
|
6865
|
+
if (outmask & g.LATITUDE)
|
|
6866
|
+
vals.lat2 = m.atan2d(sbet2, this._f1 * cbet2);
|
|
6867
|
+
if (outmask & g.AZIMUTH)
|
|
6868
|
+
vals.azi2 = m.atan2d(salp2, calp2);
|
|
6869
|
+
if (outmask & (g.REDUCEDLENGTH | g.GEODESICSCALE)) {
|
|
6870
|
+
B22 = g.SinCosSeries(true, ssig2, csig2, this._C2a);
|
|
6871
|
+
AB2 = (1 + this._A2m1) * (B22 - this._B21);
|
|
6872
|
+
J12 = (this._A1m1 - this._A2m1) * sig12 + (AB1 - AB2);
|
|
6873
|
+
if (outmask & g.REDUCEDLENGTH)
|
|
6874
|
+
vals.m12 = this._b * (dn2 * (this._csig1 * ssig2) - this._dn1 * (this._ssig1 * csig2) - this._csig1 * csig2 * J12);
|
|
6875
|
+
if (outmask & g.GEODESICSCALE) {
|
|
6876
|
+
t = this._k2 * (ssig2 - this._ssig1) * (ssig2 + this._ssig1) / (this._dn1 + dn2);
|
|
6877
|
+
vals.M12 = csig12 + (t * ssig2 - csig2 * J12) * this._ssig1 / this._dn1;
|
|
6878
|
+
vals.M21 = csig12 - (t * this._ssig1 - this._csig1 * J12) * ssig2 / dn2;
|
|
6879
|
+
}
|
|
6880
|
+
}
|
|
6881
|
+
if (outmask & g.AREA) {
|
|
6882
|
+
B42 = g.SinCosSeries(false, ssig2, csig2, this._C4a);
|
|
6883
|
+
if (this._calp0 === 0 || this._salp0 === 0) {
|
|
6884
|
+
salp12 = salp2 * this.calp1 - calp2 * this.salp1;
|
|
6885
|
+
calp12 = calp2 * this.calp1 + salp2 * this.salp1;
|
|
6886
|
+
} else {
|
|
6887
|
+
salp12 = this._calp0 * this._salp0 * (csig12 <= 0 ? this._csig1 * (1 - csig12) + ssig12 * this._ssig1 : ssig12 * (this._csig1 * ssig12 / (1 + csig12) + this._ssig1));
|
|
6888
|
+
calp12 = m.sq(this._salp0) + m.sq(this._calp0) * this._csig1 * csig2;
|
|
6889
|
+
}
|
|
6890
|
+
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);
|
|
6891
|
+
}
|
|
6892
|
+
if (!arcmode)
|
|
6893
|
+
vals.a12 = sig12 / m.degree;
|
|
6894
|
+
return vals;
|
|
6895
|
+
};
|
|
6896
|
+
l.GeodesicLine.prototype.Position = function(s12, outmask) {
|
|
6897
|
+
return this.GenPosition(false, s12, outmask);
|
|
6898
|
+
};
|
|
6899
|
+
l.GeodesicLine.prototype.ArcPosition = function(a12, outmask) {
|
|
6900
|
+
return this.GenPosition(true, a12, outmask);
|
|
6901
|
+
};
|
|
6902
|
+
l.GeodesicLine.prototype.GenSetDistance = function(arcmode, s13_a13) {
|
|
6903
|
+
if (arcmode)
|
|
6904
|
+
this.SetArc(s13_a13);
|
|
6905
|
+
else
|
|
6906
|
+
this.SetDistance(s13_a13);
|
|
6907
|
+
};
|
|
6908
|
+
l.GeodesicLine.prototype.SetDistance = function(s13) {
|
|
6909
|
+
var r;
|
|
6910
|
+
this.s13 = s13;
|
|
6911
|
+
r = this.GenPosition(false, this.s13, g.ARC);
|
|
6912
|
+
this.a13 = 0 + r.a12;
|
|
6913
|
+
};
|
|
6914
|
+
l.GeodesicLine.prototype.SetArc = function(a13) {
|
|
6915
|
+
var r;
|
|
6916
|
+
this.a13 = a13;
|
|
6917
|
+
r = this.GenPosition(true, this.a13, g.DISTANCE);
|
|
6918
|
+
this.s13 = 0 + r.s12;
|
|
6919
|
+
};
|
|
6920
|
+
})(geodesic.Geodesic, geodesic.GeodesicLine, geodesic.Math);
|
|
6921
|
+
|
|
6922
|
+
// dist/ellipsoid-geodesic.js
|
|
6923
|
+
var library = geodesic.Geodesic;
|
|
6924
|
+
function validateFinite(value2) {
|
|
6925
|
+
if (!Number.isFinite(value2))
|
|
6926
|
+
throw new Error("Geodesic axes, azimuth, distance and arc must be finite");
|
|
6927
|
+
}
|
|
6928
|
+
var nonAreaGeodesicMask = library.ALL & ~library.AREA;
|
|
6929
|
+
function createGeodesicEngine({ semiMajorAxis: a, semiMinorAxis: b }) {
|
|
6930
|
+
validateFinite(a);
|
|
6931
|
+
validateFinite(b);
|
|
6932
|
+
return new library.Geodesic(a, (a - b) / a);
|
|
6933
|
+
}
|
|
6934
|
+
|
|
6935
|
+
// dist/projection/experimental/ellipsoidal-gnomonic.js
|
|
6936
|
+
var degrees = 180 / Math.PI;
|
|
6937
|
+
function prepareEllipsoidalGnomonic(base) {
|
|
6938
|
+
return {
|
|
6939
|
+
engine: createGeodesicEngine({ semiMajorAxis: 1, semiMinorAxis: Math.sqrt(1 - base.es) }),
|
|
6940
|
+
latitude: base.lat0 * degrees
|
|
6941
|
+
};
|
|
6942
|
+
}
|
|
6943
|
+
function forwardEllipsoidalGnomonic(base, state, p) {
|
|
6944
|
+
const result = state.engine.Inverse(state.latitude, 0, p.y * degrees, adjust_lon_default(p.x - base.long0, base.over) * degrees, nonAreaGeodesicMask);
|
|
6945
|
+
if (!(result.M12 > 0))
|
|
6946
|
+
throw new Error("Coordinate is outside the ellipsoidal gnomonic horizon");
|
|
6947
|
+
const radius2 = base.a * result.m12 / result.M12;
|
|
6948
|
+
const azimuth = result.azi1 / degrees;
|
|
6949
|
+
p.x = base.x0 + radius2 * Math.sin(azimuth);
|
|
6950
|
+
p.y = base.y0 + radius2 * Math.cos(azimuth);
|
|
6951
|
+
return p;
|
|
6952
|
+
}
|
|
6953
|
+
function inverseEllipsoidalGnomonic(base, state, p) {
|
|
6954
|
+
const x = (p.x - base.x0) / base.a;
|
|
6955
|
+
const y = (p.y - base.y0) / base.a;
|
|
6956
|
+
const radius2 = Math.hypot(x, y);
|
|
6957
|
+
if (radius2 === 0) {
|
|
6958
|
+
p.x = base.long0;
|
|
6959
|
+
p.y = base.lat0;
|
|
6960
|
+
return p;
|
|
6961
|
+
}
|
|
6962
|
+
const line = state.engine.Line(state.latitude, 0, Math.atan2(x, y) * degrees, nonAreaGeodesicMask);
|
|
6963
|
+
const little = radius2 <= 1;
|
|
6964
|
+
const target = little ? radius2 : 1 / radius2;
|
|
6965
|
+
let distance = Math.atan(radius2);
|
|
6966
|
+
for (let iteration = 0; iteration < 20; iteration++) {
|
|
6967
|
+
const result = line.Position(distance, nonAreaGeodesicMask);
|
|
6968
|
+
const step = little ? (result.m12 - target * result.M12) * result.M12 : (target * result.m12 - result.M12) * result.m12;
|
|
6969
|
+
if (!Number.isFinite(step))
|
|
6970
|
+
break;
|
|
6971
|
+
distance -= step;
|
|
6972
|
+
if (Math.abs(step) < 1e-14) {
|
|
6973
|
+
const final = line.Position(distance, nonAreaGeodesicMask);
|
|
6974
|
+
if (!(final.M12 > 0))
|
|
6975
|
+
break;
|
|
6976
|
+
p.x = adjust_lon_default(base.long0 + final.lon2 / degrees, base.over);
|
|
6977
|
+
p.y = final.lat2 / degrees;
|
|
6978
|
+
return p;
|
|
6979
|
+
}
|
|
6980
|
+
}
|
|
6981
|
+
throw new Error("Ellipsoidal gnomonic inverse did not converge");
|
|
6982
|
+
}
|
|
6983
|
+
|
|
5451
6984
|
// dist/projection/experimental/kernels/gnom.js
|
|
5452
6985
|
function initialize19(state) {
|
|
6986
|
+
if (!state.sphere)
|
|
6987
|
+
state.ellipsoid = prepareEllipsoidalGnomonic(state);
|
|
5453
6988
|
state.sin_p14 = Math.sin(state.lat0);
|
|
5454
6989
|
state.cos_p14 = Math.cos(state.lat0);
|
|
5455
6990
|
state.infinity_dist = 1e3 * state.a;
|
|
5456
6991
|
state.rc = 1;
|
|
5457
6992
|
}
|
|
5458
6993
|
function forward19(state, p) {
|
|
6994
|
+
if (state.ellipsoid)
|
|
6995
|
+
return forwardEllipsoidalGnomonic(state, state.ellipsoid, p);
|
|
5459
6996
|
var sinphi, cosphi;
|
|
5460
6997
|
var dlon;
|
|
5461
6998
|
var coslon;
|
|
@@ -5482,6 +7019,8 @@ function forward19(state, p) {
|
|
|
5482
7019
|
return p;
|
|
5483
7020
|
}
|
|
5484
7021
|
function inverse19(state, p) {
|
|
7022
|
+
if (state.ellipsoid)
|
|
7023
|
+
return inverseEllipsoidalGnomonic(state, state.ellipsoid, p);
|
|
5485
7024
|
var rh;
|
|
5486
7025
|
var sinc, cosc;
|
|
5487
7026
|
var c;
|
|
@@ -5528,7 +7067,7 @@ var gnomonic = {
|
|
|
5528
7067
|
create(context) {
|
|
5529
7068
|
const base = catalogueParameters(context);
|
|
5530
7069
|
const state = createState19(base);
|
|
5531
|
-
return withAngularRenderingProfile(bindCatalogueKernel("gnom", context, state, forward19, inverse19, horizonGuard(base)), base, Math.PI * 80 / 180, (region, domain) => sphericalAzimuthalBounds(catalogueBoundsParameters(base, context), region, domain, "gnom"), Math.PI / 2);
|
|
7070
|
+
return withAngularRenderingProfile(bindCatalogueKernel("gnom", context, state, forward19, inverse19, base.sphere ? horizonGuard(base) : void 0), base, Math.min(Math.PI * 80 / 180, (1 - base.es) * Math.PI * 0.45), (region, domain) => base.sphere ? sphericalAzimuthalBounds(catalogueBoundsParameters(base, context), region, domain, "gnom") : ellipsoidalGnomonicBounds(catalogueBoundsParameters(base, context), region, domain), (1 - base.es) * Math.PI / 2);
|
|
5532
7071
|
}
|
|
5533
7072
|
};
|
|
5534
7073
|
|
|
@@ -5630,7 +7169,7 @@ function initialize21(state) {
|
|
|
5630
7169
|
state.a = 6377397155e-3;
|
|
5631
7170
|
state.es = 0.006674372230614;
|
|
5632
7171
|
state.e = Math.sqrt(state.es);
|
|
5633
|
-
state.s45 =
|
|
7172
|
+
state.s45 = Math.PI / 4;
|
|
5634
7173
|
state.s90 = 2 * state.s45;
|
|
5635
7174
|
state.fi0 = state.lat0;
|
|
5636
7175
|
state.e2 = state.es;
|
|
@@ -5807,53 +7346,55 @@ function forward23(state, p) {
|
|
|
5807
7346
|
var lon = p.x;
|
|
5808
7347
|
var lat = p.y;
|
|
5809
7348
|
var delta_lon = adjust_lon_default(lon - state.long0, state.over);
|
|
5810
|
-
|
|
5811
|
-
|
|
5812
|
-
|
|
5813
|
-
|
|
5814
|
-
|
|
7349
|
+
const sin = Math.sin(Math.abs(lat));
|
|
7350
|
+
const cos = Math.cos(lat);
|
|
7351
|
+
const target = Math.abs(lat) === Math.PI / 2 ? 0 : Math.PI * cos * cos / (1 + sin);
|
|
7352
|
+
let v = Math.cbrt(6 * target);
|
|
7353
|
+
let lower = 0;
|
|
7354
|
+
let upper = Math.PI;
|
|
7355
|
+
v = Math.min(v, upper);
|
|
7356
|
+
for (let i = 0; i < 32 && v > 0; i++) {
|
|
7357
|
+
const residual = sineComplement(v) - target;
|
|
7358
|
+
const step = residual / (2 * Math.sin(v / 2) ** 2);
|
|
7359
|
+
if (Math.abs(step) <= 16 * Number.EPSILON * v)
|
|
5815
7360
|
break;
|
|
5816
|
-
|
|
5817
|
-
|
|
5818
|
-
|
|
5819
|
-
|
|
5820
|
-
|
|
5821
|
-
if (Math.
|
|
7361
|
+
if (residual > 0)
|
|
7362
|
+
upper = v;
|
|
7363
|
+
else
|
|
7364
|
+
lower = v;
|
|
7365
|
+
const next = v - step;
|
|
7366
|
+
if (next === v || upper - lower <= 8 * Number.EPSILON * Math.max(1, v))
|
|
5822
7367
|
break;
|
|
5823
|
-
|
|
5824
|
-
|
|
5825
|
-
|
|
5826
|
-
if (Math.PI / 2 - Math.abs(lat) < EPSLN) {
|
|
5827
|
-
delta_lon = 0;
|
|
7368
|
+
v = next >= lower && next <= upper ? next : (lower + upper) / 2;
|
|
7369
|
+
if (i === 31)
|
|
7370
|
+
throw new Error("Mollweide forward did not converge");
|
|
5828
7371
|
}
|
|
5829
|
-
var x =
|
|
5830
|
-
var y =
|
|
7372
|
+
var x = 2 * Math.SQRT2 / Math.PI * state.a * delta_lon * Math.sin(v / 2) + state.x0;
|
|
7373
|
+
var y = Math.sign(lat) * Math.SQRT2 * state.a * Math.cos(v / 2) + state.y0;
|
|
5831
7374
|
p.x = x;
|
|
5832
7375
|
p.y = y;
|
|
5833
7376
|
return p;
|
|
5834
7377
|
}
|
|
5835
7378
|
function inverse23(state, p) {
|
|
5836
|
-
|
|
5837
|
-
|
|
5838
|
-
|
|
5839
|
-
|
|
5840
|
-
|
|
5841
|
-
|
|
5842
|
-
|
|
5843
|
-
|
|
5844
|
-
|
|
5845
|
-
|
|
5846
|
-
if (!state.over &&
|
|
5847
|
-
|
|
5848
|
-
|
|
5849
|
-
if (!state.over && lon > Math.PI) {
|
|
5850
|
-
lon = Math.PI;
|
|
5851
|
-
}
|
|
5852
|
-
arg = (2 * theta + Math.sin(2 * theta)) / Math.PI;
|
|
5853
|
-
if (Math.abs(arg) > 1) {
|
|
5854
|
-
arg = Math.sign(arg);
|
|
7379
|
+
const x = p.x - state.x0;
|
|
7380
|
+
const y = (p.y - state.y0) / (Math.SQRT2 * state.a);
|
|
7381
|
+
if (Math.abs(y) > 1 + 8 * Number.EPSILON)
|
|
7382
|
+
return null;
|
|
7383
|
+
const normalizedX = x / (2 * Math.SQRT2 * state.a);
|
|
7384
|
+
const ellipse = normalizedX * normalizedX + y * y;
|
|
7385
|
+
if (!state.over && ellipse > 1 + 8 * Number.EPSILON)
|
|
7386
|
+
return null;
|
|
7387
|
+
let v = 2 * Math.acos(Math.min(1, Math.abs(y)));
|
|
7388
|
+
let sinHalf = Math.sin(v / 2);
|
|
7389
|
+
if (!state.over && Math.abs(ellipse - 1) <= 8 * Number.EPSILON) {
|
|
7390
|
+
sinHalf = Math.min(1, Math.abs(normalizedX));
|
|
7391
|
+
v = 2 * Math.asin(sinHalf);
|
|
5855
7392
|
}
|
|
5856
|
-
|
|
7393
|
+
if (sinHalf === 0 && Math.abs(x) > 8 * Number.EPSILON * state.a)
|
|
7394
|
+
return null;
|
|
7395
|
+
const longitude = sinHalf === 0 ? 0 : Math.PI * normalizedX / sinHalf;
|
|
7396
|
+
var lon = adjust_lon_default(state.long0 + longitude, state.over);
|
|
7397
|
+
var lat = Math.sign(y) * (Math.PI / 2 - 2 * Math.asin(Math.sqrt(sineComplement(v) / (2 * Math.PI))));
|
|
5857
7398
|
p.x = lon;
|
|
5858
7399
|
p.y = lat;
|
|
5859
7400
|
return p;
|
|
@@ -5866,6 +7407,12 @@ function createState23(base, options = {}) {
|
|
|
5866
7407
|
initialize23(state);
|
|
5867
7408
|
return state;
|
|
5868
7409
|
}
|
|
7410
|
+
function sineComplement(v) {
|
|
7411
|
+
if (v > 0.5)
|
|
7412
|
+
return v - Math.sin(v);
|
|
7413
|
+
const squared = v * v;
|
|
7414
|
+
return v * squared * (1 / 6 + squared * (-1 / 120 + squared * (1 / 5040 + squared * (-1 / 362880 + squared * (1 / 39916800 + squared * (-1 / 6227020800 + squared / 1307674368e3))))));
|
|
7415
|
+
}
|
|
5869
7416
|
|
|
5870
7417
|
// dist/projection/experimental/projections/moll.js
|
|
5871
7418
|
var mollweide = {
|
|
@@ -6349,127 +7896,58 @@ var obliqueMercator = {
|
|
|
6349
7896
|
};
|
|
6350
7897
|
|
|
6351
7898
|
// dist/projection/experimental/kernels/ortho.js
|
|
6352
|
-
function
|
|
6353
|
-
|
|
6354
|
-
|
|
6355
|
-
|
|
6356
|
-
|
|
6357
|
-
|
|
6358
|
-
|
|
6359
|
-
|
|
6360
|
-
|
|
6361
|
-
|
|
6362
|
-
|
|
6363
|
-
|
|
6364
|
-
|
|
6365
|
-
sinphi = Math.sin(lat);
|
|
6366
|
-
cosphi = Math.cos(lat);
|
|
6367
|
-
coslon = Math.cos(dlon);
|
|
6368
|
-
g = state.sin_p14 * sinphi + state.cos_p14 * cosphi * coslon;
|
|
6369
|
-
ksp = 1;
|
|
6370
|
-
if (g > 0 || Math.abs(g) <= EPSLN) {
|
|
6371
|
-
x = (state.x0 || 0) + state.a * ksp * cosphi * Math.sin(dlon);
|
|
6372
|
-
y = (state.y0 || 0) + state.a * ksp * (state.cos_p14 * sinphi - state.sin_p14 * cosphi * coslon);
|
|
6373
|
-
}
|
|
6374
|
-
p.x = x;
|
|
6375
|
-
p.y = y;
|
|
7899
|
+
function createState26(base) {
|
|
7900
|
+
const sin0 = Math.sin(base.lat0);
|
|
7901
|
+
const cos0 = Math.cos(base.lat0);
|
|
7902
|
+
const nu0 = 1 / Math.sqrt(1 - base.es * sin0 * sin0);
|
|
7903
|
+
return { ...base, sin0, cos0, originY: -base.es * nu0 * sin0 * cos0 };
|
|
7904
|
+
}
|
|
7905
|
+
function forward26(s, p) {
|
|
7906
|
+
const longitude = adjust_lon_default(p.x - s.long0, s.over);
|
|
7907
|
+
const sin = Math.sin(p.y);
|
|
7908
|
+
const cos = Math.cos(p.y);
|
|
7909
|
+
const nu = 1 / Math.sqrt(1 - s.es * sin * sin);
|
|
7910
|
+
p.x = s.x0 + s.a * s.k0 * nu * cos * Math.sin(longitude);
|
|
7911
|
+
p.y = s.y0 + s.a * s.k0 * (nu * ((1 - s.es) * sin * s.cos0 - cos * Math.cos(longitude) * s.sin0) - s.originY);
|
|
6376
7912
|
return p;
|
|
6377
7913
|
}
|
|
6378
|
-
function inverse26(
|
|
6379
|
-
|
|
6380
|
-
|
|
6381
|
-
|
|
6382
|
-
|
|
6383
|
-
|
|
6384
|
-
|
|
6385
|
-
|
|
6386
|
-
|
|
6387
|
-
|
|
6388
|
-
|
|
6389
|
-
|
|
6390
|
-
|
|
6391
|
-
|
|
6392
|
-
|
|
6393
|
-
|
|
6394
|
-
lat0 = state.lat0 || 0;
|
|
6395
|
-
lon = long0;
|
|
6396
|
-
if (Math.abs(rh) <= EPSLN) {
|
|
6397
|
-
lat = lat0;
|
|
6398
|
-
p.x = lon;
|
|
6399
|
-
p.y = lat;
|
|
6400
|
-
return p;
|
|
6401
|
-
}
|
|
6402
|
-
lat = asinz_default(cosz * state.sin_p14 + p.y * sinz * state.cos_p14 / rh);
|
|
6403
|
-
con = Math.abs(lat0) - HALF_PI;
|
|
6404
|
-
if (Math.abs(con) <= EPSLN) {
|
|
6405
|
-
if (lat0 >= 0) {
|
|
6406
|
-
lon = adjust_lon_default(long0 + Math.atan2(p.x, -p.y), state.over);
|
|
6407
|
-
} else {
|
|
6408
|
-
lon = adjust_lon_default(long0 - Math.atan2(-p.x, p.y), state.over);
|
|
6409
|
-
}
|
|
6410
|
-
p.x = lon;
|
|
6411
|
-
p.y = lat;
|
|
6412
|
-
return p;
|
|
6413
|
-
}
|
|
6414
|
-
lon = adjust_lon_default(long0 + Math.atan2(p.x * sinz, rh * state.cos_p14 * cosz - p.y * state.sin_p14 * sinz), state.over);
|
|
6415
|
-
p.x = lon;
|
|
6416
|
-
p.y = lat;
|
|
7914
|
+
function inverse26(s, p) {
|
|
7915
|
+
const x = (p.x - s.x0) / (s.a * s.k0);
|
|
7916
|
+
const y = (p.y - s.y0) / (s.a * s.k0) + s.originY;
|
|
7917
|
+
const q = 1 - s.es;
|
|
7918
|
+
const a = s.cos0 * s.cos0 + s.sin0 * s.sin0 / q;
|
|
7919
|
+
const b = y * s.sin0 * s.cos0 * s.es / q;
|
|
7920
|
+
const c = x * x + y * y * (s.sin0 * s.sin0 + s.cos0 * s.cos0 / q) - 1;
|
|
7921
|
+
const discriminant = b * b - a * c;
|
|
7922
|
+
if (discriminant < -32 * Number.EPSILON * a) {
|
|
7923
|
+
throw new Error("Coordinate is outside the orthographic ellipse");
|
|
7924
|
+
}
|
|
7925
|
+
const t = (-b + Math.sqrt(Math.max(0, discriminant))) / a;
|
|
7926
|
+
const radial = t * s.cos0 - y * s.sin0;
|
|
7927
|
+
const z = t * s.sin0 + y * s.cos0;
|
|
7928
|
+
p.x = adjust_lon_default(s.long0 + Math.atan2(x, radial), s.over);
|
|
7929
|
+
p.y = Math.atan2(z, q * Math.hypot(radial, x));
|
|
6417
7930
|
return p;
|
|
6418
7931
|
}
|
|
6419
|
-
function createState26(base, options = {}) {
|
|
6420
|
-
const state = { ...base, sin_p14: 0, cos_p14: 0, ...options };
|
|
6421
|
-
initialize26(state);
|
|
6422
|
-
return state;
|
|
6423
|
-
}
|
|
6424
7932
|
|
|
6425
7933
|
// dist/projection/experimental/projections/ortho.js
|
|
6426
7934
|
var orthographic = {
|
|
6427
7935
|
name: "ortho",
|
|
6428
7936
|
aliases: [],
|
|
6429
|
-
parameters: ["lon_0", "x_0", "y_0", "lat_0"],
|
|
7937
|
+
parameters: ["lon_0", "x_0", "y_0", "lat_0", "k", "k_0"],
|
|
6430
7938
|
create(context) {
|
|
6431
7939
|
const base = catalogueParameters(context);
|
|
6432
7940
|
const state = createState26(base);
|
|
6433
|
-
return withAngularRenderingProfile(bindCatalogueKernel("ortho", context, state, forward26, inverse26, horizonGuard(base, 0, true)), base, Math.PI / 2, (region, domain) =>
|
|
7941
|
+
return withAngularRenderingProfile(bindCatalogueKernel("ortho", context, state, forward26, inverse26, horizonGuard(base, 0, true)), base, Math.PI / 2, (region, domain) => orthographicBounds(catalogueBoundsParameters(base, context), region, domain), Math.PI / 2);
|
|
6434
7942
|
}
|
|
6435
7943
|
};
|
|
6436
7944
|
|
|
6437
|
-
// dist/projection/experimental/common/e0fn.js
|
|
6438
|
-
function e0fn_default(x) {
|
|
6439
|
-
return 1 - 0.25 * x * (1 + x / 16 * (3 + 1.25 * x));
|
|
6440
|
-
}
|
|
6441
|
-
|
|
6442
|
-
// dist/projection/experimental/common/e1fn.js
|
|
6443
|
-
function e1fn_default(x) {
|
|
6444
|
-
return 0.375 * x * (1 + 0.25 * x * (1 + 0.46875 * x));
|
|
6445
|
-
}
|
|
6446
|
-
|
|
6447
|
-
// dist/projection/experimental/common/e2fn.js
|
|
6448
|
-
function e2fn_default(x) {
|
|
6449
|
-
return 0.05859375 * x * x * (1 + 0.75 * x);
|
|
6450
|
-
}
|
|
6451
|
-
|
|
6452
|
-
// dist/projection/experimental/common/e3fn.js
|
|
6453
|
-
function e3fn_default(x) {
|
|
6454
|
-
return x * x * x * (35 / 3072);
|
|
6455
|
-
}
|
|
6456
|
-
|
|
6457
|
-
// dist/projection/experimental/common/mlfn.js
|
|
6458
|
-
function mlfn_default(e0, e1, e2, e3, phi) {
|
|
6459
|
-
return e0 * phi - e1 * Math.sin(2 * phi) + e2 * Math.sin(4 * phi) - e3 * Math.sin(6 * phi);
|
|
6460
|
-
}
|
|
6461
|
-
|
|
6462
7945
|
// dist/projection/experimental/kernels/poly.js
|
|
6463
7946
|
var MAX_ITER4 = 20;
|
|
6464
|
-
function
|
|
6465
|
-
state.
|
|
6466
|
-
state.
|
|
6467
|
-
state.
|
|
6468
|
-
state.e0 = e0fn_default(state.es);
|
|
6469
|
-
state.e1 = e1fn_default(state.es);
|
|
6470
|
-
state.e2 = e2fn_default(state.es);
|
|
6471
|
-
state.e3 = e3fn_default(state.es);
|
|
6472
|
-
state.ml0 = state.a * mlfn_default(state.e0, state.e1, state.e2, state.e3, state.lat0);
|
|
7947
|
+
function initialize26(state) {
|
|
7948
|
+
state.meridianPole = meridianDistance(state.a, state.es, 0, Math.PI / 2);
|
|
7949
|
+
state.poleRadius = state.a / Math.sqrt(1 - state.es);
|
|
7950
|
+
state.ml0 = meridianDistance(state.a, state.es, 0, state.lat0);
|
|
6473
7951
|
}
|
|
6474
7952
|
function forward27(state, p) {
|
|
6475
7953
|
var lon = p.x;
|
|
@@ -6478,21 +7956,21 @@ function forward27(state, p) {
|
|
|
6478
7956
|
var dlon = adjust_lon_default(lon - state.long0, state.over);
|
|
6479
7957
|
el = dlon * Math.sin(lat);
|
|
6480
7958
|
if (state.sphere) {
|
|
6481
|
-
if (
|
|
7959
|
+
if (lat === 0) {
|
|
6482
7960
|
x = state.a * dlon;
|
|
6483
7961
|
y = -1 * state.a * state.lat0;
|
|
6484
7962
|
} else {
|
|
6485
7963
|
x = state.a * Math.sin(el) / Math.tan(lat);
|
|
6486
|
-
y = state.a * (
|
|
7964
|
+
y = state.a * (lat - state.lat0 + 2 * Math.sin(el / 2) ** 2 / Math.tan(lat));
|
|
6487
7965
|
}
|
|
6488
7966
|
} else {
|
|
6489
|
-
if (
|
|
7967
|
+
if (lat === 0) {
|
|
6490
7968
|
x = state.a * dlon;
|
|
6491
7969
|
y = -1 * state.ml0;
|
|
6492
7970
|
} else {
|
|
6493
7971
|
var nl = gN_default(state.a, state.e, Math.sin(lat)) / Math.tan(lat);
|
|
6494
7972
|
x = nl * Math.sin(el);
|
|
6495
|
-
y = state.a
|
|
7973
|
+
y = meridianDistance(state.a, state.es, state.lat0, lat) + nl * (2 * Math.sin(el / 2) ** 2);
|
|
6496
7974
|
}
|
|
6497
7975
|
}
|
|
6498
7976
|
p.x = x + state.x0;
|
|
@@ -6505,6 +7983,16 @@ function inverse27(state, p) {
|
|
|
6505
7983
|
var phi, dphi;
|
|
6506
7984
|
x = p.x - state.x0;
|
|
6507
7985
|
y = p.y - state.y0;
|
|
7986
|
+
const meridian = y + (state.sphere ? state.a * state.lat0 : state.ml0);
|
|
7987
|
+
const sign = meridian < 0 ? -1 : 1;
|
|
7988
|
+
const pole = state.sphere ? state.a * Math.PI / 2 : state.meridianPole;
|
|
7989
|
+
const poleOffset = pole - sign * meridian;
|
|
7990
|
+
const radius2 = Math.hypot(x, poleOffset);
|
|
7991
|
+
if (radius2 / state.a < 1e-6) {
|
|
7992
|
+
p.x = adjust_lon_default(state.long0 + Math.atan2(x, poleOffset), state.over);
|
|
7993
|
+
p.y = sign * (Math.PI / 2 - radius2 / state.poleRadius);
|
|
7994
|
+
return p;
|
|
7995
|
+
}
|
|
6508
7996
|
if (state.sphere) {
|
|
6509
7997
|
if (Math.abs(y + state.a * state.lat0) <= EPSLN) {
|
|
6510
7998
|
lon = adjust_lon_default(x / state.a + state.long0, state.over);
|
|
@@ -6518,11 +8006,15 @@ function inverse27(state, p) {
|
|
|
6518
8006
|
tanphi = Math.tan(phi);
|
|
6519
8007
|
dphi = -1 * (al * (phi * tanphi + 1) - phi - 0.5 * (phi * phi + bl) * tanphi) / ((phi - al) / tanphi - 1);
|
|
6520
8008
|
phi += dphi;
|
|
6521
|
-
if (Math.abs(dphi) <=
|
|
8009
|
+
if (Math.abs(dphi) <= 1e-14) {
|
|
6522
8010
|
lat = phi;
|
|
6523
8011
|
break;
|
|
6524
8012
|
}
|
|
6525
8013
|
}
|
|
8014
|
+
lat = refineInverseLatitude(state, lat === void 0 ? phi : lat, x, y);
|
|
8015
|
+
if (lat === void 0)
|
|
8016
|
+
return null;
|
|
8017
|
+
phi = lat;
|
|
6526
8018
|
lon = adjust_lon_default(state.long0 + Math.asin(x * Math.tan(phi) / state.a) / Math.sin(lat), state.over);
|
|
6527
8019
|
}
|
|
6528
8020
|
} else {
|
|
@@ -6538,16 +8030,20 @@ function inverse27(state, p) {
|
|
|
6538
8030
|
for (i = MAX_ITER4; i; --i) {
|
|
6539
8031
|
con = state.e * Math.sin(phi);
|
|
6540
8032
|
cl = Math.sqrt(1 - con * con) * Math.tan(phi);
|
|
6541
|
-
mln = state.a
|
|
6542
|
-
mlnp =
|
|
8033
|
+
mln = meridianDistance(state.a, state.es, 0, phi);
|
|
8034
|
+
mlnp = (1 - state.es) / Math.pow(1 - con * con, 1.5);
|
|
6543
8035
|
ma = mln / state.a;
|
|
6544
8036
|
dphi = (al * (cl * ma + 1) - ma - 0.5 * cl * (ma * ma + bl)) / (state.es * Math.sin(2 * phi) * (ma * ma + bl - 2 * al * ma) / (4 * cl) + (al - ma) * (cl * mlnp - 2 / Math.sin(2 * phi)) - mlnp);
|
|
6545
8037
|
phi -= dphi;
|
|
6546
|
-
if (Math.abs(dphi) <=
|
|
8038
|
+
if (Math.abs(dphi) <= 1e-14) {
|
|
6547
8039
|
lat = phi;
|
|
6548
8040
|
break;
|
|
6549
8041
|
}
|
|
6550
8042
|
}
|
|
8043
|
+
lat = refineInverseLatitude(state, lat === void 0 ? phi : lat, x, y);
|
|
8044
|
+
if (lat === void 0)
|
|
8045
|
+
return null;
|
|
8046
|
+
phi = lat;
|
|
6551
8047
|
cl = Math.sqrt(1 - state.es * Math.pow(Math.sin(lat), 2)) * Math.tan(lat);
|
|
6552
8048
|
lon = adjust_lon_default(state.long0 + Math.asin(x * cl / state.a) / Math.sin(lat), state.over);
|
|
6553
8049
|
}
|
|
@@ -6557,10 +8053,43 @@ function inverse27(state, p) {
|
|
|
6557
8053
|
return p;
|
|
6558
8054
|
}
|
|
6559
8055
|
function createState27(base, options = {}) {
|
|
6560
|
-
const state = {
|
|
6561
|
-
|
|
8056
|
+
const state = {
|
|
8057
|
+
...base,
|
|
8058
|
+
ml0: 0,
|
|
8059
|
+
meridianPole: 0,
|
|
8060
|
+
poleRadius: 0,
|
|
8061
|
+
...options
|
|
8062
|
+
};
|
|
8063
|
+
initialize26(state);
|
|
6562
8064
|
return state;
|
|
6563
8065
|
}
|
|
8066
|
+
function refineInverseLatitude(state, latitude, x, y) {
|
|
8067
|
+
for (let i = 0; i < 8; i++) {
|
|
8068
|
+
if (!Number.isFinite(latitude) || Math.abs(latitude) >= Math.PI / 2)
|
|
8069
|
+
return void 0;
|
|
8070
|
+
const sin = Math.sin(latitude), cos = Math.cos(latitude);
|
|
8071
|
+
const denominator = 1 - state.es * sin * sin;
|
|
8072
|
+
const normal = state.sphere ? state.a : gN_default(state.a, state.e, sin);
|
|
8073
|
+
const radius2 = normal / Math.tan(latitude);
|
|
8074
|
+
const arc = Math.asin(x / radius2);
|
|
8075
|
+
const easting = radius2 * Math.sin(arc);
|
|
8076
|
+
const oneMinusCos = 2 * Math.sin(arc / 2) ** 2;
|
|
8077
|
+
const meridian = state.sphere ? state.a * (latitude - state.lat0) : meridianDistance(state.a, state.es, state.lat0, latitude);
|
|
8078
|
+
const correction = radius2 * oneMinusCos;
|
|
8079
|
+
const northing = meridian + correction;
|
|
8080
|
+
const error = northing - y;
|
|
8081
|
+
if (Math.abs(easting - x) <= 64 * Number.EPSILON * Math.max(state.a, Math.abs(x)) && Math.abs(error) <= 64 * Number.EPSILON * Math.max(Math.abs(y), Math.abs(meridian), Math.abs(correction), state.a * Math.max(Math.abs(latitude), Math.abs(state.lat0))))
|
|
8082
|
+
return latitude;
|
|
8083
|
+
const meridianDerivative = state.sphere ? state.a : state.a * (1 - state.es) / Math.pow(denominator, 1.5);
|
|
8084
|
+
const radiusDerivative = normal * ((state.sphere ? 0 : state.es * cos * cos / denominator) - 1 / (sin * sin));
|
|
8085
|
+
const derivative = meridianDerivative + radiusDerivative * (-oneMinusCos / Math.cos(arc));
|
|
8086
|
+
const step = error / derivative;
|
|
8087
|
+
if (!Number.isFinite(step) || Math.abs(step) > 1e-6)
|
|
8088
|
+
return void 0;
|
|
8089
|
+
latitude -= step;
|
|
8090
|
+
}
|
|
8091
|
+
return void 0;
|
|
8092
|
+
}
|
|
6564
8093
|
|
|
6565
8094
|
// dist/projection/experimental/projections/poly.js
|
|
6566
8095
|
var polyconic = {
|
|
@@ -6590,7 +8119,7 @@ var AREA_ENUM = {
|
|
|
6590
8119
|
AREA_2: 3,
|
|
6591
8120
|
AREA_3: 4
|
|
6592
8121
|
};
|
|
6593
|
-
function
|
|
8122
|
+
function initialize27(state) {
|
|
6594
8123
|
state.x0 = state.x0 || 0;
|
|
6595
8124
|
state.y0 = state.y0 || 0;
|
|
6596
8125
|
state.lat0 = state.lat0 || 0;
|
|
@@ -6632,7 +8161,7 @@ function forward28(state, p) {
|
|
|
6632
8161
|
theta = lon - HALF_PI;
|
|
6633
8162
|
} else if (lon > HALF_PI + FORTPI || lon <= -(HALF_PI + FORTPI)) {
|
|
6634
8163
|
area = AREA_ENUM.AREA_1;
|
|
6635
|
-
theta = lon > 0 ? lon -
|
|
8164
|
+
theta = lon > 0 ? lon - Math.PI : lon + Math.PI;
|
|
6636
8165
|
} else if (lon > -(HALF_PI + FORTPI) && lon <= -FORTPI) {
|
|
6637
8166
|
area = AREA_ENUM.AREA_2;
|
|
6638
8167
|
theta = lon + HALF_PI;
|
|
@@ -6653,7 +8182,7 @@ function forward28(state, p) {
|
|
|
6653
8182
|
theta = -lon - HALF_PI;
|
|
6654
8183
|
} else {
|
|
6655
8184
|
area = AREA_ENUM.AREA_3;
|
|
6656
|
-
theta = lon > 0 ? -lon +
|
|
8185
|
+
theta = lon > 0 ? -lon + Math.PI : -lon - Math.PI;
|
|
6657
8186
|
}
|
|
6658
8187
|
} else {
|
|
6659
8188
|
var q, r, s;
|
|
@@ -6662,7 +8191,7 @@ function forward28(state, p) {
|
|
|
6662
8191
|
if (state.face === FACE_ENUM.RIGHT) {
|
|
6663
8192
|
lon = qsc_shift_lon_origin(lon, +HALF_PI);
|
|
6664
8193
|
} else if (state.face === FACE_ENUM.BACK) {
|
|
6665
|
-
lon = qsc_shift_lon_origin(lon, +
|
|
8194
|
+
lon = qsc_shift_lon_origin(lon, +Math.PI);
|
|
6666
8195
|
} else if (state.face === FACE_ENUM.LEFT) {
|
|
6667
8196
|
lon = qsc_shift_lon_origin(lon, -HALF_PI);
|
|
6668
8197
|
}
|
|
@@ -6674,16 +8203,16 @@ function forward28(state, p) {
|
|
|
6674
8203
|
r = coslat * sinlon;
|
|
6675
8204
|
s = sinlat;
|
|
6676
8205
|
if (state.face === FACE_ENUM.FRONT) {
|
|
6677
|
-
phi = Math.
|
|
8206
|
+
phi = Math.atan2(Math.hypot(r, s), q);
|
|
6678
8207
|
theta = qsc_fwd_equat_face_theta(phi, s, r);
|
|
6679
8208
|
} else if (state.face === FACE_ENUM.RIGHT) {
|
|
6680
|
-
phi = Math.
|
|
8209
|
+
phi = Math.atan2(Math.hypot(q, s), r);
|
|
6681
8210
|
theta = qsc_fwd_equat_face_theta(phi, s, -q);
|
|
6682
8211
|
} else if (state.face === FACE_ENUM.BACK) {
|
|
6683
|
-
phi = Math.
|
|
8212
|
+
phi = Math.atan2(Math.hypot(r, s), -q);
|
|
6684
8213
|
theta = qsc_fwd_equat_face_theta(phi, s, -r);
|
|
6685
8214
|
} else if (state.face === FACE_ENUM.LEFT) {
|
|
6686
|
-
phi = Math.
|
|
8215
|
+
phi = Math.atan2(Math.hypot(q, s), -r);
|
|
6687
8216
|
theta = qsc_fwd_equat_face_theta(phi, s, q);
|
|
6688
8217
|
} else {
|
|
6689
8218
|
phi = theta = 0;
|
|
@@ -6695,20 +8224,20 @@ function forward28(state, p) {
|
|
|
6695
8224
|
theta -= HALF_PI;
|
|
6696
8225
|
} else if (theta > HALF_PI + FORTPI || theta <= -(HALF_PI + FORTPI)) {
|
|
6697
8226
|
area = AREA_ENUM.AREA_2;
|
|
6698
|
-
theta = theta >= 0 ? theta -
|
|
8227
|
+
theta = theta >= 0 ? theta - Math.PI : theta + Math.PI;
|
|
6699
8228
|
} else {
|
|
6700
8229
|
area = AREA_ENUM.AREA_3;
|
|
6701
8230
|
theta += HALF_PI;
|
|
6702
8231
|
}
|
|
6703
8232
|
}
|
|
6704
|
-
mu = Math.atan(12 /
|
|
6705
|
-
t = Math.sqrt(
|
|
8233
|
+
mu = Math.atan(12 / Math.PI * (theta + Math.acos(Math.sin(theta) * Math.cos(FORTPI)) - HALF_PI));
|
|
8234
|
+
t = Math.sqrt(2 * Math.sin(phi / 2) ** 2 / (Math.cos(mu) * Math.cos(mu)) / (1 - Math.cos(Math.atan(1 / Math.cos(theta)))));
|
|
6706
8235
|
if (area === AREA_ENUM.AREA_1) {
|
|
6707
8236
|
mu += HALF_PI;
|
|
6708
8237
|
} else if (area === AREA_ENUM.AREA_2) {
|
|
6709
|
-
mu +=
|
|
8238
|
+
mu += Math.PI;
|
|
6710
8239
|
} else if (area === AREA_ENUM.AREA_3) {
|
|
6711
|
-
mu += 1.5 *
|
|
8240
|
+
mu += 1.5 * Math.PI;
|
|
6712
8241
|
}
|
|
6713
8242
|
xy.x = t * Math.cos(mu);
|
|
6714
8243
|
xy.y = t * Math.sin(mu);
|
|
@@ -6718,13 +8247,12 @@ function forward28(state, p) {
|
|
|
6718
8247
|
}
|
|
6719
8248
|
function inverse28(state, p) {
|
|
6720
8249
|
var lam = 0, latitude = 0;
|
|
6721
|
-
var mu,
|
|
8250
|
+
var mu, cosmu, tannu;
|
|
6722
8251
|
var tantheta, theta, cosphi, phi;
|
|
6723
8252
|
var t;
|
|
6724
8253
|
var area = 0;
|
|
6725
8254
|
p.x = (p.x - state.x0) / state.a;
|
|
6726
8255
|
p.y = (p.y - state.y0) / state.a;
|
|
6727
|
-
nu = Math.atan(Math.sqrt(p.x * p.x + p.y * p.y));
|
|
6728
8256
|
mu = Math.atan2(p.y, p.x);
|
|
6729
8257
|
if (p.x >= 0 && p.x >= Math.abs(p.y)) {
|
|
6730
8258
|
area = AREA_ENUM.AREA_0;
|
|
@@ -6733,36 +8261,37 @@ function inverse28(state, p) {
|
|
|
6733
8261
|
mu -= HALF_PI;
|
|
6734
8262
|
} else if (p.x < 0 && -p.x >= Math.abs(p.y)) {
|
|
6735
8263
|
area = AREA_ENUM.AREA_2;
|
|
6736
|
-
mu = mu < 0 ? mu +
|
|
8264
|
+
mu = mu < 0 ? mu + Math.PI : mu - Math.PI;
|
|
6737
8265
|
} else {
|
|
6738
8266
|
area = AREA_ENUM.AREA_3;
|
|
6739
8267
|
mu += HALF_PI;
|
|
6740
8268
|
}
|
|
6741
|
-
t =
|
|
8269
|
+
t = Math.PI / 12 * Math.tan(mu);
|
|
6742
8270
|
tantheta = Math.sin(t) / (Math.cos(t) - 1 / Math.sqrt(2));
|
|
6743
8271
|
theta = Math.atan(tantheta);
|
|
6744
8272
|
cosmu = Math.cos(mu);
|
|
6745
|
-
tannu = Math.
|
|
6746
|
-
|
|
8273
|
+
tannu = Math.hypot(p.x, p.y);
|
|
8274
|
+
const oneMinusCosPhi = cosmu * cosmu * tannu * tannu * (1 - Math.cos(Math.atan(1 / Math.cos(theta))));
|
|
8275
|
+
cosphi = 1 - oneMinusCosPhi;
|
|
6747
8276
|
if (cosphi < -1) {
|
|
6748
8277
|
cosphi = -1;
|
|
6749
8278
|
} else if (cosphi > 1) {
|
|
6750
8279
|
cosphi = 1;
|
|
6751
8280
|
}
|
|
6752
8281
|
if (state.face === FACE_ENUM.TOP) {
|
|
6753
|
-
phi = Math.
|
|
8282
|
+
phi = 2 * Math.asin(Math.sqrt(Math.min(1, oneMinusCosPhi / 2)));
|
|
6754
8283
|
latitude = HALF_PI - phi;
|
|
6755
8284
|
if (area === AREA_ENUM.AREA_0) {
|
|
6756
8285
|
lam = theta + HALF_PI;
|
|
6757
8286
|
} else if (area === AREA_ENUM.AREA_1) {
|
|
6758
|
-
lam = theta < 0 ? theta +
|
|
8287
|
+
lam = theta < 0 ? theta + Math.PI : theta - Math.PI;
|
|
6759
8288
|
} else if (area === AREA_ENUM.AREA_2) {
|
|
6760
8289
|
lam = theta - HALF_PI;
|
|
6761
8290
|
} else {
|
|
6762
8291
|
lam = theta;
|
|
6763
8292
|
}
|
|
6764
8293
|
} else if (state.face === FACE_ENUM.BOTTOM) {
|
|
6765
|
-
phi = Math.
|
|
8294
|
+
phi = 2 * Math.asin(Math.sqrt(Math.min(1, oneMinusCosPhi / 2)));
|
|
6766
8295
|
latitude = phi - HALF_PI;
|
|
6767
8296
|
if (area === AREA_ENUM.AREA_0) {
|
|
6768
8297
|
lam = -theta + HALF_PI;
|
|
@@ -6771,23 +8300,14 @@ function inverse28(state, p) {
|
|
|
6771
8300
|
} else if (area === AREA_ENUM.AREA_2) {
|
|
6772
8301
|
lam = -theta - HALF_PI;
|
|
6773
8302
|
} else {
|
|
6774
|
-
lam = theta < 0 ? -theta -
|
|
8303
|
+
lam = theta < 0 ? -theta - Math.PI : -theta + Math.PI;
|
|
6775
8304
|
}
|
|
6776
8305
|
} else {
|
|
6777
8306
|
var q, r, s;
|
|
6778
8307
|
q = cosphi;
|
|
6779
|
-
|
|
6780
|
-
|
|
6781
|
-
|
|
6782
|
-
} else {
|
|
6783
|
-
s = Math.sqrt(1 - t) * Math.sin(theta);
|
|
6784
|
-
}
|
|
6785
|
-
t += s * s;
|
|
6786
|
-
if (t >= 1) {
|
|
6787
|
-
r = 0;
|
|
6788
|
-
} else {
|
|
6789
|
-
r = Math.sqrt(1 - t);
|
|
6790
|
-
}
|
|
8308
|
+
const sinphi = Math.sqrt(Math.max(0, oneMinusCosPhi * (2 - oneMinusCosPhi)));
|
|
8309
|
+
s = sinphi * Math.sin(theta);
|
|
8310
|
+
r = sinphi * Math.cos(theta);
|
|
6791
8311
|
if (area === AREA_ENUM.AREA_1) {
|
|
6792
8312
|
t = r;
|
|
6793
8313
|
r = -s;
|
|
@@ -6812,26 +8332,18 @@ function inverse28(state, p) {
|
|
|
6812
8332
|
q = r;
|
|
6813
8333
|
r = -t;
|
|
6814
8334
|
}
|
|
6815
|
-
latitude = Math.
|
|
8335
|
+
latitude = Math.atan2(s, Math.hypot(q, r));
|
|
6816
8336
|
lam = Math.atan2(r, q);
|
|
6817
8337
|
if (state.face === FACE_ENUM.RIGHT) {
|
|
6818
8338
|
lam = qsc_shift_lon_origin(lam, -HALF_PI);
|
|
6819
8339
|
} else if (state.face === FACE_ENUM.BACK) {
|
|
6820
|
-
lam = qsc_shift_lon_origin(lam, -
|
|
8340
|
+
lam = qsc_shift_lon_origin(lam, -Math.PI);
|
|
6821
8341
|
} else if (state.face === FACE_ENUM.LEFT) {
|
|
6822
8342
|
lam = qsc_shift_lon_origin(lam, +HALF_PI);
|
|
6823
8343
|
}
|
|
6824
8344
|
}
|
|
6825
8345
|
if (state.es !== 0) {
|
|
6826
|
-
|
|
6827
|
-
var tanphi, xa;
|
|
6828
|
-
invert_sign = latitude < 0 ? 1 : 0;
|
|
6829
|
-
tanphi = Math.tan(latitude);
|
|
6830
|
-
xa = state.b / Math.sqrt(tanphi * tanphi + state.one_minus_f_squared);
|
|
6831
|
-
latitude = Math.atan(Math.sqrt(state.a * state.a - xa * xa) / (state.one_minus_f * xa));
|
|
6832
|
-
if (invert_sign) {
|
|
6833
|
-
latitude = -latitude;
|
|
6834
|
-
}
|
|
8346
|
+
latitude = Math.atan2(Math.sin(latitude), state.one_minus_f_squared * Math.cos(latitude));
|
|
6835
8347
|
}
|
|
6836
8348
|
lam += state.long0;
|
|
6837
8349
|
p.x = lam;
|
|
@@ -6839,20 +8351,20 @@ function inverse28(state, p) {
|
|
|
6839
8351
|
return p;
|
|
6840
8352
|
}
|
|
6841
8353
|
function qsc_fwd_equat_face_theta(phi, y, x) {
|
|
6842
|
-
return phi
|
|
8354
|
+
return phi === 0 ? 0 : Math.atan2(y, x);
|
|
6843
8355
|
}
|
|
6844
8356
|
function qsc_shift_lon_origin(lon, offset) {
|
|
6845
8357
|
var slon = lon + offset;
|
|
6846
|
-
if (slon < -
|
|
8358
|
+
if (slon < -Math.PI) {
|
|
6847
8359
|
slon += TWO_PI;
|
|
6848
|
-
} else if (slon > +
|
|
8360
|
+
} else if (slon > +Math.PI) {
|
|
6849
8361
|
slon -= TWO_PI;
|
|
6850
8362
|
}
|
|
6851
8363
|
return slon;
|
|
6852
8364
|
}
|
|
6853
8365
|
function createState28(base, options = {}) {
|
|
6854
8366
|
const state = { ...base, face: 0, one_minus_f: 0, one_minus_f_squared: 0, ...options };
|
|
6855
|
-
|
|
8367
|
+
initialize27(state);
|
|
6856
8368
|
return state;
|
|
6857
8369
|
}
|
|
6858
8370
|
|
|
@@ -6971,7 +8483,7 @@ function newton_rapshon(coefs, target, start, max_err, iters) {
|
|
|
6971
8483
|
}
|
|
6972
8484
|
return x;
|
|
6973
8485
|
}
|
|
6974
|
-
function
|
|
8486
|
+
function initialize28(state) {
|
|
6975
8487
|
state.x0 = state.x0 || 0;
|
|
6976
8488
|
state.y0 = state.y0 || 0;
|
|
6977
8489
|
state.long0 = state.long0 || 0;
|
|
@@ -7044,7 +8556,7 @@ function createState29(base, options = {}) {
|
|
|
7044
8556
|
...base,
|
|
7045
8557
|
...options
|
|
7046
8558
|
};
|
|
7047
|
-
|
|
8559
|
+
initialize28(state);
|
|
7048
8560
|
return state;
|
|
7049
8561
|
}
|
|
7050
8562
|
|
|
@@ -7075,7 +8587,7 @@ var sinusoidal = {
|
|
|
7075
8587
|
};
|
|
7076
8588
|
|
|
7077
8589
|
// dist/projection/experimental/kernels/somerc.js
|
|
7078
|
-
function
|
|
8590
|
+
function initialize29(state) {
|
|
7079
8591
|
if (!state.k0) {
|
|
7080
8592
|
state.k0 = 1;
|
|
7081
8593
|
}
|
|
@@ -7097,44 +8609,37 @@ function initialize30(state) {
|
|
|
7097
8609
|
state.K = k1 - state.alpha * k2 + state.alpha * e / 2 * k3;
|
|
7098
8610
|
}
|
|
7099
8611
|
function forward30(state, p) {
|
|
7100
|
-
|
|
7101
|
-
|
|
7102
|
-
|
|
7103
|
-
|
|
7104
|
-
|
|
7105
|
-
|
|
7106
|
-
|
|
7107
|
-
p.y = state.
|
|
7108
|
-
p.x = state.R * rotI + state.x0;
|
|
8612
|
+
const sp = state.e * Math.sin(p.y);
|
|
8613
|
+
const latitude = 2 * Math.atan(Math.exp(state.alpha * (Math.log(Math.tan(Math.PI / 4 + p.y / 2)) - state.e / 2 * Math.log((1 + sp) / (1 - sp))) + state.K)) - Math.PI / 2;
|
|
8614
|
+
const longitude = state.alpha * (p.x - state.lambda0);
|
|
8615
|
+
const cos = Math.cos(latitude);
|
|
8616
|
+
const rotatedLatitude = Math.asin(Math.cos(state.b0) * Math.sin(latitude) - Math.sin(state.b0) * cos * Math.cos(longitude));
|
|
8617
|
+
const rotatedLongitude = Math.asin(cos * Math.sin(longitude) / Math.cos(rotatedLatitude));
|
|
8618
|
+
p.x = state.x0 + state.R * rotatedLongitude;
|
|
8619
|
+
p.y = state.y0 + state.R * Math.log(Math.tan(Math.PI / 4 + rotatedLatitude / 2));
|
|
7109
8620
|
return p;
|
|
7110
8621
|
}
|
|
7111
8622
|
function inverse30(state, p) {
|
|
7112
|
-
|
|
7113
|
-
|
|
7114
|
-
|
|
7115
|
-
|
|
7116
|
-
|
|
7117
|
-
|
|
7118
|
-
|
|
7119
|
-
|
|
7120
|
-
|
|
7121
|
-
|
|
7122
|
-
|
|
7123
|
-
|
|
7124
|
-
|
|
7125
|
-
return void 0;
|
|
8623
|
+
const longitude = (p.x - state.x0) / state.R;
|
|
8624
|
+
const latitude = 2 * (Math.atan(Math.exp((p.y - state.y0) / state.R)) - Math.PI / 4);
|
|
8625
|
+
let phi = Math.asin(Math.cos(state.b0) * Math.sin(latitude) + Math.sin(state.b0) * Math.cos(latitude) * Math.cos(longitude));
|
|
8626
|
+
const lambda = Math.asin(Math.cos(latitude) * Math.sin(longitude) / Math.cos(phi));
|
|
8627
|
+
const con = (state.K - Math.log(Math.tan(Math.PI / 4 + phi / 2))) / state.alpha;
|
|
8628
|
+
for (let iteration = 0; iteration < 6; iteration++) {
|
|
8629
|
+
const esp = state.e * Math.sin(phi);
|
|
8630
|
+
const step = (con + Math.log(Math.tan(Math.PI / 4 + phi / 2)) - state.e / 2 * Math.log((1 + esp) / (1 - esp))) * (1 - esp * esp) * Math.cos(phi) / (1 - state.es);
|
|
8631
|
+
phi -= step;
|
|
8632
|
+
if (Math.abs(step) < 1e-10) {
|
|
8633
|
+
p.x = state.lambda0 + lambda / state.alpha;
|
|
8634
|
+
p.y = phi;
|
|
8635
|
+
return p;
|
|
7126
8636
|
}
|
|
7127
|
-
S = 1 / state.alpha * (Math.log(Math.tan(Math.PI / 4 + b / 2)) - state.K) + state.e * Math.log(Math.tan(Math.PI / 4 + Math.asin(state.e * Math.sin(phy)) / 2));
|
|
7128
|
-
prevPhy = phy;
|
|
7129
|
-
phy = 2 * Math.atan(Math.exp(S)) - Math.PI / 2;
|
|
7130
8637
|
}
|
|
7131
|
-
|
|
7132
|
-
p.y = phy;
|
|
7133
|
-
return p;
|
|
8638
|
+
return null;
|
|
7134
8639
|
}
|
|
7135
8640
|
function createState30(base, options = {}) {
|
|
7136
8641
|
const state = { ...base, lambda0: 0, rf: 0, R: 0, alpha: 0, b0: 0, K: 0, ...options };
|
|
7137
|
-
|
|
8642
|
+
initialize29(state);
|
|
7138
8643
|
return state;
|
|
7139
8644
|
}
|
|
7140
8645
|
|
|
@@ -7158,7 +8663,7 @@ var mode = {
|
|
|
7158
8663
|
EQUIT: 2,
|
|
7159
8664
|
OBLIQ: 3
|
|
7160
8665
|
};
|
|
7161
|
-
function
|
|
8666
|
+
function initialize30(state) {
|
|
7162
8667
|
if (Math.abs(Math.abs(state.lat0) - HALF_PI) < EPSLN) {
|
|
7163
8668
|
state.mode = state.lat0 < 0 ? mode.S_POLE : mode.N_POLE;
|
|
7164
8669
|
} else if (Math.abs(state.lat0) < EPSLN) {
|
|
@@ -7293,7 +8798,7 @@ function createState31(base, options = {}) {
|
|
|
7293
8798
|
sw: 0,
|
|
7294
8799
|
...options
|
|
7295
8800
|
};
|
|
7296
|
-
|
|
8801
|
+
initialize30(state);
|
|
7297
8802
|
return state;
|
|
7298
8803
|
}
|
|
7299
8804
|
|
|
@@ -7320,7 +8825,7 @@ var tiltedPerspective = {
|
|
|
7320
8825
|
};
|
|
7321
8826
|
|
|
7322
8827
|
// dist/projection/experimental/kernels/vandg.js
|
|
7323
|
-
function
|
|
8828
|
+
function initialize31(state) {
|
|
7324
8829
|
state.R = state.a;
|
|
7325
8830
|
}
|
|
7326
8831
|
function forward32(state, p) {
|
|
@@ -7422,7 +8927,7 @@ function inverse32(state, p) {
|
|
|
7422
8927
|
}
|
|
7423
8928
|
function createState32(base, options = {}) {
|
|
7424
8929
|
const state = { ...base, R: 0, ...options };
|
|
7425
|
-
|
|
8930
|
+
initialize31(state);
|
|
7426
8931
|
return state;
|
|
7427
8932
|
}
|
|
7428
8933
|
|
|
@@ -7577,12 +9082,12 @@ function obliqueTransformation(wrapped) {
|
|
|
7577
9082
|
return {
|
|
7578
9083
|
get bounds() {
|
|
7579
9084
|
const bounds = child2.bounds;
|
|
7580
|
-
const
|
|
9085
|
+
const degrees2 = (corner) => [
|
|
7581
9086
|
corner[0] * 180 / Math.PI,
|
|
7582
9087
|
corner[1] * 180 / Math.PI,
|
|
7583
9088
|
corner[2]
|
|
7584
9089
|
];
|
|
7585
|
-
return geographic ? [
|
|
9090
|
+
return geographic ? [degrees2(bounds[0]), degrees2(bounds[1])] : bounds;
|
|
7586
9091
|
},
|
|
7587
9092
|
normalize(point) {
|
|
7588
9093
|
source == null ? void 0 : source.normalize(point);
|
|
@@ -8548,8 +10053,8 @@ function readAxisDirection(entry, parameters, projected) {
|
|
|
8548
10053
|
if (!projected || parameters["proj"] !== "stere" || Math.abs(latitude) !== 90 || key(direction) !== (north ? "south" : "north"))
|
|
8549
10054
|
unsupportedStage("Axis meridians require an outward-facing polar stereographic axis");
|
|
8550
10055
|
const longitude = object(meridian)["longitude"];
|
|
8551
|
-
const
|
|
8552
|
-
const quarterTurns = finite2((
|
|
10056
|
+
const degrees2 = typeof longitude === "number" ? finite2(longitude) : finite2(object(longitude)["value"]) * unit(object(longitude)["unit"], DEGREES_TO_RADIANS) / DEGREES_TO_RADIANS;
|
|
10057
|
+
const quarterTurns = finite2((degrees2 - Number(parameters["lon_0"] || 0)) / 90);
|
|
8553
10058
|
if (Math.abs(quarterTurns - Math.round(quarterTurns)) > 1e-12)
|
|
8554
10059
|
unsupportedStage("Non-cardinal axis meridians require an orientation operation");
|
|
8555
10060
|
const quadrant = (Math.round(quarterTurns) % 4 + 4) % 4;
|