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