@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,61 @@
|
|
|
1
|
+
// math.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
|
+
|
|
5
|
+
/** Raw PROJ parameters. Angles are decimal degrees and lengths are meters. */
|
|
6
|
+
export type ProjectionParameters = Readonly<Record<string, string | undefined>>;
|
|
7
|
+
|
|
8
|
+
/** Mutable scratch owned by the caller. Hooks must update synchronously and never retain it. */
|
|
9
|
+
export type ProjectionPoint = {x: number; y: number; z: number};
|
|
10
|
+
|
|
11
|
+
/** Engine-validated interleaved floating-point storage. */
|
|
12
|
+
export type ProjectionFlatOperation = (
|
|
13
|
+
coordinates: Float32Array | Float64Array,
|
|
14
|
+
dimension: number
|
|
15
|
+
) => void;
|
|
16
|
+
/** Unit conversion for a horizontal geographic/projected batch, in pipeline order. */
|
|
17
|
+
export type ProjectionFlatContext = {
|
|
18
|
+
readonly inputScale: number;
|
|
19
|
+
readonly outputScale: number;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/** A projection operates on radians and meters; the engine handles CRS units. */
|
|
23
|
+
export type ProjectionImplementation = {
|
|
24
|
+
/** Optional whole-buffer specialization. Return undefined to keep the general pipeline.
|
|
25
|
+
* Called only for geographic/projected pairs without datum, axis, prime-meridian,
|
|
26
|
+
* vertical-unit, longitude-wrap or lossy stages. The engine validates storage and stride.
|
|
27
|
+
* The operation must validate each XYZ, scale XY before/after projection, check domains
|
|
28
|
+
* and Float32 range, preserve Z/trailing ordinates, and commit only completed records.
|
|
29
|
+
* Factories run at construction; operations must not retain buffers or scratch across calls.
|
|
30
|
+
*/
|
|
31
|
+
createForwardFlat?(context: ProjectionFlatContext): ProjectionFlatOperation | undefined;
|
|
32
|
+
createInverseFlat?(context: ProjectionFlatContext): ProjectionFlatOperation | undefined;
|
|
33
|
+
/** Optional mutable hooks avoid scalar coordinate arrays; preserve z for horizontal projections. */
|
|
34
|
+
forwardInPlace?(point: ProjectionPoint): void;
|
|
35
|
+
inverseInPlace?(point: ProjectionPoint): void;
|
|
36
|
+
/** Optional Cartesian operations used by geocentric plugins. */
|
|
37
|
+
forward3D?(point: [number, number, number]): [number, number, number];
|
|
38
|
+
inverse3D?(point: [number, number, number]): [number, number, number];
|
|
39
|
+
forward(longitude: number, latitude: number): [number, number];
|
|
40
|
+
inverse(x: number, y: number): [number, number];
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/** Initialized geometry shared by projection plugins. No datum shift is implied. */
|
|
44
|
+
export type ProjectionContext = {
|
|
45
|
+
/** Preserve the normalized polar axis; recovering it from eccentricity can lose precision. */
|
|
46
|
+
readonly semiMinorAxis?: number;
|
|
47
|
+
readonly semiMajorAxis: number;
|
|
48
|
+
readonly eccentricitySquared: number;
|
|
49
|
+
readonly parameters: ProjectionParameters;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
/** Explicit registration avoids global state and imports of unused projections. */
|
|
53
|
+
export type ProjectionPlugin = {
|
|
54
|
+
readonly name: string;
|
|
55
|
+
readonly aliases?: readonly string[];
|
|
56
|
+
/** Projection-specific PROJ parameters accepted in addition to the core parameters. */
|
|
57
|
+
readonly parameters: readonly string[];
|
|
58
|
+
/** Parameters accepted without a value, such as +south. */
|
|
59
|
+
readonly flags?: readonly string[];
|
|
60
|
+
create(context: ProjectionContext): ProjectionImplementation;
|
|
61
|
+
};
|
|
@@ -0,0 +1,545 @@
|
|
|
1
|
+
// math.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
|
+
import type {TypeScriptCRSInput} from './crs/spatial-reference';
|
|
5
|
+
import type {ProjectionDescriptor} from './projection-descriptor';
|
|
6
|
+
import {getLoadedProjection, preloadProjection} from './projection-descriptor';
|
|
7
|
+
import type {
|
|
8
|
+
ProjectionImplementation,
|
|
9
|
+
ProjectionPlugin,
|
|
10
|
+
ProjectionPoint,
|
|
11
|
+
ProjectionFlatOperation
|
|
12
|
+
} from './types';
|
|
13
|
+
import {projectionOperation} from './mutable-projection';
|
|
14
|
+
import {ProjectionScratch} from './projection-scratch';
|
|
15
|
+
import {validateScalarOutput, writeScalarOutput} from './scalar-output';
|
|
16
|
+
import type {ProjectionCoordinate, ProjectionOutput} from './scalar-output';
|
|
17
|
+
import {CORE_FLAGS, CORE_PARAMETERS, normalizeCRS} from './crs/normalize';
|
|
18
|
+
import {TypeScriptCRSError, unsupportedStage} from './crs/types';
|
|
19
|
+
import type {CRSCompatibilityReason, CRSNormalizationOptions, NormalizedCRS} from './crs/types';
|
|
20
|
+
import {createDatumTransform} from './datum';
|
|
21
|
+
import {wrapLongitude} from './parameters';
|
|
22
|
+
import {compileVerticalGrid} from './vertical-datum';
|
|
23
|
+
import type {DatumGridCollection, VerticalGridCollection} from './grids/types';
|
|
24
|
+
|
|
25
|
+
type ProjectionRegistration = ProjectionPlugin | ProjectionDescriptor;
|
|
26
|
+
type ProjectionResult<P, Result> =
|
|
27
|
+
Extract<P, ProjectionDescriptor> extends never ? Result : Promise<Result>;
|
|
28
|
+
export type ProjectionEngineOptions<P extends ProjectionRegistration = ProjectionPlugin> =
|
|
29
|
+
CRSNormalizationOptions & {
|
|
30
|
+
from?: TypeScriptCRSInput;
|
|
31
|
+
to?: TypeScriptCRSInput;
|
|
32
|
+
/** Only these projection implementations are available to this instance. */
|
|
33
|
+
projections?: readonly P[];
|
|
34
|
+
/** Honor declared axis order/direction. Default false, matching proj4js. */
|
|
35
|
+
enforceAxis?: boolean;
|
|
36
|
+
/** Prepared horizontal grids keyed by the names used in +nadgrids. No global registry. */
|
|
37
|
+
datumGrids?: DatumGridCollection;
|
|
38
|
+
/** Prepared geoid undulations keyed by +geoidgrids names. No implicit fetching. */
|
|
39
|
+
verticalGrids?: VerticalGridCollection;
|
|
40
|
+
};
|
|
41
|
+
export type ProjectionEngineCreateOptions = ProjectionEngineOptions<ProjectionRegistration>;
|
|
42
|
+
export type ProjectionArray = Float32Array | Float64Array;
|
|
43
|
+
type CoordinateTransform = {
|
|
44
|
+
flat?: ProjectionFlatOperation;
|
|
45
|
+
run(point: ProjectionPoint): void;
|
|
46
|
+
requiresInputZ: boolean;
|
|
47
|
+
geocentricOutput: boolean;
|
|
48
|
+
};
|
|
49
|
+
type CompiledCRS = NormalizedCRS & {
|
|
50
|
+
implementation?: ProjectionImplementation;
|
|
51
|
+
verticalGrid?: (longitude: number, latitude: number) => number;
|
|
52
|
+
};
|
|
53
|
+
/** Configurable math.gl projection engine; see the documented supported subset and accuracy limits.
|
|
54
|
+
* Third ordinates are height (gravity-related with +geoidgrids) or geocentric Z.
|
|
55
|
+
*/
|
|
56
|
+
export class ProjectionEngine<P extends ProjectionRegistration = ProjectionPlugin> {
|
|
57
|
+
/** Resolve required descriptors once, then return an ordinary synchronous instance. */
|
|
58
|
+
static async create(options: ProjectionEngineCreateOptions = {}): Promise<ProjectionEngine> {
|
|
59
|
+
const projections = await Promise.all(requiredProjections(options).map(preloadProjection));
|
|
60
|
+
return new ProjectionEngine({...options, projections});
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
private readonly coordinateScratch = new ProjectionScratch();
|
|
64
|
+
private readonly forwardTransform?: CoordinateTransform;
|
|
65
|
+
private readonly inverseTransform?: CoordinateTransform;
|
|
66
|
+
private readonly deferred?: {
|
|
67
|
+
options: ProjectionEngineCreateOptions;
|
|
68
|
+
pending?: Promise<ProjectionEngine>;
|
|
69
|
+
implementation?: ProjectionEngine;
|
|
70
|
+
};
|
|
71
|
+
readonly lossy: boolean;
|
|
72
|
+
constructor(options: ProjectionEngineOptions<P> = {}) {
|
|
73
|
+
const registrations = options.projections || [];
|
|
74
|
+
const plugins = registry(registrations);
|
|
75
|
+
if (registrations.some(projection => !('create' in projection))) {
|
|
76
|
+
// Inspect definitions without fetching any algorithms. Importing descriptors
|
|
77
|
+
// and constructing an instance never starts a dynamic import.
|
|
78
|
+
const from = normalizeCRS(options.from ?? 'WGS84', options);
|
|
79
|
+
const to = normalizeCRS(options.to ?? 'WGS84', options);
|
|
80
|
+
this.lossy = from.lossy || to.lossy;
|
|
81
|
+
this.deferred = {options: {...options, projections: [...registrations]}};
|
|
82
|
+
} else {
|
|
83
|
+
const eager = options as ProjectionEngineOptions;
|
|
84
|
+
const eagerPlugins = plugins as ReadonlyMap<string, ProjectionPlugin>;
|
|
85
|
+
const from = compileCRS(eager.from ?? 'WGS84', eagerPlugins, eager);
|
|
86
|
+
const to = compileCRS(eager.to ?? 'WGS84', eagerPlugins, eager);
|
|
87
|
+
this.lossy = from.lossy || to.lossy;
|
|
88
|
+
if (this.lossy && (from.kind === 'geocentric' || to.kind === 'geocentric'))
|
|
89
|
+
unsupportedStage(
|
|
90
|
+
'Horizontal extraction cannot supply ellipsoidal height for geocentric coordinates'
|
|
91
|
+
);
|
|
92
|
+
if (this.lossy && (from.verticalGrid || to.verticalGrid))
|
|
93
|
+
unsupportedStage('Horizontal extraction cannot be combined with vertical grids');
|
|
94
|
+
this.forwardTransform = compileTransform(from, to, Boolean(options.enforceAxis));
|
|
95
|
+
this.inverseTransform = compileTransform(to, from, Boolean(options.enforceAxis));
|
|
96
|
+
}
|
|
97
|
+
this.project = this.project.bind(this);
|
|
98
|
+
this.unproject = this.unproject.bind(this);
|
|
99
|
+
this.projectTo = this.projectTo.bind(this);
|
|
100
|
+
this.unprojectTo = this.unprojectTo.bind(this);
|
|
101
|
+
this.projectToSync = this.projectToSync.bind(this);
|
|
102
|
+
this.unprojectToSync = this.unprojectToSync.bind(this);
|
|
103
|
+
this.projectFlat = this.projectFlat.bind(this);
|
|
104
|
+
this.unprojectFlat = this.unprojectFlat.bind(this);
|
|
105
|
+
this.projectSync = this.projectSync.bind(this);
|
|
106
|
+
this.unprojectSync = this.unprojectSync.bind(this);
|
|
107
|
+
this.projectFlatSync = this.projectFlatSync.bind(this);
|
|
108
|
+
this.unprojectFlatSync = this.unprojectFlatSync.bind(this);
|
|
109
|
+
}
|
|
110
|
+
private load(): Promise<ProjectionEngine> {
|
|
111
|
+
const state = this.deferred;
|
|
112
|
+
if (!state) return Promise.resolve(this as unknown as ProjectionEngine);
|
|
113
|
+
if (state.implementation) return Promise.resolve(state.implementation);
|
|
114
|
+
state.pending ||= ProjectionEngine.create(state.options)
|
|
115
|
+
.then(projection => {
|
|
116
|
+
state.implementation = projection;
|
|
117
|
+
return projection;
|
|
118
|
+
})
|
|
119
|
+
.catch(error => {
|
|
120
|
+
state.pending = undefined;
|
|
121
|
+
throw error;
|
|
122
|
+
});
|
|
123
|
+
return state.pending;
|
|
124
|
+
}
|
|
125
|
+
private loadSync(): ProjectionEngine {
|
|
126
|
+
const state = this.deferred;
|
|
127
|
+
if (!state) return this as unknown as ProjectionEngine;
|
|
128
|
+
if (!state.implementation) {
|
|
129
|
+
const projections = requiredProjections(state.options).map(descriptor => {
|
|
130
|
+
const plugin = getLoadedProjection(descriptor);
|
|
131
|
+
if (!plugin)
|
|
132
|
+
throw new Error(
|
|
133
|
+
'Projection is not preloaded: ' + descriptor.name + '. Call preload() first.'
|
|
134
|
+
);
|
|
135
|
+
return plugin;
|
|
136
|
+
});
|
|
137
|
+
state.implementation = new ProjectionEngine({...state.options, projections});
|
|
138
|
+
}
|
|
139
|
+
return state.implementation;
|
|
140
|
+
}
|
|
141
|
+
/** Synchronous variants never import algorithms; descriptors must be preloaded. */
|
|
142
|
+
projectSync(coordinate: readonly number[]): number[] {
|
|
143
|
+
return this.deferred
|
|
144
|
+
? this.loadSync().project(coordinate)
|
|
145
|
+
: transformScalar(coordinate, this.forwardTransform, this.coordinateScratch);
|
|
146
|
+
}
|
|
147
|
+
unprojectSync(coordinate: readonly number[]): number[] {
|
|
148
|
+
return this.deferred
|
|
149
|
+
? this.loadSync().unproject(coordinate)
|
|
150
|
+
: transformScalar(coordinate, this.inverseTransform, this.coordinateScratch);
|
|
151
|
+
}
|
|
152
|
+
projectFlatSync<T extends ProjectionArray>(coordinates: T, dimension = 2): T {
|
|
153
|
+
return this.deferred
|
|
154
|
+
? this.loadSync().projectFlat(coordinates, dimension)
|
|
155
|
+
: transformInPlace(coordinates, dimension, this.forwardTransform, this.coordinateScratch);
|
|
156
|
+
}
|
|
157
|
+
unprojectFlatSync<T extends ProjectionArray>(coordinates: T, dimension = 2): T {
|
|
158
|
+
return this.deferred
|
|
159
|
+
? this.loadSync().unprojectFlat(coordinates, dimension)
|
|
160
|
+
: transformInPlace(coordinates, dimension, this.inverseTransform, this.coordinateScratch);
|
|
161
|
+
}
|
|
162
|
+
/** Optional warm-up. Coordinate methods also load automatically on first use. */
|
|
163
|
+
async preload(): Promise<void> {
|
|
164
|
+
await this.load();
|
|
165
|
+
}
|
|
166
|
+
/** Eager plugins return arrays; descriptor-backed instances return promises. */
|
|
167
|
+
project(coordinate: readonly number[]): ProjectionResult<P, number[]> {
|
|
168
|
+
const result = this.deferred
|
|
169
|
+
? this.projectLoaded(coordinate, false)
|
|
170
|
+
: transformScalar(coordinate, this.forwardTransform, this.coordinateScratch);
|
|
171
|
+
return result as ProjectionResult<P, number[]>;
|
|
172
|
+
}
|
|
173
|
+
unproject(coordinate: readonly number[]): ProjectionResult<P, number[]> {
|
|
174
|
+
const result = this.deferred
|
|
175
|
+
? this.projectLoaded(coordinate, true)
|
|
176
|
+
: transformScalar(coordinate, this.inverseTransform, this.coordinateScratch);
|
|
177
|
+
return result as ProjectionResult<P, number[]>;
|
|
178
|
+
}
|
|
179
|
+
/** Write one coordinate into caller-owned storage; return that same output. */
|
|
180
|
+
projectTo<T extends ProjectionOutput>(
|
|
181
|
+
coordinate: ProjectionCoordinate,
|
|
182
|
+
output: T
|
|
183
|
+
): ProjectionResult<P, T> {
|
|
184
|
+
return (
|
|
185
|
+
this.deferred
|
|
186
|
+
? this.projectToLoaded(coordinate, output, false)
|
|
187
|
+
: this.projectToSync(coordinate, output)
|
|
188
|
+
) as ProjectionResult<P, T>;
|
|
189
|
+
}
|
|
190
|
+
unprojectTo<T extends ProjectionOutput>(
|
|
191
|
+
coordinate: ProjectionCoordinate,
|
|
192
|
+
output: T
|
|
193
|
+
): ProjectionResult<P, T> {
|
|
194
|
+
return (
|
|
195
|
+
this.deferred
|
|
196
|
+
? this.projectToLoaded(coordinate, output, true)
|
|
197
|
+
: this.unprojectToSync(coordinate, output)
|
|
198
|
+
) as ProjectionResult<P, T>;
|
|
199
|
+
}
|
|
200
|
+
projectToSync<T extends ProjectionOutput>(coordinate: ProjectionCoordinate, output: T): T {
|
|
201
|
+
if (this.deferred) return this.loadSync().projectTo(coordinate, output);
|
|
202
|
+
validateScalarOutput(
|
|
203
|
+
coordinate,
|
|
204
|
+
output,
|
|
205
|
+
Math.max(coordinate.length, this.forwardTransform.geocentricOutput ? 3 : 2)
|
|
206
|
+
);
|
|
207
|
+
return transformScalar(coordinate, this.forwardTransform, this.coordinateScratch, output);
|
|
208
|
+
}
|
|
209
|
+
unprojectToSync<T extends ProjectionOutput>(coordinate: ProjectionCoordinate, output: T): T {
|
|
210
|
+
if (this.deferred) return this.loadSync().unprojectTo(coordinate, output);
|
|
211
|
+
validateScalarOutput(
|
|
212
|
+
coordinate,
|
|
213
|
+
output,
|
|
214
|
+
Math.max(coordinate.length, this.inverseTransform.geocentricOutput ? 3 : 2)
|
|
215
|
+
);
|
|
216
|
+
return transformScalar(coordinate, this.inverseTransform, this.coordinateScratch, output);
|
|
217
|
+
}
|
|
218
|
+
private projectToLoaded<T extends ProjectionOutput>(
|
|
219
|
+
coordinate: ProjectionCoordinate,
|
|
220
|
+
output: T,
|
|
221
|
+
inverse: boolean
|
|
222
|
+
): Promise<T> {
|
|
223
|
+
validateScalarOutput(coordinate, output, coordinate.length);
|
|
224
|
+
const input = coordinate.slice();
|
|
225
|
+
return this.load().then(projection =>
|
|
226
|
+
inverse ? projection.unprojectTo(input, output) : projection.projectTo(input, output)
|
|
227
|
+
);
|
|
228
|
+
}
|
|
229
|
+
private projectLoaded(coordinate: readonly number[], inverse: boolean): Promise<number[]> {
|
|
230
|
+
const input = coordinate.slice();
|
|
231
|
+
return this.load().then(projection =>
|
|
232
|
+
inverse ? projection.unproject(input) : projection.project(input)
|
|
233
|
+
);
|
|
234
|
+
}
|
|
235
|
+
/** In-place; descriptor callers must await completion before reusing the buffer. */
|
|
236
|
+
projectFlat<T extends ProjectionArray>(coordinates: T, dimension = 2): ProjectionResult<P, T> {
|
|
237
|
+
const result = this.deferred
|
|
238
|
+
? this.load().then(projection => projection.projectFlat(coordinates, dimension))
|
|
239
|
+
: transformInPlace(coordinates, dimension, this.forwardTransform, this.coordinateScratch);
|
|
240
|
+
return result as ProjectionResult<P, T>;
|
|
241
|
+
}
|
|
242
|
+
unprojectFlat<T extends ProjectionArray>(coordinates: T, dimension = 2): ProjectionResult<P, T> {
|
|
243
|
+
const result = this.deferred
|
|
244
|
+
? this.load().then(projection => projection.unprojectFlat(coordinates, dimension))
|
|
245
|
+
: transformInPlace(coordinates, dimension, this.inverseTransform, this.coordinateScratch);
|
|
246
|
+
return result as ProjectionResult<P, T>;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
function requiredProjections(options: ProjectionEngineCreateOptions): ProjectionRegistration[] {
|
|
250
|
+
const available = registry(options.projections || []);
|
|
251
|
+
const required = new Set<ProjectionPlugin | ProjectionDescriptor>();
|
|
252
|
+
for (const definition of [options.from ?? 'WGS84', options.to ?? 'WGS84']) {
|
|
253
|
+
const crs = normalizeCRS(definition, options);
|
|
254
|
+
if (['geographic', 'identity'].includes(crs.kind)) continue;
|
|
255
|
+
const projection = available.get(pluginKey(crs.projection));
|
|
256
|
+
if (!projection)
|
|
257
|
+
throw new TypeScriptCRSError(
|
|
258
|
+
'missing-plugin',
|
|
259
|
+
'Projection plugin is not registered: ' + crs.projection
|
|
260
|
+
);
|
|
261
|
+
required.add(projection);
|
|
262
|
+
}
|
|
263
|
+
return [...required];
|
|
264
|
+
}
|
|
265
|
+
export type ProjectionCompatibility = {
|
|
266
|
+
status: 'supported' | 'unsupported' | 'unknown';
|
|
267
|
+
lossy: boolean;
|
|
268
|
+
reason?: CRSCompatibilityReason;
|
|
269
|
+
message?: string;
|
|
270
|
+
};
|
|
271
|
+
/** Check construction with this backend and this exact set of registered plugins/readers. */
|
|
272
|
+
export function checkProjectionCompatibility(
|
|
273
|
+
definition: TypeScriptCRSInput,
|
|
274
|
+
options: ProjectionEngineOptions = {}
|
|
275
|
+
): ProjectionCompatibility {
|
|
276
|
+
try {
|
|
277
|
+
const crs = compileCRS(definition, registry(options.projections || []), options);
|
|
278
|
+
return {status: 'supported', lossy: crs.lossy};
|
|
279
|
+
} catch (error) {
|
|
280
|
+
const reason = error instanceof TypeScriptCRSError ? error.reason : 'invalid-definition';
|
|
281
|
+
return {
|
|
282
|
+
status: reason === 'unknown-syntax' ? 'unknown' : 'unsupported',
|
|
283
|
+
lossy: false,
|
|
284
|
+
reason,
|
|
285
|
+
message: error instanceof Error ? error.message : String(error)
|
|
286
|
+
};
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
const pluginKey = (name: string): string => name.toLowerCase().replace(/[\s_-]/g, '');
|
|
290
|
+
function registry<T extends Pick<ProjectionPlugin, 'name' | 'aliases'>>(
|
|
291
|
+
projections: readonly T[]
|
|
292
|
+
): Map<string, T> {
|
|
293
|
+
const plugins = new Map<string, T>();
|
|
294
|
+
for (const plugin of projections) {
|
|
295
|
+
for (const name of new Set([plugin.name, ...(plugin.aliases || [])].map(pluginKey))) {
|
|
296
|
+
if (
|
|
297
|
+
!name ||
|
|
298
|
+
['longlat', 'latlong', 'latlon', 'lonlat', 'identity'].includes(name) ||
|
|
299
|
+
plugins.has(name)
|
|
300
|
+
)
|
|
301
|
+
throw new Error('Duplicate or reserved projection plugin: ' + name);
|
|
302
|
+
plugins.set(name, plugin);
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
return plugins;
|
|
306
|
+
}
|
|
307
|
+
function compileCRS(
|
|
308
|
+
definition: TypeScriptCRSInput,
|
|
309
|
+
plugins: ReadonlyMap<string, ProjectionPlugin>,
|
|
310
|
+
options: ProjectionEngineOptions
|
|
311
|
+
): CompiledCRS {
|
|
312
|
+
const crs = normalizeCRS(definition, options);
|
|
313
|
+
const plugin = plugins.get(pluginKey(crs.projection));
|
|
314
|
+
if (!['geographic', 'identity'].includes(crs.kind) && !plugin)
|
|
315
|
+
throw new TypeScriptCRSError(
|
|
316
|
+
'missing-plugin',
|
|
317
|
+
'Projection plugin is not registered: ' + crs.projection
|
|
318
|
+
);
|
|
319
|
+
const allowed = new Set([...CORE_PARAMETERS, ...(plugin?.parameters || [])]);
|
|
320
|
+
for (const key of Object.keys(crs.parameters)) {
|
|
321
|
+
if (!allowed.has(key))
|
|
322
|
+
throw new TypeScriptCRSError(
|
|
323
|
+
'missing-transform-stage',
|
|
324
|
+
'Unsupported PROJ parameter: +' + key
|
|
325
|
+
);
|
|
326
|
+
const flag = CORE_FLAGS.includes(key) || plugin?.flags?.includes(key);
|
|
327
|
+
if (flag && crs.parameters[key] !== undefined)
|
|
328
|
+
throw new Error('Expected a flag without a value: +' + key);
|
|
329
|
+
if (!flag && !crs.parameters[key]) throw new Error('PROJ parameter requires a value: +' + key);
|
|
330
|
+
}
|
|
331
|
+
if (crs.parameters['type'] && crs.parameters['type'] !== 'crs')
|
|
332
|
+
throw new Error('Only +type=crs is supported');
|
|
333
|
+
const parameters =
|
|
334
|
+
pluginKey(crs.projection) === 'fasttransversemercator'
|
|
335
|
+
? Object.freeze({...crs.parameters, approx: undefined})
|
|
336
|
+
: crs.parameters;
|
|
337
|
+
const implementation = plugin?.create({...crs.ellipsoid, parameters});
|
|
338
|
+
if (crs.kind === 'geocentric' && (!implementation?.forward3D || !implementation?.inverse3D))
|
|
339
|
+
throw new Error('Geocentric plugin must implement 3D operations');
|
|
340
|
+
const references = crs.datum.grids;
|
|
341
|
+
const nullIndex = references?.findIndex(reference => reference.name === 'null') ?? -1;
|
|
342
|
+
const grids = references?.slice(0, nullIndex < 0 ? undefined : nullIndex + 1).map(reference => {
|
|
343
|
+
const grid = Object.prototype.hasOwnProperty.call(options.datumGrids || {}, reference.name)
|
|
344
|
+
? options.datumGrids[reference.name]
|
|
345
|
+
: undefined;
|
|
346
|
+
if (grid && typeof grid.shift !== 'function')
|
|
347
|
+
throw new Error('Invalid prepared datum grid: ' + reference.name);
|
|
348
|
+
return Object.freeze({...reference, grid});
|
|
349
|
+
});
|
|
350
|
+
// A null fallback terminates the list. Later entries can never be consulted.
|
|
351
|
+
for (const reference of grids || []) {
|
|
352
|
+
if (reference.name === 'null') break;
|
|
353
|
+
if (!reference.optional && !reference.grid)
|
|
354
|
+
unsupportedStage('Required datum grid is not registered: ' + reference.name);
|
|
355
|
+
}
|
|
356
|
+
const datum = grids ? Object.freeze({...crs.datum, grids: Object.freeze(grids)}) : crs.datum;
|
|
357
|
+
const verticalGrid = compileVerticalGrid(crs.parameters['geoidgrids'], options.verticalGrids);
|
|
358
|
+
if (verticalGrid && (crs.kind === 'geocentric' || crs.kind === 'identity' || crs.lossy))
|
|
359
|
+
unsupportedStage('Vertical grids require a non-lossy geographic or projected CRS');
|
|
360
|
+
return {...crs, datum, implementation, verticalGrid};
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
function finite(point: ProjectionPoint): boolean {
|
|
364
|
+
return Number.isFinite(point.x) && Number.isFinite(point.y) && Number.isFinite(point.z);
|
|
365
|
+
}
|
|
366
|
+
function compileAxis(
|
|
367
|
+
axis: string,
|
|
368
|
+
inverse: boolean
|
|
369
|
+
): ((point: ProjectionPoint) => void) | undefined {
|
|
370
|
+
if (axis === 'enu') return undefined;
|
|
371
|
+
const indexes = [0, 0, 0],
|
|
372
|
+
signs = [0, 0, 0];
|
|
373
|
+
for (let i = 0; i < 3; i++) {
|
|
374
|
+
const char = axis[i],
|
|
375
|
+
component = 'ew'.includes(char) ? 0 : 'ns'.includes(char) ? 1 : 2;
|
|
376
|
+
indexes[inverse ? i : component] = inverse ? component : i;
|
|
377
|
+
signs[inverse ? i : component] = 'wsd'.includes(char) ? -1 : 1;
|
|
378
|
+
}
|
|
379
|
+
return point => {
|
|
380
|
+
const x = point.x,
|
|
381
|
+
y = point.y,
|
|
382
|
+
z = point.z;
|
|
383
|
+
point.x = signs[0] * (indexes[0] === 0 ? x : indexes[0] === 1 ? y : z);
|
|
384
|
+
point.y = signs[1] * (indexes[1] === 0 ? x : indexes[1] === 1 ? y : z);
|
|
385
|
+
point.z = signs[2] * (indexes[2] === 0 ? x : indexes[2] === 1 ? y : z);
|
|
386
|
+
};
|
|
387
|
+
}
|
|
388
|
+
function compileTransform(
|
|
389
|
+
from: CompiledCRS,
|
|
390
|
+
to: CompiledCRS,
|
|
391
|
+
enforceAxis: boolean
|
|
392
|
+
): CoordinateTransform {
|
|
393
|
+
const fromAxis = from.storedAxis || (enforceAxis ? from.axis : 'enu');
|
|
394
|
+
const toAxis = to.storedAxis || (enforceAxis ? to.axis : 'enu');
|
|
395
|
+
const inputAxis = compileAxis(fromAxis, false),
|
|
396
|
+
outputAxis = compileAxis(toAxis, true);
|
|
397
|
+
const source =
|
|
398
|
+
from.implementation &&
|
|
399
|
+
projectionOperation(from.implementation, true, from.kind === 'geocentric');
|
|
400
|
+
const target =
|
|
401
|
+
to.implementation && projectionOperation(to.implementation, false, to.kind === 'geocentric');
|
|
402
|
+
const datum = createDatumTransform(from.datum, to.datum);
|
|
403
|
+
const horizontalOnly = from.lossy || to.lossy;
|
|
404
|
+
// Resolve CRS kinds and scalar constants once, outside the coordinate loop.
|
|
405
|
+
const fromGeocentric = from.kind === 'geocentric';
|
|
406
|
+
const inputScale = from.kind === 'geographic' ? from.angularUnit : from.toMeter;
|
|
407
|
+
const outputScale = to.kind === 'geographic' ? to.angularUnit : to.toMeter;
|
|
408
|
+
const inputVerticalScale = fromGeocentric ? 1 : from.verticalUnit,
|
|
409
|
+
outputVerticalScale = to.kind === 'geocentric' ? outputScale : to.verticalUnit;
|
|
410
|
+
const fromPrime = from.primeMeridian,
|
|
411
|
+
toPrime = to.primeMeridian;
|
|
412
|
+
const longitudeWrap = to.kind === 'geographic' ? to.longitudeWrap : undefined;
|
|
413
|
+
let flat: ProjectionFlatOperation | undefined;
|
|
414
|
+
if (
|
|
415
|
+
!datum &&
|
|
416
|
+
!from.verticalGrid &&
|
|
417
|
+
!to.verticalGrid &&
|
|
418
|
+
!horizontalOnly &&
|
|
419
|
+
!inputAxis &&
|
|
420
|
+
!outputAxis &&
|
|
421
|
+
!fromPrime &&
|
|
422
|
+
!toPrime &&
|
|
423
|
+
from.verticalUnit === 1 &&
|
|
424
|
+
to.verticalUnit === 1 &&
|
|
425
|
+
longitudeWrap === undefined
|
|
426
|
+
) {
|
|
427
|
+
const context = Object.freeze({inputScale, outputScale});
|
|
428
|
+
if (from.kind === 'geographic' && to.kind === 'projected')
|
|
429
|
+
flat = to.implementation?.createForwardFlat?.(context);
|
|
430
|
+
if (from.kind === 'projected' && to.kind === 'geographic')
|
|
431
|
+
flat = from.implementation?.createInverseFlat?.(context);
|
|
432
|
+
}
|
|
433
|
+
return {
|
|
434
|
+
flat,
|
|
435
|
+
requiresInputZ:
|
|
436
|
+
Boolean(from.verticalGrid || to.verticalGrid) ||
|
|
437
|
+
from.kind === 'geocentric' ||
|
|
438
|
+
/[ud]/.test(fromAxis.slice(0, 2)) ||
|
|
439
|
+
/[ud]/.test(toAxis.slice(0, 2)),
|
|
440
|
+
geocentricOutput: to.kind === 'geocentric',
|
|
441
|
+
run(point) {
|
|
442
|
+
if (!finite(point))
|
|
443
|
+
throw new Error('Coordinates must contain finite x, y and optional z values');
|
|
444
|
+
inputAxis?.(point);
|
|
445
|
+
const preservedHeight = point.z;
|
|
446
|
+
if (horizontalOnly) point.z = 0;
|
|
447
|
+
if (inputScale !== 1) {
|
|
448
|
+
point.x *= inputScale;
|
|
449
|
+
point.y *= inputScale;
|
|
450
|
+
if (fromGeocentric) point.z *= inputScale;
|
|
451
|
+
}
|
|
452
|
+
source?.(point);
|
|
453
|
+
if (inputVerticalScale !== 1) point.z *= inputVerticalScale;
|
|
454
|
+
if (Math.abs(point.y) > Math.PI / 2 || !finite(point))
|
|
455
|
+
throw new Error('Coordinate is outside the geographic domain');
|
|
456
|
+
point.x += fromPrime;
|
|
457
|
+
// Source H -> h before datum conversion; destination h -> H after it.
|
|
458
|
+
// Sample Greenwich geographic coordinates in each grid's horizontal datum.
|
|
459
|
+
if (from.verticalGrid) point.z += from.verticalGrid(point.x, point.y);
|
|
460
|
+
datum?.(point);
|
|
461
|
+
if (to.verticalGrid) point.z -= to.verticalGrid(point.x, point.y);
|
|
462
|
+
point.x -= toPrime;
|
|
463
|
+
if (longitudeWrap !== undefined)
|
|
464
|
+
point.x = longitudeWrap + wrapLongitude(point.x - longitudeWrap);
|
|
465
|
+
target?.(point);
|
|
466
|
+
if (outputScale !== 1) {
|
|
467
|
+
point.x /= outputScale;
|
|
468
|
+
point.y /= outputScale;
|
|
469
|
+
}
|
|
470
|
+
if (outputVerticalScale !== 1) point.z /= outputVerticalScale;
|
|
471
|
+
if (horizontalOnly) point.z = preservedHeight;
|
|
472
|
+
outputAxis?.(point);
|
|
473
|
+
if (!finite(point)) throw new Error('Projection produced non-finite coordinates');
|
|
474
|
+
}
|
|
475
|
+
};
|
|
476
|
+
}
|
|
477
|
+
function transformScalar<T extends ProjectionOutput = number[]>(
|
|
478
|
+
coordinate: ProjectionCoordinate,
|
|
479
|
+
operation: CoordinateTransform,
|
|
480
|
+
scratch: ProjectionScratch,
|
|
481
|
+
output?: T
|
|
482
|
+
): T {
|
|
483
|
+
if (coordinate.length < 2)
|
|
484
|
+
throw new Error('Coordinates must contain finite x, y and optional z values');
|
|
485
|
+
if (coordinate.length < 3 && operation.requiresInputZ)
|
|
486
|
+
throw new Error('This transform requires three ordinates');
|
|
487
|
+
const length = Math.max(coordinate.length, operation.geocentricOutput ? 3 : 2);
|
|
488
|
+
const point = scratch.acquire();
|
|
489
|
+
try {
|
|
490
|
+
point.x = coordinate[0];
|
|
491
|
+
point.y = coordinate[1];
|
|
492
|
+
point.z = coordinate.length >= 3 ? coordinate[2] : 0;
|
|
493
|
+
operation.run(point);
|
|
494
|
+
if (output) return writeScalarOutput(coordinate, output, point, length);
|
|
495
|
+
// Only the legacy number-array methods omit output; retain their owned result contract.
|
|
496
|
+
const result = (coordinate as readonly number[]).slice();
|
|
497
|
+
result[0] = point.x;
|
|
498
|
+
result[1] = point.y;
|
|
499
|
+
if (coordinate.length >= 3 || operation.geocentricOutput) result[2] = point.z;
|
|
500
|
+
return result as T;
|
|
501
|
+
} finally {
|
|
502
|
+
scratch.release(point);
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
function transformInPlace<T extends ProjectionArray>(
|
|
506
|
+
coordinates: T,
|
|
507
|
+
dimension: number,
|
|
508
|
+
operation: CoordinateTransform,
|
|
509
|
+
scratch: ProjectionScratch
|
|
510
|
+
): T {
|
|
511
|
+
if (!(coordinates instanceof Float32Array || coordinates instanceof Float64Array))
|
|
512
|
+
throw new Error('In-place projection requires a Float32Array or Float64Array');
|
|
513
|
+
if (!Number.isSafeInteger(dimension) || dimension < 2 || coordinates.length % dimension !== 0)
|
|
514
|
+
throw new Error('Dimension must be an integer >= 2 and divide the typed array length');
|
|
515
|
+
if (dimension < 3 && (operation.requiresInputZ || operation.geocentricOutput))
|
|
516
|
+
throw new Error('This transform requires a dimension of at least 3');
|
|
517
|
+
if (operation.flat) {
|
|
518
|
+
operation.flat(coordinates, dimension);
|
|
519
|
+
return coordinates;
|
|
520
|
+
}
|
|
521
|
+
const point = scratch.acquire();
|
|
522
|
+
try {
|
|
523
|
+
const float32 = coordinates instanceof Float32Array;
|
|
524
|
+
for (let offset = 0; offset < coordinates.length; offset += dimension) {
|
|
525
|
+
point.x = coordinates[offset];
|
|
526
|
+
point.y = coordinates[offset + 1];
|
|
527
|
+
point.z = dimension >= 3 ? coordinates[offset + 2] : 0;
|
|
528
|
+
operation.run(point);
|
|
529
|
+
// Commit only a complete finite record; do not silently overflow Float32 storage.
|
|
530
|
+
if (
|
|
531
|
+
float32 &&
|
|
532
|
+
(Math.abs(point.x) > 3.4028234663852886e38 ||
|
|
533
|
+
Math.abs(point.y) > 3.4028234663852886e38 ||
|
|
534
|
+
(dimension >= 3 && Math.abs(point.z) > 3.4028234663852886e38))
|
|
535
|
+
)
|
|
536
|
+
throw new Error('Projected coordinate exceeds Float32 range');
|
|
537
|
+
coordinates[offset] = point.x;
|
|
538
|
+
coordinates[offset + 1] = point.y;
|
|
539
|
+
if (dimension >= 3) coordinates[offset + 2] = point.z;
|
|
540
|
+
}
|
|
541
|
+
return coordinates;
|
|
542
|
+
} finally {
|
|
543
|
+
scratch.release(point);
|
|
544
|
+
}
|
|
545
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// math.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
|
+
// SPDX-FileComment: Original explicit vertical-grid stage, following PROJ geoid-height conventions. No proj4js or PROJ implementation code is copied.
|
|
5
|
+
import {unsupportedStage} from './crs/types';
|
|
6
|
+
import type {VerticalGridCollection} from './grids/types';
|
|
7
|
+
|
|
8
|
+
/** Compile an ordered list; null explicitly supplies a zero-offset fallback. */
|
|
9
|
+
export function compileVerticalGrid(
|
|
10
|
+
names: string | undefined,
|
|
11
|
+
grids: VerticalGridCollection = {}
|
|
12
|
+
): ((longitude: number, latitude: number) => number) | undefined {
|
|
13
|
+
if (names === undefined) return undefined;
|
|
14
|
+
const entries: (((longitude: number, latitude: number) => number | undefined) | null)[] = [];
|
|
15
|
+
for (const entry of names.split(',')) {
|
|
16
|
+
const optional = entry.startsWith('@');
|
|
17
|
+
const name = optional ? entry.slice(1) : entry;
|
|
18
|
+
if (!name || /\s/.test(name)) throw new Error('Invalid vertical grid name');
|
|
19
|
+
if (name === 'null') {
|
|
20
|
+
entries.push(null);
|
|
21
|
+
break;
|
|
22
|
+
}
|
|
23
|
+
const grid = Object.prototype.hasOwnProperty.call(grids, name) ? grids[name] : undefined;
|
|
24
|
+
if (grid) {
|
|
25
|
+
if (typeof grid.getOffset !== 'function') throw new Error('Invalid vertical grid: ' + name);
|
|
26
|
+
entries.push(grid.getOffset.bind(grid));
|
|
27
|
+
} else if (!optional) unsupportedStage('Required vertical grid is not registered: ' + name);
|
|
28
|
+
}
|
|
29
|
+
return (longitude, latitude) => {
|
|
30
|
+
for (const sample of entries) {
|
|
31
|
+
if (!sample) return 0;
|
|
32
|
+
const offset = sample(longitude, latitude);
|
|
33
|
+
if (offset === undefined) continue;
|
|
34
|
+
if (!Number.isFinite(offset)) throw new Error('Vertical grid returned a non-finite offset');
|
|
35
|
+
return offset;
|
|
36
|
+
}
|
|
37
|
+
throw new Error('No vertical grid covers this coordinate');
|
|
38
|
+
};
|
|
39
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// math.gl
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
|
|
4
|
+
|
|
5
|
+
export * from './experimental/index';
|
|
6
|
+
export {Projection} from './lib/projection';
|
|
7
|
+
export type {ProjectionOptions, DatumGridOptions} from './lib/projection';
|