@math.gl/projection 0.0.0-stage → 5.0.0-alpha.12
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/APACHE-2.0-LICENSE.txt +55 -0
- package/PROJ-LICENSE.txt +37 -0
- package/PROJ4-LICENSE.md +29 -0
- package/README.md +27 -2
- package/THIRD-PARTY-NOTICES.md +163 -0
- package/dist/deformation.cjs +189 -0
- package/dist/deformation.cjs.map +6 -0
- package/dist/deformation.d.ts +3 -0
- package/dist/deformation.d.ts.map +1 -0
- package/dist/deformation.js +5 -0
- package/dist/deformation.js.map +1 -0
- package/dist/experimental/catalogue-kernel.d.ts +7 -0
- package/dist/experimental/catalogue-kernel.d.ts.map +1 -0
- package/dist/experimental/catalogue-kernel.js +36 -0
- package/dist/experimental/catalogue-kernel.js.map +1 -0
- package/dist/experimental/common/adjust_lat.d.ts +2 -0
- package/dist/experimental/common/adjust_lat.d.ts.map +1 -0
- package/dist/experimental/common/adjust_lat.js +10 -0
- package/dist/experimental/common/adjust_lat.js.map +1 -0
- package/dist/experimental/common/adjust_lon.d.ts +2 -0
- package/dist/experimental/common/adjust_lon.d.ts.map +1 -0
- package/dist/experimental/common/adjust_lon.js +13 -0
- package/dist/experimental/common/adjust_lon.js.map +1 -0
- package/dist/experimental/common/asinhy.d.ts +2 -0
- package/dist/experimental/common/asinhy.d.ts.map +1 -0
- package/dist/experimental/common/asinhy.js +12 -0
- package/dist/experimental/common/asinhy.js.map +1 -0
- package/dist/experimental/common/asinz.d.ts +2 -0
- package/dist/experimental/common/asinz.d.ts.map +1 -0
- package/dist/experimental/common/asinz.js +11 -0
- package/dist/experimental/common/asinz.js.map +1 -0
- package/dist/experimental/common/authlat.d.ts +2 -0
- package/dist/experimental/common/authlat.d.ts.map +1 -0
- package/dist/experimental/common/authlat.js +9 -0
- package/dist/experimental/common/authlat.js.map +1 -0
- package/dist/experimental/common/authset.d.ts +2 -0
- package/dist/experimental/common/authset.d.ts.map +1 -0
- package/dist/experimental/common/authset.js +24 -0
- package/dist/experimental/common/authset.js.map +1 -0
- package/dist/experimental/common/clens.d.ts +2 -0
- package/dist/experimental/common/clens.d.ts.map +1 -0
- package/dist/experimental/common/clens.js +18 -0
- package/dist/experimental/common/clens.js.map +1 -0
- package/dist/experimental/common/clens_cmplx.d.ts +5 -0
- package/dist/experimental/common/clens_cmplx.d.ts.map +1 -0
- package/dist/experimental/common/clens_cmplx.js +34 -0
- package/dist/experimental/common/clens_cmplx.js.map +1 -0
- package/dist/experimental/common/constants.d.ts +9 -0
- package/dist/experimental/common/constants.d.ts.map +1 -0
- package/dist/experimental/common/constants.js +14 -0
- package/dist/experimental/common/constants.js.map +1 -0
- package/dist/experimental/common/cosh.d.ts +2 -0
- package/dist/experimental/common/cosh.d.ts.map +1 -0
- package/dist/experimental/common/cosh.js +10 -0
- package/dist/experimental/common/cosh.js.map +1 -0
- package/dist/experimental/common/e0fn.d.ts +2 -0
- package/dist/experimental/common/e0fn.d.ts.map +1 -0
- package/dist/experimental/common/e0fn.js +8 -0
- package/dist/experimental/common/e0fn.js.map +1 -0
- package/dist/experimental/common/e1fn.d.ts +2 -0
- package/dist/experimental/common/e1fn.d.ts.map +1 -0
- package/dist/experimental/common/e1fn.js +8 -0
- package/dist/experimental/common/e1fn.js.map +1 -0
- package/dist/experimental/common/e2fn.d.ts +2 -0
- package/dist/experimental/common/e2fn.d.ts.map +1 -0
- package/dist/experimental/common/e2fn.js +8 -0
- package/dist/experimental/common/e2fn.js.map +1 -0
- package/dist/experimental/common/e3fn.d.ts +2 -0
- package/dist/experimental/common/e3fn.d.ts.map +1 -0
- package/dist/experimental/common/e3fn.js +8 -0
- package/dist/experimental/common/e3fn.js.map +1 -0
- package/dist/experimental/common/fL.d.ts +2 -0
- package/dist/experimental/common/fL.d.ts.map +1 -0
- package/dist/experimental/common/fL.js +9 -0
- package/dist/experimental/common/fL.js.map +1 -0
- package/dist/experimental/common/gN.d.ts +2 -0
- package/dist/experimental/common/gN.d.ts.map +1 -0
- package/dist/experimental/common/gN.js +9 -0
- package/dist/experimental/common/gN.js.map +1 -0
- package/dist/experimental/common/gatg.d.ts +2 -0
- package/dist/experimental/common/gatg.d.ts.map +1 -0
- package/dist/experimental/common/gatg.js +18 -0
- package/dist/experimental/common/gatg.js.map +1 -0
- package/dist/experimental/common/hypot.d.ts +2 -0
- package/dist/experimental/common/hypot.d.ts.map +1 -0
- package/dist/experimental/common/hypot.js +12 -0
- package/dist/experimental/common/hypot.js.map +1 -0
- package/dist/experimental/common/imlfn.d.ts +2 -0
- package/dist/experimental/common/imlfn.d.ts.map +1 -0
- package/dist/experimental/common/imlfn.js +21 -0
- package/dist/experimental/common/imlfn.js.map +1 -0
- package/dist/experimental/common/invlatiso.d.ts +2 -0
- package/dist/experimental/common/invlatiso.d.ts.map +1 -0
- package/dist/experimental/common/invlatiso.js +20 -0
- package/dist/experimental/common/invlatiso.js.map +1 -0
- package/dist/experimental/common/iqsfnz.d.ts +2 -0
- package/dist/experimental/common/iqsfnz.d.ts.map +1 -0
- package/dist/experimental/common/iqsfnz.js +44 -0
- package/dist/experimental/common/iqsfnz.js.map +1 -0
- package/dist/experimental/common/latiso.d.ts +2 -0
- package/dist/experimental/common/latiso.d.ts.map +1 -0
- package/dist/experimental/common/latiso.js +19 -0
- package/dist/experimental/common/latiso.js.map +1 -0
- package/dist/experimental/common/log1py.d.ts +2 -0
- package/dist/experimental/common/log1py.d.ts.map +1 -0
- package/dist/experimental/common/log1py.js +10 -0
- package/dist/experimental/common/log1py.js.map +1 -0
- package/dist/experimental/common/mlfn.d.ts +2 -0
- package/dist/experimental/common/mlfn.d.ts.map +1 -0
- package/dist/experimental/common/mlfn.js +8 -0
- package/dist/experimental/common/mlfn.js.map +1 -0
- package/dist/experimental/common/msfnz.d.ts +2 -0
- package/dist/experimental/common/msfnz.d.ts.map +1 -0
- package/dist/experimental/common/msfnz.js +9 -0
- package/dist/experimental/common/msfnz.js.map +1 -0
- package/dist/experimental/common/phi2z.d.ts +2 -0
- package/dist/experimental/common/phi2z.d.ts.map +1 -0
- package/dist/experimental/common/phi2z.js +21 -0
- package/dist/experimental/common/phi2z.js.map +1 -0
- package/dist/experimental/common/pj_enfn.d.ts +2 -0
- package/dist/experimental/common/pj_enfn.d.ts.map +1 -0
- package/dist/experimental/common/pj_enfn.js +28 -0
- package/dist/experimental/common/pj_enfn.js.map +1 -0
- package/dist/experimental/common/pj_inv_mlfn.d.ts +2 -0
- package/dist/experimental/common/pj_inv_mlfn.d.ts.map +1 -0
- package/dist/experimental/common/pj_inv_mlfn.js +26 -0
- package/dist/experimental/common/pj_inv_mlfn.js.map +1 -0
- package/dist/experimental/common/pj_mlfn.d.ts +2 -0
- package/dist/experimental/common/pj_mlfn.d.ts.map +1 -0
- package/dist/experimental/common/pj_mlfn.js +10 -0
- package/dist/experimental/common/pj_mlfn.js.map +1 -0
- package/dist/experimental/common/qsfnz.d.ts +2 -0
- package/dist/experimental/common/qsfnz.d.ts.map +1 -0
- package/dist/experimental/common/qsfnz.js +16 -0
- package/dist/experimental/common/qsfnz.js.map +1 -0
- package/dist/experimental/common/sign.d.ts +2 -0
- package/dist/experimental/common/sign.d.ts.map +1 -0
- package/dist/experimental/common/sign.js +8 -0
- package/dist/experimental/common/sign.js.map +1 -0
- package/dist/experimental/common/sinh.d.ts +2 -0
- package/dist/experimental/common/sinh.d.ts.map +1 -0
- package/dist/experimental/common/sinh.js +10 -0
- package/dist/experimental/common/sinh.js.map +1 -0
- package/dist/experimental/common/srat.d.ts +2 -0
- package/dist/experimental/common/srat.d.ts.map +1 -0
- package/dist/experimental/common/srat.js +8 -0
- package/dist/experimental/common/srat.js.map +1 -0
- package/dist/experimental/common/tsfnz.d.ts +2 -0
- package/dist/experimental/common/tsfnz.d.ts.map +1 -0
- package/dist/experimental/common/tsfnz.js +12 -0
- package/dist/experimental/common/tsfnz.js.map +1 -0
- package/dist/experimental/common/vincenty.d.ts +29 -0
- package/dist/experimental/common/vincenty.d.ts.map +1 -0
- package/dist/experimental/common/vincenty.js +134 -0
- package/dist/experimental/common/vincenty.js.map +1 -0
- package/dist/experimental/core.cjs +2868 -0
- package/dist/experimental/core.cjs.map +6 -0
- package/dist/experimental/core.d.ts +13 -0
- package/dist/experimental/core.d.ts.map +1 -0
- package/dist/experimental/core.js +9 -0
- package/dist/experimental/core.js.map +1 -0
- package/dist/experimental/crs/datum-table.d.ts +8 -0
- package/dist/experimental/crs/datum-table.d.ts.map +1 -0
- package/dist/experimental/crs/datum-table.js +1365 -0
- package/dist/experimental/crs/datum-table.js.map +1 -0
- package/dist/experimental/crs/ellipsoid-table.d.ts +8 -0
- package/dist/experimental/crs/ellipsoid-table.d.ts.map +1 -0
- package/dist/experimental/crs/ellipsoid-table.js +229 -0
- package/dist/experimental/crs/ellipsoid-table.js.map +1 -0
- package/dist/experimental/crs/normalize.d.ts +8 -0
- package/dist/experimental/crs/normalize.d.ts.map +1 -0
- package/dist/experimental/crs/normalize.js +277 -0
- package/dist/experimental/crs/normalize.js.map +1 -0
- package/dist/experimental/crs/primemeridian-table.d.ts +3 -0
- package/dist/experimental/crs/primemeridian-table.d.ts.map +1 -0
- package/dist/experimental/crs/primemeridian-table.js +20 -0
- package/dist/experimental/crs/primemeridian-table.js.map +1 -0
- package/dist/experimental/crs/projjson.cjs +1847 -0
- package/dist/experimental/crs/projjson.cjs.map +6 -0
- package/dist/experimental/crs/projjson.d.ts +4 -0
- package/dist/experimental/crs/projjson.d.ts.map +1 -0
- package/dist/experimental/crs/projjson.js +12 -0
- package/dist/experimental/crs/projjson.js.map +1 -0
- package/dist/experimental/crs/spatial-reference.d.ts +11 -0
- package/dist/experimental/crs/spatial-reference.d.ts.map +1 -0
- package/dist/experimental/crs/spatial-reference.js +91 -0
- package/dist/experimental/crs/spatial-reference.js.map +1 -0
- package/dist/experimental/crs/structured.d.ts +8 -0
- package/dist/experimental/crs/structured.d.ts.map +1 -0
- package/dist/experimental/crs/structured.js +481 -0
- package/dist/experimental/crs/structured.js.map +1 -0
- package/dist/experimental/crs/types.d.ts +58 -0
- package/dist/experimental/crs/types.d.ts.map +1 -0
- package/dist/experimental/crs/types.js +21 -0
- package/dist/experimental/crs/types.js.map +1 -0
- package/dist/experimental/crs/units-table.d.ts +64 -0
- package/dist/experimental/crs/units-table.d.ts.map +1 -0
- package/dist/experimental/crs/units-table.js +27 -0
- package/dist/experimental/crs/units-table.js.map +1 -0
- package/dist/experimental/crs/wkt.cjs +2507 -0
- package/dist/experimental/crs/wkt.cjs.map +6 -0
- package/dist/experimental/crs/wkt.d.ts +3 -0
- package/dist/experimental/crs/wkt.d.ts.map +1 -0
- package/dist/experimental/crs/wkt.js +181 -0
- package/dist/experimental/crs/wkt.js.map +1 -0
- package/dist/experimental/datum.d.ts +17 -0
- package/dist/experimental/datum.d.ts.map +1 -0
- package/dist/experimental/datum.js +160 -0
- package/dist/experimental/datum.js.map +1 -0
- package/dist/experimental/deformation.d.ts +25 -0
- package/dist/experimental/deformation.d.ts.map +1 -0
- package/dist/experimental/deformation.js +98 -0
- package/dist/experimental/deformation.js.map +1 -0
- package/dist/experimental/entries/projections/aea.cjs +367 -0
- package/dist/experimental/entries/projections/aea.cjs.map +6 -0
- package/dist/experimental/entries/projections/aea.d.ts +2 -0
- package/dist/experimental/entries/projections/aea.d.ts.map +1 -0
- package/dist/experimental/entries/projections/aea.js +5 -0
- package/dist/experimental/entries/projections/aea.js.map +1 -0
- package/dist/experimental/entries/projections/aeqd.cjs +461 -0
- package/dist/experimental/entries/projections/aeqd.cjs.map +6 -0
- package/dist/experimental/entries/projections/aeqd.d.ts +2 -0
- package/dist/experimental/entries/projections/aeqd.d.ts.map +1 -0
- package/dist/experimental/entries/projections/aeqd.js +5 -0
- package/dist/experimental/entries/projections/aeqd.js.map +1 -0
- package/dist/experimental/entries/projections/bonne.cjs +359 -0
- package/dist/experimental/entries/projections/bonne.cjs.map +6 -0
- package/dist/experimental/entries/projections/bonne.d.ts +2 -0
- package/dist/experimental/entries/projections/bonne.d.ts.map +1 -0
- package/dist/experimental/entries/projections/bonne.js +5 -0
- package/dist/experimental/entries/projections/bonne.js.map +1 -0
- package/dist/experimental/entries/projections/cass.cjs +347 -0
- package/dist/experimental/entries/projections/cass.cjs.map +6 -0
- package/dist/experimental/entries/projections/cass.d.ts +2 -0
- package/dist/experimental/entries/projections/cass.d.ts.map +1 -0
- package/dist/experimental/entries/projections/cass.js +5 -0
- package/dist/experimental/entries/projections/cass.js.map +1 -0
- package/dist/experimental/entries/projections/cea.cjs +283 -0
- package/dist/experimental/entries/projections/cea.cjs.map +6 -0
- package/dist/experimental/entries/projections/cea.d.ts +2 -0
- package/dist/experimental/entries/projections/cea.d.ts.map +1 -0
- package/dist/experimental/entries/projections/cea.js +5 -0
- package/dist/experimental/entries/projections/cea.js.map +1 -0
- package/dist/experimental/entries/projections/eck6.cjs +306 -0
- package/dist/experimental/entries/projections/eck6.cjs.map +6 -0
- package/dist/experimental/entries/projections/eck6.d.ts +2 -0
- package/dist/experimental/entries/projections/eck6.d.ts.map +1 -0
- package/dist/experimental/entries/projections/eck6.js +5 -0
- package/dist/experimental/entries/projections/eck6.js.map +1 -0
- package/dist/experimental/entries/projections/eqc.cjs +119 -0
- package/dist/experimental/entries/projections/eqc.cjs.map +6 -0
- package/dist/experimental/entries/projections/eqc.d.ts +2 -0
- package/dist/experimental/entries/projections/eqc.d.ts.map +1 -0
- package/dist/experimental/entries/projections/eqc.js +5 -0
- package/dist/experimental/entries/projections/eqc.js.map +1 -0
- package/dist/experimental/entries/projections/eqdc.cjs +377 -0
- package/dist/experimental/entries/projections/eqdc.cjs.map +6 -0
- package/dist/experimental/entries/projections/eqdc.d.ts +2 -0
- package/dist/experimental/entries/projections/eqdc.d.ts.map +1 -0
- package/dist/experimental/entries/projections/eqdc.js +5 -0
- package/dist/experimental/entries/projections/eqdc.js.map +1 -0
- package/dist/experimental/entries/projections/eqearth.cjs +292 -0
- package/dist/experimental/entries/projections/eqearth.cjs.map +6 -0
- package/dist/experimental/entries/projections/eqearth.d.ts +2 -0
- package/dist/experimental/entries/projections/eqearth.d.ts.map +1 -0
- package/dist/experimental/entries/projections/eqearth.js +5 -0
- package/dist/experimental/entries/projections/eqearth.js.map +1 -0
- package/dist/experimental/entries/projections/equi.cjs +222 -0
- package/dist/experimental/entries/projections/equi.cjs.map +6 -0
- package/dist/experimental/entries/projections/equi.d.ts +2 -0
- package/dist/experimental/entries/projections/equi.d.ts.map +1 -0
- package/dist/experimental/entries/projections/equi.js +5 -0
- package/dist/experimental/entries/projections/equi.js.map +1 -0
- package/dist/experimental/entries/projections/etmerc.cjs +618 -0
- package/dist/experimental/entries/projections/etmerc.cjs.map +6 -0
- package/dist/experimental/entries/projections/etmerc.d.ts +2 -0
- package/dist/experimental/entries/projections/etmerc.d.ts.map +1 -0
- package/dist/experimental/entries/projections/etmerc.js +5 -0
- package/dist/experimental/entries/projections/etmerc.js.map +1 -0
- package/dist/experimental/entries/projections/geocent.cjs +161 -0
- package/dist/experimental/entries/projections/geocent.cjs.map +6 -0
- package/dist/experimental/entries/projections/geocent.d.ts +2 -0
- package/dist/experimental/entries/projections/geocent.d.ts.map +1 -0
- package/dist/experimental/entries/projections/geocent.js +5 -0
- package/dist/experimental/entries/projections/geocent.js.map +1 -0
- package/dist/experimental/entries/projections/geos.cjs +328 -0
- package/dist/experimental/entries/projections/geos.cjs.map +6 -0
- package/dist/experimental/entries/projections/geos.d.ts +2 -0
- package/dist/experimental/entries/projections/geos.d.ts.map +1 -0
- package/dist/experimental/entries/projections/geos.js +5 -0
- package/dist/experimental/entries/projections/geos.js.map +1 -0
- package/dist/experimental/entries/projections/gnom.cjs +274 -0
- package/dist/experimental/entries/projections/gnom.cjs.map +6 -0
- package/dist/experimental/entries/projections/gnom.d.ts +2 -0
- package/dist/experimental/entries/projections/gnom.d.ts.map +1 -0
- package/dist/experimental/entries/projections/gnom.js +5 -0
- package/dist/experimental/entries/projections/gnom.js.map +1 -0
- package/dist/experimental/entries/projections/gstmerc.cjs +266 -0
- package/dist/experimental/entries/projections/gstmerc.cjs.map +6 -0
- package/dist/experimental/entries/projections/gstmerc.d.ts +2 -0
- package/dist/experimental/entries/projections/gstmerc.d.ts.map +1 -0
- package/dist/experimental/entries/projections/gstmerc.js +5 -0
- package/dist/experimental/entries/projections/gstmerc.js.map +1 -0
- package/dist/experimental/entries/projections/krovak.cjs +301 -0
- package/dist/experimental/entries/projections/krovak.cjs.map +6 -0
- package/dist/experimental/entries/projections/krovak.d.ts +2 -0
- package/dist/experimental/entries/projections/krovak.d.ts.map +1 -0
- package/dist/experimental/entries/projections/krovak.js +5 -0
- package/dist/experimental/entries/projections/krovak.js.map +1 -0
- package/dist/experimental/entries/projections/laea.cjs +477 -0
- package/dist/experimental/entries/projections/laea.cjs.map +6 -0
- package/dist/experimental/entries/projections/laea.d.ts +2 -0
- package/dist/experimental/entries/projections/laea.d.ts.map +1 -0
- package/dist/experimental/entries/projections/laea.js +5 -0
- package/dist/experimental/entries/projections/laea.js.map +1 -0
- package/dist/experimental/entries/projections/lcc.cjs +368 -0
- package/dist/experimental/entries/projections/lcc.cjs.map +6 -0
- package/dist/experimental/entries/projections/lcc.d.ts +2 -0
- package/dist/experimental/entries/projections/lcc.d.ts.map +1 -0
- package/dist/experimental/entries/projections/lcc.js +5 -0
- package/dist/experimental/entries/projections/lcc.js.map +1 -0
- package/dist/experimental/entries/projections/merc.cjs +201 -0
- package/dist/experimental/entries/projections/merc.cjs.map +6 -0
- package/dist/experimental/entries/projections/merc.d.ts +2 -0
- package/dist/experimental/entries/projections/merc.d.ts.map +1 -0
- package/dist/experimental/entries/projections/merc.js +5 -0
- package/dist/experimental/entries/projections/merc.js.map +1 -0
- package/dist/experimental/entries/projections/mill.cjs +217 -0
- package/dist/experimental/entries/projections/mill.cjs.map +6 -0
- package/dist/experimental/entries/projections/mill.d.ts +2 -0
- package/dist/experimental/entries/projections/mill.d.ts.map +1 -0
- package/dist/experimental/entries/projections/mill.js +5 -0
- package/dist/experimental/entries/projections/mill.js.map +1 -0
- package/dist/experimental/entries/projections/moll.cjs +257 -0
- package/dist/experimental/entries/projections/moll.cjs.map +6 -0
- package/dist/experimental/entries/projections/moll.d.ts +2 -0
- package/dist/experimental/entries/projections/moll.d.ts.map +1 -0
- package/dist/experimental/entries/projections/moll.js +5 -0
- package/dist/experimental/entries/projections/moll.js.map +1 -0
- package/dist/experimental/entries/projections/nzmg.cjs +346 -0
- package/dist/experimental/entries/projections/nzmg.cjs.map +6 -0
- package/dist/experimental/entries/projections/nzmg.d.ts +2 -0
- package/dist/experimental/entries/projections/nzmg.d.ts.map +1 -0
- package/dist/experimental/entries/projections/nzmg.js +5 -0
- package/dist/experimental/entries/projections/nzmg.js.map +1 -0
- package/dist/experimental/entries/projections/ob_tran.cjs +233 -0
- package/dist/experimental/entries/projections/ob_tran.cjs.map +6 -0
- package/dist/experimental/entries/projections/ob_tran.d.ts +2 -0
- package/dist/experimental/entries/projections/ob_tran.d.ts.map +1 -0
- package/dist/experimental/entries/projections/ob_tran.js +5 -0
- package/dist/experimental/entries/projections/ob_tran.js.map +1 -0
- package/dist/experimental/entries/projections/omerc.cjs +479 -0
- package/dist/experimental/entries/projections/omerc.cjs.map +6 -0
- package/dist/experimental/entries/projections/omerc.d.ts +2 -0
- package/dist/experimental/entries/projections/omerc.d.ts.map +1 -0
- package/dist/experimental/entries/projections/omerc.js +5 -0
- package/dist/experimental/entries/projections/omerc.js.map +1 -0
- package/dist/experimental/entries/projections/ortho.cjs +276 -0
- package/dist/experimental/entries/projections/ortho.cjs.map +6 -0
- package/dist/experimental/entries/projections/ortho.d.ts +2 -0
- package/dist/experimental/entries/projections/ortho.d.ts.map +1 -0
- package/dist/experimental/entries/projections/ortho.js +5 -0
- package/dist/experimental/entries/projections/ortho.js.map +1 -0
- package/dist/experimental/entries/projections/poly.cjs +326 -0
- package/dist/experimental/entries/projections/poly.cjs.map +6 -0
- package/dist/experimental/entries/projections/poly.d.ts +2 -0
- package/dist/experimental/entries/projections/poly.d.ts.map +1 -0
- package/dist/experimental/entries/projections/poly.js +5 -0
- package/dist/experimental/entries/projections/poly.js.map +1 -0
- package/dist/experimental/entries/projections/qsc.cjs +455 -0
- package/dist/experimental/entries/projections/qsc.cjs.map +6 -0
- package/dist/experimental/entries/projections/qsc.d.ts +2 -0
- package/dist/experimental/entries/projections/qsc.d.ts.map +1 -0
- package/dist/experimental/entries/projections/qsc.js +5 -0
- package/dist/experimental/entries/projections/qsc.js.map +1 -0
- package/dist/experimental/entries/projections/robin.cjs +331 -0
- package/dist/experimental/entries/projections/robin.cjs.map +6 -0
- package/dist/experimental/entries/projections/robin.d.ts +2 -0
- package/dist/experimental/entries/projections/robin.d.ts.map +1 -0
- package/dist/experimental/entries/projections/robin.js +5 -0
- package/dist/experimental/entries/projections/robin.js.map +1 -0
- package/dist/experimental/entries/projections/sinu.cjs +330 -0
- package/dist/experimental/entries/projections/sinu.cjs.map +6 -0
- package/dist/experimental/entries/projections/sinu.d.ts +2 -0
- package/dist/experimental/entries/projections/sinu.d.ts.map +1 -0
- package/dist/experimental/entries/projections/sinu.js +5 -0
- package/dist/experimental/entries/projections/sinu.js.map +1 -0
- package/dist/experimental/entries/projections/somerc.cjs +228 -0
- package/dist/experimental/entries/projections/somerc.cjs.map +6 -0
- package/dist/experimental/entries/projections/somerc.d.ts +2 -0
- package/dist/experimental/entries/projections/somerc.d.ts.map +1 -0
- package/dist/experimental/entries/projections/somerc.js +5 -0
- package/dist/experimental/entries/projections/somerc.js.map +1 -0
- package/dist/experimental/entries/projections/stere.cjs +379 -0
- package/dist/experimental/entries/projections/stere.cjs.map +6 -0
- package/dist/experimental/entries/projections/stere.d.ts +2 -0
- package/dist/experimental/entries/projections/stere.d.ts.map +1 -0
- package/dist/experimental/entries/projections/stere.js +5 -0
- package/dist/experimental/entries/projections/stere.js.map +1 -0
- package/dist/experimental/entries/projections/sterea.cjs +328 -0
- package/dist/experimental/entries/projections/sterea.cjs.map +6 -0
- package/dist/experimental/entries/projections/sterea.d.ts +2 -0
- package/dist/experimental/entries/projections/sterea.d.ts.map +1 -0
- package/dist/experimental/entries/projections/sterea.js +5 -0
- package/dist/experimental/entries/projections/sterea.js.map +1 -0
- package/dist/experimental/entries/projections/tmerc.cjs +618 -0
- package/dist/experimental/entries/projections/tmerc.cjs.map +6 -0
- package/dist/experimental/entries/projections/tmerc.d.ts +2 -0
- package/dist/experimental/entries/projections/tmerc.d.ts.map +1 -0
- package/dist/experimental/entries/projections/tmerc.js +5 -0
- package/dist/experimental/entries/projections/tmerc.js.map +1 -0
- package/dist/experimental/entries/projections/tpers.cjs +340 -0
- package/dist/experimental/entries/projections/tpers.cjs.map +6 -0
- package/dist/experimental/entries/projections/tpers.d.ts +2 -0
- package/dist/experimental/entries/projections/tpers.d.ts.map +1 -0
- package/dist/experimental/entries/projections/tpers.js +5 -0
- package/dist/experimental/entries/projections/tpers.js.map +1 -0
- package/dist/experimental/entries/projections/utm.cjs +644 -0
- package/dist/experimental/entries/projections/utm.cjs.map +6 -0
- package/dist/experimental/entries/projections/utm.d.ts +2 -0
- package/dist/experimental/entries/projections/utm.d.ts.map +1 -0
- package/dist/experimental/entries/projections/utm.js +5 -0
- package/dist/experimental/entries/projections/utm.js.map +1 -0
- package/dist/experimental/entries/projections/vandg.cjs +301 -0
- package/dist/experimental/entries/projections/vandg.cjs.map +6 -0
- package/dist/experimental/entries/projections/vandg.d.ts +2 -0
- package/dist/experimental/entries/projections/vandg.d.ts.map +1 -0
- package/dist/experimental/entries/projections/vandg.js +5 -0
- package/dist/experimental/entries/projections/vandg.js.map +1 -0
- package/dist/experimental/exact-helmert.d.ts +9 -0
- package/dist/experimental/exact-helmert.d.ts.map +1 -0
- package/dist/experimental/exact-helmert.js +32 -0
- package/dist/experimental/exact-helmert.js.map +1 -0
- package/dist/experimental/flat-projection.d.ts +13 -0
- package/dist/experimental/flat-projection.d.ts.map +1 -0
- package/dist/experimental/flat-projection.js +61 -0
- package/dist/experimental/flat-projection.js.map +1 -0
- package/dist/experimental/grids/geotiff.cjs +180 -0
- package/dist/experimental/grids/geotiff.cjs.map +6 -0
- package/dist/experimental/grids/geotiff.d.ts +23 -0
- package/dist/experimental/grids/geotiff.d.ts.map +1 -0
- package/dist/experimental/grids/geotiff.js +59 -0
- package/dist/experimental/grids/geotiff.js.map +1 -0
- package/dist/experimental/grids/grid.d.ts +4 -0
- package/dist/experimental/grids/grid.d.ts.map +1 -0
- package/dist/experimental/grids/grid.js +111 -0
- package/dist/experimental/grids/grid.js.map +1 -0
- package/dist/experimental/grids/gtx.cjs +91 -0
- package/dist/experimental/grids/gtx.cjs.map +6 -0
- package/dist/experimental/grids/gtx.d.ts +7 -0
- package/dist/experimental/grids/gtx.d.ts.map +1 -0
- package/dist/experimental/grids/gtx.js +30 -0
- package/dist/experimental/grids/gtx.js.map +1 -0
- package/dist/experimental/grids/ntv2.cjs +181 -0
- package/dist/experimental/grids/ntv2.cjs.map +6 -0
- package/dist/experimental/grids/ntv2.d.ts +8 -0
- package/dist/experimental/grids/ntv2.d.ts.map +1 -0
- package/dist/experimental/grids/ntv2.js +56 -0
- package/dist/experimental/grids/ntv2.js.map +1 -0
- package/dist/experimental/grids/scalar-geotiff.d.ts +58 -0
- package/dist/experimental/grids/scalar-geotiff.d.ts.map +1 -0
- package/dist/experimental/grids/scalar-geotiff.js +147 -0
- package/dist/experimental/grids/scalar-geotiff.js.map +1 -0
- package/dist/experimental/grids/types.d.ts +35 -0
- package/dist/experimental/grids/types.d.ts.map +1 -0
- package/dist/experimental/grids/types.js +2 -0
- package/dist/experimental/grids/types.js.map +1 -0
- package/dist/experimental/grids/velocity-geotiff.cjs +247 -0
- package/dist/experimental/grids/velocity-geotiff.cjs.map +6 -0
- package/dist/experimental/grids/velocity-geotiff.d.ts +11 -0
- package/dist/experimental/grids/velocity-geotiff.d.ts.map +1 -0
- package/dist/experimental/grids/velocity-geotiff.js +61 -0
- package/dist/experimental/grids/velocity-geotiff.js.map +1 -0
- package/dist/experimental/grids/velocity.d.ts +21 -0
- package/dist/experimental/grids/velocity.d.ts.map +1 -0
- package/dist/experimental/grids/velocity.js +29 -0
- package/dist/experimental/grids/velocity.js.map +1 -0
- package/dist/experimental/grids/vertical-geotiff.cjs +195 -0
- package/dist/experimental/grids/vertical-geotiff.cjs.map +6 -0
- package/dist/experimental/grids/vertical-geotiff.d.ts +6 -0
- package/dist/experimental/grids/vertical-geotiff.d.ts.map +1 -0
- package/dist/experimental/grids/vertical-geotiff.js +20 -0
- package/dist/experimental/grids/vertical-geotiff.js.map +1 -0
- package/dist/experimental/grids/vertical.cjs +80 -0
- package/dist/experimental/grids/vertical.cjs.map +6 -0
- package/dist/experimental/grids/vertical.d.ts +22 -0
- package/dist/experimental/grids/vertical.d.ts.map +1 -0
- package/dist/experimental/grids/vertical.js +73 -0
- package/dist/experimental/grids/vertical.js.map +1 -0
- package/dist/experimental/helmert-flat.d.ts +4 -0
- package/dist/experimental/helmert-flat.d.ts.map +1 -0
- package/dist/experimental/helmert-flat.js +53 -0
- package/dist/experimental/helmert-flat.js.map +1 -0
- package/dist/experimental/index.cjs +10062 -0
- package/dist/experimental/index.cjs.map +6 -0
- package/dist/experimental/index.d.ts +49 -0
- package/dist/experimental/index.d.ts.map +1 -0
- package/dist/experimental/index.js +48 -0
- package/dist/experimental/index.js.map +1 -0
- package/dist/experimental/kernel.d.ts +36 -0
- package/dist/experimental/kernel.d.ts.map +1 -0
- package/dist/experimental/kernel.js +80 -0
- package/dist/experimental/kernel.js.map +1 -0
- package/dist/experimental/kernels/aea.d.ts +25 -0
- package/dist/experimental/kernels/aea.d.ts.map +1 -0
- package/dist/experimental/kernels/aea.js +136 -0
- package/dist/experimental/kernels/aea.js.map +1 -0
- package/dist/experimental/kernels/aeqd.d.ts +10 -0
- package/dist/experimental/kernels/aeqd.d.ts.map +1 -0
- package/dist/experimental/kernels/aeqd.js +176 -0
- package/dist/experimental/kernels/aeqd.js.map +1 -0
- package/dist/experimental/kernels/bonne.d.ts +12 -0
- package/dist/experimental/kernels/bonne.d.ts.map +1 -0
- package/dist/experimental/kernels/bonne.js +128 -0
- package/dist/experimental/kernels/bonne.js.map +1 -0
- package/dist/experimental/kernels/cass.d.ts +10 -0
- package/dist/experimental/kernels/cass.d.ts.map +1 -0
- package/dist/experimental/kernels/cass.js +122 -0
- package/dist/experimental/kernels/cass.js.map +1 -0
- package/dist/experimental/kernels/cea.d.ts +6 -0
- package/dist/experimental/kernels/cea.d.ts.map +1 -0
- package/dist/experimental/kernels/cea.js +63 -0
- package/dist/experimental/kernels/cea.js.map +1 -0
- package/dist/experimental/kernels/eck6.d.ts +13 -0
- package/dist/experimental/kernels/eck6.d.ts.map +1 -0
- package/dist/experimental/kernels/eck6.js +23 -0
- package/dist/experimental/kernels/eck6.js.map +1 -0
- package/dist/experimental/kernels/eqdc.d.ts +19 -0
- package/dist/experimental/kernels/eqdc.d.ts.map +1 -0
- package/dist/experimental/kernels/eqdc.js +117 -0
- package/dist/experimental/kernels/eqdc.js.map +1 -0
- package/dist/experimental/kernels/eqearth.d.ts +10 -0
- package/dist/experimental/kernels/eqearth.d.ts.map +1 -0
- package/dist/experimental/kernels/eqearth.js +103 -0
- package/dist/experimental/kernels/eqearth.js.map +1 -0
- package/dist/experimental/kernels/equi.d.ts +9 -0
- package/dist/experimental/kernels/equi.d.ts.map +1 -0
- package/dist/experimental/kernels/equi.js +41 -0
- package/dist/experimental/kernels/equi.js.map +1 -0
- package/dist/experimental/kernels/etmerc.d.ts +13 -0
- package/dist/experimental/kernels/etmerc.d.ts.map +1 -0
- package/dist/experimental/kernels/etmerc.js +145 -0
- package/dist/experimental/kernels/etmerc.js.map +1 -0
- package/dist/experimental/kernels/gauss.d.ts +12 -0
- package/dist/experimental/kernels/gauss.d.ts.map +1 -0
- package/dist/experimental/kernels/gauss.js +64 -0
- package/dist/experimental/kernels/gauss.js.map +1 -0
- package/dist/experimental/kernels/geos.d.ts +17 -0
- package/dist/experimental/kernels/geos.d.ts.map +1 -0
- package/dist/experimental/kernels/geos.js +153 -0
- package/dist/experimental/kernels/geos.js.map +1 -0
- package/dist/experimental/kernels/gnom.d.ts +12 -0
- package/dist/experimental/kernels/gnom.d.ts.map +1 -0
- package/dist/experimental/kernels/gnom.js +95 -0
- package/dist/experimental/kernels/gnom.js.map +1 -0
- package/dist/experimental/kernels/gstmerc.d.ts +13 -0
- package/dist/experimental/kernels/gstmerc.d.ts.map +1 -0
- package/dist/experimental/kernels/gstmerc.js +57 -0
- package/dist/experimental/kernels/gstmerc.js.map +1 -0
- package/dist/experimental/kernels/krovak.d.ts +23 -0
- package/dist/experimental/kernels/krovak.d.ts.map +1 -0
- package/dist/experimental/kernels/krovak.js +128 -0
- package/dist/experimental/kernels/krovak.js.map +1 -0
- package/dist/experimental/kernels/laea.d.ts +23 -0
- package/dist/experimental/kernels/laea.d.ts.map +1 -0
- package/dist/experimental/kernels/laea.js +278 -0
- package/dist/experimental/kernels/laea.js.map +1 -0
- package/dist/experimental/kernels/lcc.d.ts +10 -0
- package/dist/experimental/kernels/lcc.d.ts.map +1 -0
- package/dist/experimental/kernels/lcc.js +131 -0
- package/dist/experimental/kernels/lcc.js.map +1 -0
- package/dist/experimental/kernels/mill.d.ts +6 -0
- package/dist/experimental/kernels/mill.d.ts.map +1 -0
- package/dist/experimental/kernels/mill.js +49 -0
- package/dist/experimental/kernels/mill.js.map +1 -0
- package/dist/experimental/kernels/moll.d.ts +6 -0
- package/dist/experimental/kernels/moll.d.ts.map +1 -0
- package/dist/experimental/kernels/moll.js +89 -0
- package/dist/experimental/kernels/moll.js.map +1 -0
- package/dist/experimental/kernels/nzmg.d.ts +28 -0
- package/dist/experimental/kernels/nzmg.d.ts.map +1 -0
- package/dist/experimental/kernels/nzmg.js +209 -0
- package/dist/experimental/kernels/nzmg.js.map +1 -0
- package/dist/experimental/kernels/omerc.d.ts +30 -0
- package/dist/experimental/kernels/omerc.d.ts.map +1 -0
- package/dist/experimental/kernels/omerc.js +260 -0
- package/dist/experimental/kernels/omerc.js.map +1 -0
- package/dist/experimental/kernels/ortho.d.ts +9 -0
- package/dist/experimental/kernels/ortho.d.ts.map +1 -0
- package/dist/experimental/kernels/ortho.js +91 -0
- package/dist/experimental/kernels/ortho.js.map +1 -0
- package/dist/experimental/kernels/poly.d.ts +13 -0
- package/dist/experimental/kernels/poly.d.ts.map +1 -0
- package/dist/experimental/kernels/poly.js +141 -0
- package/dist/experimental/kernels/poly.js.map +1 -0
- package/dist/experimental/kernels/qsc.d.ts +10 -0
- package/dist/experimental/kernels/qsc.d.ts.map +1 -0
- package/dist/experimental/kernels/qsc.js +379 -0
- package/dist/experimental/kernels/qsc.js.map +1 -0
- package/dist/experimental/kernels/robin.d.ts +6 -0
- package/dist/experimental/kernels/robin.d.ts.map +1 -0
- package/dist/experimental/kernels/robin.js +166 -0
- package/dist/experimental/kernels/robin.js.map +1 -0
- package/dist/experimental/kernels/sinu.d.ts +12 -0
- package/dist/experimental/kernels/sinu.d.ts.map +1 -0
- package/dist/experimental/kernels/sinu.js +104 -0
- package/dist/experimental/kernels/sinu.js.map +1 -0
- package/dist/experimental/kernels/somerc.d.ts +13 -0
- package/dist/experimental/kernels/somerc.d.ts.map +1 -0
- package/dist/experimental/kernels/somerc.js +81 -0
- package/dist/experimental/kernels/somerc.js.map +1 -0
- package/dist/experimental/kernels/stere.d.ts +15 -0
- package/dist/experimental/kernels/stere.d.ts.map +1 -0
- package/dist/experimental/kernels/stere.js +195 -0
- package/dist/experimental/kernels/stere.js.map +1 -0
- package/dist/experimental/kernels/sterea.d.ts +11 -0
- package/dist/experimental/kernels/sterea.d.ts.map +1 -0
- package/dist/experimental/kernels/sterea.js +65 -0
- package/dist/experimental/kernels/sterea.js.map +1 -0
- package/dist/experimental/kernels/tmerc.d.ts +9 -0
- package/dist/experimental/kernels/tmerc.d.ts.map +1 -0
- package/dist/experimental/kernels/tmerc.js +201 -0
- package/dist/experimental/kernels/tmerc.js.map +1 -0
- package/dist/experimental/kernels/tpers.d.ts +22 -0
- package/dist/experimental/kernels/tpers.d.ts.map +1 -0
- package/dist/experimental/kernels/tpers.js +156 -0
- package/dist/experimental/kernels/tpers.js.map +1 -0
- package/dist/experimental/kernels/vandg.d.ts +8 -0
- package/dist/experimental/kernels/vandg.d.ts.map +1 -0
- package/dist/experimental/kernels/vandg.js +132 -0
- package/dist/experimental/kernels/vandg.js.map +1 -0
- package/dist/experimental/kinematic-helmert-flat.d.ts +4 -0
- package/dist/experimental/kinematic-helmert-flat.d.ts.map +1 -0
- package/dist/experimental/kinematic-helmert-flat.js +60 -0
- package/dist/experimental/kinematic-helmert-flat.js.map +1 -0
- package/dist/experimental/kinematic-helmert.d.ts +11 -0
- package/dist/experimental/kinematic-helmert.d.ts.map +1 -0
- package/dist/experimental/kinematic-helmert.js +103 -0
- package/dist/experimental/kinematic-helmert.js.map +1 -0
- package/dist/experimental/lazy-projection.d.ts +11 -0
- package/dist/experimental/lazy-projection.d.ts.map +1 -0
- package/dist/experimental/lazy-projection.js +138 -0
- package/dist/experimental/lazy-projection.js.map +1 -0
- package/dist/experimental/lazy-projections/aea.cjs +79 -0
- package/dist/experimental/lazy-projections/aea.cjs.map +6 -0
- package/dist/experimental/lazy-projections/aea.d.ts +3 -0
- package/dist/experimental/lazy-projections/aea.d.ts.map +1 -0
- package/dist/experimental/lazy-projections/aea.js +7 -0
- package/dist/experimental/lazy-projections/aea.js.map +1 -0
- package/dist/experimental/lazy-projections/aeqd.cjs +79 -0
- package/dist/experimental/lazy-projections/aeqd.cjs.map +6 -0
- package/dist/experimental/lazy-projections/aeqd.d.ts +3 -0
- package/dist/experimental/lazy-projections/aeqd.d.ts.map +1 -0
- package/dist/experimental/lazy-projections/aeqd.js +8 -0
- package/dist/experimental/lazy-projections/aeqd.js.map +1 -0
- package/dist/experimental/lazy-projections/bonne.cjs +79 -0
- package/dist/experimental/lazy-projections/bonne.cjs.map +6 -0
- package/dist/experimental/lazy-projections/bonne.d.ts +3 -0
- package/dist/experimental/lazy-projections/bonne.d.ts.map +1 -0
- package/dist/experimental/lazy-projections/bonne.js +7 -0
- package/dist/experimental/lazy-projections/bonne.js.map +1 -0
- package/dist/experimental/lazy-projections/cass.cjs +79 -0
- package/dist/experimental/lazy-projections/cass.cjs.map +6 -0
- package/dist/experimental/lazy-projections/cass.d.ts +3 -0
- package/dist/experimental/lazy-projections/cass.d.ts.map +1 -0
- package/dist/experimental/lazy-projections/cass.js +7 -0
- package/dist/experimental/lazy-projections/cass.js.map +1 -0
- package/dist/experimental/lazy-projections/cea.cjs +79 -0
- package/dist/experimental/lazy-projections/cea.cjs.map +6 -0
- package/dist/experimental/lazy-projections/cea.d.ts +3 -0
- package/dist/experimental/lazy-projections/cea.d.ts.map +1 -0
- package/dist/experimental/lazy-projections/cea.js +8 -0
- package/dist/experimental/lazy-projections/cea.js.map +1 -0
- package/dist/experimental/lazy-projections/eck6.cjs +79 -0
- package/dist/experimental/lazy-projections/eck6.cjs.map +6 -0
- package/dist/experimental/lazy-projections/eck6.d.ts +3 -0
- package/dist/experimental/lazy-projections/eck6.d.ts.map +1 -0
- package/dist/experimental/lazy-projections/eck6.js +7 -0
- package/dist/experimental/lazy-projections/eck6.js.map +1 -0
- package/dist/experimental/lazy-projections/eqc.cjs +82 -0
- package/dist/experimental/lazy-projections/eqc.cjs.map +6 -0
- package/dist/experimental/lazy-projections/eqc.d.ts +3 -0
- package/dist/experimental/lazy-projections/eqc.d.ts.map +1 -0
- package/dist/experimental/lazy-projections/eqc.js +11 -0
- package/dist/experimental/lazy-projections/eqc.js.map +1 -0
- package/dist/experimental/lazy-projections/eqdc.cjs +79 -0
- package/dist/experimental/lazy-projections/eqdc.cjs.map +6 -0
- package/dist/experimental/lazy-projections/eqdc.d.ts +3 -0
- package/dist/experimental/lazy-projections/eqdc.d.ts.map +1 -0
- package/dist/experimental/lazy-projections/eqdc.js +8 -0
- package/dist/experimental/lazy-projections/eqdc.js.map +1 -0
- package/dist/experimental/lazy-projections/eqearth.cjs +79 -0
- package/dist/experimental/lazy-projections/eqearth.cjs.map +6 -0
- package/dist/experimental/lazy-projections/eqearth.d.ts +3 -0
- package/dist/experimental/lazy-projections/eqearth.d.ts.map +1 -0
- package/dist/experimental/lazy-projections/eqearth.js +7 -0
- package/dist/experimental/lazy-projections/eqearth.js.map +1 -0
- package/dist/experimental/lazy-projections/equi.cjs +79 -0
- package/dist/experimental/lazy-projections/equi.cjs.map +6 -0
- package/dist/experimental/lazy-projections/equi.d.ts +3 -0
- package/dist/experimental/lazy-projections/equi.d.ts.map +1 -0
- package/dist/experimental/lazy-projections/equi.js +7 -0
- package/dist/experimental/lazy-projections/equi.js.map +1 -0
- package/dist/experimental/lazy-projections/etmerc.cjs +79 -0
- package/dist/experimental/lazy-projections/etmerc.cjs.map +6 -0
- package/dist/experimental/lazy-projections/etmerc.d.ts +3 -0
- package/dist/experimental/lazy-projections/etmerc.d.ts.map +1 -0
- package/dist/experimental/lazy-projections/etmerc.js +8 -0
- package/dist/experimental/lazy-projections/etmerc.js.map +1 -0
- package/dist/experimental/lazy-projections/geocent.cjs +79 -0
- package/dist/experimental/lazy-projections/geocent.cjs.map +6 -0
- package/dist/experimental/lazy-projections/geocent.d.ts +3 -0
- package/dist/experimental/lazy-projections/geocent.d.ts.map +1 -0
- package/dist/experimental/lazy-projections/geocent.js +7 -0
- package/dist/experimental/lazy-projections/geocent.js.map +1 -0
- package/dist/experimental/lazy-projections/geos.cjs +79 -0
- package/dist/experimental/lazy-projections/geos.cjs.map +6 -0
- package/dist/experimental/lazy-projections/geos.d.ts +3 -0
- package/dist/experimental/lazy-projections/geos.d.ts.map +1 -0
- package/dist/experimental/lazy-projections/geos.js +7 -0
- package/dist/experimental/lazy-projections/geos.js.map +1 -0
- package/dist/experimental/lazy-projections/gnom.cjs +79 -0
- package/dist/experimental/lazy-projections/gnom.cjs.map +6 -0
- package/dist/experimental/lazy-projections/gnom.d.ts +3 -0
- package/dist/experimental/lazy-projections/gnom.d.ts.map +1 -0
- package/dist/experimental/lazy-projections/gnom.js +7 -0
- package/dist/experimental/lazy-projections/gnom.js.map +1 -0
- package/dist/experimental/lazy-projections/gstmerc.cjs +79 -0
- package/dist/experimental/lazy-projections/gstmerc.cjs.map +6 -0
- package/dist/experimental/lazy-projections/gstmerc.d.ts +3 -0
- package/dist/experimental/lazy-projections/gstmerc.d.ts.map +1 -0
- package/dist/experimental/lazy-projections/gstmerc.js +8 -0
- package/dist/experimental/lazy-projections/gstmerc.js.map +1 -0
- package/dist/experimental/lazy-projections/index.cjs +3177 -0
- package/dist/experimental/lazy-projections/index.cjs.map +6 -0
- package/dist/experimental/lazy-projections/index.d.ts +39 -0
- package/dist/experimental/lazy-projections/index.d.ts.map +1 -0
- package/dist/experimental/lazy-projections/index.js +41 -0
- package/dist/experimental/lazy-projections/index.js.map +1 -0
- package/dist/experimental/lazy-projections/krovak.cjs +87 -0
- package/dist/experimental/lazy-projections/krovak.cjs.map +6 -0
- package/dist/experimental/lazy-projections/krovak.d.ts +3 -0
- package/dist/experimental/lazy-projections/krovak.d.ts.map +1 -0
- package/dist/experimental/lazy-projections/krovak.js +15 -0
- package/dist/experimental/lazy-projections/krovak.js.map +1 -0
- package/dist/experimental/lazy-projections/laea.cjs +79 -0
- package/dist/experimental/lazy-projections/laea.cjs.map +6 -0
- package/dist/experimental/lazy-projections/laea.d.ts +3 -0
- package/dist/experimental/lazy-projections/laea.d.ts.map +1 -0
- package/dist/experimental/lazy-projections/laea.js +8 -0
- package/dist/experimental/lazy-projections/laea.js.map +1 -0
- package/dist/experimental/lazy-projections/lcc.cjs +89 -0
- package/dist/experimental/lazy-projections/lcc.cjs.map +6 -0
- package/dist/experimental/lazy-projections/lcc.d.ts +3 -0
- package/dist/experimental/lazy-projections/lcc.d.ts.map +1 -0
- package/dist/experimental/lazy-projections/lcc.js +18 -0
- package/dist/experimental/lazy-projections/lcc.js.map +1 -0
- package/dist/experimental/lazy-projections/merc.cjs +88 -0
- package/dist/experimental/lazy-projections/merc.cjs.map +6 -0
- package/dist/experimental/lazy-projections/merc.d.ts +3 -0
- package/dist/experimental/lazy-projections/merc.d.ts.map +1 -0
- package/dist/experimental/lazy-projections/merc.js +16 -0
- package/dist/experimental/lazy-projections/merc.js.map +1 -0
- package/dist/experimental/lazy-projections/mill.cjs +79 -0
- package/dist/experimental/lazy-projections/mill.cjs.map +6 -0
- package/dist/experimental/lazy-projections/mill.d.ts +3 -0
- package/dist/experimental/lazy-projections/mill.d.ts.map +1 -0
- package/dist/experimental/lazy-projections/mill.js +8 -0
- package/dist/experimental/lazy-projections/mill.js.map +1 -0
- package/dist/experimental/lazy-projections/moll.cjs +79 -0
- package/dist/experimental/lazy-projections/moll.cjs.map +6 -0
- package/dist/experimental/lazy-projections/moll.d.ts +3 -0
- package/dist/experimental/lazy-projections/moll.d.ts.map +1 -0
- package/dist/experimental/lazy-projections/moll.js +7 -0
- package/dist/experimental/lazy-projections/moll.js.map +1 -0
- package/dist/experimental/lazy-projections/nzmg.cjs +79 -0
- package/dist/experimental/lazy-projections/nzmg.cjs.map +6 -0
- package/dist/experimental/lazy-projections/nzmg.d.ts +3 -0
- package/dist/experimental/lazy-projections/nzmg.d.ts.map +1 -0
- package/dist/experimental/lazy-projections/nzmg.js +8 -0
- package/dist/experimental/lazy-projections/nzmg.js.map +1 -0
- package/dist/experimental/lazy-projections/ob_tran.cjs +90 -0
- package/dist/experimental/lazy-projections/ob_tran.cjs.map +6 -0
- package/dist/experimental/lazy-projections/ob_tran.d.ts +5 -0
- package/dist/experimental/lazy-projections/ob_tran.d.ts.map +1 -0
- package/dist/experimental/lazy-projections/ob_tran.js +18 -0
- package/dist/experimental/lazy-projections/ob_tran.js.map +1 -0
- package/dist/experimental/lazy-projections/omerc.cjs +91 -0
- package/dist/experimental/lazy-projections/omerc.cjs.map +6 -0
- package/dist/experimental/lazy-projections/omerc.d.ts +3 -0
- package/dist/experimental/lazy-projections/omerc.d.ts.map +1 -0
- package/dist/experimental/lazy-projections/omerc.js +19 -0
- package/dist/experimental/lazy-projections/omerc.js.map +1 -0
- package/dist/experimental/lazy-projections/ortho.cjs +79 -0
- package/dist/experimental/lazy-projections/ortho.cjs.map +6 -0
- package/dist/experimental/lazy-projections/ortho.d.ts +3 -0
- package/dist/experimental/lazy-projections/ortho.d.ts.map +1 -0
- package/dist/experimental/lazy-projections/ortho.js +7 -0
- package/dist/experimental/lazy-projections/ortho.js.map +1 -0
- package/dist/experimental/lazy-projections/poly.cjs +79 -0
- package/dist/experimental/lazy-projections/poly.cjs.map +6 -0
- package/dist/experimental/lazy-projections/poly.d.ts +3 -0
- package/dist/experimental/lazy-projections/poly.d.ts.map +1 -0
- package/dist/experimental/lazy-projections/poly.js +7 -0
- package/dist/experimental/lazy-projections/poly.js.map +1 -0
- package/dist/experimental/lazy-projections/qsc.cjs +82 -0
- package/dist/experimental/lazy-projections/qsc.cjs.map +6 -0
- package/dist/experimental/lazy-projections/qsc.d.ts +3 -0
- package/dist/experimental/lazy-projections/qsc.d.ts.map +1 -0
- package/dist/experimental/lazy-projections/qsc.js +11 -0
- package/dist/experimental/lazy-projections/qsc.js.map +1 -0
- package/dist/experimental/lazy-projections/robin.cjs +79 -0
- package/dist/experimental/lazy-projections/robin.cjs.map +6 -0
- package/dist/experimental/lazy-projections/robin.d.ts +3 -0
- package/dist/experimental/lazy-projections/robin.d.ts.map +1 -0
- package/dist/experimental/lazy-projections/robin.js +7 -0
- package/dist/experimental/lazy-projections/robin.js.map +1 -0
- package/dist/experimental/lazy-projections/sinu.cjs +79 -0
- package/dist/experimental/lazy-projections/sinu.cjs.map +6 -0
- package/dist/experimental/lazy-projections/sinu.d.ts +3 -0
- package/dist/experimental/lazy-projections/sinu.d.ts.map +1 -0
- package/dist/experimental/lazy-projections/sinu.js +7 -0
- package/dist/experimental/lazy-projections/sinu.js.map +1 -0
- package/dist/experimental/lazy-projections/somerc.cjs +79 -0
- package/dist/experimental/lazy-projections/somerc.cjs.map +6 -0
- package/dist/experimental/lazy-projections/somerc.d.ts +3 -0
- package/dist/experimental/lazy-projections/somerc.d.ts.map +1 -0
- package/dist/experimental/lazy-projections/somerc.js +8 -0
- package/dist/experimental/lazy-projections/somerc.js.map +1 -0
- package/dist/experimental/lazy-projections/stere.cjs +87 -0
- package/dist/experimental/lazy-projections/stere.cjs.map +6 -0
- package/dist/experimental/lazy-projections/stere.d.ts +3 -0
- package/dist/experimental/lazy-projections/stere.d.ts.map +1 -0
- package/dist/experimental/lazy-projections/stere.js +15 -0
- package/dist/experimental/lazy-projections/stere.js.map +1 -0
- package/dist/experimental/lazy-projections/sterea.cjs +87 -0
- package/dist/experimental/lazy-projections/sterea.cjs.map +6 -0
- package/dist/experimental/lazy-projections/sterea.d.ts +3 -0
- package/dist/experimental/lazy-projections/sterea.d.ts.map +1 -0
- package/dist/experimental/lazy-projections/sterea.js +16 -0
- package/dist/experimental/lazy-projections/sterea.js.map +1 -0
- package/dist/experimental/lazy-projections/tmerc.cjs +89 -0
- package/dist/experimental/lazy-projections/tmerc.cjs.map +6 -0
- package/dist/experimental/lazy-projections/tmerc.d.ts +3 -0
- package/dist/experimental/lazy-projections/tmerc.d.ts.map +1 -0
- package/dist/experimental/lazy-projections/tmerc.js +18 -0
- package/dist/experimental/lazy-projections/tmerc.js.map +1 -0
- package/dist/experimental/lazy-projections/tpers.cjs +79 -0
- package/dist/experimental/lazy-projections/tpers.cjs.map +6 -0
- package/dist/experimental/lazy-projections/tpers.d.ts +3 -0
- package/dist/experimental/lazy-projections/tpers.d.ts.map +1 -0
- package/dist/experimental/lazy-projections/tpers.js +8 -0
- package/dist/experimental/lazy-projections/tpers.js.map +1 -0
- package/dist/experimental/lazy-projections/utm.cjs +79 -0
- package/dist/experimental/lazy-projections/utm.cjs.map +6 -0
- package/dist/experimental/lazy-projections/utm.d.ts +3 -0
- package/dist/experimental/lazy-projections/utm.d.ts.map +1 -0
- package/dist/experimental/lazy-projections/utm.js +8 -0
- package/dist/experimental/lazy-projections/utm.js.map +1 -0
- package/dist/experimental/lazy-projections/vandg.cjs +79 -0
- package/dist/experimental/lazy-projections/vandg.cjs.map +6 -0
- package/dist/experimental/lazy-projections/vandg.d.ts +3 -0
- package/dist/experimental/lazy-projections/vandg.d.ts.map +1 -0
- package/dist/experimental/lazy-projections/vandg.js +7 -0
- package/dist/experimental/lazy-projections/vandg.js.map +1 -0
- package/dist/experimental/mutable-projection.d.ts +6 -0
- package/dist/experimental/mutable-projection.d.ts.map +1 -0
- package/dist/experimental/mutable-projection.js +53 -0
- package/dist/experimental/mutable-projection.js.map +1 -0
- package/dist/experimental/numeric-flat.d.ts +8 -0
- package/dist/experimental/numeric-flat.d.ts.map +1 -0
- package/dist/experimental/numeric-flat.js +54 -0
- package/dist/experimental/numeric-flat.js.map +1 -0
- package/dist/experimental/parameters.d.ts +7 -0
- package/dist/experimental/parameters.d.ts.map +1 -0
- package/dist/experimental/parameters.js +30 -0
- package/dist/experimental/parameters.js.map +1 -0
- package/dist/experimental/projection-descriptor.d.ts +13 -0
- package/dist/experimental/projection-descriptor.d.ts.map +1 -0
- package/dist/experimental/projection-descriptor.js +52 -0
- package/dist/experimental/projection-descriptor.js.map +1 -0
- package/dist/experimental/projection-pipeline.d.ts +142 -0
- package/dist/experimental/projection-pipeline.d.ts.map +1 -0
- package/dist/experimental/projection-pipeline.js +746 -0
- package/dist/experimental/projection-pipeline.js.map +1 -0
- package/dist/experimental/projection-scratch.d.ts +9 -0
- package/dist/experimental/projection-scratch.d.ts.map +1 -0
- package/dist/experimental/projection-scratch.js +18 -0
- package/dist/experimental/projection-scratch.js.map +1 -0
- package/dist/experimental/projections/aea.d.ts +3 -0
- package/dist/experimental/projections/aea.d.ts.map +1 -0
- package/dist/experimental/projections/aea.js +17 -0
- package/dist/experimental/projections/aea.js.map +1 -0
- package/dist/experimental/projections/aeqd.d.ts +3 -0
- package/dist/experimental/projections/aeqd.d.ts.map +1 -0
- package/dist/experimental/projections/aeqd.js +15 -0
- package/dist/experimental/projections/aeqd.js.map +1 -0
- package/dist/experimental/projections/bonne.d.ts +3 -0
- package/dist/experimental/projections/bonne.d.ts.map +1 -0
- package/dist/experimental/projections/bonne.js +16 -0
- package/dist/experimental/projections/bonne.js.map +1 -0
- package/dist/experimental/projections/cass.d.ts +3 -0
- package/dist/experimental/projections/cass.d.ts.map +1 -0
- package/dist/experimental/projections/cass.js +13 -0
- package/dist/experimental/projections/cass.js.map +1 -0
- package/dist/experimental/projections/cea.d.ts +3 -0
- package/dist/experimental/projections/cea.d.ts.map +1 -0
- package/dist/experimental/projections/cea.js +15 -0
- package/dist/experimental/projections/cea.js.map +1 -0
- package/dist/experimental/projections/eck6.d.ts +3 -0
- package/dist/experimental/projections/eck6.d.ts.map +1 -0
- package/dist/experimental/projections/eck6.js +13 -0
- package/dist/experimental/projections/eck6.js.map +1 -0
- package/dist/experimental/projections/eqdc.d.ts +3 -0
- package/dist/experimental/projections/eqdc.d.ts.map +1 -0
- package/dist/experimental/projections/eqdc.js +17 -0
- package/dist/experimental/projections/eqdc.js.map +1 -0
- package/dist/experimental/projections/eqearth.d.ts +3 -0
- package/dist/experimental/projections/eqearth.d.ts.map +1 -0
- package/dist/experimental/projections/eqearth.js +13 -0
- package/dist/experimental/projections/eqearth.js.map +1 -0
- package/dist/experimental/projections/equi.d.ts +3 -0
- package/dist/experimental/projections/equi.d.ts.map +1 -0
- package/dist/experimental/projections/equi.js +15 -0
- package/dist/experimental/projections/equi.js.map +1 -0
- package/dist/experimental/projections/equidistant-cylindrical.d.ts +4 -0
- package/dist/experimental/projections/equidistant-cylindrical.d.ts.map +1 -0
- package/dist/experimental/projections/equidistant-cylindrical.js +30 -0
- package/dist/experimental/projections/equidistant-cylindrical.js.map +1 -0
- package/dist/experimental/projections/geocentric.d.ts +3 -0
- package/dist/experimental/projections/geocentric.d.ts.map +1 -0
- package/dist/experimental/projections/geocentric.js +26 -0
- package/dist/experimental/projections/geocentric.js.map +1 -0
- package/dist/experimental/projections/geos.d.ts +3 -0
- package/dist/experimental/projections/geos.d.ts.map +1 -0
- package/dist/experimental/projections/geos.js +20 -0
- package/dist/experimental/projections/geos.js.map +1 -0
- package/dist/experimental/projections/gnom.d.ts +3 -0
- package/dist/experimental/projections/gnom.d.ts.map +1 -0
- package/dist/experimental/projections/gnom.js +13 -0
- package/dist/experimental/projections/gnom.js.map +1 -0
- package/dist/experimental/projections/gstmerc.d.ts +3 -0
- package/dist/experimental/projections/gstmerc.d.ts.map +1 -0
- package/dist/experimental/projections/gstmerc.js +13 -0
- package/dist/experimental/projections/gstmerc.js.map +1 -0
- package/dist/experimental/projections/krovak.d.ts +3 -0
- package/dist/experimental/projections/krovak.d.ts.map +1 -0
- package/dist/experimental/projections/krovak.js +32 -0
- package/dist/experimental/projections/krovak.js.map +1 -0
- package/dist/experimental/projections/laea.d.ts +3 -0
- package/dist/experimental/projections/laea.d.ts.map +1 -0
- package/dist/experimental/projections/laea.js +15 -0
- package/dist/experimental/projections/laea.js.map +1 -0
- package/dist/experimental/projections/lcc.d.ts +3 -0
- package/dist/experimental/projections/lcc.d.ts.map +1 -0
- package/dist/experimental/projections/lcc.js +32 -0
- package/dist/experimental/projections/lcc.js.map +1 -0
- package/dist/experimental/projections/mercator.d.ts +4 -0
- package/dist/experimental/projections/mercator.d.ts.map +1 -0
- package/dist/experimental/projections/mercator.js +71 -0
- package/dist/experimental/projections/mercator.js.map +1 -0
- package/dist/experimental/projections/mill.d.ts +3 -0
- package/dist/experimental/projections/mill.d.ts.map +1 -0
- package/dist/experimental/projections/mill.js +13 -0
- package/dist/experimental/projections/mill.js.map +1 -0
- package/dist/experimental/projections/moll.d.ts +3 -0
- package/dist/experimental/projections/moll.d.ts.map +1 -0
- package/dist/experimental/projections/moll.js +13 -0
- package/dist/experimental/projections/moll.js.map +1 -0
- package/dist/experimental/projections/nzmg.d.ts +3 -0
- package/dist/experimental/projections/nzmg.d.ts.map +1 -0
- package/dist/experimental/projections/nzmg.js +20 -0
- package/dist/experimental/projections/nzmg.js.map +1 -0
- package/dist/experimental/projections/ob-tran.d.ts +4 -0
- package/dist/experimental/projections/ob-tran.d.ts.map +1 -0
- package/dist/experimental/projections/ob-tran.js +119 -0
- package/dist/experimental/projections/ob-tran.js.map +1 -0
- package/dist/experimental/projections/omerc.d.ts +3 -0
- package/dist/experimental/projections/omerc.d.ts.map +1 -0
- package/dist/experimental/projections/omerc.js +60 -0
- package/dist/experimental/projections/omerc.js.map +1 -0
- package/dist/experimental/projections/ortho.d.ts +3 -0
- package/dist/experimental/projections/ortho.d.ts.map +1 -0
- package/dist/experimental/projections/ortho.js +13 -0
- package/dist/experimental/projections/ortho.js.map +1 -0
- package/dist/experimental/projections/poly.d.ts +3 -0
- package/dist/experimental/projections/poly.d.ts.map +1 -0
- package/dist/experimental/projections/poly.js +13 -0
- package/dist/experimental/projections/poly.js.map +1 -0
- package/dist/experimental/projections/qsc.d.ts +3 -0
- package/dist/experimental/projections/qsc.d.ts.map +1 -0
- package/dist/experimental/projections/qsc.js +13 -0
- package/dist/experimental/projections/qsc.js.map +1 -0
- package/dist/experimental/projections/robin.d.ts +3 -0
- package/dist/experimental/projections/robin.d.ts.map +1 -0
- package/dist/experimental/projections/robin.js +13 -0
- package/dist/experimental/projections/robin.js.map +1 -0
- package/dist/experimental/projections/sinu.d.ts +3 -0
- package/dist/experimental/projections/sinu.d.ts.map +1 -0
- package/dist/experimental/projections/sinu.js +13 -0
- package/dist/experimental/projections/sinu.js.map +1 -0
- package/dist/experimental/projections/somerc.d.ts +3 -0
- package/dist/experimental/projections/somerc.d.ts.map +1 -0
- package/dist/experimental/projections/somerc.js +13 -0
- package/dist/experimental/projections/somerc.js.map +1 -0
- package/dist/experimental/projections/stere.d.ts +3 -0
- package/dist/experimental/projections/stere.d.ts.map +1 -0
- package/dist/experimental/projections/stere.js +20 -0
- package/dist/experimental/projections/stere.js.map +1 -0
- package/dist/experimental/projections/sterea.d.ts +3 -0
- package/dist/experimental/projections/sterea.d.ts.map +1 -0
- package/dist/experimental/projections/sterea.js +22 -0
- package/dist/experimental/projections/sterea.js.map +1 -0
- package/dist/experimental/projections/tpers.d.ts +3 -0
- package/dist/experimental/projections/tpers.d.ts.map +1 -0
- package/dist/experimental/projections/tpers.js +19 -0
- package/dist/experimental/projections/tpers.js.map +1 -0
- package/dist/experimental/projections/transverse-mercator.d.ts +6 -0
- package/dist/experimental/projections/transverse-mercator.d.ts.map +1 -0
- package/dist/experimental/projections/transverse-mercator.js +39 -0
- package/dist/experimental/projections/transverse-mercator.js.map +1 -0
- package/dist/experimental/projections/utm.d.ts +3 -0
- package/dist/experimental/projections/utm.d.ts.map +1 -0
- package/dist/experimental/projections/utm.js +31 -0
- package/dist/experimental/projections/utm.js.map +1 -0
- package/dist/experimental/projections/vandg.d.ts +3 -0
- package/dist/experimental/projections/vandg.d.ts.map +1 -0
- package/dist/experimental/projections/vandg.js +13 -0
- package/dist/experimental/projections/vandg.js.map +1 -0
- package/dist/experimental/scalar-output.d.ts +8 -0
- package/dist/experimental/scalar-output.d.ts.map +1 -0
- package/dist/experimental/scalar-output.js +46 -0
- package/dist/experimental/scalar-output.js.map +1 -0
- package/dist/experimental/types.d.ts +54 -0
- package/dist/experimental/types.d.ts.map +1 -0
- package/dist/experimental/types.js +5 -0
- package/dist/experimental/types.js.map +1 -0
- package/dist/experimental/typescript-projection.d.ts +67 -0
- package/dist/experimental/typescript-projection.d.ts.map +1 -0
- package/dist/experimental/typescript-projection.js +429 -0
- package/dist/experimental/typescript-projection.js.map +1 -0
- package/dist/experimental/vertical-datum.d.ts +4 -0
- package/dist/experimental/vertical-datum.d.ts.map +1 -0
- package/dist/experimental/vertical-datum.js +43 -0
- package/dist/experimental/vertical-datum.js.map +1 -0
- package/dist/grids/velocity.cjs +92 -0
- package/dist/grids/velocity.cjs.map +6 -0
- package/dist/grids/velocity.d.ts +3 -0
- package/dist/grids/velocity.d.ts.map +1 -0
- package/dist/grids/velocity.js +5 -0
- package/dist/grids/velocity.js.map +1 -0
- package/dist/index.cjs +10158 -0
- package/dist/index.cjs.map +6 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/projection.d.ts +24 -0
- package/dist/lib/projection.d.ts.map +1 -0
- package/dist/lib/projection.js +107 -0
- package/dist/lib/projection.js.map +1 -0
- package/dist/operations.cjs +255 -0
- package/dist/operations.cjs.map +6 -0
- package/dist/operations.d.ts +67 -0
- package/dist/operations.d.ts.map +1 -0
- package/dist/operations.js +272 -0
- package/dist/operations.js.map +1 -0
- package/dist/pipeline.cjs +3347 -0
- package/dist/pipeline.cjs.map +6 -0
- package/dist/pipeline.d.ts +2 -0
- package/dist/pipeline.d.ts.map +1 -0
- package/dist/pipeline.js +5 -0
- package/dist/pipeline.js.map +1 -0
- package/package.json +970 -3
- package/src/deformation.ts +5 -0
- package/src/experimental/catalogue-kernel.ts +54 -0
- package/src/experimental/common/adjust_lat.ts +11 -0
- package/src/experimental/common/adjust_lon.ts +14 -0
- package/src/experimental/common/asinhy.ts +14 -0
- package/src/experimental/common/asinz.ts +11 -0
- package/src/experimental/common/authlat.ts +9 -0
- package/src/experimental/common/authset.ts +25 -0
- package/src/experimental/common/clens.ts +20 -0
- package/src/experimental/common/clens_cmplx.ts +43 -0
- package/src/experimental/common/constants.ts +15 -0
- package/src/experimental/common/cosh.ts +10 -0
- package/src/experimental/common/e0fn.ts +8 -0
- package/src/experimental/common/e1fn.ts +8 -0
- package/src/experimental/common/e2fn.ts +8 -0
- package/src/experimental/common/e3fn.ts +8 -0
- package/src/experimental/common/fL.ts +10 -0
- package/src/experimental/common/gN.ts +9 -0
- package/src/experimental/common/gatg.ts +20 -0
- package/src/experimental/common/hypot.ts +13 -0
- package/src/experimental/common/imlfn.ts +23 -0
- package/src/experimental/common/invlatiso.ts +20 -0
- package/src/experimental/common/iqsfnz.ts +45 -0
- package/src/experimental/common/latiso.ts +21 -0
- package/src/experimental/common/log1py.ts +11 -0
- package/src/experimental/common/mlfn.ts +8 -0
- package/src/experimental/common/msfnz.ts +9 -0
- package/src/experimental/common/phi2z.ts +22 -0
- package/src/experimental/common/pj_enfn.ts +29 -0
- package/src/experimental/common/pj_inv_mlfn.ts +28 -0
- package/src/experimental/common/pj_mlfn.ts +10 -0
- package/src/experimental/common/qsfnz.ts +17 -0
- package/src/experimental/common/sign.ts +8 -0
- package/src/experimental/common/sinh.ts +10 -0
- package/src/experimental/common/srat.ts +8 -0
- package/src/experimental/common/tsfnz.ts +13 -0
- package/src/experimental/common/vincenty.ts +180 -0
- package/src/experimental/core.ts +48 -0
- package/src/experimental/crs/datum-table.ts +1370 -0
- package/src/experimental/crs/ellipsoid-table.ts +230 -0
- package/src/experimental/crs/normalize.ts +303 -0
- package/src/experimental/crs/primemeridian-table.ts +22 -0
- package/src/experimental/crs/projjson.ts +12 -0
- package/src/experimental/crs/spatial-reference.ts +115 -0
- package/src/experimental/crs/structured.ts +521 -0
- package/src/experimental/crs/types.ts +80 -0
- package/src/experimental/crs/units-table.ts +27 -0
- package/src/experimental/crs/wkt.ts +192 -0
- package/src/experimental/datum.ts +185 -0
- package/src/experimental/deformation.ts +134 -0
- package/src/experimental/entries/projections/aea.ts +5 -0
- package/src/experimental/entries/projections/aeqd.ts +5 -0
- package/src/experimental/entries/projections/bonne.ts +5 -0
- package/src/experimental/entries/projections/cass.ts +5 -0
- package/src/experimental/entries/projections/cea.ts +5 -0
- package/src/experimental/entries/projections/eck6.ts +5 -0
- package/src/experimental/entries/projections/eqc.ts +5 -0
- package/src/experimental/entries/projections/eqdc.ts +5 -0
- package/src/experimental/entries/projections/eqearth.ts +5 -0
- package/src/experimental/entries/projections/equi.ts +5 -0
- package/src/experimental/entries/projections/etmerc.ts +5 -0
- package/src/experimental/entries/projections/geocent.ts +5 -0
- package/src/experimental/entries/projections/geos.ts +5 -0
- package/src/experimental/entries/projections/gnom.ts +5 -0
- package/src/experimental/entries/projections/gstmerc.ts +5 -0
- package/src/experimental/entries/projections/krovak.ts +5 -0
- package/src/experimental/entries/projections/laea.ts +5 -0
- package/src/experimental/entries/projections/lcc.ts +5 -0
- package/src/experimental/entries/projections/merc.ts +5 -0
- package/src/experimental/entries/projections/mill.ts +5 -0
- package/src/experimental/entries/projections/moll.ts +5 -0
- package/src/experimental/entries/projections/nzmg.ts +5 -0
- package/src/experimental/entries/projections/ob_tran.ts +5 -0
- package/src/experimental/entries/projections/omerc.ts +5 -0
- package/src/experimental/entries/projections/ortho.ts +5 -0
- package/src/experimental/entries/projections/poly.ts +5 -0
- package/src/experimental/entries/projections/qsc.ts +5 -0
- package/src/experimental/entries/projections/robin.ts +5 -0
- package/src/experimental/entries/projections/sinu.ts +5 -0
- package/src/experimental/entries/projections/somerc.ts +5 -0
- package/src/experimental/entries/projections/stere.ts +5 -0
- package/src/experimental/entries/projections/sterea.ts +5 -0
- package/src/experimental/entries/projections/tmerc.ts +5 -0
- package/src/experimental/entries/projections/tpers.ts +5 -0
- package/src/experimental/entries/projections/utm.ts +5 -0
- package/src/experimental/entries/projections/vandg.ts +5 -0
- package/src/experimental/exact-helmert.ts +58 -0
- package/src/experimental/flat-projection.ts +70 -0
- package/src/experimental/grids/geotiff.ts +88 -0
- package/src/experimental/grids/grid.ts +141 -0
- package/src/experimental/grids/gtx.ts +31 -0
- package/src/experimental/grids/ntv2.ts +71 -0
- package/src/experimental/grids/scalar-geotiff.ts +231 -0
- package/src/experimental/grids/types.ts +35 -0
- package/src/experimental/grids/velocity-geotiff.ts +82 -0
- package/src/experimental/grids/velocity.ts +58 -0
- package/src/experimental/grids/vertical-geotiff.ts +28 -0
- package/src/experimental/grids/vertical.ts +99 -0
- package/src/experimental/helmert-flat.ts +76 -0
- package/src/experimental/index.ts +59 -0
- package/src/experimental/kernel.ts +139 -0
- package/src/experimental/kernels/aea.ts +170 -0
- package/src/experimental/kernels/aeqd.ts +182 -0
- package/src/experimental/kernels/bonne.ts +141 -0
- package/src/experimental/kernels/cass.ts +140 -0
- package/src/experimental/kernels/cea.ts +71 -0
- package/src/experimental/kernels/eck6.ts +36 -0
- package/src/experimental/kernels/eqdc.ts +137 -0
- package/src/experimental/kernels/eqearth.ts +136 -0
- package/src/experimental/kernels/equi.ts +53 -0
- package/src/experimental/kernels/etmerc.ts +190 -0
- package/src/experimental/kernels/gauss.ts +79 -0
- package/src/experimental/kernels/geos.ts +183 -0
- package/src/experimental/kernels/gnom.ts +113 -0
- package/src/experimental/kernels/gstmerc.ts +74 -0
- package/src/experimental/kernels/krovak.ts +166 -0
- package/src/experimental/kernels/laea.ts +297 -0
- package/src/experimental/kernels/lcc.ts +147 -0
- package/src/experimental/kernels/mill.ts +60 -0
- package/src/experimental/kernels/moll.ts +105 -0
- package/src/experimental/kernels/nzmg.ts +249 -0
- package/src/experimental/kernels/omerc.ts +343 -0
- package/src/experimental/kernels/ortho.ts +106 -0
- package/src/experimental/kernels/poly.ts +156 -0
- package/src/experimental/kernels/qsc.ts +369 -0
- package/src/experimental/kernels/robin.ts +189 -0
- package/src/experimental/kernels/sinu.ts +116 -0
- package/src/experimental/kernels/somerc.ts +112 -0
- package/src/experimental/kernels/stere.ts +221 -0
- package/src/experimental/kernels/sterea.ts +80 -0
- package/src/experimental/kernels/tmerc.ts +227 -0
- package/src/experimental/kernels/tpers.ts +187 -0
- package/src/experimental/kernels/vandg.ts +147 -0
- package/src/experimental/kinematic-helmert-flat.ts +85 -0
- package/src/experimental/kinematic-helmert.ts +132 -0
- package/src/experimental/lazy-projection.ts +146 -0
- package/src/experimental/lazy-projections/aea.ts +10 -0
- package/src/experimental/lazy-projections/aeqd.ts +11 -0
- package/src/experimental/lazy-projections/bonne.ts +10 -0
- package/src/experimental/lazy-projections/cass.ts +10 -0
- package/src/experimental/lazy-projections/cea.ts +11 -0
- package/src/experimental/lazy-projections/eck6.ts +10 -0
- package/src/experimental/lazy-projections/eqc.ts +14 -0
- package/src/experimental/lazy-projections/eqdc.ts +11 -0
- package/src/experimental/lazy-projections/eqearth.ts +10 -0
- package/src/experimental/lazy-projections/equi.ts +10 -0
- package/src/experimental/lazy-projections/etmerc.ts +11 -0
- package/src/experimental/lazy-projections/geocent.ts +10 -0
- package/src/experimental/lazy-projections/geos.ts +10 -0
- package/src/experimental/lazy-projections/gnom.ts +10 -0
- package/src/experimental/lazy-projections/gstmerc.ts +12 -0
- package/src/experimental/lazy-projections/index.ts +42 -0
- package/src/experimental/lazy-projections/krovak.ts +18 -0
- package/src/experimental/lazy-projections/laea.ts +11 -0
- package/src/experimental/lazy-projections/lcc.ts +21 -0
- package/src/experimental/lazy-projections/merc.ts +19 -0
- package/src/experimental/lazy-projections/mill.ts +11 -0
- package/src/experimental/lazy-projections/moll.ts +10 -0
- package/src/experimental/lazy-projections/nzmg.ts +11 -0
- package/src/experimental/lazy-projections/ob_tran.ts +25 -0
- package/src/experimental/lazy-projections/omerc.ts +22 -0
- package/src/experimental/lazy-projections/ortho.ts +10 -0
- package/src/experimental/lazy-projections/poly.ts +10 -0
- package/src/experimental/lazy-projections/qsc.ts +14 -0
- package/src/experimental/lazy-projections/robin.ts +10 -0
- package/src/experimental/lazy-projections/sinu.ts +10 -0
- package/src/experimental/lazy-projections/somerc.ts +11 -0
- package/src/experimental/lazy-projections/stere.ts +18 -0
- package/src/experimental/lazy-projections/sterea.ts +19 -0
- package/src/experimental/lazy-projections/tmerc.ts +21 -0
- package/src/experimental/lazy-projections/tpers.ts +11 -0
- package/src/experimental/lazy-projections/utm.ts +11 -0
- package/src/experimental/lazy-projections/vandg.ts +10 -0
- package/src/experimental/mutable-projection.ts +63 -0
- package/src/experimental/numeric-flat.ts +73 -0
- package/src/experimental/parameters.ts +35 -0
- package/src/experimental/projection-descriptor.ts +79 -0
- package/src/experimental/projection-pipeline.ts +1053 -0
- package/src/experimental/projection-scratch.ts +19 -0
- package/src/experimental/projections/aea.ts +19 -0
- package/src/experimental/projections/aeqd.ts +18 -0
- package/src/experimental/projections/bonne.ts +23 -0
- package/src/experimental/projections/cass.ts +19 -0
- package/src/experimental/projections/cea.ts +20 -0
- package/src/experimental/projections/eck6.ts +19 -0
- package/src/experimental/projections/eqdc.ts +19 -0
- package/src/experimental/projections/eqearth.ts +19 -0
- package/src/experimental/projections/equi.ts +20 -0
- package/src/experimental/projections/equidistant-cylindrical.ts +35 -0
- package/src/experimental/projections/geocentric.ts +34 -0
- package/src/experimental/projections/geos.ts +31 -0
- package/src/experimental/projections/gnom.ts +19 -0
- package/src/experimental/projections/gstmerc.ts +19 -0
- package/src/experimental/projections/krovak.ts +41 -0
- package/src/experimental/projections/laea.ts +18 -0
- package/src/experimental/projections/lcc.ts +40 -0
- package/src/experimental/projections/mercator.ts +79 -0
- package/src/experimental/projections/mill.ts +19 -0
- package/src/experimental/projections/moll.ts +19 -0
- package/src/experimental/projections/nzmg.ts +27 -0
- package/src/experimental/projections/ob-tran.ts +161 -0
- package/src/experimental/projections/omerc.ts +66 -0
- package/src/experimental/projections/ortho.ts +26 -0
- package/src/experimental/projections/poly.ts +19 -0
- package/src/experimental/projections/qsc.ts +19 -0
- package/src/experimental/projections/robin.ts +19 -0
- package/src/experimental/projections/sinu.ts +19 -0
- package/src/experimental/projections/somerc.ts +19 -0
- package/src/experimental/projections/stere.ts +29 -0
- package/src/experimental/projections/sterea.ts +30 -0
- package/src/experimental/projections/tpers.ts +31 -0
- package/src/experimental/projections/transverse-mercator.ts +68 -0
- package/src/experimental/projections/utm.ts +33 -0
- package/src/experimental/projections/vandg.ts +19 -0
- package/src/experimental/scalar-output.ts +74 -0
- package/src/experimental/types.ts +61 -0
- package/src/experimental/typescript-projection.ts +545 -0
- package/src/experimental/vertical-datum.ts +39 -0
- package/src/grids/velocity.ts +5 -0
- package/src/index.ts +7 -0
- package/src/lib/projection.ts +167 -0
- package/src/operations.ts +358 -0
- package/src/pipeline.ts +4 -0
|
@@ -0,0 +1,1053 @@
|
|
|
1
|
+
// math.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
|
+
// SPDX-FileComment: Original typed orchestration inspired by PROJ's explicit pipeline model. Projection, geocentric and static Helmert equations reuse the proj4js adaptations in this package; see datum.ts and ../../PROJ4-LICENSE.md. The separate exact Helmert matrix is adapted from PROJ; see exact-helmert.ts and ../../PROJ-LICENSE.txt.
|
|
5
|
+
import type {DeformationModel} from './deformation';
|
|
6
|
+
import {CORE_PARAMETERS, normalizeCRS} from './crs/normalize';
|
|
7
|
+
import {unsupportedStage} from './crs/types';
|
|
8
|
+
import {
|
|
9
|
+
applyDatumGrids,
|
|
10
|
+
createHelmert,
|
|
11
|
+
geocentricToGeodeticInPlace,
|
|
12
|
+
geodeticToGeocentricInPlace
|
|
13
|
+
} from './datum';
|
|
14
|
+
import {projectionOperation} from './mutable-projection';
|
|
15
|
+
import {ProjectionScratch} from './projection-scratch';
|
|
16
|
+
import {createNumericFlat} from './numeric-flat';
|
|
17
|
+
import type {NumericStep, NumericFlatOperation} from './numeric-flat';
|
|
18
|
+
import {validateScalarOutput, writeScalarOutput} from './scalar-output';
|
|
19
|
+
import type {ProjectionCoordinate, ProjectionOutput} from './scalar-output';
|
|
20
|
+
export type {ProjectionCoordinate, ProjectionOutput} from './scalar-output';
|
|
21
|
+
import {createHelmertFlat} from './helmert-flat';
|
|
22
|
+
import {createExactHelmert} from './exact-helmert';
|
|
23
|
+
import {createKinematicHelmert} from './kinematic-helmert';
|
|
24
|
+
import {getLoadedProjection, preloadProjection} from './projection-descriptor';
|
|
25
|
+
import {compileVerticalGrid} from './vertical-datum';
|
|
26
|
+
import type {ProjectionDescriptor} from './projection-descriptor';
|
|
27
|
+
import type {ProjectionParameters, ProjectionPlugin, ProjectionPoint} from './types';
|
|
28
|
+
import type {ProjectionArray} from './typescript-projection';
|
|
29
|
+
import type {DatumGridCollection, VerticalGridCollection} from './grids/types';
|
|
30
|
+
|
|
31
|
+
/** Decimal years; a flat call accepts one epoch or one per coordinate record. */
|
|
32
|
+
export type PipelineEpochs = number | Float32Array | Float64Array;
|
|
33
|
+
export type PipelineHelmertRates = {
|
|
34
|
+
/** Metres per decimal year. */
|
|
35
|
+
readonly translation?: readonly [number, number, number];
|
|
36
|
+
/** Arcseconds per decimal year, using the step's rotation convention. */
|
|
37
|
+
readonly rotation?: readonly [number, number, number];
|
|
38
|
+
/** Parts per million per decimal year. */
|
|
39
|
+
readonly scalePPM?: number;
|
|
40
|
+
};
|
|
41
|
+
export type PipelineUnit = 'deg' | 'rad' | 'm' | 'ft' | 'us-ft';
|
|
42
|
+
export type PipelineCoordinateSystem = {
|
|
43
|
+
readonly space: 'geographic' | 'projected' | 'geocentric';
|
|
44
|
+
/** Units in stored X/Y/Z order. Geographic steps require longitude/latitude order. */
|
|
45
|
+
readonly units: readonly [PipelineUnit, PipelineUnit, PipelineUnit];
|
|
46
|
+
};
|
|
47
|
+
export type PipelineEllipsoid = Readonly<
|
|
48
|
+
Partial<Record<'ellps' | 'a' | 'b' | 'rf' | 'f' | 'R', string>>
|
|
49
|
+
>;
|
|
50
|
+
export type PipelineProjectionOutput =
|
|
51
|
+
| {readonly space: 'geographic'; readonly unit: 'deg' | 'rad'}
|
|
52
|
+
| {readonly space: 'projected'; readonly unit: 'm'};
|
|
53
|
+
type Direction = {
|
|
54
|
+
readonly inverse?: boolean;
|
|
55
|
+
/** Omit this step when calling project/projectFlat. */
|
|
56
|
+
readonly omitForward?: boolean;
|
|
57
|
+
/** Omit this step when calling unproject/unprojectFlat. */
|
|
58
|
+
readonly omitInverse?: boolean;
|
|
59
|
+
};
|
|
60
|
+
export type PipelineStep = Direction &
|
|
61
|
+
(
|
|
62
|
+
| {
|
|
63
|
+
readonly type: 'unitconvert';
|
|
64
|
+
readonly xy?: {readonly from: PipelineUnit; readonly to: PipelineUnit};
|
|
65
|
+
readonly z?: {readonly from: PipelineUnit; readonly to: PipelineUnit};
|
|
66
|
+
}
|
|
67
|
+
| {
|
|
68
|
+
readonly type: 'axisswap';
|
|
69
|
+
readonly order: readonly [number, number] | readonly [number, number, number];
|
|
70
|
+
}
|
|
71
|
+
| {
|
|
72
|
+
readonly type: 'projection';
|
|
73
|
+
readonly name: string;
|
|
74
|
+
readonly parameters?: ProjectionParameters;
|
|
75
|
+
/** Required for ob_tran; geographic helper output can be degrees or radians. */
|
|
76
|
+
readonly output?: PipelineProjectionOutput;
|
|
77
|
+
}
|
|
78
|
+
| {readonly type: 'cart'; readonly ellipsoid?: PipelineEllipsoid}
|
|
79
|
+
| {
|
|
80
|
+
readonly type: 'helmert';
|
|
81
|
+
readonly translation: readonly [number, number, number];
|
|
82
|
+
readonly rotation?: readonly [number, number, number];
|
|
83
|
+
readonly scalePPM?: number;
|
|
84
|
+
readonly convention?: 'position_vector' | 'coordinate_frame';
|
|
85
|
+
/** Use a full rotation matrix and its mathematical inverse. Default false. */
|
|
86
|
+
readonly exact?: boolean;
|
|
87
|
+
/** Decimal year at which the base parameters apply. Required with rates. */
|
|
88
|
+
readonly referenceEpoch?: number;
|
|
89
|
+
readonly rates?: PipelineHelmertRates;
|
|
90
|
+
}
|
|
91
|
+
| {
|
|
92
|
+
readonly type: 'deformation';
|
|
93
|
+
readonly model: DeformationModel;
|
|
94
|
+
/** 'coordinate' uses the separate scalar/batch/per-record epoch argument. */
|
|
95
|
+
readonly sourceEpoch: number | 'coordinate';
|
|
96
|
+
readonly targetEpoch: number;
|
|
97
|
+
}
|
|
98
|
+
| {readonly type: 'push' | 'pop'; readonly components: readonly (1 | 2 | 3)[]}
|
|
99
|
+
| {readonly type: 'hgridshift'; readonly grids: string}
|
|
100
|
+
| {readonly type: 'vgridshift'; readonly grids: string; readonly multiplier?: number}
|
|
101
|
+
);
|
|
102
|
+
type Registration = ProjectionPlugin | ProjectionDescriptor;
|
|
103
|
+
type Result<P, T> = Extract<P, ProjectionDescriptor> extends never ? T : Promise<T>;
|
|
104
|
+
export type ProjectionPipelineOptions<P extends Registration = ProjectionPlugin> = {
|
|
105
|
+
readonly input: PipelineCoordinateSystem;
|
|
106
|
+
readonly steps: readonly PipelineStep[];
|
|
107
|
+
readonly projections?: readonly P[];
|
|
108
|
+
readonly datumGrids?: DatumGridCollection;
|
|
109
|
+
readonly verticalGrids?: VerticalGridCollection;
|
|
110
|
+
};
|
|
111
|
+
type Operation = (point: ProjectionPoint, stack: Float64Array, epoch?: number) => void;
|
|
112
|
+
type StackEntry = {unit: PipelineUnit; space: PipelineCoordinateSystem['space']; slot: number};
|
|
113
|
+
type State = {
|
|
114
|
+
space: PipelineCoordinateSystem['space'];
|
|
115
|
+
units: [PipelineUnit, PipelineUnit, PipelineUnit];
|
|
116
|
+
stacks: StackEntry[][];
|
|
117
|
+
};
|
|
118
|
+
const EMPTY_STACK = new Float64Array(0);
|
|
119
|
+
// Typed-array buffers are ordinary or shared. The intrinsic getter checks the
|
|
120
|
+
// backing-store brand across realms and cannot be fooled by Symbol.toStringTag.
|
|
121
|
+
const ordinaryByteLength = Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, 'byteLength').get;
|
|
122
|
+
function sharedBuffer(buffer: ArrayBufferLike): boolean {
|
|
123
|
+
try {
|
|
124
|
+
ordinaryByteLength.call(buffer);
|
|
125
|
+
return false;
|
|
126
|
+
} catch {
|
|
127
|
+
return true;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
type Pair = {
|
|
132
|
+
forward: Operation;
|
|
133
|
+
inverse: Operation;
|
|
134
|
+
forwardNumeric?: NumericStep;
|
|
135
|
+
inverseNumeric?: NumericStep;
|
|
136
|
+
forwardFlat?: NumericFlatOperation;
|
|
137
|
+
inverseFlat?: NumericFlatOperation;
|
|
138
|
+
};
|
|
139
|
+
function compileFlat(pairs: readonly Pair[]): NumericFlatOperation | undefined {
|
|
140
|
+
if (pairs.length === 1 && pairs[0].forwardFlat) return pairs[0].forwardFlat;
|
|
141
|
+
// Pure axis measurements were inconsistent; retain general dispatch for that subset.
|
|
142
|
+
return pairs.every(pair => pair.forwardNumeric) &&
|
|
143
|
+
pairs.some(pair => pair.forwardNumeric[0] !== 2)
|
|
144
|
+
? createNumericFlat(pairs.map(pair => pair.forwardNumeric))
|
|
145
|
+
: undefined;
|
|
146
|
+
}
|
|
147
|
+
type Factory = () => Pair;
|
|
148
|
+
const factors: Record<PipelineUnit, number> = {
|
|
149
|
+
deg: Math.PI / 180,
|
|
150
|
+
rad: 1,
|
|
151
|
+
m: 1,
|
|
152
|
+
ft: 0.3048,
|
|
153
|
+
'us-ft': 1200 / 3937
|
|
154
|
+
};
|
|
155
|
+
const geometryKeys = ['ellps', 'a', 'b', 'rf', 'f', 'R'];
|
|
156
|
+
const angular = (unit: PipelineUnit): boolean => unit === 'deg' || unit === 'rad';
|
|
157
|
+
const own = (value: object, name: string): boolean =>
|
|
158
|
+
Object.prototype.hasOwnProperty.call(value, name);
|
|
159
|
+
function keys(value: object, allowed: readonly string[]): void {
|
|
160
|
+
if (!value || typeof value !== 'object' || Array.isArray(value))
|
|
161
|
+
throw new Error('Expected operation object');
|
|
162
|
+
for (const name of Object.keys(value))
|
|
163
|
+
if (!allowed.includes(name)) unsupportedStage('Unsupported pipeline parameter: ' + name);
|
|
164
|
+
}
|
|
165
|
+
function definition(name: string, parameters: ProjectionParameters = {}): string {
|
|
166
|
+
if (!/^[a-z][a-z0-9_]*$/i.test(name)) throw new Error('Invalid projection name');
|
|
167
|
+
return (
|
|
168
|
+
'+proj=' +
|
|
169
|
+
name +
|
|
170
|
+
Object.entries(parameters)
|
|
171
|
+
.map(([key, value]) => {
|
|
172
|
+
if (
|
|
173
|
+
!/^[a-z][a-z0-9_]*$/i.test(key) ||
|
|
174
|
+
(value !== undefined &&
|
|
175
|
+
(typeof value !== 'string' ||
|
|
176
|
+
!value ||
|
|
177
|
+
/[\s=]/.test(value) ||
|
|
178
|
+
/\+/.test(value.slice(1).replace(/[eE]\+/g, ''))))
|
|
179
|
+
)
|
|
180
|
+
throw new Error('Invalid pipeline projection parameter: ' + key);
|
|
181
|
+
return ' +' + key + (value === undefined ? '' : '=' + value);
|
|
182
|
+
})
|
|
183
|
+
.join('')
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
function finite(point: ProjectionPoint): void {
|
|
187
|
+
if (!Number.isFinite(point.x) || !Number.isFinite(point.y) || !Number.isFinite(point.z))
|
|
188
|
+
throw new Error('Pipeline coordinate must be finite');
|
|
189
|
+
}
|
|
190
|
+
function triple(values: readonly number[]): void {
|
|
191
|
+
if (!Array.isArray(values) || values.length !== 3 || !values.every(Number.isFinite))
|
|
192
|
+
throw new Error('Expected three finite Helmert parameters');
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/** Explicit forward/reverse operations; no CRS/epoch inference or string pipeline parser.
|
|
196
|
+
* General execution reuses guarded scratch; specialized flat stages use numeric
|
|
197
|
+
* locals and never allocate coordinate arrays inside the flat loop. M and additional ordinates are preserved, never interpreted.
|
|
198
|
+
*/
|
|
199
|
+
export class ProjectionPipeline<P extends Registration = ProjectionPlugin> {
|
|
200
|
+
readonly input: PipelineCoordinateSystem;
|
|
201
|
+
readonly output: PipelineCoordinateSystem;
|
|
202
|
+
private readonly forwardFactories: Factory[] = [];
|
|
203
|
+
private readonly inverseFactories: Factory[] = [];
|
|
204
|
+
private stackSize = 0;
|
|
205
|
+
private readonly coordinateScratch = new ProjectionScratch();
|
|
206
|
+
private coordinateStack?: Float64Array;
|
|
207
|
+
private readonly required: Registration[] = [];
|
|
208
|
+
private readonly deferred: boolean;
|
|
209
|
+
private requiresZ = false;
|
|
210
|
+
private requiresEpoch = false;
|
|
211
|
+
private compiled?: {
|
|
212
|
+
forward: Operation[];
|
|
213
|
+
inverse: Operation[];
|
|
214
|
+
forwardFlat?: NumericFlatOperation;
|
|
215
|
+
inverseFlat?: NumericFlatOperation;
|
|
216
|
+
};
|
|
217
|
+
private pending?: Promise<this>;
|
|
218
|
+
|
|
219
|
+
constructor(options: ProjectionPipelineOptions<P>) {
|
|
220
|
+
keys(options, ['input', 'steps', 'projections', 'datumGrids', 'verticalGrids']);
|
|
221
|
+
keys(options.input, ['space', 'units']);
|
|
222
|
+
const {space, units} = options.input;
|
|
223
|
+
if (
|
|
224
|
+
!['geographic', 'projected', 'geocentric'].includes(space) ||
|
|
225
|
+
!Array.isArray(units) ||
|
|
226
|
+
units.length !== 3 ||
|
|
227
|
+
units.some(unit => !own(factors, unit)) ||
|
|
228
|
+
angular(units[2]) ||
|
|
229
|
+
(space === 'geographic'
|
|
230
|
+
? !angular(units[0]) || !angular(units[1])
|
|
231
|
+
: angular(units[0]) || angular(units[1]))
|
|
232
|
+
)
|
|
233
|
+
throw new Error('Invalid pipeline input space/units');
|
|
234
|
+
if (!Array.isArray(options.steps) || options.steps.length === 0)
|
|
235
|
+
throw new Error('Pipeline requires at least one step');
|
|
236
|
+
this.requiresZ = space === 'geocentric';
|
|
237
|
+
this.input = Object.freeze({
|
|
238
|
+
space,
|
|
239
|
+
units: Object.freeze([...units]) as PipelineCoordinateSystem['units']
|
|
240
|
+
});
|
|
241
|
+
const state: State = {space, units: [...units] as State['units'], stacks: [[], [], []]};
|
|
242
|
+
const projections = [...(options.projections || [])];
|
|
243
|
+
this.deferred = projections.some(projection => !('create' in projection));
|
|
244
|
+
// Each direction has its own validated metadata and stack layout. Share equation
|
|
245
|
+
// implementations by step so custom plugin factories still run once per step.
|
|
246
|
+
const caches = options.steps.map(() => ({}) as {pair?: Pair});
|
|
247
|
+
for (const [index, step] of options.steps.entries()) {
|
|
248
|
+
for (const name of ['inverse', 'omitForward', 'omitInverse'] as const)
|
|
249
|
+
if (step?.[name] !== undefined && typeof step[name] !== 'boolean')
|
|
250
|
+
throw new Error('Invalid pipeline ' + name + ' flag');
|
|
251
|
+
if (step?.omitForward && step.omitInverse)
|
|
252
|
+
throw new Error('A pipeline step cannot omit both directions');
|
|
253
|
+
if (!step?.omitForward)
|
|
254
|
+
this.forwardFactories.push(
|
|
255
|
+
this.prepare(step, state, {...options, projections}, caches[index])
|
|
256
|
+
);
|
|
257
|
+
}
|
|
258
|
+
this.balanced(state);
|
|
259
|
+
this.output = Object.freeze({
|
|
260
|
+
space: state.space,
|
|
261
|
+
units: Object.freeze([...state.units]) as PipelineCoordinateSystem['units']
|
|
262
|
+
});
|
|
263
|
+
const reverse: State = {space: state.space, units: [...state.units], stacks: [[], [], []]};
|
|
264
|
+
for (let index = options.steps.length - 1; index >= 0; index--) {
|
|
265
|
+
const step = options.steps[index];
|
|
266
|
+
if (!step.omitInverse)
|
|
267
|
+
this.inverseFactories.push(
|
|
268
|
+
this.prepare(
|
|
269
|
+
{...step, inverse: !step.inverse},
|
|
270
|
+
reverse,
|
|
271
|
+
{...options, projections},
|
|
272
|
+
caches[index]
|
|
273
|
+
)
|
|
274
|
+
);
|
|
275
|
+
}
|
|
276
|
+
this.balanced(reverse);
|
|
277
|
+
if (reverse.space !== space || reverse.units.some((unit, index) => unit !== units[index]))
|
|
278
|
+
throw new Error('Inverse pipeline output does not match declared input space/units');
|
|
279
|
+
if (this.required.every(projection => getLoadedProjection(projection))) this.compile();
|
|
280
|
+
this.project = this.project.bind(this);
|
|
281
|
+
this.unproject = this.unproject.bind(this);
|
|
282
|
+
this.projectSync = this.projectSync.bind(this);
|
|
283
|
+
this.unprojectSync = this.unprojectSync.bind(this);
|
|
284
|
+
this.projectTo = this.projectTo.bind(this);
|
|
285
|
+
this.unprojectTo = this.unprojectTo.bind(this);
|
|
286
|
+
this.projectToSync = this.projectToSync.bind(this);
|
|
287
|
+
this.unprojectToSync = this.unprojectToSync.bind(this);
|
|
288
|
+
this.projectFlat = this.projectFlat.bind(this);
|
|
289
|
+
this.unprojectFlat = this.unprojectFlat.bind(this);
|
|
290
|
+
this.projectFlatSync = this.projectFlatSync.bind(this);
|
|
291
|
+
this.unprojectFlatSync = this.unprojectFlatSync.bind(this);
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
/** Load only implementations named by pipeline steps; failures can be retried. */
|
|
295
|
+
preload(): Promise<this> {
|
|
296
|
+
if (this.compiled) return Promise.resolve(this);
|
|
297
|
+
this.pending ||= Promise.all(this.required.map(preloadProjection))
|
|
298
|
+
.then(() => {
|
|
299
|
+
this.compile();
|
|
300
|
+
return this;
|
|
301
|
+
})
|
|
302
|
+
.catch(error => {
|
|
303
|
+
this.pending = undefined;
|
|
304
|
+
throw error;
|
|
305
|
+
});
|
|
306
|
+
return this.pending;
|
|
307
|
+
}
|
|
308
|
+
project(coordinate: readonly number[], epoch?: number): Result<P, number[]> {
|
|
309
|
+
return (
|
|
310
|
+
this.deferred
|
|
311
|
+
? this.preload().then(() => this.projectSync(coordinate, epoch))
|
|
312
|
+
: this.projectSync(coordinate, epoch)
|
|
313
|
+
) as Result<P, number[]>;
|
|
314
|
+
}
|
|
315
|
+
unproject(coordinate: readonly number[], epoch?: number): Result<P, number[]> {
|
|
316
|
+
return (
|
|
317
|
+
this.deferred
|
|
318
|
+
? this.preload().then(() => this.unprojectSync(coordinate, epoch))
|
|
319
|
+
: this.unprojectSync(coordinate, epoch)
|
|
320
|
+
) as Result<P, number[]>;
|
|
321
|
+
}
|
|
322
|
+
/** Reuse a scalar output; the epoch remains separate from all coordinate ordinates. */
|
|
323
|
+
projectTo<T extends ProjectionOutput>(
|
|
324
|
+
coordinate: ProjectionCoordinate,
|
|
325
|
+
output: T,
|
|
326
|
+
epoch?: number
|
|
327
|
+
): Result<P, T> {
|
|
328
|
+
return (
|
|
329
|
+
this.deferred
|
|
330
|
+
? this.scalarToLoaded(coordinate, output, false, epoch)
|
|
331
|
+
: this.projectToSync(coordinate, output, epoch)
|
|
332
|
+
) as Result<P, T>;
|
|
333
|
+
}
|
|
334
|
+
unprojectTo<T extends ProjectionOutput>(
|
|
335
|
+
coordinate: ProjectionCoordinate,
|
|
336
|
+
output: T,
|
|
337
|
+
epoch?: number
|
|
338
|
+
): Result<P, T> {
|
|
339
|
+
return (
|
|
340
|
+
this.deferred
|
|
341
|
+
? this.scalarToLoaded(coordinate, output, true, epoch)
|
|
342
|
+
: this.unprojectToSync(coordinate, output, epoch)
|
|
343
|
+
) as Result<P, T>;
|
|
344
|
+
}
|
|
345
|
+
projectToSync<T extends ProjectionOutput>(
|
|
346
|
+
coordinate: ProjectionCoordinate,
|
|
347
|
+
output: T,
|
|
348
|
+
epoch?: number
|
|
349
|
+
): T {
|
|
350
|
+
validateScalarOutput(coordinate, output, coordinate.length);
|
|
351
|
+
return this.scalar(coordinate, false, epoch, output);
|
|
352
|
+
}
|
|
353
|
+
unprojectToSync<T extends ProjectionOutput>(
|
|
354
|
+
coordinate: ProjectionCoordinate,
|
|
355
|
+
output: T,
|
|
356
|
+
epoch?: number
|
|
357
|
+
): T {
|
|
358
|
+
validateScalarOutput(coordinate, output, coordinate.length);
|
|
359
|
+
return this.scalar(coordinate, true, epoch, output);
|
|
360
|
+
}
|
|
361
|
+
private scalarToLoaded<T extends ProjectionOutput>(
|
|
362
|
+
coordinate: ProjectionCoordinate,
|
|
363
|
+
output: T,
|
|
364
|
+
inverse: boolean,
|
|
365
|
+
epoch?: number
|
|
366
|
+
): Promise<T> {
|
|
367
|
+
validateScalarOutput(coordinate, output, coordinate.length);
|
|
368
|
+
const input = coordinate.slice();
|
|
369
|
+
return this.preload().then(() =>
|
|
370
|
+
inverse
|
|
371
|
+
? this.unprojectToSync(input, output, epoch)
|
|
372
|
+
: this.projectToSync(input, output, epoch)
|
|
373
|
+
);
|
|
374
|
+
}
|
|
375
|
+
projectFlat<T extends ProjectionArray>(
|
|
376
|
+
coordinates: T,
|
|
377
|
+
dimension = 2,
|
|
378
|
+
epochs?: PipelineEpochs
|
|
379
|
+
): Result<P, T> {
|
|
380
|
+
return (
|
|
381
|
+
this.deferred
|
|
382
|
+
? this.preload().then(() => this.projectFlatSync(coordinates, dimension, epochs))
|
|
383
|
+
: this.projectFlatSync(coordinates, dimension, epochs)
|
|
384
|
+
) as Result<P, T>;
|
|
385
|
+
}
|
|
386
|
+
unprojectFlat<T extends ProjectionArray>(
|
|
387
|
+
coordinates: T,
|
|
388
|
+
dimension = 2,
|
|
389
|
+
epochs?: PipelineEpochs
|
|
390
|
+
): Result<P, T> {
|
|
391
|
+
return (
|
|
392
|
+
this.deferred
|
|
393
|
+
? this.preload().then(() => this.unprojectFlatSync(coordinates, dimension, epochs))
|
|
394
|
+
: this.unprojectFlatSync(coordinates, dimension, epochs)
|
|
395
|
+
) as Result<P, T>;
|
|
396
|
+
}
|
|
397
|
+
projectSync(coordinate: readonly number[], epoch?: number): number[] {
|
|
398
|
+
return this.scalar(coordinate, false, epoch);
|
|
399
|
+
}
|
|
400
|
+
unprojectSync(coordinate: readonly number[], epoch?: number): number[] {
|
|
401
|
+
return this.scalar(coordinate, true, epoch);
|
|
402
|
+
}
|
|
403
|
+
projectFlatSync<T extends ProjectionArray>(
|
|
404
|
+
coordinates: T,
|
|
405
|
+
dimension = 2,
|
|
406
|
+
epochs?: PipelineEpochs
|
|
407
|
+
): T {
|
|
408
|
+
return this.flat(coordinates, dimension, false, epochs);
|
|
409
|
+
}
|
|
410
|
+
unprojectFlatSync<T extends ProjectionArray>(
|
|
411
|
+
coordinates: T,
|
|
412
|
+
dimension = 2,
|
|
413
|
+
epochs?: PipelineEpochs
|
|
414
|
+
): T {
|
|
415
|
+
return this.flat(coordinates, dimension, true, epochs);
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
private compile(): void {
|
|
419
|
+
if (this.compiled) return;
|
|
420
|
+
for (const registration of this.required)
|
|
421
|
+
if (!getLoadedProjection(registration))
|
|
422
|
+
unsupportedStage('Pipeline projection requires preload(): ' + registration.name);
|
|
423
|
+
const forward = this.forwardFactories.map(factory => factory()),
|
|
424
|
+
inverse = this.inverseFactories.map(factory => factory());
|
|
425
|
+
this.compiled = {
|
|
426
|
+
forward: forward.map(pair => pair.forward),
|
|
427
|
+
inverse: inverse.map(pair => pair.forward),
|
|
428
|
+
forwardFlat: compileFlat(forward),
|
|
429
|
+
inverseFlat: compileFlat(inverse)
|
|
430
|
+
};
|
|
431
|
+
}
|
|
432
|
+
private operations(inverse: boolean): Operation[] {
|
|
433
|
+
this.compile();
|
|
434
|
+
return inverse ? this.compiled.inverse : this.compiled.forward;
|
|
435
|
+
}
|
|
436
|
+
private scalar<T extends ProjectionOutput = number[]>(
|
|
437
|
+
coordinate: ProjectionCoordinate,
|
|
438
|
+
inverse: boolean,
|
|
439
|
+
epoch?: number,
|
|
440
|
+
output?: T
|
|
441
|
+
): T {
|
|
442
|
+
this.coordinateEpoch(epoch);
|
|
443
|
+
if (coordinate.length < (this.requiresZ ? 3 : 2))
|
|
444
|
+
throw new Error('Pipeline requires ' + (this.requiresZ ? 'XYZ' : 'XY') + ' coordinates');
|
|
445
|
+
const operations = this.operations(inverse);
|
|
446
|
+
const point = this.coordinateScratch.acquire();
|
|
447
|
+
try {
|
|
448
|
+
point.x = coordinate[0];
|
|
449
|
+
point.y = coordinate[1];
|
|
450
|
+
point.z = coordinate.length >= 3 ? coordinate[2] : 0;
|
|
451
|
+
let stack: Float64Array = EMPTY_STACK;
|
|
452
|
+
if (this.stackSize) {
|
|
453
|
+
if (point === this.coordinateScratch.point) {
|
|
454
|
+
this.coordinateStack ||= new Float64Array(this.stackSize);
|
|
455
|
+
stack = this.coordinateStack;
|
|
456
|
+
} else {
|
|
457
|
+
stack = new Float64Array(this.stackSize);
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
this.run(point, operations, stack, epoch);
|
|
461
|
+
if (output) return writeScalarOutput(coordinate, output, point, coordinate.length);
|
|
462
|
+
const result = [...coordinate];
|
|
463
|
+
result[0] = point.x;
|
|
464
|
+
result[1] = point.y;
|
|
465
|
+
if (coordinate.length >= 3) result[2] = point.z;
|
|
466
|
+
return result as T;
|
|
467
|
+
} finally {
|
|
468
|
+
this.coordinateScratch.release(point);
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
private flat<T extends ProjectionArray>(
|
|
472
|
+
coordinates: T,
|
|
473
|
+
dimension: number,
|
|
474
|
+
inverse: boolean,
|
|
475
|
+
epochs?: PipelineEpochs
|
|
476
|
+
): T {
|
|
477
|
+
if (
|
|
478
|
+
!(coordinates instanceof Float32Array || coordinates instanceof Float64Array) ||
|
|
479
|
+
!Number.isSafeInteger(dimension) ||
|
|
480
|
+
dimension < (this.requiresZ ? 3 : 2) ||
|
|
481
|
+
coordinates.length % dimension
|
|
482
|
+
)
|
|
483
|
+
throw new Error('Pipeline requires Float32Array/Float64Array and a valid XY/XYZ stride');
|
|
484
|
+
if (epochs === undefined) this.coordinateEpoch(undefined);
|
|
485
|
+
else if (typeof epochs === 'number') this.coordinateEpoch(epochs);
|
|
486
|
+
else {
|
|
487
|
+
if (
|
|
488
|
+
!(epochs instanceof Float32Array || epochs instanceof Float64Array) ||
|
|
489
|
+
epochs.length !== coordinates.length / dimension
|
|
490
|
+
)
|
|
491
|
+
throw new Error('Epoch buffer requires one Float32/Float64 value per coordinate record');
|
|
492
|
+
if (
|
|
493
|
+
epochs.byteOffset < coordinates.byteOffset + coordinates.byteLength &&
|
|
494
|
+
coordinates.byteOffset < epochs.byteOffset + epochs.byteLength &&
|
|
495
|
+
(epochs.buffer === coordinates.buffer ||
|
|
496
|
+
(sharedBuffer(epochs.buffer) && sharedBuffer(coordinates.buffer)))
|
|
497
|
+
)
|
|
498
|
+
throw new Error('Epoch and coordinate buffers must not overlap or alias shared storage');
|
|
499
|
+
}
|
|
500
|
+
const operations = this.operations(inverse);
|
|
501
|
+
const specialized = inverse ? this.compiled.inverseFlat : this.compiled.forwardFlat;
|
|
502
|
+
if (specialized) {
|
|
503
|
+
specialized(coordinates, dimension, epochs);
|
|
504
|
+
return coordinates;
|
|
505
|
+
}
|
|
506
|
+
const point = this.coordinateScratch.acquire();
|
|
507
|
+
try {
|
|
508
|
+
const float32 = coordinates instanceof Float32Array;
|
|
509
|
+
let stack: Float64Array = EMPTY_STACK;
|
|
510
|
+
if (this.stackSize) {
|
|
511
|
+
if (point === this.coordinateScratch.point) {
|
|
512
|
+
this.coordinateStack ||= new Float64Array(this.stackSize);
|
|
513
|
+
stack = this.coordinateStack;
|
|
514
|
+
} else stack = new Float64Array(this.stackSize);
|
|
515
|
+
}
|
|
516
|
+
const epochBuffer = typeof epochs === 'number' ? undefined : epochs;
|
|
517
|
+
let epoch = typeof epochs === 'number' ? epochs : undefined;
|
|
518
|
+
for (let i = 0; i < coordinates.length; i += dimension) {
|
|
519
|
+
point.x = coordinates[i];
|
|
520
|
+
point.y = coordinates[i + 1];
|
|
521
|
+
point.z = dimension >= 3 ? coordinates[i + 2] : 0;
|
|
522
|
+
if (epochBuffer) {
|
|
523
|
+
epoch = epochBuffer[i / dimension];
|
|
524
|
+
this.coordinateEpoch(epoch);
|
|
525
|
+
}
|
|
526
|
+
this.run(point, operations, stack, epoch);
|
|
527
|
+
if (
|
|
528
|
+
float32 &&
|
|
529
|
+
Math.max(Math.abs(point.x), Math.abs(point.y), Math.abs(point.z)) > 3.4028234663852886e38
|
|
530
|
+
)
|
|
531
|
+
throw new Error('Pipeline output exceeds Float32 range');
|
|
532
|
+
coordinates[i] = point.x;
|
|
533
|
+
coordinates[i + 1] = point.y;
|
|
534
|
+
if (dimension >= 3) coordinates[i + 2] = point.z;
|
|
535
|
+
}
|
|
536
|
+
return coordinates;
|
|
537
|
+
} finally {
|
|
538
|
+
this.coordinateScratch.release(point);
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
private coordinateEpoch(epoch: number | undefined): void {
|
|
542
|
+
if (epoch === undefined) {
|
|
543
|
+
if (this.requiresEpoch) throw new Error('Pipeline requires an explicit coordinate epoch');
|
|
544
|
+
} else if (typeof epoch !== 'number' || !Number.isFinite(epoch))
|
|
545
|
+
throw new Error('Coordinate epoch must be a finite decimal year');
|
|
546
|
+
}
|
|
547
|
+
private run(
|
|
548
|
+
point: ProjectionPoint,
|
|
549
|
+
operations: readonly Operation[],
|
|
550
|
+
stack: Float64Array,
|
|
551
|
+
epoch?: number
|
|
552
|
+
): void {
|
|
553
|
+
finite(point);
|
|
554
|
+
for (const operation of operations) {
|
|
555
|
+
operation(point, stack, epoch);
|
|
556
|
+
finite(point);
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
private balanced(state: State): void {
|
|
560
|
+
if (state.stacks.some(stack => stack.length))
|
|
561
|
+
throw new Error('Pipeline stack has unbalanced push/pop operations');
|
|
562
|
+
}
|
|
563
|
+
private prepare(
|
|
564
|
+
step: PipelineStep,
|
|
565
|
+
state: State,
|
|
566
|
+
options: ProjectionPipelineOptions<Registration>,
|
|
567
|
+
cache: {pair?: Pair}
|
|
568
|
+
): Factory {
|
|
569
|
+
const allowed: Record<PipelineStep['type'], string[]> = {
|
|
570
|
+
unitconvert: ['xy', 'z'],
|
|
571
|
+
axisswap: ['order'],
|
|
572
|
+
projection: ['name', 'parameters', 'output'],
|
|
573
|
+
cart: ['ellipsoid'],
|
|
574
|
+
helmert: [
|
|
575
|
+
'translation',
|
|
576
|
+
'rotation',
|
|
577
|
+
'scalePPM',
|
|
578
|
+
'convention',
|
|
579
|
+
'exact',
|
|
580
|
+
'referenceEpoch',
|
|
581
|
+
'rates'
|
|
582
|
+
],
|
|
583
|
+
deformation: ['model', 'sourceEpoch', 'targetEpoch'],
|
|
584
|
+
push: ['components'],
|
|
585
|
+
pop: ['components'],
|
|
586
|
+
hgridshift: ['grids'],
|
|
587
|
+
vgridshift: ['grids', 'multiplier']
|
|
588
|
+
};
|
|
589
|
+
if (!step || !own(allowed, step.type))
|
|
590
|
+
unsupportedStage('Unsupported pipeline operation: ' + step?.type);
|
|
591
|
+
keys(step, ['type', 'inverse', 'omitForward', 'omitInverse', ...allowed[step.type]]);
|
|
592
|
+
if (step.inverse !== undefined && typeof step.inverse !== 'boolean')
|
|
593
|
+
throw new Error('Invalid pipeline inverse flag');
|
|
594
|
+
const inverse = Boolean(step.inverse);
|
|
595
|
+
const orient = (pair: Pair): Pair =>
|
|
596
|
+
inverse
|
|
597
|
+
? {
|
|
598
|
+
forward: pair.inverse,
|
|
599
|
+
inverse: pair.forward,
|
|
600
|
+
forwardNumeric: pair.inverseNumeric,
|
|
601
|
+
inverseNumeric: pair.forwardNumeric,
|
|
602
|
+
forwardFlat: pair.inverseFlat,
|
|
603
|
+
inverseFlat: pair.forwardFlat
|
|
604
|
+
}
|
|
605
|
+
: pair;
|
|
606
|
+
const pair =
|
|
607
|
+
(
|
|
608
|
+
forward: Operation,
|
|
609
|
+
backward: Operation,
|
|
610
|
+
forwardNumeric?: NumericStep,
|
|
611
|
+
inverseNumeric?: NumericStep,
|
|
612
|
+
forwardFlat?: NumericFlatOperation,
|
|
613
|
+
inverseFlat?: NumericFlatOperation
|
|
614
|
+
): Factory =>
|
|
615
|
+
() => {
|
|
616
|
+
cache.pair ||= {
|
|
617
|
+
forward,
|
|
618
|
+
inverse: backward,
|
|
619
|
+
forwardNumeric,
|
|
620
|
+
inverseNumeric,
|
|
621
|
+
forwardFlat,
|
|
622
|
+
inverseFlat
|
|
623
|
+
};
|
|
624
|
+
return orient(cache.pair);
|
|
625
|
+
};
|
|
626
|
+
const requireState = (
|
|
627
|
+
space: PipelineCoordinateSystem['space'],
|
|
628
|
+
expected: readonly PipelineUnit[]
|
|
629
|
+
) => {
|
|
630
|
+
if (state.space !== space || expected.some((unit, index) => state.units[index] !== unit))
|
|
631
|
+
throw new Error(
|
|
632
|
+
'Pipeline step ' + step.type + ' requires ' + space + ' ' + expected.join('/')
|
|
633
|
+
);
|
|
634
|
+
};
|
|
635
|
+
switch (step.type) {
|
|
636
|
+
case 'unitconvert': {
|
|
637
|
+
if (!step.xy && !step.z) throw new Error('Empty unit conversion');
|
|
638
|
+
const scale = [1, 1, 1];
|
|
639
|
+
for (const [conversion, indices] of [
|
|
640
|
+
[step.xy, [0, 1]],
|
|
641
|
+
[step.z, [2]]
|
|
642
|
+
] as const) {
|
|
643
|
+
if (!conversion) continue;
|
|
644
|
+
keys(conversion, ['from', 'to']);
|
|
645
|
+
const {from, to} = conversion;
|
|
646
|
+
if (!own(factors, from) || !own(factors, to) || angular(from) !== angular(to))
|
|
647
|
+
throw new Error('Incompatible pipeline units');
|
|
648
|
+
for (const index of indices) {
|
|
649
|
+
if (state.units[index] !== (inverse ? to : from))
|
|
650
|
+
throw new Error('Pipeline unit mismatch');
|
|
651
|
+
state.units[index] = inverse ? from : to;
|
|
652
|
+
scale[index] = factors[from] / factors[to];
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
this.requiresZ ||= Boolean(step.z);
|
|
656
|
+
const [xScale, yScale, zScale] = scale;
|
|
657
|
+
return pair(
|
|
658
|
+
p => {
|
|
659
|
+
p.x *= xScale;
|
|
660
|
+
p.y *= yScale;
|
|
661
|
+
p.z *= zScale;
|
|
662
|
+
},
|
|
663
|
+
p => {
|
|
664
|
+
p.x /= xScale;
|
|
665
|
+
p.y /= yScale;
|
|
666
|
+
p.z /= zScale;
|
|
667
|
+
},
|
|
668
|
+
[0, xScale, yScale, zScale],
|
|
669
|
+
[1, xScale, yScale, zScale]
|
|
670
|
+
);
|
|
671
|
+
}
|
|
672
|
+
case 'axisswap': {
|
|
673
|
+
const order = [...step.order];
|
|
674
|
+
if (
|
|
675
|
+
![2, 3].includes(order.length) ||
|
|
676
|
+
order.some(
|
|
677
|
+
index =>
|
|
678
|
+
!Number.isInteger(index) || Math.abs(index) < 1 || Math.abs(index) > order.length
|
|
679
|
+
) ||
|
|
680
|
+
new Set(order.map(Math.abs)).size !== order.length
|
|
681
|
+
)
|
|
682
|
+
throw new Error('Axis order must be a signed permutation');
|
|
683
|
+
if (order.length === 2) order.push(3);
|
|
684
|
+
this.requiresZ ||= step.order.length === 3;
|
|
685
|
+
const reverse = [0, 0, 0];
|
|
686
|
+
order.forEach((index, target) => {
|
|
687
|
+
reverse[Math.abs(index) - 1] = Math.sign(index) * (target + 1);
|
|
688
|
+
});
|
|
689
|
+
const selected = inverse ? reverse : order;
|
|
690
|
+
state.units = selected.map(index => state.units[Math.abs(index) - 1]) as typeof state.units;
|
|
691
|
+
const operation = (indices: number[]): Operation => {
|
|
692
|
+
const [a, b, c] = indices.map(Math.abs);
|
|
693
|
+
const [sx, sy, sz] = indices.map(Math.sign);
|
|
694
|
+
return p => {
|
|
695
|
+
const {x, y, z} = p;
|
|
696
|
+
p.x = sx * (a === 1 ? x : a === 2 ? y : z);
|
|
697
|
+
p.y = sy * (b === 1 ? x : b === 2 ? y : z);
|
|
698
|
+
p.z = sz * (c === 1 ? x : c === 2 ? y : z);
|
|
699
|
+
};
|
|
700
|
+
};
|
|
701
|
+
return pair(
|
|
702
|
+
operation(order),
|
|
703
|
+
operation(reverse),
|
|
704
|
+
[2, order[0], order[1], order[2]],
|
|
705
|
+
[2, reverse[0], reverse[1], reverse[2]]
|
|
706
|
+
);
|
|
707
|
+
}
|
|
708
|
+
case 'projection': {
|
|
709
|
+
const output: PipelineProjectionOutput =
|
|
710
|
+
step.output === undefined ? {space: 'projected', unit: 'm'} : {...step.output};
|
|
711
|
+
keys(output, ['space', 'unit']);
|
|
712
|
+
if (
|
|
713
|
+
output.space === 'geographic'
|
|
714
|
+
? !['rad', 'deg'].includes(output.unit)
|
|
715
|
+
: output.space !== 'projected' || output.unit !== 'm'
|
|
716
|
+
)
|
|
717
|
+
throw new Error('Invalid projection output space/unit contract');
|
|
718
|
+
requireState(
|
|
719
|
+
inverse ? output.space : 'geographic',
|
|
720
|
+
inverse ? [output.unit, output.unit] : ['rad', 'rad']
|
|
721
|
+
);
|
|
722
|
+
state.space = inverse ? 'geographic' : output.space;
|
|
723
|
+
state.units[0] = state.units[1] = inverse ? 'rad' : output.unit;
|
|
724
|
+
const key = (name: string) => name.toLowerCase().replace(/[\s_-]/g, '');
|
|
725
|
+
if (typeof step.name !== 'string') throw new Error('Invalid projection name');
|
|
726
|
+
const registration = options.projections?.find(p =>
|
|
727
|
+
[p.name, ...(p.aliases || [])].some(name => key(name) === key(step.name))
|
|
728
|
+
);
|
|
729
|
+
if (!registration) unsupportedStage('Pipeline projection is not registered: ' + step.name);
|
|
730
|
+
if (!this.required.includes(registration)) this.required.push(registration);
|
|
731
|
+
const parameters = {...step.parameters};
|
|
732
|
+
for (const name of Object.keys(parameters))
|
|
733
|
+
if (CORE_PARAMETERS.includes(name) && !geometryKeys.includes(name) && name !== 'over')
|
|
734
|
+
unsupportedStage('Unsupported pipeline parameter: ' + name);
|
|
735
|
+
const oblique = key(registration.name) === 'obtran';
|
|
736
|
+
const geographicChild = ['longlat', 'latlong', 'latlon', 'lonlat', 'identity'].includes(
|
|
737
|
+
key(parameters['o_proj'] || '')
|
|
738
|
+
);
|
|
739
|
+
if (oblique && (!step.output || !parameters['o_proj']))
|
|
740
|
+
unsupportedStage(
|
|
741
|
+
'Oblique helper pipelines require an explicit output-unit contract and o_proj'
|
|
742
|
+
);
|
|
743
|
+
if ((oblique && geographicChild) !== (output.space === 'geographic'))
|
|
744
|
+
throw new Error('Projection output contract does not match its algorithm');
|
|
745
|
+
const scale = geographicChild && output.unit === 'rad' ? Math.PI / 180 : 1;
|
|
746
|
+
const normalized = normalizeCRS(definition(registration.name, parameters));
|
|
747
|
+
if (normalized.kind !== 'projected')
|
|
748
|
+
unsupportedStage('Use a cart step for geocentric conversion');
|
|
749
|
+
return () => {
|
|
750
|
+
if (cache.pair) return orient(cache.pair);
|
|
751
|
+
const plugin = getLoadedProjection(registration);
|
|
752
|
+
if (!plugin)
|
|
753
|
+
unsupportedStage('Pipeline projection requires preload(): ' + registration.name);
|
|
754
|
+
if ((key(plugin.name) === 'obtran') !== oblique)
|
|
755
|
+
unsupportedStage(
|
|
756
|
+
'Pipeline projection requires a matching projected-metre output contract: ' +
|
|
757
|
+
plugin.name
|
|
758
|
+
);
|
|
759
|
+
if (
|
|
760
|
+
[
|
|
761
|
+
'geocent',
|
|
762
|
+
'geocentric',
|
|
763
|
+
'identity',
|
|
764
|
+
'longlat',
|
|
765
|
+
'latlong',
|
|
766
|
+
'latlon',
|
|
767
|
+
'lonlat'
|
|
768
|
+
].includes(key(plugin.name))
|
|
769
|
+
)
|
|
770
|
+
unsupportedStage(
|
|
771
|
+
'Pipeline projection requires a projected-metre output contract: ' + plugin.name
|
|
772
|
+
);
|
|
773
|
+
keys(parameters, [...geometryKeys, 'over', ...plugin.parameters]);
|
|
774
|
+
for (const [name, value] of Object.entries(parameters)) {
|
|
775
|
+
const flag = name === 'over' || plugin.flags?.includes(name);
|
|
776
|
+
if (flag && value !== undefined)
|
|
777
|
+
throw new Error('Expected a flag without a value: ' + name);
|
|
778
|
+
if (!flag && value === undefined)
|
|
779
|
+
throw new Error('Pipeline parameter requires a value: ' + name);
|
|
780
|
+
}
|
|
781
|
+
const implementation = plugin.create({
|
|
782
|
+
parameters: {...normalized.parameters, proj: plugin.name},
|
|
783
|
+
semiMajorAxis: normalized.ellipsoid.semiMajorAxis,
|
|
784
|
+
semiMinorAxis: normalized.ellipsoid.semiMinorAxis,
|
|
785
|
+
eccentricitySquared: normalized.ellipsoid.eccentricitySquared
|
|
786
|
+
});
|
|
787
|
+
const forward = projectionOperation(implementation, false),
|
|
788
|
+
backward = projectionOperation(implementation, true);
|
|
789
|
+
cache.pair = oblique
|
|
790
|
+
? {
|
|
791
|
+
forward: p => {
|
|
792
|
+
if (Math.abs(p.y) > Math.PI / 2) throw new Error('Invalid geographic latitude');
|
|
793
|
+
forward(p);
|
|
794
|
+
p.x *= scale;
|
|
795
|
+
p.y *= scale;
|
|
796
|
+
},
|
|
797
|
+
inverse: p => {
|
|
798
|
+
if (geographicChild && Math.abs(p.y) > (output.unit === 'deg' ? 90 : Math.PI / 2))
|
|
799
|
+
throw new Error('Invalid rotated geographic latitude');
|
|
800
|
+
p.x /= scale;
|
|
801
|
+
p.y /= scale;
|
|
802
|
+
backward(p);
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
: {forward, inverse: backward};
|
|
806
|
+
return orient(cache.pair);
|
|
807
|
+
};
|
|
808
|
+
}
|
|
809
|
+
case 'cart': {
|
|
810
|
+
requireState(
|
|
811
|
+
inverse ? 'geocentric' : 'geographic',
|
|
812
|
+
inverse ? ['m', 'm', 'm'] : ['rad', 'rad', 'm']
|
|
813
|
+
);
|
|
814
|
+
state.space = inverse ? 'geographic' : 'geocentric';
|
|
815
|
+
state.units = inverse ? ['rad', 'rad', 'm'] : ['m', 'm', 'm'];
|
|
816
|
+
this.requiresZ = true;
|
|
817
|
+
keys(step.ellipsoid || {}, geometryKeys);
|
|
818
|
+
const ellipsoid = normalizeCRS(definition('longlat', step.ellipsoid)).ellipsoid;
|
|
819
|
+
return pair(
|
|
820
|
+
p => geodeticToGeocentricInPlace(p, ellipsoid),
|
|
821
|
+
p => geocentricToGeodeticInPlace(p, ellipsoid)
|
|
822
|
+
);
|
|
823
|
+
}
|
|
824
|
+
case 'helmert': {
|
|
825
|
+
requireState('geocentric', ['m', 'm', 'm']);
|
|
826
|
+
this.requiresZ = true;
|
|
827
|
+
triple(step.translation);
|
|
828
|
+
if (step.rotation) triple(step.rotation);
|
|
829
|
+
if ((step.rotation || step.rates?.rotation) && !step.convention)
|
|
830
|
+
throw new Error('Helmert rotation requires a convention');
|
|
831
|
+
if (
|
|
832
|
+
step.convention !== undefined &&
|
|
833
|
+
!['position_vector', 'coordinate_frame'].includes(step.convention)
|
|
834
|
+
)
|
|
835
|
+
throw new Error('Invalid Helmert convention');
|
|
836
|
+
const scale = step.scalePPM ?? 0;
|
|
837
|
+
if (!Number.isFinite(scale) || scale <= -1e6)
|
|
838
|
+
throw new Error('Helmert requires positive finite scale');
|
|
839
|
+
if (step.exact !== undefined && typeof step.exact !== 'boolean')
|
|
840
|
+
throw new Error('Invalid exact Helmert flag');
|
|
841
|
+
if (step.rates !== undefined) {
|
|
842
|
+
keys(step.rates, ['translation', 'rotation', 'scalePPM']);
|
|
843
|
+
if (
|
|
844
|
+
step.rates.translation === undefined &&
|
|
845
|
+
step.rates.rotation === undefined &&
|
|
846
|
+
step.rates.scalePPM === undefined
|
|
847
|
+
)
|
|
848
|
+
throw new Error('Helmert rates require at least one parameter');
|
|
849
|
+
if (step.rates.translation !== undefined) triple(step.rates.translation);
|
|
850
|
+
if (step.rates.rotation !== undefined) triple(step.rates.rotation);
|
|
851
|
+
if (step.rates.scalePPM !== undefined && !Number.isFinite(step.rates.scalePPM))
|
|
852
|
+
throw new Error('Helmert scale rate must be finite');
|
|
853
|
+
if (typeof step.referenceEpoch !== 'number' || !Number.isFinite(step.referenceEpoch))
|
|
854
|
+
throw new Error('Helmert rates require a finite referenceEpoch');
|
|
855
|
+
this.requiresEpoch = true;
|
|
856
|
+
const operation = createKinematicHelmert(
|
|
857
|
+
step.translation,
|
|
858
|
+
step.rotation || [0, 0, 0],
|
|
859
|
+
scale,
|
|
860
|
+
step.rates,
|
|
861
|
+
step.referenceEpoch,
|
|
862
|
+
step.convention === 'coordinate_frame',
|
|
863
|
+
Boolean(step.exact)
|
|
864
|
+
);
|
|
865
|
+
return pair(
|
|
866
|
+
(p, _stack, epoch) => operation.forward(p, epoch),
|
|
867
|
+
(p, _stack, epoch) => operation.inverse(p, epoch),
|
|
868
|
+
undefined,
|
|
869
|
+
undefined,
|
|
870
|
+
operation.forwardFlat,
|
|
871
|
+
operation.inverseFlat
|
|
872
|
+
);
|
|
873
|
+
}
|
|
874
|
+
if (step.referenceEpoch !== undefined)
|
|
875
|
+
throw new Error('Helmert referenceEpoch requires rates');
|
|
876
|
+
if (step.exact) {
|
|
877
|
+
const exact = createExactHelmert(
|
|
878
|
+
step.translation,
|
|
879
|
+
step.rotation || [0, 0, 0],
|
|
880
|
+
scale,
|
|
881
|
+
step.convention === 'coordinate_frame'
|
|
882
|
+
);
|
|
883
|
+
return pair(
|
|
884
|
+
exact.forward,
|
|
885
|
+
exact.inverse,
|
|
886
|
+
undefined,
|
|
887
|
+
undefined,
|
|
888
|
+
createHelmertFlat(exact.coefficients, false, true),
|
|
889
|
+
createHelmertFlat(exact.coefficients, true, true)
|
|
890
|
+
);
|
|
891
|
+
}
|
|
892
|
+
const sign = step.convention === 'coordinate_frame' ? -1 : 1;
|
|
893
|
+
const values = [
|
|
894
|
+
...step.translation,
|
|
895
|
+
...(step.rotation || [0, 0, 0]).map(value => sign * value),
|
|
896
|
+
scale
|
|
897
|
+
];
|
|
898
|
+
const radians = Math.PI / (180 * 3600);
|
|
899
|
+
const coefficients = [
|
|
900
|
+
(values[3] || 0) * radians,
|
|
901
|
+
(values[4] || 0) * radians,
|
|
902
|
+
(values[5] || 0) * radians,
|
|
903
|
+
0,
|
|
904
|
+
0,
|
|
905
|
+
0,
|
|
906
|
+
0,
|
|
907
|
+
0,
|
|
908
|
+
0,
|
|
909
|
+
values[0],
|
|
910
|
+
values[1],
|
|
911
|
+
values[2],
|
|
912
|
+
1 + (values[6] || 0) / 1e6
|
|
913
|
+
];
|
|
914
|
+
return pair(
|
|
915
|
+
createHelmert(values, false),
|
|
916
|
+
createHelmert(values, true),
|
|
917
|
+
undefined,
|
|
918
|
+
undefined,
|
|
919
|
+
createHelmertFlat(coefficients, false, false),
|
|
920
|
+
createHelmertFlat(coefficients, true, false)
|
|
921
|
+
);
|
|
922
|
+
}
|
|
923
|
+
case 'deformation': {
|
|
924
|
+
requireState('geocentric', ['m', 'm', 'm']);
|
|
925
|
+
this.requiresZ = true;
|
|
926
|
+
const source = step.sourceEpoch,
|
|
927
|
+
target = step.targetEpoch;
|
|
928
|
+
if (
|
|
929
|
+
(source !== 'coordinate' && (typeof source !== 'number' || !Number.isFinite(source))) ||
|
|
930
|
+
typeof target !== 'number' ||
|
|
931
|
+
!Number.isFinite(target)
|
|
932
|
+
)
|
|
933
|
+
throw new Error('Explicit finite deformation source/target epochs required');
|
|
934
|
+
if (
|
|
935
|
+
!step.model ||
|
|
936
|
+
typeof step.model.forward !== 'function' ||
|
|
937
|
+
typeof step.model.inverse !== 'function'
|
|
938
|
+
)
|
|
939
|
+
throw new Error('Prepared deformation model required');
|
|
940
|
+
this.requiresEpoch ||= source === 'coordinate';
|
|
941
|
+
const forward = step.model.forward.bind(step.model),
|
|
942
|
+
backward = step.model.inverse.bind(step.model);
|
|
943
|
+
return pair(
|
|
944
|
+
(p, _stack, epoch) => forward(p, source === 'coordinate' ? epoch : source, target),
|
|
945
|
+
(p, _stack, epoch) => backward(p, source === 'coordinate' ? epoch : source, target)
|
|
946
|
+
);
|
|
947
|
+
}
|
|
948
|
+
case 'push':
|
|
949
|
+
case 'pop': {
|
|
950
|
+
if (
|
|
951
|
+
!Array.isArray(step.components) ||
|
|
952
|
+
!step.components.length ||
|
|
953
|
+
step.components.some(
|
|
954
|
+
component => !Number.isInteger(component) || component < 1 || component > 3
|
|
955
|
+
) ||
|
|
956
|
+
new Set(step.components).size !== step.components.length
|
|
957
|
+
)
|
|
958
|
+
throw new Error('Stack components must be distinct ordinates 1, 2 or 3');
|
|
959
|
+
const components = [...step.components];
|
|
960
|
+
this.requiresZ ||= components.includes(3);
|
|
961
|
+
const pushing = (step.type === 'push') !== inverse;
|
|
962
|
+
const entries = components.map(component => {
|
|
963
|
+
const index = component - 1;
|
|
964
|
+
if (pushing) {
|
|
965
|
+
const entry = {unit: state.units[index], space: state.space, slot: this.stackSize++};
|
|
966
|
+
state.stacks[index].push(entry);
|
|
967
|
+
return entry;
|
|
968
|
+
}
|
|
969
|
+
const entry = state.stacks[index].pop();
|
|
970
|
+
if (!entry) throw new Error('Pipeline stack underflow for ordinate ' + component);
|
|
971
|
+
return entry;
|
|
972
|
+
});
|
|
973
|
+
if (!pushing) {
|
|
974
|
+
const horizontal = components
|
|
975
|
+
.map((component, index) => ({component, entry: entries[index]}))
|
|
976
|
+
.filter(({component}) => component < 3);
|
|
977
|
+
const space = horizontal[0]?.entry.space || state.space;
|
|
978
|
+
if (
|
|
979
|
+
horizontal.some(({entry}) => entry.space !== space) ||
|
|
980
|
+
(horizontal.length === 1 && space !== state.space)
|
|
981
|
+
)
|
|
982
|
+
throw new Error('Stack restore would mix horizontal coordinate spaces');
|
|
983
|
+
state.space = space;
|
|
984
|
+
components.forEach((component, index) => {
|
|
985
|
+
state.units[component - 1] = entries[index].unit;
|
|
986
|
+
});
|
|
987
|
+
}
|
|
988
|
+
const save: Operation = (p, stack) => {
|
|
989
|
+
for (let index = 0; index < components.length; index++)
|
|
990
|
+
stack[entries[index].slot] =
|
|
991
|
+
components[index] === 1 ? p.x : components[index] === 2 ? p.y : p.z;
|
|
992
|
+
};
|
|
993
|
+
const restore: Operation = (p, stack) => {
|
|
994
|
+
for (let index = 0; index < components.length; index++) {
|
|
995
|
+
const value = stack[entries[index].slot];
|
|
996
|
+
if (components[index] === 1) p.x = value;
|
|
997
|
+
else if (components[index] === 2) p.y = value;
|
|
998
|
+
else p.z = value;
|
|
999
|
+
}
|
|
1000
|
+
};
|
|
1001
|
+
// Unlike equations, stack slots are direction-local and must not use the
|
|
1002
|
+
// shared pair cache. Their matching push is known at construction.
|
|
1003
|
+
return () =>
|
|
1004
|
+
pushing ? {forward: save, inverse: restore} : {forward: restore, inverse: save};
|
|
1005
|
+
}
|
|
1006
|
+
case 'hgridshift': {
|
|
1007
|
+
requireState('geographic', ['rad', 'rad']);
|
|
1008
|
+
if (typeof step.grids !== 'string') throw new Error('Horizontal grid names required');
|
|
1009
|
+
const crs = normalizeCRS(definition('longlat', {nadgrids: step.grids}));
|
|
1010
|
+
// Normalization collapses sole null/@null lists to no datum-grid metadata.
|
|
1011
|
+
if (!crs.datum.grids)
|
|
1012
|
+
return pair(
|
|
1013
|
+
() => {},
|
|
1014
|
+
() => {}
|
|
1015
|
+
);
|
|
1016
|
+
const grids = crs.datum.grids.map(reference => {
|
|
1017
|
+
const grid = own(options.datumGrids || {}, reference.name)
|
|
1018
|
+
? options.datumGrids[reference.name]
|
|
1019
|
+
: undefined;
|
|
1020
|
+
if (reference.name !== 'null' && !grid && !reference.optional)
|
|
1021
|
+
unsupportedStage('Required datum grid is not registered: ' + reference.name);
|
|
1022
|
+
if (grid && typeof grid.shift !== 'function')
|
|
1023
|
+
throw new Error('Invalid datum grid: ' + reference.name);
|
|
1024
|
+
return {...reference, grid};
|
|
1025
|
+
});
|
|
1026
|
+
const datum = {...crs.datum, grids};
|
|
1027
|
+
return pair(
|
|
1028
|
+
p => applyDatumGrids(p, datum, false),
|
|
1029
|
+
p => applyDatumGrids(p, datum, true)
|
|
1030
|
+
);
|
|
1031
|
+
}
|
|
1032
|
+
case 'vgridshift': {
|
|
1033
|
+
requireState('geographic', ['rad', 'rad', 'm']);
|
|
1034
|
+
this.requiresZ = true;
|
|
1035
|
+
if (typeof step.grids !== 'string') throw new Error('Vertical grid names required');
|
|
1036
|
+
const offset = compileVerticalGrid(step.grids, options.verticalGrids);
|
|
1037
|
+
const multiplier = step.multiplier ?? -1;
|
|
1038
|
+
if (!Number.isFinite(multiplier))
|
|
1039
|
+
throw new Error('Vertical grid multiplier must be finite');
|
|
1040
|
+
return pair(
|
|
1041
|
+
p => {
|
|
1042
|
+
p.z += multiplier * offset(p.x, p.y);
|
|
1043
|
+
},
|
|
1044
|
+
p => {
|
|
1045
|
+
p.z -= multiplier * offset(p.x, p.y);
|
|
1046
|
+
}
|
|
1047
|
+
);
|
|
1048
|
+
}
|
|
1049
|
+
default:
|
|
1050
|
+
throw new Error('Unsupported pipeline step');
|
|
1051
|
+
}
|
|
1052
|
+
}
|
|
1053
|
+
}
|