@math.gl/geospatial 5.0.0-beta.9 → 5.0.0-rc.2
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/README.md +3 -3
- package/dist/crs/crs-descriptor-types.d.ts +2 -1
- package/dist/crs/crs-descriptor-types.d.ts.map +1 -1
- package/dist/crs/index.cjs +54 -0
- package/dist/crs/index.cjs.map +2 -2
- package/dist/crs/index.d.ts +1 -0
- package/dist/crs/index.d.ts.map +1 -1
- package/dist/crs/index.js +1 -0
- package/dist/crs/index.js.map +1 -1
- package/dist/crs/spatial-reference-metadata.d.ts +20 -0
- package/dist/crs/spatial-reference-metadata.d.ts.map +1 -0
- package/dist/crs/spatial-reference-metadata.js +86 -0
- package/dist/crs/spatial-reference-metadata.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 +2 -2
- package/dist/ellipsoid-helpers/ellipsoid-transform.js.map +1 -1
- package/dist/ellipsoid-helpers/scale-to-geodetic-surface.js +1 -1
- package/dist/ellipsoid-helpers/scale-to-geodetic-surface.js.map +1 -1
- package/dist/ellipsoid-helpers/tangent-plane-numerics.d.ts +1 -1
- package/dist/ellipsoid-helpers/tangent-plane-numerics.d.ts.map +1 -1
- package/dist/ellipsoid-tangent-plane.d.ts +2 -2
- package/dist/ellipsoid-tangent-plane.d.ts.map +1 -1
- package/dist/ellipsoid-tangent-plane.js +1 -1
- package/dist/ellipsoid-tangent-plane.js.map +1 -1
- package/dist/ellipsoid-transforms.d.ts +2 -2
- package/dist/ellipsoid-transforms.d.ts.map +1 -1
- package/dist/ellipsoid-transforms.js +1 -1
- package/dist/ellipsoid-transforms.js.map +1 -1
- package/dist/ellipsoid.d.ts +2 -2
- package/dist/ellipsoid.d.ts.map +1 -1
- package/dist/ellipsoid.js +2 -2
- package/dist/ellipsoid.js.map +1 -1
- package/dist/expressions.d.ts +1 -1
- package/dist/expressions.d.ts.map +1 -1
- package/dist/expressions.js +1 -1
- package/dist/expressions.js.map +1 -1
- package/dist/geodesic-buffer.d.ts +1 -1
- package/dist/geodesic-buffer.d.ts.map +1 -1
- package/dist/geodesic-path.d.ts +1 -1
- package/dist/geodesic-path.d.ts.map +1 -1
- package/dist/geometry-constructors.d.ts +6 -0
- package/dist/geometry-constructors.d.ts.map +1 -0
- package/dist/geometry-constructors.js +37 -0
- package/dist/geometry-constructors.js.map +1 -0
- package/dist/geometry-inspection.d.ts +8 -0
- package/dist/geometry-inspection.d.ts.map +1 -0
- package/dist/geometry-inspection.js +61 -0
- package/dist/geometry-inspection.js.map +1 -0
- package/dist/index.cjs +2514 -558
- package/dist/index.cjs.map +3 -3
- package/dist/index.d.ts +164 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +106 -0
- package/dist/index.js.map +1 -1
- package/dist/line-simplification.d.ts +4 -0
- package/dist/line-simplification.d.ts.map +1 -0
- package/dist/line-simplification.js +83 -0
- package/dist/line-simplification.js.map +1 -0
- package/dist/linear-referencing.d.ts +6 -0
- package/dist/linear-referencing.d.ts.map +1 -0
- package/dist/linear-referencing.js +74 -0
- package/dist/linear-referencing.js.map +1 -0
- package/dist/lng-lat-rectangle.d.ts +1 -1
- package/dist/lng-lat-rectangle.d.ts.map +1 -1
- package/dist/lng-lat-rectangle.js +1 -1
- package/dist/lng-lat-rectangle.js.map +1 -1
- package/dist/local-reference-frame.d.ts +3 -3
- package/dist/local-reference-frame.d.ts.map +1 -1
- package/dist/local-reference-frame.js +2 -2
- package/dist/local-reference-frame.js.map +1 -1
- 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 +1 -1
- package/dist/make-obb-from-region.js.map +1 -1
- package/dist/maps/air-ocean-mesh.js +1 -1
- package/dist/maps/air-ocean-mesh.js.map +1 -1
- package/dist/maps/myriahedral/unfold.d.ts +1 -1
- package/dist/maps/myriahedral/unfold.d.ts.map +1 -1
- package/dist/maps/myriahedral/unfold.js +1 -1
- package/dist/maps/myriahedral/unfold.js.map +1 -1
- package/dist/maps/presets.cjs +6 -6
- package/dist/maps/presets.cjs.map +2 -2
- package/dist/maps.cjs +6 -6
- package/dist/maps.cjs.map +2 -2
- package/dist/projection/deformation.cjs +5 -5
- package/dist/projection/deformation.cjs.map +2 -2
- package/dist/projection/experimental/core.cjs +8 -4
- package/dist/projection/experimental/core.cjs.map +1 -1
- package/dist/projection/experimental/crs/spatial-reference.d.ts.map +1 -1
- package/dist/projection/experimental/crs/spatial-reference.js.map +1 -1
- package/dist/projection/experimental/crs/types.d.ts +1 -1
- package/dist/projection/experimental/crs/types.d.ts.map +1 -1
- package/dist/projection/experimental/crs-rendering-scale.d.ts.map +1 -1
- package/dist/projection/experimental/crs-rendering-scale.js +13 -2
- package/dist/projection/experimental/crs-rendering-scale.js.map +1 -1
- package/dist/projection/experimental/datum.js +1 -1
- package/dist/projection/experimental/datum.js.map +1 -1
- package/dist/projection/experimental/entries/projections/geocent.cjs +3 -3
- package/dist/projection/experimental/entries/projections/geocent.cjs.map +1 -1
- package/dist/projection/experimental/lazy-projections/aea.cjs +4 -1
- package/dist/projection/experimental/lazy-projections/aea.cjs.map +1 -1
- package/dist/projection/experimental/lazy-projections/aea.d.ts.map +1 -1
- package/dist/projection/experimental/lazy-projections/aea.js +4 -1
- package/dist/projection/experimental/lazy-projections/aea.js.map +1 -1
- package/dist/projection/experimental/lazy-projections/bonne.cjs +4 -1
- package/dist/projection/experimental/lazy-projections/bonne.cjs.map +1 -1
- package/dist/projection/experimental/lazy-projections/bonne.d.ts.map +1 -1
- package/dist/projection/experimental/lazy-projections/bonne.js +4 -1
- package/dist/projection/experimental/lazy-projections/bonne.js.map +1 -1
- package/dist/projection/experimental/lazy-projections/cass.cjs +4 -1
- package/dist/projection/experimental/lazy-projections/cass.cjs.map +1 -1
- package/dist/projection/experimental/lazy-projections/cass.d.ts.map +1 -1
- package/dist/projection/experimental/lazy-projections/cass.js +4 -1
- package/dist/projection/experimental/lazy-projections/cass.js.map +1 -1
- package/dist/projection/experimental/lazy-projections/eck6.cjs +4 -1
- package/dist/projection/experimental/lazy-projections/eck6.cjs.map +1 -1
- package/dist/projection/experimental/lazy-projections/eck6.d.ts.map +1 -1
- package/dist/projection/experimental/lazy-projections/eck6.js +4 -1
- package/dist/projection/experimental/lazy-projections/eck6.js.map +1 -1
- package/dist/projection/experimental/lazy-projections/eqdc.cjs +4 -1
- package/dist/projection/experimental/lazy-projections/eqdc.cjs.map +1 -1
- package/dist/projection/experimental/lazy-projections/eqdc.d.ts.map +1 -1
- package/dist/projection/experimental/lazy-projections/eqdc.js +4 -1
- package/dist/projection/experimental/lazy-projections/eqdc.js.map +1 -1
- package/dist/projection/experimental/lazy-projections/eqearth.cjs +4 -1
- package/dist/projection/experimental/lazy-projections/eqearth.cjs.map +1 -1
- package/dist/projection/experimental/lazy-projections/eqearth.d.ts.map +1 -1
- package/dist/projection/experimental/lazy-projections/eqearth.js +4 -1
- package/dist/projection/experimental/lazy-projections/eqearth.js.map +1 -1
- package/dist/projection/experimental/lazy-projections/equi.cjs +4 -1
- package/dist/projection/experimental/lazy-projections/equi.cjs.map +1 -1
- package/dist/projection/experimental/lazy-projections/equi.d.ts.map +1 -1
- package/dist/projection/experimental/lazy-projections/equi.js +4 -1
- package/dist/projection/experimental/lazy-projections/equi.js.map +1 -1
- package/dist/projection/experimental/lazy-projections/geocent.cjs +4 -1
- package/dist/projection/experimental/lazy-projections/geocent.cjs.map +1 -1
- package/dist/projection/experimental/lazy-projections/geocent.d.ts.map +1 -1
- package/dist/projection/experimental/lazy-projections/geocent.js +4 -1
- package/dist/projection/experimental/lazy-projections/geocent.js.map +1 -1
- package/dist/projection/experimental/lazy-projections/geos.cjs +4 -1
- package/dist/projection/experimental/lazy-projections/geos.cjs.map +1 -1
- package/dist/projection/experimental/lazy-projections/geos.d.ts.map +1 -1
- package/dist/projection/experimental/lazy-projections/geos.js +4 -1
- package/dist/projection/experimental/lazy-projections/geos.js.map +1 -1
- package/dist/projection/experimental/lazy-projections/gnom.cjs +4 -1
- package/dist/projection/experimental/lazy-projections/gnom.cjs.map +1 -1
- package/dist/projection/experimental/lazy-projections/gnom.d.ts.map +1 -1
- package/dist/projection/experimental/lazy-projections/gnom.js +4 -1
- package/dist/projection/experimental/lazy-projections/gnom.js.map +1 -1
- package/dist/projection/experimental/lazy-projections/index.cjs +100 -27
- package/dist/projection/experimental/lazy-projections/index.cjs.map +1 -1
- package/dist/projection/experimental/lazy-projections/krovak.cjs +4 -1
- package/dist/projection/experimental/lazy-projections/krovak.cjs.map +1 -1
- package/dist/projection/experimental/lazy-projections/krovak.d.ts.map +1 -1
- package/dist/projection/experimental/lazy-projections/krovak.js +4 -1
- package/dist/projection/experimental/lazy-projections/krovak.js.map +1 -1
- package/dist/projection/experimental/lazy-projections/merc.cjs +4 -1
- package/dist/projection/experimental/lazy-projections/merc.cjs.map +1 -1
- package/dist/projection/experimental/lazy-projections/merc.d.ts.map +1 -1
- package/dist/projection/experimental/lazy-projections/merc.js +4 -1
- package/dist/projection/experimental/lazy-projections/merc.js.map +1 -1
- package/dist/projection/experimental/lazy-projections/mill.cjs +4 -1
- package/dist/projection/experimental/lazy-projections/mill.cjs.map +1 -1
- package/dist/projection/experimental/lazy-projections/mill.d.ts.map +1 -1
- package/dist/projection/experimental/lazy-projections/mill.js +4 -1
- package/dist/projection/experimental/lazy-projections/mill.js.map +1 -1
- package/dist/projection/experimental/lazy-projections/moll.cjs +4 -1
- package/dist/projection/experimental/lazy-projections/moll.cjs.map +1 -1
- package/dist/projection/experimental/lazy-projections/moll.d.ts.map +1 -1
- package/dist/projection/experimental/lazy-projections/moll.js +4 -1
- package/dist/projection/experimental/lazy-projections/moll.js.map +1 -1
- package/dist/projection/experimental/lazy-projections/nzmg.cjs +4 -1
- package/dist/projection/experimental/lazy-projections/nzmg.cjs.map +1 -1
- package/dist/projection/experimental/lazy-projections/nzmg.d.ts.map +1 -1
- package/dist/projection/experimental/lazy-projections/nzmg.js +4 -1
- package/dist/projection/experimental/lazy-projections/nzmg.js.map +1 -1
- package/dist/projection/experimental/lazy-projections/omerc.cjs +4 -1
- package/dist/projection/experimental/lazy-projections/omerc.cjs.map +1 -1
- package/dist/projection/experimental/lazy-projections/omerc.d.ts.map +1 -1
- package/dist/projection/experimental/lazy-projections/omerc.js +4 -1
- package/dist/projection/experimental/lazy-projections/omerc.js.map +1 -1
- package/dist/projection/experimental/lazy-projections/ortho.cjs +4 -1
- package/dist/projection/experimental/lazy-projections/ortho.cjs.map +1 -1
- package/dist/projection/experimental/lazy-projections/ortho.d.ts.map +1 -1
- package/dist/projection/experimental/lazy-projections/ortho.js +4 -1
- package/dist/projection/experimental/lazy-projections/ortho.js.map +1 -1
- package/dist/projection/experimental/lazy-projections/poly.cjs +4 -1
- package/dist/projection/experimental/lazy-projections/poly.cjs.map +1 -1
- package/dist/projection/experimental/lazy-projections/poly.d.ts.map +1 -1
- package/dist/projection/experimental/lazy-projections/poly.js +4 -1
- package/dist/projection/experimental/lazy-projections/poly.js.map +1 -1
- package/dist/projection/experimental/lazy-projections/robin.cjs +4 -1
- package/dist/projection/experimental/lazy-projections/robin.cjs.map +1 -1
- package/dist/projection/experimental/lazy-projections/robin.d.ts.map +1 -1
- package/dist/projection/experimental/lazy-projections/robin.js +4 -1
- package/dist/projection/experimental/lazy-projections/robin.js.map +1 -1
- package/dist/projection/experimental/lazy-projections/sinu.cjs +4 -1
- package/dist/projection/experimental/lazy-projections/sinu.cjs.map +1 -1
- package/dist/projection/experimental/lazy-projections/sinu.d.ts.map +1 -1
- package/dist/projection/experimental/lazy-projections/sinu.js +4 -1
- package/dist/projection/experimental/lazy-projections/sinu.js.map +1 -1
- package/dist/projection/experimental/lazy-projections/stere.cjs +4 -1
- package/dist/projection/experimental/lazy-projections/stere.cjs.map +1 -1
- package/dist/projection/experimental/lazy-projections/stere.d.ts.map +1 -1
- package/dist/projection/experimental/lazy-projections/stere.js +4 -1
- package/dist/projection/experimental/lazy-projections/stere.js.map +1 -1
- package/dist/projection/experimental/lazy-projections/tpers.cjs +4 -1
- package/dist/projection/experimental/lazy-projections/tpers.cjs.map +1 -1
- package/dist/projection/experimental/lazy-projections/tpers.d.ts.map +1 -1
- package/dist/projection/experimental/lazy-projections/tpers.js +4 -1
- package/dist/projection/experimental/lazy-projections/tpers.js.map +1 -1
- package/dist/projection/experimental/lazy-projections/vandg.cjs +4 -1
- package/dist/projection/experimental/lazy-projections/vandg.cjs.map +1 -1
- package/dist/projection/experimental/lazy-projections/vandg.d.ts.map +1 -1
- package/dist/projection/experimental/lazy-projections/vandg.js +4 -1
- package/dist/projection/experimental/lazy-projections/vandg.js.map +1 -1
- package/dist/projection/experimental/spatial-deformation.js +1 -1
- package/dist/projection/experimental/spatial-deformation.js.map +1 -1
- package/dist/projection/index.cjs +8 -4
- package/dist/projection/index.cjs.map +1 -1
- package/dist/projection/index.d.ts.map +1 -1
- package/dist/projection/index.js.map +1 -1
- package/dist/projection/lib/projection.js.map +1 -1
- package/dist/projection/pipeline.cjs +3 -3
- package/dist/projection/pipeline.cjs.map +1 -1
- package/dist/projection/temporal.cjs +5 -5
- package/dist/projection/temporal.cjs.map +2 -2
- package/dist/projection/transform-analysis.cjs +3 -3
- package/dist/projection/transform-analysis.cjs.map +1 -1
- package/dist/rhumb-path.d.ts +1 -1
- package/dist/rhumb-path.d.ts.map +1 -1
- package/dist/spatial-planar-intersects.d.ts +4 -0
- package/dist/spatial-planar-intersects.d.ts.map +1 -0
- package/dist/spatial-planar-intersects.js +108 -0
- package/dist/spatial-planar-intersects.js.map +1 -0
- package/dist/spatial-planar.d.ts +16 -0
- package/dist/spatial-planar.d.ts.map +1 -0
- package/dist/spatial-planar.js +240 -0
- package/dist/spatial-planar.js.map +1 -0
- package/dist/spatial-sql.d.ts +45 -0
- package/dist/spatial-sql.d.ts.map +1 -0
- package/dist/spatial-sql.js +192 -0
- package/dist/spatial-sql.js.map +1 -0
- package/dist/st-functions.cjs +1616 -0
- package/dist/st-functions.cjs.map +6 -0
- package/dist/st-functions.d.ts +307 -0
- package/dist/st-functions.d.ts.map +1 -0
- package/dist/st-functions.js +593 -0
- package/dist/st-functions.js.map +1 -0
- package/dist/subdivide-globe-mesh.js +1 -1
- package/dist/subdivide-globe-mesh.js.map +1 -1
- package/dist/tasks/index.cjs +216 -98
- package/dist/tasks/index.cjs.map +2 -2
- package/dist/tasks/terrain-residency.d.ts +9 -0
- package/dist/tasks/terrain-residency.d.ts.map +1 -1
- package/dist/tasks/terrain-residency.js +98 -19
- package/dist/tasks/terrain-residency.js.map +1 -1
- package/dist/terrain/cutout-polygons.d.ts +21 -0
- package/dist/terrain/cutout-polygons.d.ts.map +1 -0
- package/dist/terrain/cutout-polygons.js +172 -0
- package/dist/terrain/cutout-polygons.js.map +1 -0
- package/dist/terrain/cutout-region.d.ts +34 -0
- package/dist/terrain/cutout-region.d.ts.map +1 -0
- package/dist/terrain/cutout-region.js +33 -0
- package/dist/terrain/cutout-region.js.map +1 -0
- package/dist/terrain/cutout-skirts.d.ts +34 -0
- package/dist/terrain/cutout-skirts.d.ts.map +1 -0
- package/dist/terrain/cutout-skirts.js +29 -0
- package/dist/terrain/cutout-skirts.js.map +1 -0
- package/dist/terrain/depression-fill.d.ts +25 -0
- package/dist/terrain/depression-fill.d.ts.map +1 -0
- package/dist/terrain/depression-fill.js +106 -0
- package/dist/terrain/depression-fill.js.map +1 -0
- package/dist/terrain/geographic-cutout.d.ts +38 -0
- package/dist/terrain/geographic-cutout.d.ts.map +1 -0
- package/dist/terrain/geographic-cutout.js +120 -0
- package/dist/terrain/geographic-cutout.js.map +1 -0
- package/dist/terrain/geographic-lod-seams.d.ts +10 -0
- package/dist/terrain/geographic-lod-seams.d.ts.map +1 -0
- package/dist/terrain/geographic-lod-seams.js +100 -0
- package/dist/terrain/geographic-lod-seams.js.map +1 -0
- package/dist/terrain/geographic-neighbor.d.ts +18 -0
- package/dist/terrain/geographic-neighbor.d.ts.map +1 -0
- package/dist/terrain/geographic-neighbor.js +44 -0
- package/dist/terrain/geographic-neighbor.js.map +1 -0
- package/dist/terrain/geographic-poles.d.ts +24 -0
- package/dist/terrain/geographic-poles.d.ts.map +1 -0
- package/dist/terrain/geographic-poles.js +34 -0
- package/dist/terrain/geographic-poles.js.map +1 -0
- package/dist/terrain/hydrology.d.ts +42 -0
- package/dist/terrain/hydrology.d.ts.map +1 -0
- package/dist/terrain/hydrology.js +112 -0
- package/dist/terrain/hydrology.js.map +1 -0
- package/dist/terrain/index.cjs +2135 -161
- package/dist/terrain/index.cjs.map +3 -3
- package/dist/terrain/index.d.ts +23 -1
- package/dist/terrain/index.d.ts.map +1 -1
- package/dist/terrain/index.js +21 -0
- package/dist/terrain/index.js.map +1 -1
- package/dist/terrain/lod-screen-error.d.ts +28 -0
- package/dist/terrain/lod-screen-error.d.ts.map +1 -0
- package/dist/terrain/lod-screen-error.js +95 -0
- package/dist/terrain/lod-screen-error.js.map +1 -0
- package/dist/terrain/lod-select.d.ts +26 -10
- package/dist/terrain/lod-select.d.ts.map +1 -1
- package/dist/terrain/lod-select.js +27 -14
- package/dist/terrain/lod-select.js.map +1 -1
- package/dist/terrain/lod-stitch.d.ts +2 -0
- package/dist/terrain/lod-stitch.d.ts.map +1 -1
- package/dist/terrain/lod-stitch.js +21 -6
- package/dist/terrain/lod-stitch.js.map +1 -1
- package/dist/terrain/mesh-cutout.d.ts +45 -0
- package/dist/terrain/mesh-cutout.d.ts.map +1 -0
- package/dist/terrain/mesh-cutout.js +336 -0
- package/dist/terrain/mesh-cutout.js.map +1 -0
- package/dist/terrain/mesh-skirts.d.ts +8 -2
- package/dist/terrain/mesh-skirts.d.ts.map +1 -1
- package/dist/terrain/mesh-skirts.js +5 -4
- package/dist/terrain/mesh-skirts.js.map +1 -1
- package/dist/terrain/mixed-halo-update.d.ts.map +1 -1
- package/dist/terrain/mixed-halo-update.js +58 -23
- package/dist/terrain/mixed-halo-update.js.map +1 -1
- package/dist/terrain/mixed-vertex-halos.d.ts +24 -1
- package/dist/terrain/mixed-vertex-halos.d.ts.map +1 -1
- package/dist/terrain/mixed-vertex-halos.js +75 -58
- package/dist/terrain/mixed-vertex-halos.js.map +1 -1
- package/dist/terrain/regional-viewshed.d.ts +55 -0
- package/dist/terrain/regional-viewshed.d.ts.map +1 -0
- package/dist/terrain/regional-viewshed.js +119 -0
- package/dist/terrain/regional-viewshed.js.map +1 -0
- package/dist/terrain/surface.d.ts +1 -1
- package/dist/terrain/surface.d.ts.map +1 -1
- package/dist/terrain/surface.js +1 -1
- package/dist/terrain/surface.js.map +1 -1
- package/dist/terrain/sweep-capsule.d.ts +27 -0
- package/dist/terrain/sweep-capsule.d.ts.map +1 -0
- package/dist/terrain/sweep-capsule.js +104 -0
- package/dist/terrain/sweep-capsule.js.map +1 -0
- package/dist/terrain/sweep-cylinder.d.ts +16 -0
- package/dist/terrain/sweep-cylinder.d.ts.map +1 -0
- package/dist/terrain/sweep-cylinder.js +52 -0
- package/dist/terrain/sweep-cylinder.js.map +1 -0
- package/dist/terrain/sweep-plane.d.ts +9 -0
- package/dist/terrain/sweep-plane.d.ts.map +1 -0
- package/dist/terrain/sweep-plane.js +52 -0
- package/dist/terrain/sweep-plane.js.map +1 -0
- package/dist/terrain/sweep-polytope.d.ts +42 -0
- package/dist/terrain/sweep-polytope.d.ts.map +1 -0
- package/dist/terrain/sweep-polytope.js +189 -0
- package/dist/terrain/sweep-polytope.js.map +1 -0
- package/dist/terrain/sweep-rotating-capsule.d.ts +17 -0
- package/dist/terrain/sweep-rotating-capsule.d.ts.map +1 -0
- package/dist/terrain/sweep-rotating-capsule.js +118 -0
- package/dist/terrain/sweep-rotating-capsule.js.map +1 -0
- package/dist/terrain/sweep-rotation.d.ts +35 -0
- package/dist/terrain/sweep-rotation.d.ts.map +1 -0
- package/dist/terrain/sweep-rotation.js +114 -0
- package/dist/terrain/sweep-rotation.js.map +1 -0
- package/dist/terrain/sweep-sphere.d.ts +27 -0
- package/dist/terrain/sweep-sphere.d.ts.map +1 -0
- package/dist/terrain/sweep-sphere.js +69 -0
- package/dist/terrain/sweep-sphere.js.map +1 -0
- package/dist/terrain/tile-cutout-update.d.ts +73 -0
- package/dist/terrain/tile-cutout-update.d.ts.map +1 -0
- package/dist/terrain/tile-cutout-update.js +181 -0
- package/dist/terrain/tile-cutout-update.js.map +1 -0
- package/dist/terrain/tile-cutout.d.ts +33 -0
- package/dist/terrain/tile-cutout.d.ts.map +1 -0
- package/dist/terrain/tile-cutout.js +93 -0
- package/dist/terrain/tile-cutout.js.map +1 -0
- package/dist/terrain/watershed-accumulation.d.ts +20 -0
- package/dist/terrain/watershed-accumulation.d.ts.map +1 -0
- package/dist/terrain/watershed-accumulation.js +53 -0
- package/dist/terrain/watershed-accumulation.js.map +1 -0
- package/dist/triaxial.d.ts +1 -1
- package/dist/triaxial.d.ts.map +1 -1
- package/dist/turf-expressions.cjs +1997 -0
- package/dist/turf-expressions.cjs.map +6 -0
- package/dist/turf-expressions.d.ts +3 -0
- package/dist/turf-expressions.d.ts.map +1 -0
- package/dist/turf-expressions.js +7 -0
- package/dist/turf-expressions.js.map +1 -0
- package/dist/turf-functions.cjs +743 -0
- package/dist/turf-functions.cjs.map +6 -0
- package/dist/turf-functions.d.ts +90 -0
- package/dist/turf-functions.d.ts.map +1 -0
- package/dist/{turf/expressions.js → turf-functions.js} +51 -5
- package/dist/turf-functions.js.map +1 -0
- package/dist/turf.cjs +25 -25
- package/dist/turf.cjs.map +2 -2
- package/dist/turf.d.ts +1 -1
- package/dist/turf.d.ts.map +1 -1
- package/dist/turf.js +2 -2
- package/dist/turf.js.map +1 -1
- package/dist/type-utils.d.ts +1 -1
- package/dist/type-utils.d.ts.map +1 -1
- package/dist/type-utils.js +1 -1
- package/dist/type-utils.js.map +1 -1
- package/dist/web-mercator/assert.d.ts +2 -0
- package/dist/web-mercator/assert.d.ts.map +1 -0
- package/dist/web-mercator/assert.js +12 -0
- package/dist/web-mercator/assert.js.map +1 -0
- package/dist/web-mercator/fit-bounds.d.ts +52 -0
- package/dist/web-mercator/fit-bounds.d.ts.map +1 -0
- package/dist/web-mercator/fit-bounds.js +70 -0
- package/dist/web-mercator/fit-bounds.js.map +1 -0
- package/dist/web-mercator/fly-to-viewport.d.ts +19 -0
- package/dist/web-mercator/fly-to-viewport.d.ts.map +1 -0
- package/dist/web-mercator/fly-to-viewport.js +94 -0
- package/dist/web-mercator/fly-to-viewport.js.map +1 -0
- package/dist/web-mercator/get-bounds.d.ts +3 -0
- package/dist/web-mercator/get-bounds.d.ts.map +1 -0
- package/dist/web-mercator/get-bounds.js +56 -0
- package/dist/web-mercator/get-bounds.js.map +1 -0
- package/dist/web-mercator/index.cjs +705 -0
- package/dist/web-mercator/index.cjs.map +6 -0
- package/dist/web-mercator/index.d.ts +14 -0
- package/dist/web-mercator/index.d.ts.map +1 -0
- package/dist/web-mercator/index.js +14 -0
- package/dist/web-mercator/index.js.map +1 -0
- package/dist/web-mercator/math-utils.d.ts +7 -0
- package/dist/web-mercator/math-utils.d.ts.map +1 -0
- package/dist/web-mercator/math-utils.js +30 -0
- package/dist/web-mercator/math-utils.js.map +1 -0
- package/dist/web-mercator/mercator-meters.d.ts +29 -0
- package/dist/web-mercator/mercator-meters.d.ts.map +1 -0
- package/dist/web-mercator/mercator-meters.js +61 -0
- package/dist/web-mercator/mercator-meters.js.map +1 -0
- package/dist/web-mercator/normalize-viewport-props.d.ts +16 -0
- package/dist/web-mercator/normalize-viewport-props.d.ts.map +1 -0
- package/dist/web-mercator/normalize-viewport-props.js +45 -0
- package/dist/web-mercator/normalize-viewport-props.js.map +1 -0
- package/dist/web-mercator/web-mercator-utils.d.ts +192 -0
- package/dist/web-mercator/web-mercator-utils.d.ts.map +1 -0
- package/dist/web-mercator/web-mercator-utils.js +321 -0
- package/dist/web-mercator/web-mercator-utils.js.map +1 -0
- package/dist/web-mercator/web-mercator-viewport.d.ts +177 -0
- package/dist/web-mercator/web-mercator-viewport.d.ts.map +1 -0
- package/dist/web-mercator/web-mercator-viewport.js +276 -0
- package/dist/web-mercator/web-mercator-viewport.js.map +1 -0
- package/dist/web-mercator.d.ts +1 -1
- package/dist/web-mercator.d.ts.map +1 -1
- package/dist/web-mercator.js +1 -1
- package/dist/web-mercator.js.map +1 -1
- package/package.json +34 -462
- package/src/crs/crs-descriptor-types.ts +2 -1
- package/src/crs/index.ts +7 -0
- package/src/crs/spatial-reference-metadata.ts +118 -0
- package/src/ellipsoid-helpers/ellipsoid-transform.ts +3 -3
- package/src/ellipsoid-helpers/scale-to-geodetic-surface.ts +1 -1
- package/src/ellipsoid-helpers/tangent-plane-numerics.ts +1 -1
- package/src/ellipsoid-tangent-plane.ts +2 -2
- package/src/ellipsoid-transforms.ts +2 -2
- package/src/ellipsoid.ts +7 -3
- package/src/expressions.ts +2 -2
- package/src/geodesic-buffer.ts +1 -1
- package/src/geodesic-path.ts +1 -1
- package/src/geometry-constructors.ts +36 -0
- package/src/geometry-inspection.ts +66 -0
- package/src/index.ts +271 -4
- package/src/line-simplification.ts +97 -0
- package/src/linear-referencing.ts +94 -0
- package/src/lng-lat-rectangle.ts +1 -1
- package/src/local-reference-frame.ts +4 -4
- package/src/make-obb-from-region.ts +9 -1
- package/src/maps/air-ocean-mesh.ts +1 -1
- package/src/maps/myriahedral/unfold.ts +1 -1
- package/src/projection/experimental/crs/spatial-reference.ts +1 -6
- package/src/projection/experimental/crs/types.ts +2 -2
- package/src/projection/experimental/crs/wkt.ts +1 -1
- package/src/projection/experimental/crs-descriptor.ts +1 -1
- package/src/projection/experimental/crs-rendering-scale.ts +16 -4
- package/src/projection/experimental/datum.ts +1 -1
- package/src/projection/experimental/lazy-projections/aea.ts +4 -1
- package/src/projection/experimental/lazy-projections/bonne.ts +4 -1
- package/src/projection/experimental/lazy-projections/cass.ts +4 -1
- package/src/projection/experimental/lazy-projections/eck6.ts +4 -1
- package/src/projection/experimental/lazy-projections/eqdc.ts +4 -1
- package/src/projection/experimental/lazy-projections/eqearth.ts +4 -1
- package/src/projection/experimental/lazy-projections/equi.ts +4 -1
- package/src/projection/experimental/lazy-projections/geocent.ts +4 -1
- package/src/projection/experimental/lazy-projections/geos.ts +4 -1
- package/src/projection/experimental/lazy-projections/gnom.ts +4 -1
- package/src/projection/experimental/lazy-projections/krovak.ts +4 -1
- package/src/projection/experimental/lazy-projections/merc.ts +4 -1
- package/src/projection/experimental/lazy-projections/mill.ts +4 -1
- package/src/projection/experimental/lazy-projections/moll.ts +4 -1
- package/src/projection/experimental/lazy-projections/nzmg.ts +4 -1
- package/src/projection/experimental/lazy-projections/omerc.ts +4 -1
- package/src/projection/experimental/lazy-projections/ortho.ts +4 -1
- package/src/projection/experimental/lazy-projections/poly.ts +4 -1
- package/src/projection/experimental/lazy-projections/robin.ts +4 -1
- package/src/projection/experimental/lazy-projections/sinu.ts +4 -1
- package/src/projection/experimental/lazy-projections/stere.ts +4 -1
- package/src/projection/experimental/lazy-projections/tpers.ts +4 -1
- package/src/projection/experimental/lazy-projections/vandg.ts +4 -1
- package/src/projection/experimental/spatial-deformation.ts +1 -1
- package/src/projection/index.ts +1 -1
- package/src/projection/lib/projection.ts +1 -1
- package/src/rhumb-path.ts +1 -1
- package/src/spatial-planar-intersects.ts +134 -0
- package/src/spatial-planar.ts +266 -0
- package/src/spatial-sql.ts +276 -0
- package/src/st-functions.ts +852 -0
- package/src/subdivide-globe-mesh.ts +1 -1
- package/src/tasks/terrain-residency.ts +120 -24
- package/src/terrain/cutout-polygons.ts +202 -0
- package/src/terrain/cutout-region.ts +54 -0
- package/src/terrain/cutout-skirts.ts +52 -0
- package/src/terrain/depression-fill.ts +125 -0
- package/src/terrain/geographic-cutout.ts +154 -0
- package/src/terrain/geographic-lod-seams.ts +109 -0
- package/src/terrain/geographic-neighbor.ts +58 -0
- package/src/terrain/geographic-poles.ts +52 -0
- package/src/terrain/hydrology.ts +149 -0
- package/src/terrain/index.ts +122 -1
- package/src/terrain/lod-screen-error.ts +128 -0
- package/src/terrain/lod-select.ts +65 -31
- package/src/terrain/lod-stitch.ts +25 -7
- package/src/terrain/mesh-cutout.ts +420 -0
- package/src/terrain/mesh-skirts.ts +10 -7
- package/src/terrain/mixed-halo-update.ts +54 -20
- package/src/terrain/mixed-vertex-halos.ts +94 -78
- package/src/terrain/regional-viewshed.ts +177 -0
- package/src/terrain/surface.ts +1 -1
- package/src/terrain/sweep-capsule.ts +148 -0
- package/src/terrain/sweep-cylinder.ts +64 -0
- package/src/terrain/sweep-plane.ts +61 -0
- package/src/terrain/sweep-polytope.ts +253 -0
- package/src/terrain/sweep-rotating-capsule.ts +139 -0
- package/src/terrain/sweep-rotation.ts +149 -0
- package/src/terrain/sweep-sphere.ts +100 -0
- package/src/terrain/tile-cutout-update.ts +293 -0
- package/src/terrain/tile-cutout.ts +123 -0
- package/src/terrain/watershed-accumulation.ts +67 -0
- package/src/triaxial.ts +1 -1
- package/src/turf-expressions.ts +7 -0
- package/src/{turf/expressions.ts → turf-functions.ts} +121 -6
- package/src/turf.ts +3 -7
- package/src/type-utils.ts +2 -2
- package/src/web-mercator/assert.ts +11 -0
- package/src/web-mercator/fit-bounds.ts +132 -0
- package/src/web-mercator/fly-to-viewport.ts +157 -0
- package/src/web-mercator/get-bounds.ts +62 -0
- package/src/web-mercator/index.ts +49 -0
- package/src/web-mercator/math-utils.ts +35 -0
- package/src/web-mercator/mercator-meters.ts +83 -0
- package/src/web-mercator/normalize-viewport-props.ts +58 -0
- package/src/web-mercator/web-mercator-utils.ts +468 -0
- package/src/web-mercator/web-mercator-viewport.ts +406 -0
- package/src/web-mercator.ts +1 -1
- package/dist/projection/experimental/index.cjs +0 -11707
- package/dist/projection/experimental/index.cjs.map +0 -6
- package/dist/turf/expressions.cjs +0 -87
- package/dist/turf/expressions.cjs.map +0 -6
- package/dist/turf/expressions.d.ts +0 -24
- package/dist/turf/expressions.d.ts.map +0 -1
- package/dist/turf/expressions.js.map +0 -1
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
// math.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
|
+
|
|
5
|
+
import type {WellKnownGeometry} from '@math.gl/core/arrow';
|
|
6
|
+
|
|
7
|
+
/** Ordered planar XY coordinates of a route. */
|
|
8
|
+
|
|
9
|
+
type Path = readonly (readonly number[])[];
|
|
10
|
+
|
|
11
|
+
/** Measures planar distance along the route at each vertex. */
|
|
12
|
+
function cumulativeDistances(path: Path): number[] {
|
|
13
|
+
const distances = [0];
|
|
14
|
+
for (let i = 1; i < path.length; i++) {
|
|
15
|
+
const a = path[i - 1]!,
|
|
16
|
+
b = path[i]!;
|
|
17
|
+
distances.push(distances[i - 1]! + Math.hypot(b[0]! - a[0]!, b[1]! - a[1]!));
|
|
18
|
+
}
|
|
19
|
+
return distances;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/** Returns a route coordinate at an absolute distance, skipping zero-length segments. */
|
|
23
|
+
function coordinateAt(path: Path, distances: number[], target: number): readonly number[] {
|
|
24
|
+
for (let i = 0; i < path.length; i++) {
|
|
25
|
+
if (target === distances[i]) return path[i]!;
|
|
26
|
+
if (target < distances[i]!) {
|
|
27
|
+
const t = (target - distances[i - 1]!) / (distances[i]! - distances[i - 1]!);
|
|
28
|
+
const a = path[i - 1]!,
|
|
29
|
+
b = path[i]!;
|
|
30
|
+
return [(1 - t) * a[0]! + t * b[0]!, (1 - t) * a[1]! + t * b[1]!];
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return path[path.length - 1]!;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/** Cuts a route at two fractions of its planar length, preserving intermediate vertices. */
|
|
37
|
+
export function lineSubstring(
|
|
38
|
+
line: WellKnownGeometry,
|
|
39
|
+
start: number,
|
|
40
|
+
end: number
|
|
41
|
+
): WellKnownGeometry | null {
|
|
42
|
+
if (!(start >= 0 && end <= 1 && start <= end))
|
|
43
|
+
throw new Error('Expected ordered route fractions in [0, 1]');
|
|
44
|
+
if (line.type !== 'LineString' || !line.coordinates.length) return null;
|
|
45
|
+
const path = line.coordinates;
|
|
46
|
+
const distances = cumulativeDistances(path);
|
|
47
|
+
const total = distances[distances.length - 1]!;
|
|
48
|
+
const from = start * total,
|
|
49
|
+
to = end * total;
|
|
50
|
+
const first = coordinateAt(path, distances, from);
|
|
51
|
+
if (from === to) return {type: 'Point', coordinates: first};
|
|
52
|
+
const coordinates = [first];
|
|
53
|
+
for (let i = 1; i < path.length - 1; i++) {
|
|
54
|
+
if (distances[i]! > from && distances[i]! < to && distances[i] !== distances[i - 1])
|
|
55
|
+
coordinates.push(path[i]!);
|
|
56
|
+
}
|
|
57
|
+
coordinates.push(coordinateAt(path, distances, to));
|
|
58
|
+
return {type: 'LineString', coordinates};
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/** Projects a point onto the nearest route segment and returns fractional planar distance. */
|
|
62
|
+
export function lineLocatePoint(line: WellKnownGeometry, point: WellKnownGeometry): number | null {
|
|
63
|
+
if (
|
|
64
|
+
line.type !== 'LineString' ||
|
|
65
|
+
!line.coordinates.length ||
|
|
66
|
+
point.type !== 'Point' ||
|
|
67
|
+
!Number.isFinite(point.coordinates[0]) ||
|
|
68
|
+
!Number.isFinite(point.coordinates[1])
|
|
69
|
+
)
|
|
70
|
+
return null;
|
|
71
|
+
const path = line.coordinates,
|
|
72
|
+
[x, y] = point.coordinates;
|
|
73
|
+
let total = 0,
|
|
74
|
+
nearest = Infinity,
|
|
75
|
+
position = 0;
|
|
76
|
+
for (let i = 1; i < path.length; i++) {
|
|
77
|
+
const a = path[i - 1]!,
|
|
78
|
+
b = path[i]!;
|
|
79
|
+
const dx = b[0]! - a[0]!,
|
|
80
|
+
dy = b[1]! - a[1]!;
|
|
81
|
+
const length = Math.hypot(dx, dy);
|
|
82
|
+
if (!length) continue;
|
|
83
|
+
const ux = dx / length,
|
|
84
|
+
uy = dy / length;
|
|
85
|
+
const along = Math.max(0, Math.min(length, (x! - a[0]!) * ux + (y! - a[1]!) * uy));
|
|
86
|
+
const distance = Math.hypot(x! - (a[0]! + along * ux), y! - (a[1]! + along * uy));
|
|
87
|
+
if (distance < nearest) {
|
|
88
|
+
nearest = distance;
|
|
89
|
+
position = total + along;
|
|
90
|
+
}
|
|
91
|
+
total += length;
|
|
92
|
+
}
|
|
93
|
+
return total ? position / total : 0;
|
|
94
|
+
}
|
package/src/lng-lat-rectangle.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
// This file is derived from the Cesium library under Apache 2 license
|
|
8
8
|
// See ../LICENSE for the retained Cesium notice and Apache-2.0 terms.
|
|
9
9
|
|
|
10
|
-
import {Vector3, normalizeAngle, _MathUtils} from '@math.gl/core';
|
|
10
|
+
import {Vector3, normalizeAngle, _MathUtils} from '@math.gl/core/matrix';
|
|
11
11
|
|
|
12
12
|
/** A two dimensional region specified as longitude and latitude coordinates. */
|
|
13
13
|
export class LngLatRectangle {
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
4
|
// SPDX-FileComment: Original geodetic frame and pose composition over math.gl local-frame kernels.
|
|
5
5
|
|
|
6
|
-
import {Matrix4, Quaternion, Vector3, config} from '@math.gl/core';
|
|
7
|
-
import {createLocalFrameBasis, eastNorthUpBasis, localFrameToMatrix} from '@math.gl/core';
|
|
8
|
-
import type {LocalFrameAxis} from '@math.gl/core';
|
|
9
|
-
import type {NumericArray} from '@math.gl/core';
|
|
6
|
+
import {Matrix4, Quaternion, Vector3, config} from '@math.gl/core/matrix';
|
|
7
|
+
import {createLocalFrameBasis, eastNorthUpBasis, localFrameToMatrix} from '@math.gl/core/matrix';
|
|
8
|
+
import type {LocalFrameAxis} from '@math.gl/core/matrix';
|
|
9
|
+
import type {NumericArray} from '@math.gl/core/matrix';
|
|
10
10
|
import {Ellipsoid} from './ellipsoid';
|
|
11
11
|
|
|
12
12
|
export type LocalReferenceFrameOptions = {
|
|
@@ -7,7 +7,15 @@
|
|
|
7
7
|
// This file is derived from the Cesium math library under Apache 2 license
|
|
8
8
|
// See ../LICENSE for the retained Cesium notice and Apache-2.0 terms.
|
|
9
9
|
|
|
10
|
-
import {
|
|
10
|
+
import {
|
|
11
|
+
Matrix3,
|
|
12
|
+
Matrix4,
|
|
13
|
+
Vector2,
|
|
14
|
+
Vector3,
|
|
15
|
+
degrees,
|
|
16
|
+
radians,
|
|
17
|
+
_MathUtils
|
|
18
|
+
} from '@math.gl/core/matrix';
|
|
11
19
|
import {OrientedBoundingBox, Plane} from '@math.gl/geometry/culling';
|
|
12
20
|
// @ts-ignore
|
|
13
21
|
// eslint-disable-next-line import/no-unresolved
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
// Arrangement implementation credited upstream to Jason Davies, Enrico Spinielli,
|
|
7
7
|
// and Philippe Riviere. Hinge geometry and rendering are independent of Nico's code.
|
|
8
8
|
|
|
9
|
-
import {Matrix4} from '@math.gl/core';
|
|
9
|
+
import {Matrix4} from '@math.gl/core/matrix';
|
|
10
10
|
import {add, cross, dot, scale, type Vector as Vec3} from './math';
|
|
11
11
|
const subtract = (a: Vec3, b: Vec3) => add(a, scale(b, -1));
|
|
12
12
|
const center = (points: Vec3[]) => scale(points.reduce(add, [0, 0, 0]), 1 / points.length);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
4
|
|
|
5
|
-
import {Matrix4} from '@math.gl/core';
|
|
5
|
+
import {Matrix4} from '@math.gl/core/matrix';
|
|
6
6
|
import {HingeTree, type HingePanel} from '@math.gl/geometry';
|
|
7
7
|
import {
|
|
8
8
|
center,
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
// math.gl
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
|
-
import type {
|
|
5
|
-
CRSInput,
|
|
6
|
-
CRSReference,
|
|
7
|
-
ReadonlyCRSDefinition,
|
|
8
|
-
SpatialReference
|
|
9
|
-
} from '../../../crs/index';
|
|
4
|
+
import type {CRSInput, CRSReference, ReadonlyCRSDefinition, SpatialReference} from '../../../crs';
|
|
10
5
|
import {TypeScriptCRSError, unsupportedStage} from './types';
|
|
11
6
|
import type {CRSNormalizationOptions, NormalizedCRS} from './types';
|
|
12
7
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// math.gl
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
|
-
import type {SpheroidParameters} from '@math.gl/core';
|
|
5
|
-
import type {CRSMetadata, ReadonlyCRSDefinition} from '../../../crs
|
|
4
|
+
import type {SpheroidParameters} from '@math.gl/core/matrix';
|
|
5
|
+
import type {CRSMetadata, ReadonlyCRSDefinition} from '../../../crs';
|
|
6
6
|
import type {ProjectionParameters} from '../types';
|
|
7
7
|
import type {DatumGridReference} from '../grids/types';
|
|
8
8
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// SPDX-FileComment: Original adapter; named-axis fallback inspired by proj4js 2.22.0 / wkt-parser (MIT). See ../../../../PROJ4-LICENSE.md for upstream attribution.
|
|
5
5
|
import {inferCRSRepresentation} from '../../../crs/spatial-reference';
|
|
6
6
|
import {parseWKTCRS} from '../../../crs/wkt-crs';
|
|
7
|
-
import type {WKTCRSNode} from '../../../crs
|
|
7
|
+
import type {WKTCRSNode} from '../../../crs';
|
|
8
8
|
import type {CRSParser} from './types';
|
|
9
9
|
import {unsupportedStage} from './types';
|
|
10
10
|
import {readStructuredCRS} from './structured';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
4
|
|
|
5
|
-
import type {CRSMetadata, CRSUnit} from '../../crs
|
|
5
|
+
import type {CRSMetadata, CRSUnit} from '../../crs';
|
|
6
6
|
import type {CRSResolver} from '../../crs/resolver';
|
|
7
7
|
import {normalizeCRS} from './crs/normalize';
|
|
8
8
|
import {createRenderingScale} from './crs-rendering-scale';
|
|
@@ -4,14 +4,23 @@
|
|
|
4
4
|
|
|
5
5
|
import {NumericalDerivative} from '../numerical-derivative';
|
|
6
6
|
import {normalizeCRS} from './crs/normalize';
|
|
7
|
-
import type {NormalizedCRS} from './crs/types';
|
|
7
|
+
import type {Ellipsoid, NormalizedCRS} from './crs/types';
|
|
8
8
|
import type {CRSRenderingScale} from './types';
|
|
9
9
|
import type {PreparedProjection, ProjectionCoordinate} from '../types';
|
|
10
10
|
|
|
11
11
|
const RADIANS = Math.PI / 180;
|
|
12
|
-
|
|
12
|
+
/** Ground units for Earth CRSs, whose samples come from the WGS84 converter. */
|
|
13
13
|
const WGS84 = normalizeCRS('WGS84').ellipsoid;
|
|
14
14
|
|
|
15
|
+
/**
|
|
16
|
+
* Returns true for an Earth ellipsoid or sphere. This is the semi-major axis test
|
|
17
|
+
* of PROJ's `Ellipsoid::guessBodyName`: within 0.7% of a 6375 km mean radius.
|
|
18
|
+
*/
|
|
19
|
+
function isEarth(ellipsoid: Ellipsoid): boolean {
|
|
20
|
+
return Math.abs(ellipsoid.semiMajorAxis - 6375000) < 0.007 * 6375000;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/** Throws unless the scale has three finite, positive components. */
|
|
15
24
|
function validateScale(scale: CRSRenderingScale): CRSRenderingScale {
|
|
16
25
|
if (scale.length !== 3 || scale.some(value => !Number.isFinite(value) || value <= 0))
|
|
17
26
|
throw new Error('Invalid CRS rendering scale');
|
|
@@ -39,6 +48,9 @@ export function createRenderingScale(
|
|
|
39
48
|
geographic = [0, 0, 0],
|
|
40
49
|
sample = [0, 0, 0];
|
|
41
50
|
const derivatives = Array.from({length: 3}, () => [0, 0, 0]);
|
|
51
|
+
// Earth CRSs keep WGS84 ground units. Another body has no datum stage, so the
|
|
52
|
+
// sampled degrees are on its own ellipsoid or sphere.
|
|
53
|
+
const body = isEarth(crs.ellipsoid) ? WGS84 : crs.ellipsoid;
|
|
42
54
|
let component = 0,
|
|
43
55
|
longitudeMeters = 0,
|
|
44
56
|
latitudeMeters = 0,
|
|
@@ -69,8 +81,8 @@ export function createRenderingScale(
|
|
|
69
81
|
if (!anchor.every(Number.isFinite)) return null;
|
|
70
82
|
projection.unprojectTo(anchor, geographic);
|
|
71
83
|
const latitude = geographic[1] * RADIANS;
|
|
72
|
-
const a =
|
|
73
|
-
es =
|
|
84
|
+
const a = body.semiMajorAxis,
|
|
85
|
+
es = body.eccentricitySquared;
|
|
74
86
|
const denominator = 1 - es * Math.sin(latitude) ** 2;
|
|
75
87
|
longitudeMeters = ((a * Math.cos(latitude)) / Math.sqrt(denominator)) * RADIANS;
|
|
76
88
|
latitudeMeters = ((a * (1 - es)) / denominator ** 1.5) * RADIANS;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// SPDX-FileCopyrightText: 2014 Mike Adair, Richard Greenwood, Didier Richard, Stephen Irons, Olivier Terral and Calvin Metcalf (proj4js)
|
|
4
4
|
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
5
5
|
// SPDX-FileComment: Helmert equations directly adapted from proj4js 2.22.0 datumUtils.js. See ../../../PROJ4-LICENSE.md. Geocentric equations now delegate to the attributed @math.gl/core leaf.
|
|
6
|
-
import {spheroidToCartesian, cartesianToSpheroid} from '@math.gl/core';
|
|
6
|
+
import {spheroidToCartesian, cartesianToSpheroid} from '@math.gl/core/matrix';
|
|
7
7
|
import type {Datum, Ellipsoid} from './crs/types';
|
|
8
8
|
import type {ProjectionPoint} from './types';
|
|
9
9
|
export type Coordinate3D = [number, number, number];
|
|
@@ -6,5 +6,8 @@ import {createProjectionDescriptor} from '../projection-descriptor';
|
|
|
6
6
|
import type {ProjectionDescriptor} from '../projection-descriptor';
|
|
7
7
|
export const lazyAlbersEqualArea: ProjectionDescriptor = /* @__PURE__ */ createProjectionDescriptor(
|
|
8
8
|
{name: 'aea', aliases: ['Albers_Conic_Equal_Area', 'Albers_Equal_Area', 'Albers']},
|
|
9
|
-
async () =>
|
|
9
|
+
async () => {
|
|
10
|
+
const projectionModule = await import('@math.gl/geospatial/projection/projections/aea');
|
|
11
|
+
return projectionModule.albersEqualArea;
|
|
12
|
+
}
|
|
10
13
|
);
|
|
@@ -6,5 +6,8 @@ import {createProjectionDescriptor} from '../projection-descriptor';
|
|
|
6
6
|
import type {ProjectionDescriptor} from '../projection-descriptor';
|
|
7
7
|
export const lazyBonne: ProjectionDescriptor = /* @__PURE__ */ createProjectionDescriptor(
|
|
8
8
|
{name: 'bonne', aliases: ['Bonne (Werner lat_1=90)']},
|
|
9
|
-
async () =>
|
|
9
|
+
async () => {
|
|
10
|
+
const projectionModule = await import('@math.gl/geospatial/projection/projections/bonne');
|
|
11
|
+
return projectionModule.bonne;
|
|
12
|
+
}
|
|
10
13
|
);
|
|
@@ -6,5 +6,8 @@ import {createProjectionDescriptor} from '../projection-descriptor';
|
|
|
6
6
|
import type {ProjectionDescriptor} from '../projection-descriptor';
|
|
7
7
|
export const lazyCassiniSoldner: ProjectionDescriptor = /* @__PURE__ */ createProjectionDescriptor(
|
|
8
8
|
{name: 'cass', aliases: ['Cassini', 'Cassini_Soldner']},
|
|
9
|
-
async () =>
|
|
9
|
+
async () => {
|
|
10
|
+
const projectionModule = await import('@math.gl/geospatial/projection/projections/cass');
|
|
11
|
+
return projectionModule.cassiniSoldner;
|
|
12
|
+
}
|
|
10
13
|
);
|
|
@@ -6,5 +6,8 @@ import {createProjectionDescriptor} from '../projection-descriptor';
|
|
|
6
6
|
import type {ProjectionDescriptor} from '../projection-descriptor';
|
|
7
7
|
export const lazyEckertVI: ProjectionDescriptor = /* @__PURE__ */ createProjectionDescriptor(
|
|
8
8
|
{name: 'eck6', aliases: ['Eckert_VI']},
|
|
9
|
-
async () =>
|
|
9
|
+
async () => {
|
|
10
|
+
const projectionModule = await import('@math.gl/geospatial/projection/projections/eck6');
|
|
11
|
+
return projectionModule.eckertVI;
|
|
12
|
+
}
|
|
10
13
|
);
|
|
@@ -7,5 +7,8 @@ import type {ProjectionDescriptor} from '../projection-descriptor';
|
|
|
7
7
|
export const lazyEquidistantConic: ProjectionDescriptor =
|
|
8
8
|
/* @__PURE__ */ createProjectionDescriptor(
|
|
9
9
|
{name: 'eqdc', aliases: ['Equidistant_Conic']},
|
|
10
|
-
async () =>
|
|
10
|
+
async () => {
|
|
11
|
+
const projectionModule = await import('@math.gl/geospatial/projection/projections/eqdc');
|
|
12
|
+
return projectionModule.equidistantConic;
|
|
13
|
+
}
|
|
11
14
|
);
|
|
@@ -6,5 +6,8 @@ import {createProjectionDescriptor} from '../projection-descriptor';
|
|
|
6
6
|
import type {ProjectionDescriptor} from '../projection-descriptor';
|
|
7
7
|
export const lazyEqualEarth: ProjectionDescriptor = /* @__PURE__ */ createProjectionDescriptor(
|
|
8
8
|
{name: 'eqearth', aliases: ['Equal Earth', 'Equal_Earth']},
|
|
9
|
-
async () =>
|
|
9
|
+
async () => {
|
|
10
|
+
const projectionModule = await import('@math.gl/geospatial/projection/projections/eqearth');
|
|
11
|
+
return projectionModule.equalEarth;
|
|
12
|
+
}
|
|
10
13
|
);
|
|
@@ -6,5 +6,8 @@ import {createProjectionDescriptor} from '../projection-descriptor';
|
|
|
6
6
|
import type {ProjectionDescriptor} from '../projection-descriptor';
|
|
7
7
|
export const lazyEquirectangular: ProjectionDescriptor = /* @__PURE__ */ createProjectionDescriptor(
|
|
8
8
|
{name: 'equi', aliases: []},
|
|
9
|
-
async () =>
|
|
9
|
+
async () => {
|
|
10
|
+
const projectionModule = await import('@math.gl/geospatial/projection/projections/equi');
|
|
11
|
+
return projectionModule.equirectangular;
|
|
12
|
+
}
|
|
10
13
|
);
|
|
@@ -6,5 +6,8 @@ import {createProjectionDescriptor} from '../projection-descriptor';
|
|
|
6
6
|
import type {ProjectionDescriptor} from '../projection-descriptor';
|
|
7
7
|
export const lazyGeocentric: ProjectionDescriptor = /* @__PURE__ */ createProjectionDescriptor(
|
|
8
8
|
{name: 'geocent', aliases: ['Geocentric', 'geocentric', 'Geocent']},
|
|
9
|
-
async () =>
|
|
9
|
+
async () => {
|
|
10
|
+
const projectionModule = await import('@math.gl/geospatial/projection/projections/geocent');
|
|
11
|
+
return projectionModule.geocentric;
|
|
12
|
+
}
|
|
10
13
|
);
|
|
@@ -6,5 +6,8 @@ import {createProjectionDescriptor} from '../projection-descriptor';
|
|
|
6
6
|
import type {ProjectionDescriptor} from '../projection-descriptor';
|
|
7
7
|
export const lazyGeostationary: ProjectionDescriptor = /* @__PURE__ */ createProjectionDescriptor(
|
|
8
8
|
{name: 'geos', aliases: ['Geostationary Satellite View', 'Geostationary_Satellite']},
|
|
9
|
-
async () =>
|
|
9
|
+
async () => {
|
|
10
|
+
const projectionModule = await import('@math.gl/geospatial/projection/projections/geos');
|
|
11
|
+
return projectionModule.geostationary;
|
|
12
|
+
}
|
|
10
13
|
);
|
|
@@ -6,5 +6,8 @@ import {createProjectionDescriptor} from '../projection-descriptor';
|
|
|
6
6
|
import type {ProjectionDescriptor} from '../projection-descriptor';
|
|
7
7
|
export const lazyGnomonic: ProjectionDescriptor = /* @__PURE__ */ createProjectionDescriptor(
|
|
8
8
|
{name: 'gnom', aliases: []},
|
|
9
|
-
async () =>
|
|
9
|
+
async () => {
|
|
10
|
+
const projectionModule = await import('@math.gl/geospatial/projection/projections/gnom');
|
|
11
|
+
return projectionModule.gnomonic;
|
|
12
|
+
}
|
|
10
13
|
);
|
|
@@ -14,5 +14,8 @@ export const lazyKrovak: ProjectionDescriptor = /* @__PURE__ */ createProjection
|
|
|
14
14
|
'Krovak Modified (North Orientated)'
|
|
15
15
|
]
|
|
16
16
|
},
|
|
17
|
-
async () =>
|
|
17
|
+
async () => {
|
|
18
|
+
const projectionModule = await import('@math.gl/geospatial/projection/projections/krovak');
|
|
19
|
+
return projectionModule.krovak;
|
|
20
|
+
}
|
|
18
21
|
);
|
|
@@ -15,5 +15,8 @@ export const lazyMercator: ProjectionDescriptor = /* @__PURE__ */ createProjecti
|
|
|
15
15
|
'Mercator_Variant_A'
|
|
16
16
|
]
|
|
17
17
|
},
|
|
18
|
-
async () =>
|
|
18
|
+
async () => {
|
|
19
|
+
const projectionModule = await import('@math.gl/geospatial/projection/projections/merc');
|
|
20
|
+
return projectionModule.mercator;
|
|
21
|
+
}
|
|
19
22
|
);
|
|
@@ -7,5 +7,8 @@ import type {ProjectionDescriptor} from '../projection-descriptor';
|
|
|
7
7
|
export const lazyMillerCylindrical: ProjectionDescriptor =
|
|
8
8
|
/* @__PURE__ */ createProjectionDescriptor(
|
|
9
9
|
{name: 'mill', aliases: ['Miller_Cylindrical']},
|
|
10
|
-
async () =>
|
|
10
|
+
async () => {
|
|
11
|
+
const projectionModule = await import('@math.gl/geospatial/projection/projections/mill');
|
|
12
|
+
return projectionModule.millerCylindrical;
|
|
13
|
+
}
|
|
11
14
|
);
|
|
@@ -6,5 +6,8 @@ import {createProjectionDescriptor} from '../projection-descriptor';
|
|
|
6
6
|
import type {ProjectionDescriptor} from '../projection-descriptor';
|
|
7
7
|
export const lazyMollweide: ProjectionDescriptor = /* @__PURE__ */ createProjectionDescriptor(
|
|
8
8
|
{name: 'moll', aliases: ['Mollweide']},
|
|
9
|
-
async () =>
|
|
9
|
+
async () => {
|
|
10
|
+
const projectionModule = await import('@math.gl/geospatial/projection/projections/moll');
|
|
11
|
+
return projectionModule.mollweide;
|
|
12
|
+
}
|
|
10
13
|
);
|
|
@@ -7,5 +7,8 @@ import type {ProjectionDescriptor} from '../projection-descriptor';
|
|
|
7
7
|
export const lazyNewZealandMapGrid: ProjectionDescriptor =
|
|
8
8
|
/* @__PURE__ */ createProjectionDescriptor(
|
|
9
9
|
{name: 'nzmg', aliases: ['New_Zealand_Map_Grid']},
|
|
10
|
-
async () =>
|
|
10
|
+
async () => {
|
|
11
|
+
const projectionModule = await import('@math.gl/geospatial/projection/projections/nzmg');
|
|
12
|
+
return projectionModule.newZealandMapGrid;
|
|
13
|
+
}
|
|
11
14
|
);
|
|
@@ -18,5 +18,8 @@ export const lazyObliqueMercator: ProjectionDescriptor = /* @__PURE__ */ createP
|
|
|
18
18
|
'Oblique_Mercator'
|
|
19
19
|
]
|
|
20
20
|
},
|
|
21
|
-
async () =>
|
|
21
|
+
async () => {
|
|
22
|
+
const projectionModule = await import('@math.gl/geospatial/projection/projections/omerc');
|
|
23
|
+
return projectionModule.obliqueMercator;
|
|
24
|
+
}
|
|
22
25
|
);
|
|
@@ -6,5 +6,8 @@ import {createProjectionDescriptor} from '../projection-descriptor';
|
|
|
6
6
|
import type {ProjectionDescriptor} from '../projection-descriptor';
|
|
7
7
|
export const lazyOrthographic: ProjectionDescriptor = /* @__PURE__ */ createProjectionDescriptor(
|
|
8
8
|
{name: 'ortho', aliases: []},
|
|
9
|
-
async () =>
|
|
9
|
+
async () => {
|
|
10
|
+
const projectionModule = await import('@math.gl/geospatial/projection/projections/ortho');
|
|
11
|
+
return projectionModule.orthographic;
|
|
12
|
+
}
|
|
10
13
|
);
|
|
@@ -6,5 +6,8 @@ import {createProjectionDescriptor} from '../projection-descriptor';
|
|
|
6
6
|
import type {ProjectionDescriptor} from '../projection-descriptor';
|
|
7
7
|
export const lazyPolyconic: ProjectionDescriptor = /* @__PURE__ */ createProjectionDescriptor(
|
|
8
8
|
{name: 'poly', aliases: ['Polyconic', 'American_Polyconic']},
|
|
9
|
-
async () =>
|
|
9
|
+
async () => {
|
|
10
|
+
const projectionModule = await import('@math.gl/geospatial/projection/projections/poly');
|
|
11
|
+
return projectionModule.polyconic;
|
|
12
|
+
}
|
|
10
13
|
);
|
|
@@ -6,5 +6,8 @@ import {createProjectionDescriptor} from '../projection-descriptor';
|
|
|
6
6
|
import type {ProjectionDescriptor} from '../projection-descriptor';
|
|
7
7
|
export const lazyRobinson: ProjectionDescriptor = /* @__PURE__ */ createProjectionDescriptor(
|
|
8
8
|
{name: 'robin', aliases: ['Robinson']},
|
|
9
|
-
async () =>
|
|
9
|
+
async () => {
|
|
10
|
+
const projectionModule = await import('@math.gl/geospatial/projection/projections/robin');
|
|
11
|
+
return projectionModule.robinson;
|
|
12
|
+
}
|
|
10
13
|
);
|
|
@@ -6,5 +6,8 @@ import {createProjectionDescriptor} from '../projection-descriptor';
|
|
|
6
6
|
import type {ProjectionDescriptor} from '../projection-descriptor';
|
|
7
7
|
export const lazySinusoidal: ProjectionDescriptor = /* @__PURE__ */ createProjectionDescriptor(
|
|
8
8
|
{name: 'sinu', aliases: ['Sinusoidal']},
|
|
9
|
-
async () =>
|
|
9
|
+
async () => {
|
|
10
|
+
const projectionModule = await import('@math.gl/geospatial/projection/projections/sinu');
|
|
11
|
+
return projectionModule.sinusoidal;
|
|
12
|
+
}
|
|
10
13
|
);
|
|
@@ -14,5 +14,8 @@ export const lazyStereographic: ProjectionDescriptor = /* @__PURE__ */ createPro
|
|
|
14
14
|
'Polar_Stereographic'
|
|
15
15
|
]
|
|
16
16
|
},
|
|
17
|
-
async () =>
|
|
17
|
+
async () => {
|
|
18
|
+
const projectionModule = await import('@math.gl/geospatial/projection/projections/stere');
|
|
19
|
+
return projectionModule.stereographic;
|
|
20
|
+
}
|
|
18
21
|
);
|
|
@@ -7,5 +7,8 @@ import type {ProjectionDescriptor} from '../projection-descriptor';
|
|
|
7
7
|
export const lazyTiltedPerspective: ProjectionDescriptor =
|
|
8
8
|
/* @__PURE__ */ createProjectionDescriptor(
|
|
9
9
|
{name: 'tpers', aliases: ['Tilted_Perspective']},
|
|
10
|
-
async () =>
|
|
10
|
+
async () => {
|
|
11
|
+
const projectionModule = await import('@math.gl/geospatial/projection/projections/tpers');
|
|
12
|
+
return projectionModule.tiltedPerspective;
|
|
13
|
+
}
|
|
11
14
|
);
|
|
@@ -6,5 +6,8 @@ import {createProjectionDescriptor} from '../projection-descriptor';
|
|
|
6
6
|
import type {ProjectionDescriptor} from '../projection-descriptor';
|
|
7
7
|
export const lazyVanDerGrinten: ProjectionDescriptor = /* @__PURE__ */ createProjectionDescriptor(
|
|
8
8
|
{name: 'vandg', aliases: ['Van_der_Grinten_I', 'VanDerGrinten', 'Van_der_Grinten']},
|
|
9
|
-
async () =>
|
|
9
|
+
async () => {
|
|
10
|
+
const projectionModule = await import('@math.gl/geospatial/projection/projections/vandg');
|
|
11
|
+
return projectionModule.vanDerGrinten;
|
|
12
|
+
}
|
|
10
13
|
);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
4
|
// SPDX-FileComment: Original shared source-sampled displacement and bounded inverse kernel; no upstream implementation copied.
|
|
5
5
|
import type {inverseDisplacement} from './deformation-inverse';
|
|
6
|
-
import {createLocalFrameBasis, eastNorthUpBasis, localToFixed} from '@math.gl/core';
|
|
6
|
+
import {createLocalFrameBasis, eastNorthUpBasis, localToFixed} from '@math.gl/core/matrix';
|
|
7
7
|
import {geocentricToGeodeticInPlace} from './datum';
|
|
8
8
|
import type {ProjectionPoint} from './types';
|
|
9
9
|
import type {DeformationModel, DeformationModelOptions} from './deformation';
|
package/src/projection/index.ts
CHANGED
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
obliqueTransformation,
|
|
47
47
|
wktCRSParser,
|
|
48
48
|
projJSONCRSParser
|
|
49
|
-
} from '../experimental
|
|
49
|
+
} from '../experimental';
|
|
50
50
|
import {CORE_PARAMETERS} from '../experimental/crs/normalize';
|
|
51
51
|
import type {ProjectionPlugin} from '../experimental/types';
|
|
52
52
|
|
package/src/rhumb-path.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
4
|
// SPDX-FileComment: Original distance-parameterized adapter over the attributed math.gl rhumb solver.
|
|
5
5
|
|
|
6
|
-
import type {NumericArray} from '@math.gl/core';
|
|
6
|
+
import type {NumericArray} from '@math.gl/core/matrix';
|
|
7
7
|
import {EllipsoidRhumb, type RhumbLine} from './ellipsoid-rhumb';
|
|
8
8
|
import {validateGeographicPosition} from './geodesic-path';
|
|
9
9
|
import {WGS84_RADIUS_X, WGS84_RADIUS_Z} from './constants';
|