@math.gl/geospatial 5.0.0-beta.4 → 5.0.0-beta.6
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 +192 -2
- package/THIRD-PARTY-NOTICES.md +192 -20
- package/dist/expressions.d.ts +1 -1
- package/dist/expressions.d.ts.map +1 -1
- package/dist/index.cjs +6953 -10021
- package/dist/index.cjs.map +3 -3
- package/dist/index.d.ts +40 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +20 -4
- package/dist/index.js.map +1 -1
- package/dist/projection/experimental/common/adjust_lat.js +1 -1
- package/dist/projection/experimental/common/adjust_lat.js.map +1 -1
- package/dist/projection/experimental/common/adjust_lon.js +1 -1
- package/dist/projection/experimental/common/adjust_lon.js.map +1 -1
- package/dist/projection/experimental/common/asinhy.js +1 -1
- package/dist/projection/experimental/common/asinhy.js.map +1 -1
- package/dist/projection/experimental/common/asinz.js +1 -1
- package/dist/projection/experimental/common/asinz.js.map +1 -1
- package/dist/projection/experimental/common/authlat.js +1 -1
- package/dist/projection/experimental/common/authlat.js.map +1 -1
- package/dist/projection/experimental/common/authset.js +1 -1
- package/dist/projection/experimental/common/authset.js.map +1 -1
- package/dist/projection/experimental/common/clens.js +1 -1
- package/dist/projection/experimental/common/clens.js.map +1 -1
- package/dist/projection/experimental/common/clens_cmplx.js +1 -1
- package/dist/projection/experimental/common/clens_cmplx.js.map +1 -1
- package/dist/projection/experimental/common/constants.js +1 -1
- package/dist/projection/experimental/common/constants.js.map +1 -1
- package/dist/projection/experimental/common/cosh.js +1 -1
- package/dist/projection/experimental/common/cosh.js.map +1 -1
- package/dist/projection/experimental/common/e0fn.js +1 -1
- package/dist/projection/experimental/common/e0fn.js.map +1 -1
- package/dist/projection/experimental/common/e1fn.js +1 -1
- package/dist/projection/experimental/common/e1fn.js.map +1 -1
- package/dist/projection/experimental/common/e2fn.js +1 -1
- package/dist/projection/experimental/common/e2fn.js.map +1 -1
- package/dist/projection/experimental/common/e3fn.js +1 -1
- package/dist/projection/experimental/common/e3fn.js.map +1 -1
- package/dist/projection/experimental/common/fL.js +1 -1
- package/dist/projection/experimental/common/fL.js.map +1 -1
- package/dist/projection/experimental/common/gN.js +1 -1
- package/dist/projection/experimental/common/gN.js.map +1 -1
- package/dist/projection/experimental/common/gatg.js +1 -1
- package/dist/projection/experimental/common/gatg.js.map +1 -1
- package/dist/projection/experimental/common/hypot.js +1 -1
- package/dist/projection/experimental/common/hypot.js.map +1 -1
- package/dist/projection/experimental/common/imlfn.js +1 -1
- package/dist/projection/experimental/common/imlfn.js.map +1 -1
- package/dist/projection/experimental/common/invlatiso.js +1 -1
- package/dist/projection/experimental/common/invlatiso.js.map +1 -1
- package/dist/projection/experimental/common/iqsfnz.js +1 -1
- package/dist/projection/experimental/common/iqsfnz.js.map +1 -1
- package/dist/projection/experimental/common/latiso.js +1 -1
- package/dist/projection/experimental/common/latiso.js.map +1 -1
- package/dist/projection/experimental/common/log1py.js +1 -1
- package/dist/projection/experimental/common/log1py.js.map +1 -1
- package/dist/projection/experimental/common/mlfn.js +1 -1
- package/dist/projection/experimental/common/mlfn.js.map +1 -1
- package/dist/projection/experimental/common/msfnz.js +1 -1
- package/dist/projection/experimental/common/msfnz.js.map +1 -1
- package/dist/projection/experimental/common/phi2z.js +1 -1
- package/dist/projection/experimental/common/phi2z.js.map +1 -1
- package/dist/projection/experimental/common/pj_enfn.js +1 -1
- package/dist/projection/experimental/common/pj_enfn.js.map +1 -1
- package/dist/projection/experimental/common/pj_inv_mlfn.js +1 -1
- package/dist/projection/experimental/common/pj_inv_mlfn.js.map +1 -1
- package/dist/projection/experimental/common/pj_mlfn.js +1 -1
- package/dist/projection/experimental/common/pj_mlfn.js.map +1 -1
- package/dist/projection/experimental/common/qsfnz.js +1 -1
- package/dist/projection/experimental/common/qsfnz.js.map +1 -1
- package/dist/projection/experimental/common/sign.js +1 -1
- package/dist/projection/experimental/common/sign.js.map +1 -1
- package/dist/projection/experimental/common/sinh.js +1 -1
- package/dist/projection/experimental/common/sinh.js.map +1 -1
- package/dist/projection/experimental/common/srat.js +1 -1
- package/dist/projection/experimental/common/srat.js.map +1 -1
- package/dist/projection/experimental/common/tsfnz.js +1 -1
- package/dist/projection/experimental/common/tsfnz.js.map +1 -1
- package/dist/projection/experimental/common/vincenty.js +1 -1
- package/dist/projection/experimental/common/vincenty.js.map +1 -1
- package/dist/projection/experimental/core.cjs +100 -2
- package/dist/projection/experimental/core.cjs.map +2 -2
- package/dist/projection/experimental/core.d.ts +1 -0
- package/dist/projection/experimental/core.d.ts.map +1 -1
- package/dist/projection/experimental/crs/datum-table.js +1 -1
- package/dist/projection/experimental/crs/datum-table.js.map +1 -1
- package/dist/projection/experimental/crs/ellipsoid-table.js +1 -1
- package/dist/projection/experimental/crs/ellipsoid-table.js.map +1 -1
- package/dist/projection/experimental/crs/primemeridian-table.js +1 -1
- package/dist/projection/experimental/crs/primemeridian-table.js.map +1 -1
- package/dist/projection/experimental/crs/structured.js +1 -1
- package/dist/projection/experimental/crs/structured.js.map +1 -1
- package/dist/projection/experimental/crs/wkt.js +1 -1
- package/dist/projection/experimental/crs/wkt.js.map +1 -1
- package/dist/projection/experimental/datum.js +1 -1
- package/dist/projection/experimental/datum.js.map +1 -1
- package/dist/projection/experimental/ellipsoidal-gnomonic.js +1 -1
- package/dist/projection/experimental/ellipsoidal-gnomonic.js.map +1 -1
- package/dist/projection/experimental/entries/projections/eqc.cjs +1 -0
- package/dist/projection/experimental/entries/projections/eqc.cjs.map +1 -1
- package/dist/projection/experimental/entries/projections/merc.cjs +1 -0
- package/dist/projection/experimental/entries/projections/merc.cjs.map +1 -1
- package/dist/projection/experimental/grids/geotiff.js +1 -1
- package/dist/projection/experimental/grids/geotiff.js.map +1 -1
- package/dist/projection/experimental/grids/ntv2.js +1 -1
- package/dist/projection/experimental/grids/ntv2.js.map +1 -1
- package/dist/projection/experimental/index.cjs +102 -2
- package/dist/projection/experimental/index.cjs.map +3 -3
- package/dist/projection/experimental/kernels/aea.js +1 -1
- package/dist/projection/experimental/kernels/aea.js.map +1 -1
- package/dist/projection/experimental/kernels/aeqd.js +1 -1
- package/dist/projection/experimental/kernels/aeqd.js.map +1 -1
- package/dist/projection/experimental/kernels/bonne.js +1 -1
- package/dist/projection/experimental/kernels/bonne.js.map +1 -1
- package/dist/projection/experimental/kernels/cass.js +1 -1
- package/dist/projection/experimental/kernels/cass.js.map +1 -1
- package/dist/projection/experimental/kernels/cea.js +1 -1
- package/dist/projection/experimental/kernels/cea.js.map +1 -1
- package/dist/projection/experimental/kernels/eck6.js +1 -1
- package/dist/projection/experimental/kernels/eck6.js.map +1 -1
- package/dist/projection/experimental/kernels/eqdc.js +1 -1
- package/dist/projection/experimental/kernels/eqdc.js.map +1 -1
- package/dist/projection/experimental/kernels/eqearth.js +1 -1
- package/dist/projection/experimental/kernels/eqearth.js.map +1 -1
- package/dist/projection/experimental/kernels/equi.js +1 -1
- package/dist/projection/experimental/kernels/equi.js.map +1 -1
- package/dist/projection/experimental/kernels/etmerc.js +1 -1
- package/dist/projection/experimental/kernels/etmerc.js.map +1 -1
- package/dist/projection/experimental/kernels/gauss.js +1 -1
- package/dist/projection/experimental/kernels/gauss.js.map +1 -1
- package/dist/projection/experimental/kernels/geos.js +1 -1
- package/dist/projection/experimental/kernels/geos.js.map +1 -1
- package/dist/projection/experimental/kernels/gnom.js +1 -1
- package/dist/projection/experimental/kernels/gnom.js.map +1 -1
- package/dist/projection/experimental/kernels/gstmerc.js +1 -1
- package/dist/projection/experimental/kernels/gstmerc.js.map +1 -1
- package/dist/projection/experimental/kernels/krovak.js +1 -1
- package/dist/projection/experimental/kernels/krovak.js.map +1 -1
- package/dist/projection/experimental/kernels/laea.js +1 -1
- package/dist/projection/experimental/kernels/laea.js.map +1 -1
- package/dist/projection/experimental/kernels/lcc.js +1 -1
- package/dist/projection/experimental/kernels/lcc.js.map +1 -1
- package/dist/projection/experimental/kernels/mill.js +1 -1
- package/dist/projection/experimental/kernels/mill.js.map +1 -1
- package/dist/projection/experimental/kernels/moll.js +1 -1
- package/dist/projection/experimental/kernels/moll.js.map +1 -1
- package/dist/projection/experimental/kernels/nzmg.js +1 -1
- package/dist/projection/experimental/kernels/nzmg.js.map +1 -1
- package/dist/projection/experimental/kernels/omerc.js +1 -1
- package/dist/projection/experimental/kernels/omerc.js.map +1 -1
- package/dist/projection/experimental/kernels/poly.js +1 -1
- package/dist/projection/experimental/kernels/poly.js.map +1 -1
- package/dist/projection/experimental/kernels/qsc.js +1 -1
- package/dist/projection/experimental/kernels/qsc.js.map +1 -1
- package/dist/projection/experimental/kernels/robin.js +1 -1
- package/dist/projection/experimental/kernels/robin.js.map +1 -1
- package/dist/projection/experimental/kernels/sinu.js +1 -1
- package/dist/projection/experimental/kernels/sinu.js.map +1 -1
- package/dist/projection/experimental/kernels/somerc.js +1 -1
- package/dist/projection/experimental/kernels/somerc.js.map +1 -1
- package/dist/projection/experimental/kernels/stere.js +1 -1
- package/dist/projection/experimental/kernels/stere.js.map +1 -1
- package/dist/projection/experimental/kernels/sterea.js +1 -1
- package/dist/projection/experimental/kernels/sterea.js.map +1 -1
- package/dist/projection/experimental/kernels/tmerc.js +1 -1
- package/dist/projection/experimental/kernels/tmerc.js.map +1 -1
- package/dist/projection/experimental/kernels/tpers.js +1 -1
- package/dist/projection/experimental/kernels/tpers.js.map +1 -1
- package/dist/projection/experimental/kernels/vandg.js +1 -1
- package/dist/projection/experimental/kernels/vandg.js.map +1 -1
- package/dist/projection/experimental/kinematic-helmert.js +1 -1
- package/dist/projection/experimental/kinematic-helmert.js.map +1 -1
- package/dist/projection/experimental/lazy-projections/index.cjs +100 -2
- package/dist/projection/experimental/lazy-projections/index.cjs.map +2 -2
- package/dist/projection/experimental/projections/equidistant-cylindrical.d.ts.map +1 -1
- package/dist/projection/experimental/projections/equidistant-cylindrical.js +1 -0
- package/dist/projection/experimental/projections/equidistant-cylindrical.js.map +1 -1
- package/dist/projection/experimental/projections/mercator.d.ts.map +1 -1
- package/dist/projection/experimental/projections/mercator.js +1 -0
- package/dist/projection/experimental/projections/mercator.js.map +1 -1
- package/dist/projection/experimental/transform-description.d.ts +8 -0
- package/dist/projection/experimental/transform-description.d.ts.map +1 -0
- package/dist/projection/experimental/transform-description.js +57 -0
- package/dist/projection/experimental/transform-description.js.map +1 -0
- package/dist/projection/experimental/types.d.ts +5 -0
- package/dist/projection/experimental/types.d.ts.map +1 -1
- package/dist/projection/experimental/typescript-projection.d.ts +4 -0
- package/dist/projection/experimental/typescript-projection.d.ts.map +1 -1
- package/dist/projection/experimental/typescript-projection.js +54 -5
- package/dist/projection/experimental/typescript-projection.js.map +1 -1
- package/dist/projection/index.cjs +102 -2
- package/dist/projection/index.cjs.map +3 -3
- package/dist/projection/transform-analysis.cjs +100 -2
- package/dist/projection/transform-analysis.cjs.map +2 -2
- package/dist/projection/transform-description.d.ts +44 -0
- package/dist/projection/transform-description.d.ts.map +1 -0
- package/dist/projection/transform-description.js +5 -0
- package/dist/projection/transform-description.js.map +1 -0
- package/dist/projection/types.d.ts +4 -0
- package/dist/projection/types.d.ts.map +1 -1
- package/dist/tasks/definitions.d.ts +3 -3
- package/dist/tasks/index.cjs +107 -2
- package/dist/tasks/index.cjs.map +3 -3
- package/dist/tasks/index.d.ts +1 -1
- package/dist/tasks/index.d.ts.map +1 -1
- package/dist/tasks/map-worker.js +1 -1
- package/dist/tasks/map-worker.js.map +1 -1
- package/dist/tasks/operations.d.ts +1 -1
- package/dist/tasks/operations.d.ts.map +1 -1
- package/dist/tasks/projection-worker.js +1 -1
- package/dist/tasks/projection-worker.js.map +1 -1
- package/dist/terrain/bounds-regions.d.ts +15 -0
- package/dist/terrain/bounds-regions.d.ts.map +1 -0
- package/dist/terrain/bounds-regions.js +84 -0
- package/dist/terrain/bounds-regions.js.map +1 -0
- package/dist/terrain/bounds-update.d.ts +11 -0
- package/dist/terrain/bounds-update.d.ts.map +1 -0
- package/dist/terrain/bounds-update.js +10 -0
- package/dist/terrain/bounds-update.js.map +1 -0
- package/dist/terrain/box-index.d.ts +9 -0
- package/dist/terrain/box-index.d.ts.map +1 -0
- package/dist/terrain/box-index.js +43 -0
- package/dist/terrain/box-index.js.map +1 -0
- package/dist/terrain/contour-mixed-weld.d.ts +25 -0
- package/dist/terrain/contour-mixed-weld.d.ts.map +1 -0
- package/dist/terrain/contour-mixed-weld.js +194 -0
- package/dist/terrain/contour-mixed-weld.js.map +1 -0
- package/dist/terrain/contour-simplify.d.ts +1 -0
- package/dist/terrain/contour-simplify.d.ts.map +1 -1
- package/dist/terrain/contour-simplify.js +5 -1
- package/dist/terrain/contour-simplify.js.map +1 -1
- package/dist/terrain/contour-topology.d.ts +30 -0
- package/dist/terrain/contour-topology.d.ts.map +1 -0
- package/dist/terrain/contour-topology.js +236 -0
- package/dist/terrain/contour-topology.js.map +1 -0
- package/dist/terrain/delatin-regions.d.ts +14 -0
- package/dist/terrain/delatin-regions.d.ts.map +1 -0
- package/dist/terrain/delatin-regions.js +15 -0
- package/dist/terrain/delatin-regions.js.map +1 -0
- package/dist/terrain/dirty-regions.d.ts +11 -0
- package/dist/terrain/dirty-regions.d.ts.map +1 -0
- package/dist/terrain/dirty-regions.js +34 -0
- package/dist/terrain/dirty-regions.js.map +1 -0
- package/dist/terrain/gradient-pyramid-regions.d.ts +15 -0
- package/dist/terrain/gradient-pyramid-regions.d.ts.map +1 -0
- package/dist/terrain/gradient-pyramid-regions.js +112 -0
- package/dist/terrain/gradient-pyramid-regions.js.map +1 -0
- package/dist/terrain/gradient-pyramid-update.d.ts +11 -0
- package/dist/terrain/gradient-pyramid-update.d.ts.map +1 -0
- package/dist/terrain/gradient-pyramid-update.js +17 -0
- package/dist/terrain/gradient-pyramid-update.js.map +1 -0
- package/dist/terrain/height-field.d.ts.map +1 -1
- package/dist/terrain/height-field.js +48 -5
- package/dist/terrain/height-field.js.map +1 -1
- package/dist/terrain/index.cjs +1613 -79
- package/dist/terrain/index.cjs.map +3 -3
- package/dist/terrain/index.d.ts +40 -0
- package/dist/terrain/index.d.ts.map +1 -1
- package/dist/terrain/index.js +20 -0
- package/dist/terrain/index.js.map +1 -1
- package/dist/terrain/isobands.d.ts +24 -0
- package/dist/terrain/isobands.d.ts.map +1 -0
- package/dist/terrain/isobands.js +281 -0
- package/dist/terrain/isobands.js.map +1 -0
- package/dist/terrain/lod-morph-evaluate.d.ts +8 -0
- package/dist/terrain/lod-morph-evaluate.d.ts.map +1 -0
- package/dist/terrain/lod-morph-evaluate.js +30 -0
- package/dist/terrain/lod-morph-evaluate.js.map +1 -0
- package/dist/terrain/lod-morph.d.ts +35 -0
- package/dist/terrain/lod-morph.d.ts.map +1 -0
- package/dist/terrain/lod-morph.js +87 -0
- package/dist/terrain/lod-morph.js.map +1 -0
- package/dist/terrain/martini-regions.d.ts +14 -0
- package/dist/terrain/martini-regions.d.ts.map +1 -0
- package/dist/terrain/martini-regions.js +26 -0
- package/dist/terrain/martini-regions.js.map +1 -0
- package/dist/terrain/mesh-error.d.ts.map +1 -1
- package/dist/terrain/mesh-error.js +9 -1
- package/dist/terrain/mesh-error.js.map +1 -1
- package/dist/terrain/mesh-regions-data.d.ts +24 -0
- package/dist/terrain/mesh-regions-data.d.ts.map +1 -0
- package/dist/terrain/mesh-regions-data.js +80 -0
- package/dist/terrain/mesh-regions-data.js.map +1 -0
- package/dist/terrain/mesh-regions.d.ts +12 -0
- package/dist/terrain/mesh-regions.d.ts.map +1 -0
- package/dist/terrain/mesh-regions.js +10 -0
- package/dist/terrain/mesh-regions.js.map +1 -0
- package/dist/terrain/mesh-update.d.ts +11 -0
- package/dist/terrain/mesh-update.d.ts.map +1 -0
- package/dist/terrain/mesh-update.js +10 -0
- package/dist/terrain/mesh-update.js.map +1 -0
- package/dist/terrain/mixed-gradient-update.d.ts +15 -0
- package/dist/terrain/mixed-gradient-update.d.ts.map +1 -0
- package/dist/terrain/mixed-gradient-update.js +24 -0
- package/dist/terrain/mixed-gradient-update.js.map +1 -0
- package/dist/terrain/mixed-halo-update.d.ts +16 -0
- package/dist/terrain/mixed-halo-update.d.ts.map +1 -0
- package/dist/terrain/mixed-halo-update.js +46 -0
- package/dist/terrain/mixed-halo-update.js.map +1 -0
- package/dist/terrain/mixed-vertex-halos.d.ts +32 -0
- package/dist/terrain/mixed-vertex-halos.d.ts.map +1 -0
- package/dist/terrain/mixed-vertex-halos.js +125 -0
- package/dist/terrain/mixed-vertex-halos.js.map +1 -0
- package/dist/terrain/persistent-bounds.d.ts +16 -0
- package/dist/terrain/persistent-bounds.d.ts.map +1 -0
- package/dist/terrain/persistent-bounds.js +51 -0
- package/dist/terrain/persistent-bounds.js.map +1 -0
- package/dist/terrain/persistent-gradients.d.ts +16 -0
- package/dist/terrain/persistent-gradients.d.ts.map +1 -0
- package/dist/terrain/persistent-gradients.js +69 -0
- package/dist/terrain/persistent-gradients.js.map +1 -0
- package/dist/terrain/persistent-hierarchy-data.d.ts +41 -0
- package/dist/terrain/persistent-hierarchy-data.d.ts.map +1 -0
- package/dist/terrain/persistent-hierarchy-data.js +130 -0
- package/dist/terrain/persistent-hierarchy-data.js.map +1 -0
- package/dist/terrain/sample-triangle-height.d.ts +4 -0
- package/dist/terrain/sample-triangle-height.d.ts.map +1 -0
- package/dist/terrain/sample-triangle-height.js +46 -0
- package/dist/terrain/sample-triangle-height.js.map +1 -0
- package/dist/terrain/tile-update-data.d.ts +14 -0
- package/dist/terrain/tile-update-data.d.ts.map +1 -0
- package/dist/terrain/tile-update-data.js +23 -0
- package/dist/terrain/tile-update-data.js.map +1 -0
- package/dist/terrain/tiled.d.ts +10 -2
- package/dist/terrain/tiled.d.ts.map +1 -1
- package/dist/terrain/tiled.js +5 -1
- package/dist/terrain/tiled.js.map +1 -1
- package/dist/terrain/types.d.ts +6 -0
- package/dist/terrain/types.d.ts.map +1 -1
- package/dist/turf.cjs +25 -671
- package/dist/turf.cjs.map +3 -3
- 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/package.json +15 -19
- package/src/expressions.ts +1 -1
- package/src/index.ts +64 -123
- package/src/projection/experimental/common/adjust_lat.ts +1 -1
- package/src/projection/experimental/common/adjust_lon.ts +1 -1
- package/src/projection/experimental/common/asinhy.ts +1 -1
- package/src/projection/experimental/common/asinz.ts +1 -1
- package/src/projection/experimental/common/authlat.ts +1 -1
- package/src/projection/experimental/common/authset.ts +1 -1
- package/src/projection/experimental/common/clens.ts +1 -1
- package/src/projection/experimental/common/clens_cmplx.ts +1 -1
- package/src/projection/experimental/common/constants.ts +1 -1
- package/src/projection/experimental/common/cosh.ts +1 -1
- package/src/projection/experimental/common/e0fn.ts +1 -1
- package/src/projection/experimental/common/e1fn.ts +1 -1
- package/src/projection/experimental/common/e2fn.ts +1 -1
- package/src/projection/experimental/common/e3fn.ts +1 -1
- package/src/projection/experimental/common/fL.ts +1 -1
- package/src/projection/experimental/common/gN.ts +1 -1
- package/src/projection/experimental/common/gatg.ts +1 -1
- package/src/projection/experimental/common/hypot.ts +1 -1
- package/src/projection/experimental/common/imlfn.ts +1 -1
- package/src/projection/experimental/common/invlatiso.ts +1 -1
- package/src/projection/experimental/common/iqsfnz.ts +1 -1
- package/src/projection/experimental/common/latiso.ts +1 -1
- package/src/projection/experimental/common/log1py.ts +1 -1
- package/src/projection/experimental/common/mlfn.ts +1 -1
- package/src/projection/experimental/common/msfnz.ts +1 -1
- package/src/projection/experimental/common/phi2z.ts +1 -1
- package/src/projection/experimental/common/pj_enfn.ts +1 -1
- package/src/projection/experimental/common/pj_inv_mlfn.ts +1 -1
- package/src/projection/experimental/common/pj_mlfn.ts +1 -1
- package/src/projection/experimental/common/qsfnz.ts +1 -1
- package/src/projection/experimental/common/sign.ts +1 -1
- package/src/projection/experimental/common/sinh.ts +1 -1
- package/src/projection/experimental/common/srat.ts +1 -1
- package/src/projection/experimental/common/tsfnz.ts +1 -1
- package/src/projection/experimental/common/vincenty.ts +1 -1
- package/src/projection/experimental/core.ts +8 -0
- package/src/projection/experimental/crs/datum-table.ts +1 -1
- package/src/projection/experimental/crs/ellipsoid-table.ts +1 -1
- package/src/projection/experimental/crs/primemeridian-table.ts +1 -1
- package/src/projection/experimental/crs/structured.ts +1 -1
- package/src/projection/experimental/crs/wkt.ts +1 -1
- package/src/projection/experimental/datum.ts +1 -1
- package/src/projection/experimental/ellipsoidal-gnomonic.ts +1 -1
- package/src/projection/experimental/exact-helmert.ts +1 -1
- package/src/projection/experimental/grids/geotiff.ts +1 -1
- package/src/projection/experimental/grids/grid.ts +1 -1
- package/src/projection/experimental/grids/ntv2.ts +1 -1
- package/src/projection/experimental/helmert-flat.ts +1 -1
- package/src/projection/experimental/kernels/aea.ts +1 -1
- package/src/projection/experimental/kernels/aeqd.ts +1 -1
- package/src/projection/experimental/kernels/bonne.ts +1 -1
- package/src/projection/experimental/kernels/cass.ts +1 -1
- package/src/projection/experimental/kernels/cea.ts +1 -1
- package/src/projection/experimental/kernels/eck6.ts +1 -1
- package/src/projection/experimental/kernels/eqdc.ts +1 -1
- package/src/projection/experimental/kernels/eqearth.ts +1 -1
- package/src/projection/experimental/kernels/equi.ts +1 -1
- package/src/projection/experimental/kernels/etmerc.ts +1 -1
- package/src/projection/experimental/kernels/gauss.ts +1 -1
- package/src/projection/experimental/kernels/geos.ts +1 -1
- package/src/projection/experimental/kernels/gnom.ts +1 -1
- package/src/projection/experimental/kernels/gstmerc.ts +1 -1
- package/src/projection/experimental/kernels/krovak.ts +1 -1
- package/src/projection/experimental/kernels/laea.ts +1 -1
- package/src/projection/experimental/kernels/lcc.ts +1 -1
- package/src/projection/experimental/kernels/mill.ts +1 -1
- package/src/projection/experimental/kernels/moll.ts +1 -1
- package/src/projection/experimental/kernels/nzmg.ts +1 -1
- package/src/projection/experimental/kernels/omerc.ts +1 -1
- package/src/projection/experimental/kernels/ortho.ts +1 -1
- package/src/projection/experimental/kernels/poly.ts +1 -1
- package/src/projection/experimental/kernels/qsc.ts +1 -1
- package/src/projection/experimental/kernels/robin.ts +1 -1
- package/src/projection/experimental/kernels/sinu.ts +1 -1
- package/src/projection/experimental/kernels/somerc.ts +1 -1
- package/src/projection/experimental/kernels/stere.ts +1 -1
- package/src/projection/experimental/kernels/sterea.ts +1 -1
- package/src/projection/experimental/kernels/tmerc.ts +1 -1
- package/src/projection/experimental/kernels/tpers.ts +1 -1
- package/src/projection/experimental/kernels/vandg.ts +1 -1
- package/src/projection/experimental/kinematic-helmert-flat.ts +1 -1
- package/src/projection/experimental/kinematic-helmert.ts +1 -1
- package/src/projection/experimental/projection-pipeline.ts +1 -1
- package/src/projection/experimental/projections/equidistant-cylindrical.ts +1 -0
- package/src/projection/experimental/projections/mercator.ts +1 -0
- package/src/projection/experimental/projections/ob-tran.ts +1 -1
- package/src/projection/experimental/transform-description.ts +82 -0
- package/src/projection/experimental/types.ts +5 -0
- package/src/projection/experimental/typescript-projection.ts +54 -6
- package/src/projection/transform-description.ts +69 -0
- package/src/projection/types.ts +11 -0
- package/src/tasks/definitions.ts +1 -1
- package/src/tasks/index.ts +1 -1
- package/src/tasks/map-worker.ts +1 -1
- package/src/tasks/operations.ts +1 -1
- package/src/tasks/projection-worker.ts +1 -1
- package/src/terrain/bounds-regions.ts +106 -0
- package/src/terrain/bounds-update.ts +19 -0
- package/src/terrain/box-index.ts +47 -0
- package/src/terrain/contour-mixed-weld.ts +254 -0
- package/src/terrain/contour-simplify.ts +10 -2
- package/src/terrain/contour-topology.ts +263 -0
- package/src/terrain/delatin-regions.ts +25 -0
- package/src/terrain/dirty-regions.ts +61 -0
- package/src/terrain/gradient-pyramid-regions.ts +140 -0
- package/src/terrain/gradient-pyramid-update.ts +25 -0
- package/src/terrain/height-field.ts +45 -5
- package/src/terrain/index.ts +58 -0
- package/src/terrain/isobands.ts +348 -0
- package/src/terrain/lod-morph-evaluate.ts +36 -0
- package/src/terrain/lod-morph.ts +138 -0
- package/src/terrain/martini-regions.ts +38 -0
- package/src/terrain/mesh-error.ts +14 -1
- package/src/terrain/mesh-regions-data.ts +113 -0
- package/src/terrain/mesh-regions.ts +18 -0
- package/src/terrain/mesh-update.ts +15 -0
- package/src/terrain/mixed-gradient-update.ts +40 -0
- package/src/terrain/mixed-halo-update.ts +56 -0
- package/src/terrain/mixed-vertex-halos.ts +170 -0
- package/src/terrain/persistent-bounds.ts +95 -0
- package/src/terrain/persistent-gradients.ts +117 -0
- package/src/terrain/persistent-hierarchy-data.ts +196 -0
- package/src/terrain/sample-triangle-height.ts +50 -0
- package/src/terrain/tile-update-data.ts +32 -0
- package/src/terrain/tiled.ts +16 -3
- package/src/terrain/types.ts +9 -1
- package/src/turf.ts +7 -3
- package/crs/README.md +0 -84
- package/crs/schemas/README.md +0 -9
- package/dist/geoarrow/builder-entry.d.ts +0 -4
- package/dist/geoarrow/builder-entry.d.ts.map +0 -1
- package/dist/geoarrow/builder-entry.js +0 -5
- package/dist/geoarrow/builder-entry.js.map +0 -1
- package/dist/geoarrow/builder.d.ts +0 -106
- package/dist/geoarrow/builder.d.ts.map +0 -1
- package/dist/geoarrow/builder.js +0 -668
- package/dist/geoarrow/builder.js.map +0 -1
- package/dist/geoarrow/codecs.d.ts +0 -24
- package/dist/geoarrow/codecs.d.ts.map +0 -1
- package/dist/geoarrow/codecs.js +0 -916
- package/dist/geoarrow/codecs.js.map +0 -1
- package/dist/geoarrow/index.cjs +0 -4352
- package/dist/geoarrow/index.cjs.map +0 -6
- package/dist/geoarrow/index.d.ts +0 -21
- package/dist/geoarrow/index.d.ts.map +0 -1
- package/dist/geoarrow/index.js +0 -15
- package/dist/geoarrow/index.js.map +0 -1
- package/dist/geoarrow/kernels.d.ts +0 -56
- package/dist/geoarrow/kernels.d.ts.map +0 -1
- package/dist/geoarrow/kernels.js +0 -982
- package/dist/geoarrow/kernels.js.map +0 -1
- package/dist/geoarrow/layout.d.ts +0 -66
- package/dist/geoarrow/layout.d.ts.map +0 -1
- package/dist/geoarrow/layout.js +0 -723
- package/dist/geoarrow/layout.js.map +0 -1
- package/dist/geoarrow/stream-tessellate.d.ts +0 -34
- package/dist/geoarrow/stream-tessellate.d.ts.map +0 -1
- package/dist/geoarrow/stream-tessellate.js +0 -171
- package/dist/geoarrow/stream-tessellate.js.map +0 -1
- package/dist/geoarrow/stream.d.ts +0 -29
- package/dist/geoarrow/stream.d.ts.map +0 -1
- package/dist/geoarrow/stream.js +0 -100
- package/dist/geoarrow/stream.js.map +0 -1
- package/dist/geoarrow/tessellate.d.ts +0 -31
- package/dist/geoarrow/tessellate.d.ts.map +0 -1
- package/dist/geoarrow/tessellate.js +0 -102
- package/dist/geoarrow/tessellate.js.map +0 -1
- package/dist/geoarrow/tessellation-entry.d.ts +0 -4
- package/dist/geoarrow/tessellation-entry.d.ts.map +0 -1
- package/dist/geoarrow/tessellation-entry.js +0 -5
- package/dist/geoarrow/tessellation-entry.js.map +0 -1
- package/dist/geoarrow/types.d.ts +0 -155
- package/dist/geoarrow/types.d.ts.map +0 -1
- package/dist/geoarrow/types.js +0 -71
- package/dist/geoarrow/types.js.map +0 -1
- package/dist/geoarrow/views.d.ts +0 -45
- package/dist/geoarrow/views.d.ts.map +0 -1
- package/dist/geoarrow/views.js +0 -114
- package/dist/geoarrow/views.js.map +0 -1
- package/dist/geoarrow/wkb-entry.d.ts +0 -4
- package/dist/geoarrow/wkb-entry.d.ts.map +0 -1
- package/dist/geoarrow/wkb-entry.js +0 -6
- package/dist/geoarrow/wkb-entry.js.map +0 -1
- package/dist/geoarrow/worker.d.ts +0 -11
- package/dist/geoarrow/worker.d.ts.map +0 -1
- package/dist/geoarrow/worker.js +0 -10
- package/dist/geoarrow/worker.js.map +0 -1
- package/dist/wkb/index.d.ts +0 -11
- package/dist/wkb/index.d.ts.map +0 -1
- package/dist/wkb/index.js +0 -9
- package/dist/wkb/index.js.map +0 -1
- package/dist/wkb/types.d.ts +0 -30
- package/dist/wkb/types.d.ts.map +0 -1
- package/dist/wkb/types.js +0 -34
- package/dist/wkb/types.js.map +0 -1
- package/dist/wkb/wkb-builder.d.ts +0 -91
- package/dist/wkb/wkb-builder.d.ts.map +0 -1
- package/dist/wkb/wkb-builder.js +0 -283
- package/dist/wkb/wkb-builder.js.map +0 -1
- package/dist/wkb/wkb-reader.d.ts +0 -74
- package/dist/wkb/wkb-reader.d.ts.map +0 -1
- package/dist/wkb/wkb-reader.js +0 -251
- package/dist/wkb/wkb-reader.js.map +0 -1
- package/dist/wkb/wkb.d.ts +0 -21
- package/dist/wkb/wkb.d.ts.map +0 -1
- package/dist/wkb/wkb.js +0 -204
- package/dist/wkb/wkb.js.map +0 -1
- package/dist/wkb/wkt.d.ts +0 -19
- package/dist/wkb/wkt.d.ts.map +0 -1
- package/dist/wkb/wkt.js +0 -321
- package/dist/wkb/wkt.js.map +0 -1
- package/projection/THIRD-PARTY-NOTICES.md +0 -210
- package/src/discontinuous/elastic/README.md +0 -20
- package/src/discontinuous/spherical-clip/README.md +0 -16
- package/src/discontinuous/world-kernels/README.md +0 -24
- package/src/geoarrow/builder-entry.ts +0 -18
- package/src/geoarrow/builder.ts +0 -860
- package/src/geoarrow/codecs.ts +0 -1268
- package/src/geoarrow/index.ts +0 -111
- package/src/geoarrow/kernels.ts +0 -1290
- package/src/geoarrow/layout.ts +0 -900
- package/src/geoarrow/stream-tessellate.ts +0 -205
- package/src/geoarrow/stream.ts +0 -130
- package/src/geoarrow/tessellate.ts +0 -133
- package/src/geoarrow/tessellation-entry.ts +0 -7
- package/src/geoarrow/types.ts +0 -259
- package/src/geoarrow/views.ts +0 -150
- package/src/geoarrow/wkb-entry.ts +0 -13
- package/src/geoarrow/worker.ts +0 -20
- package/src/terrain/vendor/README.md +0 -20
- package/src/vendor/geographiclib-geodesic/README.md +0 -26
- package/src/wkb/index.ts +0 -38
- package/src/wkb/types.ts +0 -54
- package/src/wkb/wkb-builder.ts +0 -395
- package/src/wkb/wkb-reader.ts +0 -401
- package/src/wkb/wkb.ts +0 -255
- package/src/wkb/wkt.ts +0 -375
- /package/{projection/APACHE-2.0-LICENSE.txt → APACHE-2.0-LICENSE.txt} +0 -0
- /package/{projection/PROJ-LICENSE.txt → PROJ-LICENSE.txt} +0 -0
- /package/{projection/PROJ4-LICENSE.md → PROJ4-LICENSE.md} +0 -0
- /package/{crs/schemas → src/crs}/projjson.schema.json +0 -0
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
// math.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
|
+
import {HeightFieldMinMax} from './bounds';
|
|
5
|
+
import {
|
|
6
|
+
sameTerrainFrame,
|
|
7
|
+
validateTerrainDirtyWindows,
|
|
8
|
+
terrainDirtyIndices,
|
|
9
|
+
type TerrainDirtyWindow
|
|
10
|
+
} from './dirty-regions';
|
|
11
|
+
import {
|
|
12
|
+
packTerrainHierarchyLevel,
|
|
13
|
+
persistentHierarchyOptions,
|
|
14
|
+
updatePersistentHierarchy,
|
|
15
|
+
type TerrainPersistentLevel,
|
|
16
|
+
type TerrainHierarchyUpdateStats
|
|
17
|
+
} from './persistent-hierarchy-data';
|
|
18
|
+
import type {HeightField} from './height-field';
|
|
19
|
+
export type TerrainPersistentBounds = {
|
|
20
|
+
field: HeightField;
|
|
21
|
+
levels: readonly TerrainPersistentLevel[];
|
|
22
|
+
stats: TerrainHierarchyUpdateStats;
|
|
23
|
+
};
|
|
24
|
+
/** Immutable block-sharing extrema hierarchy. Values are min/max; counts are
|
|
25
|
+
* populated/complete source-cell counts. Report every changed source sample. */
|
|
26
|
+
export function updateTerrainPersistentBounds(
|
|
27
|
+
previous: TerrainPersistentBounds | null,
|
|
28
|
+
field: HeightField,
|
|
29
|
+
dirty: readonly TerrainDirtyWindow[],
|
|
30
|
+
options: {nodesPerBlock?: number; maxSamples?: number; maxTests?: number} = {}
|
|
31
|
+
): TerrainPersistentBounds {
|
|
32
|
+
const {nodesPerBlock, charge} = persistentHierarchyOptions(options, field.width * field.height);
|
|
33
|
+
validateTerrainDirtyWindows(dirty, field.width, field.height);
|
|
34
|
+
if (
|
|
35
|
+
!previous ||
|
|
36
|
+
!sameTerrainFrame(previous.field, field) ||
|
|
37
|
+
previous.levels[0].nodesPerBlock !== nodesPerBlock
|
|
38
|
+
) {
|
|
39
|
+
const bounds = new HeightFieldMinMax(field),
|
|
40
|
+
levels = Array.from({length: bounds.levelCount}, (_, i) => {
|
|
41
|
+
const l = bounds.copyLevel(i),
|
|
42
|
+
values = new Float64Array(2 * l.width * l.height),
|
|
43
|
+
counts = new Uint32Array(values.length);
|
|
44
|
+
for (let j = 0; j < l.width * l.height; j++) {
|
|
45
|
+
values[2 * j] = l.minimums[j];
|
|
46
|
+
values[2 * j + 1] = l.maximums[j];
|
|
47
|
+
counts[2 * j] = l.populatedCellCounts[j];
|
|
48
|
+
counts[2 * j + 1] = l.completeCellCounts[j];
|
|
49
|
+
}
|
|
50
|
+
return packTerrainHierarchyLevel(
|
|
51
|
+
l.width,
|
|
52
|
+
l.height,
|
|
53
|
+
l.blockSize,
|
|
54
|
+
values,
|
|
55
|
+
counts,
|
|
56
|
+
nodesPerBlock
|
|
57
|
+
);
|
|
58
|
+
});
|
|
59
|
+
return {
|
|
60
|
+
field,
|
|
61
|
+
levels,
|
|
62
|
+
stats: {
|
|
63
|
+
copiedBlocks: levels.reduce((n, l) => n + l.blocks.length, 0),
|
|
64
|
+
copiedBytes: levels.reduce(
|
|
65
|
+
(n, l) => n + l.blocks.reduce((s, b) => s + b.values.byteLength + b.counts.byteLength, 0),
|
|
66
|
+
0
|
|
67
|
+
),
|
|
68
|
+
updatedNodes: Uint32Array.from(levels, l => l.width * l.height)
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
const ids = terrainDirtyIndices(dirty, field.width - 1, field.height - 1, 1, charge);
|
|
73
|
+
const result = updatePersistentHierarchy(
|
|
74
|
+
previous.levels,
|
|
75
|
+
ids,
|
|
76
|
+
'bounds',
|
|
77
|
+
(x, y) => {
|
|
78
|
+
let min = Infinity,
|
|
79
|
+
max = -Infinity,
|
|
80
|
+
n = 0;
|
|
81
|
+
for (let dy = 0; dy < 2; dy++)
|
|
82
|
+
for (let dx = 0; dx < 2; dx++) {
|
|
83
|
+
const z = field.getHeight(x + dx, y + dy);
|
|
84
|
+
if (z !== undefined) {
|
|
85
|
+
min = Math.min(min, z);
|
|
86
|
+
max = Math.max(max, z);
|
|
87
|
+
n++;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return {values: n ? [min, max] : [0, 0], counts: [n ? 1 : 0, n === 4 ? 1 : 0]};
|
|
91
|
+
},
|
|
92
|
+
charge
|
|
93
|
+
);
|
|
94
|
+
return {field, ...result};
|
|
95
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
// math.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
|
+
import {createTerrainGradientPyramid} from './gradient-pyramid';
|
|
5
|
+
import {
|
|
6
|
+
validateTerrainDirtyWindows,
|
|
7
|
+
terrainDirtyIndices,
|
|
8
|
+
type TerrainDirtyWindow
|
|
9
|
+
} from './dirty-regions';
|
|
10
|
+
import {
|
|
11
|
+
packTerrainHierarchyLevel,
|
|
12
|
+
persistentHierarchyOptions,
|
|
13
|
+
updatePersistentHierarchy,
|
|
14
|
+
type TerrainPersistentLevel,
|
|
15
|
+
type TerrainHierarchyUpdateStats
|
|
16
|
+
} from './persistent-hierarchy-data';
|
|
17
|
+
import type {TerrainGradientGrid} from './derivatives';
|
|
18
|
+
export type TerrainPersistentGradients = {
|
|
19
|
+
source: TerrainGradientGrid;
|
|
20
|
+
levels: readonly TerrainPersistentLevel[];
|
|
21
|
+
stats: TerrainHierarchyUpdateStats;
|
|
22
|
+
};
|
|
23
|
+
/** Values are mean dz/dx,dz/dy; counts are valid/total original samples.
|
|
24
|
+
* Dirty windows refer to gradient samples, including stencil dependencies. */
|
|
25
|
+
export function updateTerrainPersistentGradients(
|
|
26
|
+
previous: TerrainPersistentGradients | null,
|
|
27
|
+
grid: TerrainGradientGrid,
|
|
28
|
+
dirty: readonly TerrainDirtyWindow[],
|
|
29
|
+
options: {nodesPerBlock?: number; maxSamples?: number; maxTests?: number} = {}
|
|
30
|
+
): TerrainPersistentGradients {
|
|
31
|
+
const {nodesPerBlock, maxSamples, charge} = persistentHierarchyOptions(
|
|
32
|
+
options,
|
|
33
|
+
grid.width * grid.height
|
|
34
|
+
);
|
|
35
|
+
if (
|
|
36
|
+
!Number.isSafeInteger(grid.width) ||
|
|
37
|
+
grid.width < 1 ||
|
|
38
|
+
!Number.isSafeInteger(grid.height) ||
|
|
39
|
+
grid.height < 1 ||
|
|
40
|
+
!(grid.gradients instanceof Float64Array) ||
|
|
41
|
+
grid.gradients.length !== 2 * grid.width * grid.height ||
|
|
42
|
+
!(grid.statuses instanceof Uint8Array) ||
|
|
43
|
+
grid.statuses.length !== grid.width * grid.height ||
|
|
44
|
+
(grid.method !== 'horn' && grid.method !== 'zevenbergen-thorne') ||
|
|
45
|
+
(grid.registration !== 'vertex' && grid.registration !== 'cell') ||
|
|
46
|
+
typeof grid.heightReference !== 'string' ||
|
|
47
|
+
![grid.origin, grid.columnStep, grid.rowStep].every(
|
|
48
|
+
v => v.length === 2 && v.every(Number.isFinite)
|
|
49
|
+
)
|
|
50
|
+
)
|
|
51
|
+
throw new Error('Invalid persistent gradient grid');
|
|
52
|
+
validateTerrainDirtyWindows(dirty, grid.width, grid.height);
|
|
53
|
+
const old = previous?.source;
|
|
54
|
+
if (
|
|
55
|
+
!old ||
|
|
56
|
+
old.width !== grid.width ||
|
|
57
|
+
old.height !== grid.height ||
|
|
58
|
+
old.method !== grid.method ||
|
|
59
|
+
old.registration !== grid.registration ||
|
|
60
|
+
old.heightReference !== grid.heightReference ||
|
|
61
|
+
!old.origin.every((v, i) => v === grid.origin[i]) ||
|
|
62
|
+
!old.columnStep.every((v, i) => v === grid.columnStep[i]) ||
|
|
63
|
+
!old.rowStep.every((v, i) => v === grid.rowStep[i]) ||
|
|
64
|
+
previous!.levels[0].nodesPerBlock !== nodesPerBlock
|
|
65
|
+
) {
|
|
66
|
+
const pyramid = createTerrainGradientPyramid(grid, {maxSamples}),
|
|
67
|
+
levels = pyramid.levels.map(l => {
|
|
68
|
+
const counts = new Uint32Array(2 * l.width * l.height);
|
|
69
|
+
for (let i = 0; i < l.width * l.height; i++) {
|
|
70
|
+
counts[2 * i] = l.validCounts[i];
|
|
71
|
+
counts[2 * i + 1] = l.sampleCounts[i];
|
|
72
|
+
}
|
|
73
|
+
return packTerrainHierarchyLevel(
|
|
74
|
+
l.width,
|
|
75
|
+
l.height,
|
|
76
|
+
l.blockSize,
|
|
77
|
+
l.gradients,
|
|
78
|
+
counts,
|
|
79
|
+
nodesPerBlock
|
|
80
|
+
);
|
|
81
|
+
});
|
|
82
|
+
return {
|
|
83
|
+
source: grid,
|
|
84
|
+
levels,
|
|
85
|
+
stats: {
|
|
86
|
+
copiedBlocks: levels.reduce((n, l) => n + l.blocks.length, 0),
|
|
87
|
+
copiedBytes: levels.reduce(
|
|
88
|
+
(n, l) => n + l.blocks.reduce((s, b) => s + b.values.byteLength + b.counts.byteLength, 0),
|
|
89
|
+
0
|
|
90
|
+
),
|
|
91
|
+
updatedNodes: Uint32Array.from(levels, l => l.width * l.height)
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
const ids = terrainDirtyIndices(dirty, grid.width, grid.height, 0, charge);
|
|
96
|
+
const result = updatePersistentHierarchy(
|
|
97
|
+
previous!.levels,
|
|
98
|
+
ids,
|
|
99
|
+
'gradient',
|
|
100
|
+
(x, y) => {
|
|
101
|
+
const i = y * grid.width + x,
|
|
102
|
+
s = grid.statuses[i];
|
|
103
|
+
if (s > 6) throw new Error('Invalid terrain gradient status');
|
|
104
|
+
if (
|
|
105
|
+
s === 0 &&
|
|
106
|
+
(!Number.isFinite(grid.gradients[2 * i]) || !Number.isFinite(grid.gradients[2 * i + 1]))
|
|
107
|
+
)
|
|
108
|
+
throw new Error('Invalid terrain gradient value');
|
|
109
|
+
return {
|
|
110
|
+
values: s === 0 ? [grid.gradients[2 * i], grid.gradients[2 * i + 1]] : [0, 0],
|
|
111
|
+
counts: [s === 0 ? 1 : 0, 1]
|
|
112
|
+
};
|
|
113
|
+
},
|
|
114
|
+
charge
|
|
115
|
+
);
|
|
116
|
+
return {source: grid, ...result};
|
|
117
|
+
}
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
// math.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
|
+
export type TerrainHierarchyBlock = {
|
|
5
|
+
/** Linear node offset in this level. Buffers pack two values and two counts per node. */
|
|
6
|
+
offset: number;
|
|
7
|
+
count: number;
|
|
8
|
+
values: Float64Array;
|
|
9
|
+
counts: Uint32Array;
|
|
10
|
+
};
|
|
11
|
+
export type TerrainPersistentLevel = {
|
|
12
|
+
width: number;
|
|
13
|
+
height: number;
|
|
14
|
+
blockSize: number;
|
|
15
|
+
nodesPerBlock: number;
|
|
16
|
+
blocks: readonly TerrainHierarchyBlock[];
|
|
17
|
+
};
|
|
18
|
+
export type TerrainHierarchyUpdateStats = {
|
|
19
|
+
copiedBlocks: number;
|
|
20
|
+
copiedBytes: number;
|
|
21
|
+
updatedNodes: Uint32Array;
|
|
22
|
+
};
|
|
23
|
+
export function getTerrainHierarchyNode(
|
|
24
|
+
level: TerrainPersistentLevel,
|
|
25
|
+
column: number,
|
|
26
|
+
row: number
|
|
27
|
+
): {values: readonly [number, number]; counts: readonly [number, number]} {
|
|
28
|
+
if (
|
|
29
|
+
!Number.isSafeInteger(level.width) ||
|
|
30
|
+
level.width < 1 ||
|
|
31
|
+
!Number.isSafeInteger(level.height) ||
|
|
32
|
+
level.height < 1 ||
|
|
33
|
+
!Number.isSafeInteger(level.nodesPerBlock) ||
|
|
34
|
+
level.nodesPerBlock < 1 ||
|
|
35
|
+
!Array.isArray(level.blocks)
|
|
36
|
+
)
|
|
37
|
+
throw new Error('Invalid persistent hierarchy level');
|
|
38
|
+
if (
|
|
39
|
+
!Number.isSafeInteger(column) ||
|
|
40
|
+
!Number.isSafeInteger(row) ||
|
|
41
|
+
column < 0 ||
|
|
42
|
+
row < 0 ||
|
|
43
|
+
column >= level.width ||
|
|
44
|
+
row >= level.height
|
|
45
|
+
)
|
|
46
|
+
throw new Error('Invalid persistent hierarchy node');
|
|
47
|
+
const id = row * level.width + column,
|
|
48
|
+
block = level.blocks[Math.floor(id / level.nodesPerBlock)],
|
|
49
|
+
i = block ? 2 * (id - block.offset) : -1;
|
|
50
|
+
const expectedOffset = Math.floor(id / level.nodesPerBlock) * level.nodesPerBlock;
|
|
51
|
+
if (
|
|
52
|
+
!block ||
|
|
53
|
+
block.offset !== expectedOffset ||
|
|
54
|
+
block.count !== Math.min(level.nodesPerBlock, level.width * level.height - expectedOffset) ||
|
|
55
|
+
!(block.values instanceof Float64Array) ||
|
|
56
|
+
!(block.counts instanceof Uint32Array) ||
|
|
57
|
+
block.values.length !== 2 * block.count ||
|
|
58
|
+
block.counts.length !== 2 * block.count
|
|
59
|
+
)
|
|
60
|
+
throw new Error('Invalid persistent hierarchy block');
|
|
61
|
+
return {
|
|
62
|
+
values: [block.values[i], block.values[i + 1]],
|
|
63
|
+
counts: [block.counts[i], block.counts[i + 1]]
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
export function packTerrainHierarchyLevel(
|
|
67
|
+
width: number,
|
|
68
|
+
height: number,
|
|
69
|
+
blockSize: number,
|
|
70
|
+
values: Float64Array,
|
|
71
|
+
counts: Uint32Array,
|
|
72
|
+
nodesPerBlock: number
|
|
73
|
+
): TerrainPersistentLevel {
|
|
74
|
+
if (
|
|
75
|
+
values.length !== 2 * width * height ||
|
|
76
|
+
counts.length !== values.length ||
|
|
77
|
+
!values.every(Number.isFinite)
|
|
78
|
+
)
|
|
79
|
+
throw new Error('Invalid persistent hierarchy buffers');
|
|
80
|
+
const blocks: TerrainHierarchyBlock[] = [];
|
|
81
|
+
for (let offset = 0; offset < width * height; offset += nodesPerBlock) {
|
|
82
|
+
const count = Math.min(nodesPerBlock, width * height - offset);
|
|
83
|
+
blocks.push({
|
|
84
|
+
offset,
|
|
85
|
+
count,
|
|
86
|
+
values: values.slice(2 * offset, 2 * (offset + count)),
|
|
87
|
+
counts: counts.slice(2 * offset, 2 * (offset + count))
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
return {width, height, blockSize, nodesPerBlock, blocks};
|
|
91
|
+
}
|
|
92
|
+
export function persistentHierarchyOptions(
|
|
93
|
+
options: {nodesPerBlock?: number; maxSamples?: number; maxTests?: number},
|
|
94
|
+
count: number
|
|
95
|
+
) {
|
|
96
|
+
const nodesPerBlock = options.nodesPerBlock ?? 256,
|
|
97
|
+
maxSamples = options.maxSamples ?? 4_000_000,
|
|
98
|
+
maxTests = options.maxTests ?? 10_000_000;
|
|
99
|
+
if (
|
|
100
|
+
![nodesPerBlock, maxSamples, maxTests, count].every(Number.isSafeInteger) ||
|
|
101
|
+
nodesPerBlock < 1 ||
|
|
102
|
+
maxSamples < 0 ||
|
|
103
|
+
maxTests < 0 ||
|
|
104
|
+
count < 1 ||
|
|
105
|
+
count > maxSamples
|
|
106
|
+
)
|
|
107
|
+
throw new Error('Invalid persistent terrain hierarchy capacity');
|
|
108
|
+
let tests = 0;
|
|
109
|
+
return {
|
|
110
|
+
nodesPerBlock,
|
|
111
|
+
maxSamples,
|
|
112
|
+
charge: () => {
|
|
113
|
+
if (++tests > maxTests) throw new Error('Persistent hierarchy work budget exceeded');
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
export function updatePersistentHierarchy(
|
|
118
|
+
previous: readonly TerrainPersistentLevel[],
|
|
119
|
+
ids: Set<number>,
|
|
120
|
+
mode: 'bounds' | 'gradient',
|
|
121
|
+
base: (
|
|
122
|
+
x: number,
|
|
123
|
+
y: number
|
|
124
|
+
) => {values: readonly [number, number]; counts: readonly [number, number]},
|
|
125
|
+
charge: () => void
|
|
126
|
+
): {levels: TerrainPersistentLevel[]; stats: TerrainHierarchyUpdateStats} {
|
|
127
|
+
const levels = previous.slice(),
|
|
128
|
+
updatedNodes: number[] = [];
|
|
129
|
+
let copiedBlocks = 0,
|
|
130
|
+
copiedBytes = 0;
|
|
131
|
+
for (let l = 0; l < levels.length; l++) {
|
|
132
|
+
updatedNodes.push(ids.size);
|
|
133
|
+
if (!ids.size) continue;
|
|
134
|
+
const old = levels[l],
|
|
135
|
+
blocks = old.blocks.slice(),
|
|
136
|
+
cloned = new Set<number>(),
|
|
137
|
+
parents = new Set<number>();
|
|
138
|
+
const node = (level: TerrainPersistentLevel, x: number, y: number) =>
|
|
139
|
+
getTerrainHierarchyNode(level, x, y);
|
|
140
|
+
for (const id of ids) {
|
|
141
|
+
charge();
|
|
142
|
+
const x = id % old.width,
|
|
143
|
+
y = Math.floor(id / old.width);
|
|
144
|
+
let value: {values: readonly [number, number]; counts: readonly [number, number]};
|
|
145
|
+
if (l === 0) value = base(x, y);
|
|
146
|
+
else {
|
|
147
|
+
const child = levels[l - 1];
|
|
148
|
+
let a = mode === 'bounds' ? Infinity : 0,
|
|
149
|
+
b = mode === 'bounds' ? -Infinity : 0,
|
|
150
|
+
c = 0,
|
|
151
|
+
d = 0;
|
|
152
|
+
for (let dy = 0; dy < 2; dy++)
|
|
153
|
+
for (let dx = 0; dx < 2; dx++) {
|
|
154
|
+
const cx = x * 2 + dx,
|
|
155
|
+
cy = y * 2 + dy;
|
|
156
|
+
if (cx >= child.width || cy >= child.height) continue;
|
|
157
|
+
const v = node(child, cx, cy),
|
|
158
|
+
n = v.counts[0];
|
|
159
|
+
d += v.counts[1];
|
|
160
|
+
if (n) {
|
|
161
|
+
if (mode === 'bounds') {
|
|
162
|
+
a = Math.min(a, v.values[0]);
|
|
163
|
+
b = Math.max(b, v.values[1]);
|
|
164
|
+
} else {
|
|
165
|
+
const total = c + n;
|
|
166
|
+
a = c ? a * (c / total) + v.values[0] * (n / total) : v.values[0];
|
|
167
|
+
b = c ? b * (c / total) + v.values[1] * (n / total) : v.values[1];
|
|
168
|
+
}
|
|
169
|
+
c += n;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
if (c && (!Number.isFinite(a) || !Number.isFinite(b)))
|
|
173
|
+
throw new Error('Persistent hierarchy arithmetic overflow');
|
|
174
|
+
value = {values: c ? [a, b] : [0, 0], counts: [c, d]};
|
|
175
|
+
}
|
|
176
|
+
const blockId = Math.floor(id / old.nodesPerBlock);
|
|
177
|
+
if (!cloned.has(blockId)) {
|
|
178
|
+
const source = blocks[blockId];
|
|
179
|
+
blocks[blockId] = {...source, values: source.values.slice(), counts: source.counts.slice()};
|
|
180
|
+
cloned.add(blockId);
|
|
181
|
+
copiedBlocks++;
|
|
182
|
+
copiedBytes += blocks[blockId].values.byteLength + blocks[blockId].counts.byteLength;
|
|
183
|
+
}
|
|
184
|
+
const block = blocks[blockId],
|
|
185
|
+
i = 2 * (id - block.offset);
|
|
186
|
+
block.values[i] = value.values[0];
|
|
187
|
+
block.values[i + 1] = value.values[1];
|
|
188
|
+
block.counts[i] = value.counts[0];
|
|
189
|
+
block.counts[i + 1] = value.counts[1];
|
|
190
|
+
parents.add(Math.floor(y / 2) * Math.ceil(old.width / 2) + Math.floor(x / 2));
|
|
191
|
+
}
|
|
192
|
+
levels[l] = {...old, blocks};
|
|
193
|
+
ids = parents;
|
|
194
|
+
}
|
|
195
|
+
return {levels, stats: {copiedBlocks, copiedBytes, updatedNodes: Uint32Array.from(updatedNodes)}};
|
|
196
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// math.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
|
+
import type {HeightField} from './height-field';
|
|
5
|
+
|
|
6
|
+
/** Height-only triangle interpolation: zero-weight vertices are not support. */
|
|
7
|
+
export function sampleTerrainTriangleHeight(
|
|
8
|
+
field: HeightField,
|
|
9
|
+
x: number,
|
|
10
|
+
y: number
|
|
11
|
+
): number | undefined {
|
|
12
|
+
if (Number.isInteger(x) && Number.isInteger(y)) return field.getHeight(x, y);
|
|
13
|
+
const column = Math.min(Math.floor(x), field.width - 2);
|
|
14
|
+
const row = Math.min(Math.floor(y), field.height - 2);
|
|
15
|
+
const u = x - column,
|
|
16
|
+
v = y - row;
|
|
17
|
+
let a: number, b: number, c: number, d: number;
|
|
18
|
+
if (field.diagonal === '00-11') {
|
|
19
|
+
if (v <= u) {
|
|
20
|
+
a = 1 - u;
|
|
21
|
+
b = u - v;
|
|
22
|
+
c = 0;
|
|
23
|
+
d = v;
|
|
24
|
+
} else {
|
|
25
|
+
a = 1 - v;
|
|
26
|
+
b = 0;
|
|
27
|
+
c = v - u;
|
|
28
|
+
d = u;
|
|
29
|
+
}
|
|
30
|
+
} else if (u + v <= 1) {
|
|
31
|
+
a = 1 - u - v;
|
|
32
|
+
b = u;
|
|
33
|
+
c = v;
|
|
34
|
+
d = 0;
|
|
35
|
+
} else {
|
|
36
|
+
a = 0;
|
|
37
|
+
b = 1 - v;
|
|
38
|
+
c = 1 - u;
|
|
39
|
+
d = u + v - 1;
|
|
40
|
+
}
|
|
41
|
+
const za = a ? field.getHeight(column, row) : 0;
|
|
42
|
+
const zb = b ? field.getHeight(column + 1, row) : 0;
|
|
43
|
+
const zc = c ? field.getHeight(column, row + 1) : 0;
|
|
44
|
+
const zd = d ? field.getHeight(column + 1, row + 1) : 0;
|
|
45
|
+
if (za === undefined || zb === undefined || zc === undefined || zd === undefined)
|
|
46
|
+
return undefined;
|
|
47
|
+
const height = a * za + b * zb + c * zc + d * zd;
|
|
48
|
+
if (!Number.isFinite(height)) throw new Error('Terrain triangle numeric sampling failure');
|
|
49
|
+
return height;
|
|
50
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// math.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
|
+
import type {HeightField} from './height-field';
|
|
5
|
+
export type TerrainFieldTile = {id: string; field: HeightField};
|
|
6
|
+
/** Immutable tile-granular updates. Replace the field after any edit. */
|
|
7
|
+
export function updateTerrainTileData<T>(
|
|
8
|
+
previous: readonly {source: TerrainFieldTile; data: T}[] | null,
|
|
9
|
+
resident: readonly TerrainFieldTile[],
|
|
10
|
+
create: (field: HeightField) => T,
|
|
11
|
+
maxSamples = 4_000_000
|
|
12
|
+
): {source: TerrainFieldTile; data: T}[] {
|
|
13
|
+
if (!Number.isSafeInteger(maxSamples) || maxSamples < 0)
|
|
14
|
+
throw new Error('Invalid terrain update sample capacity');
|
|
15
|
+
let count = 0;
|
|
16
|
+
const ids = new Set<string>();
|
|
17
|
+
for (const tile of resident) {
|
|
18
|
+
if (typeof tile.id !== 'string' || ids.has(tile.id))
|
|
19
|
+
throw new Error('Invalid or duplicate terrain update tile');
|
|
20
|
+
ids.add(tile.id);
|
|
21
|
+
count += tile.field.width * tile.field.height;
|
|
22
|
+
if (!Number.isSafeInteger(count) || count > maxSamples)
|
|
23
|
+
throw new Error('Terrain update sample capacity exceeded');
|
|
24
|
+
}
|
|
25
|
+
const cached = new Map(previous?.map(t => [t.source.id, t]));
|
|
26
|
+
return resident.map(source => {
|
|
27
|
+
const old = cached.get(source.id);
|
|
28
|
+
return old?.source.field === source.field
|
|
29
|
+
? {source, data: old.data}
|
|
30
|
+
: {source, data: create(source.field)};
|
|
31
|
+
});
|
|
32
|
+
}
|
package/src/terrain/tiled.ts
CHANGED
|
@@ -218,12 +218,25 @@ export class TiledHeightField {
|
|
|
218
218
|
};
|
|
219
219
|
}
|
|
220
220
|
|
|
221
|
-
/** Queries never mix resolutions. Only absent residency permits coarser fallback.
|
|
221
|
+
/** Queries never mix resolutions. Only absent residency permits coarser fallback.
|
|
222
|
+
* Raster footprint/masked-support policies are specific to HeightField, not tiled halos.
|
|
223
|
+
*/
|
|
222
224
|
sample(
|
|
223
225
|
x: number,
|
|
224
226
|
y: number,
|
|
225
|
-
options: TerrainSampleOptions
|
|
227
|
+
options: Pick<TerrainSampleOptions, 'interpolation'> & {
|
|
228
|
+
/** Requested tile-matrix level. */
|
|
229
|
+
matrixId: string;
|
|
230
|
+
/** Only absent residency permits a coarser level. */
|
|
231
|
+
fallback?: 'none' | 'coarser';
|
|
232
|
+
/** Raster domains are not supported by the tiled halo sampler. */
|
|
233
|
+
domain?: never;
|
|
234
|
+
/** Masked raster support is not supported by the tiled halo sampler. */
|
|
235
|
+
noData?: never;
|
|
236
|
+
}
|
|
226
237
|
): TiledTerrainSample {
|
|
238
|
+
if ('domain' in options || 'noData' in options)
|
|
239
|
+
throw new Error('Raster sampling policies require a HeightField');
|
|
227
240
|
const requested = this.getMatrix(options.matrixId);
|
|
228
241
|
if (
|
|
229
242
|
options.fallback !== undefined &&
|
|
@@ -269,7 +282,7 @@ export class TiledHeightField {
|
|
|
269
282
|
matrix: TileMatrix,
|
|
270
283
|
x: number,
|
|
271
284
|
y: number,
|
|
272
|
-
options: TerrainSampleOptions
|
|
285
|
+
options: Pick<TerrainSampleOptions, 'interpolation'>
|
|
273
286
|
): TerrainSample & {matrixId: string} {
|
|
274
287
|
const invalid = (status: TerrainSample['status']) => ({
|
|
275
288
|
status,
|
package/src/terrain/types.ts
CHANGED
|
@@ -40,7 +40,15 @@ export type HeightFieldProps = {
|
|
|
40
40
|
heightReference?: string;
|
|
41
41
|
};
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
/** Sampling policies; defaults retain strict sample-domain and complete-cell behavior. */
|
|
44
|
+
export type TerrainSampleOptions = {
|
|
45
|
+
/** Interpolation between grid samples; defaults to bilinear. */
|
|
46
|
+
interpolation?: TerrainInterpolation;
|
|
47
|
+
/** Cell fields may clamp the outer half-cell footprint to the nearest sample. */
|
|
48
|
+
domain?: 'samples' | 'footprint';
|
|
49
|
+
/** Bilinear height may use only nonzero-weight support; gradients still require a complete cell. */
|
|
50
|
+
noData?: 'cell' | 'support';
|
|
51
|
+
};
|
|
44
52
|
|
|
45
53
|
/** Numeric values are zero when their associated status is not VALID. */
|
|
46
54
|
export type TerrainSample = {
|
package/src/turf.ts
CHANGED
|
@@ -2,9 +2,13 @@
|
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
4
|
|
|
5
|
-
import type {GeoArrowArray, GeoArrowColumn} from '
|
|
6
|
-
import {isGeoArrowValueValid} from '
|
|
7
|
-
import {
|
|
5
|
+
import type {GeoArrowArray, GeoArrowColumn} from '@math.gl/arrow/geoarrow-utils';
|
|
6
|
+
import {isGeoArrowValueValid} from '@math.gl/arrow/geoarrow-utils';
|
|
7
|
+
import {
|
|
8
|
+
getGeoArrowRowBounds,
|
|
9
|
+
mapGeoArrowCoordinates,
|
|
10
|
+
rewindGeoArrow
|
|
11
|
+
} from '@math.gl/arrow/geoarrow-utils';
|
|
8
12
|
|
|
9
13
|
/** A nullable, row-aligned numeric or boolean result. Validity is an Arrow bitmap. */
|
|
10
14
|
export type TurfBatchResult<T extends Float64Array | Uint8Array> = {
|
package/crs/README.md
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
# @math.gl/geospatial/crs
|
|
2
|
-
|
|
3
|
-
Proj4-independent coordinate reference system definitions shared by math.gl integrations.
|
|
4
|
-
|
|
5
|
-
PROJJSON is an OSGeo/PROJ specification, not an independently published OGC or ISO standard. It
|
|
6
|
-
is designed as a lossless JSON encoding of OGC WKT2:2019 / ISO 19162:2019 and is referenced by OGC
|
|
7
|
-
standards. This package uses strict PROJJSON v0.7 as its semantic CRS object model. Authority codes,
|
|
8
|
-
PROJ strings, WKT2, WKT1, and vendor WKT dialects remain string serializations. WKT and PROJ
|
|
9
|
-
syntax trees preserve the serializations without claiming semantic conversion to PROJJSON.
|
|
10
|
-
|
|
11
|
-
```ts
|
|
12
|
-
import {parsePROJString, parseWKTCRS} from '@math.gl/geospatial/crs';
|
|
13
|
-
import type {CRSDefinition, PROJJSONCRS} from '@math.gl/geospatial/crs';
|
|
14
|
-
|
|
15
|
-
const authorityCode: CRSDefinition = 'EPSG:4326';
|
|
16
|
-
const projString: CRSDefinition = '+proj=longlat +datum=WGS84 +no_defs';
|
|
17
|
-
const projjson: PROJJSONCRS = {
|
|
18
|
-
type: 'GeographicCRS',
|
|
19
|
-
name: 'WGS 84',
|
|
20
|
-
datum: {
|
|
21
|
-
name: 'World Geodetic System 1984',
|
|
22
|
-
ellipsoid: {
|
|
23
|
-
name: 'WGS 84',
|
|
24
|
-
semi_major_axis: 6378137,
|
|
25
|
-
inverse_flattening: 298.257223563
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
const wkt = parseWKTCRS('GEOGCRS["WGS 84",ID["EPSG",4326]]');
|
|
31
|
-
const proj = parsePROJString('+proj=longlat +datum=WGS84 +no_defs');
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
`SpatialReference` adds format-neutral discovery state around those definitions. It distinguishes
|
|
35
|
-
explicit definitions, specification defaults, explicitly unknown CRS values, and absent metadata;
|
|
36
|
-
it can also retain alternate representations, coordinate epoch, coordinate frame, stored
|
|
37
|
-
component order, and units.
|
|
38
|
-
|
|
39
|
-
```ts
|
|
40
|
-
import {createSpatialReference} from '@math.gl/geospatial/crs';
|
|
41
|
-
|
|
42
|
-
const spatialReference = createSpatialReference({
|
|
43
|
-
crs: {
|
|
44
|
-
state: 'explicit',
|
|
45
|
-
definition: 'EPSG:4326',
|
|
46
|
-
representation: 'identifier',
|
|
47
|
-
provenance: 'metadata'
|
|
48
|
-
},
|
|
49
|
-
coordinateFrame: 'geographic',
|
|
50
|
-
coordinateOrder: ['x', 'y']
|
|
51
|
-
});
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
The official PROJJSON v0.7 JSON Schema is vendored unchanged under its MIT license and exported as
|
|
55
|
-
`@math.gl/geospatial/crs/projjson.schema.json`. It is the source of truth for the checked-in generated
|
|
56
|
-
TypeScript declarations. This package has no runtime dependencies. Its runtime APIs parse, encode,
|
|
57
|
-
and validate serialization syntax and identify already-resolved metadata. They do not perform registry lookup, semantic equivalence,
|
|
58
|
-
coordinate transformation, or general conversion between WKT, PROJ, and PROJJSON.
|
|
59
|
-
|
|
60
|
-
The `ProjectionTransform` in `@math.gl/geospatial/projection/core` directly accepts
|
|
61
|
-
these readonly definitions, `CRSReference`, and `SpatialReference` descriptors. Its optional
|
|
62
|
-
WKT/PROJJSON adapters use this package's types and parsers; execution support is checked
|
|
63
|
-
by `checkProjectionCompatibility`. Unknown/absent metadata remains unresolved.
|
|
64
|
-
See the [projection API](https://math.gl/docs/modules/geospatial/projection/api-reference/typescript-projection)
|
|
65
|
-
for the supported transformation subset and storage-order behavior.
|
|
66
|
-
|
|
67
|
-
See the [PROJJSON specification](https://proj.org/en/stable/specifications/projjson.html).
|
|
68
|
-
See the math.gl [Coordinate Reference Systems guide](https://math.gl/docs/modules/geospatial/crs/developer-guide/coordinate-reference-systems)
|
|
69
|
-
for representations, epochs, axis order, vertical CRS, and transformation guidance.
|
|
70
|
-
|
|
71
|
-
`linearUnits` provides names and metre conversion factors keyed by PROJ unit
|
|
72
|
-
identifier. For example, `linearUnits.ft` is `{name: 'feet', metersPerUnit: 0.3048}`.
|
|
73
|
-
|
|
74
|
-
`getCRSSignature(metadata)` returns a deterministic signature for resolved
|
|
75
|
-
`CRSMetadata`. It tracks projection parameters, ellipsoid, effective axis order,
|
|
76
|
-
units, and horizontal extraction. Parameter order and object identity do not
|
|
77
|
-
matter. This is an identity of resolved execution conventions, not a semantic
|
|
78
|
-
equivalence test for arbitrary CRS definitions. Projection descriptors use this
|
|
79
|
-
result as `signature` when structured input or overrides require resolved metadata;
|
|
80
|
-
default string definitions retain the original string.
|
|
81
|
-
|
|
82
|
-
Import `getCRSSignature`, `linearUnits`, `CRSMetadata` and `CRSUnit` from
|
|
83
|
-
`@math.gl/geospatial/crs` when only resolved metadata is needed. This entry keeps
|
|
84
|
-
WKT/PROJ syntax readers out of the initial graph of code-split applications.
|
package/crs/schemas/README.md
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
# Vendored PROJJSON schema
|
|
2
|
-
|
|
3
|
-
`projjson.schema.json` is the official PROJJSON v0.7 JSON Schema from
|
|
4
|
-
[OSGeo/PROJ](https://github.com/OSGeo/PROJ/blob/master/schemas/v0.7/projjson.schema.json).
|
|
5
|
-
It is vendored unchanged under the MIT license declared in its `$comment` field.
|
|
6
|
-
|
|
7
|
-
The checked-in TypeScript declarations in `../../src/crs/projjson-types.ts` are generated
|
|
8
|
-
from `#/definitions/crs`; run `yarn generate:projjson-types` after an intentional
|
|
9
|
-
schema upgrade.
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/** Optional builder subpath. Importing it avoids pulling codec and tessellation helpers. */
|
|
2
|
-
export type { GeoArrowBuilderEncoding, GeoArrowBuilderMeasurement, GeoArrowBuilderModeOptions, GeoArrowBuilderOptions, GeoArrowColumnFromRowsOptions, GeoArrowBuilderTarget } from "./builder.js";
|
|
3
|
-
export { allocateGeoArrowBuilderTarget, GeoArrowBuilder, makeGeoArrowColumnFromGeometryRows } from "./builder.js";
|
|
4
|
-
//# sourceMappingURL=builder-entry.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"builder-entry.d.ts","sourceRoot":"","sources":["../../src/geoarrow/builder-entry.ts"],"names":[],"mappings":"AAIA,4FAA4F;AAC5F,YAAY,EACV,uBAAuB,EACvB,0BAA0B,EAC1B,0BAA0B,EAC1B,sBAAsB,EACtB,6BAA6B,EAC7B,qBAAqB,EACtB,qBAAkB;AACnB,OAAO,EACL,6BAA6B,EAC7B,eAAe,EACf,kCAAkC,EACnC,qBAAkB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"builder-entry.js","sourceRoot":"","sources":["../../src/geoarrow/builder-entry.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AAW5D,OAAO,EACL,6BAA6B,EAC7B,eAAe,EACf,kCAAkC,EACnC,qBAAkB"}
|