@math.gl/geospatial 5.0.0-rc.2 → 5.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/dist/coordinates.cjs +2523 -0
- package/dist/coordinates.cjs.map +6 -0
- package/dist/coordinates.d.ts +4 -0
- package/dist/coordinates.d.ts.map +1 -1
- package/dist/coordinates.js +2 -0
- package/dist/coordinates.js.map +1 -1
- package/dist/entries/ellipsoid.cjs +1209 -0
- package/dist/entries/ellipsoid.cjs.map +6 -0
- package/dist/entries/ellipsoid.d.ts +3 -19
- package/dist/entries/ellipsoid.d.ts.map +1 -1
- package/dist/entries/ellipsoid.js +1 -9
- package/dist/entries/ellipsoid.js.map +1 -1
- package/dist/expressions.cjs +726 -0
- package/dist/expressions.cjs.map +6 -0
- package/dist/geodesics.cjs +3195 -0
- package/dist/geodesics.cjs.map +6 -0
- package/dist/geodesics.d.ts +18 -0
- package/dist/geodesics.d.ts.map +1 -0
- package/dist/geodesics.js +13 -0
- package/dist/geodesics.js.map +1 -0
- package/dist/geographic-atlas/sampling.d.ts +1 -1
- package/dist/geographic-atlas/sampling.d.ts.map +1 -1
- package/dist/geographic-atlas/sampling.js +1 -1
- package/dist/geographic-atlas/sampling.js.map +1 -1
- package/dist/geographic-cuts.cjs +4160 -0
- package/dist/geographic-cuts.cjs.map +6 -0
- package/dist/geographic-cuts.d.ts +2 -0
- package/dist/geographic-cuts.d.ts.map +1 -1
- package/dist/geographic-cuts.js +1 -0
- package/dist/geographic-cuts.js.map +1 -1
- package/dist/geographic-seams/subdivide-cut.d.ts +1 -1
- package/dist/geographic-seams/subdivide-cut.d.ts.map +1 -1
- package/dist/geographic-seams/subdivide-cut.js +1 -1
- package/dist/geographic-seams/subdivide-cut.js.map +1 -1
- package/dist/geographic-seams/types.shared.cjs +32 -0
- package/dist/geographic-seams/types.shared.cjs.map +6 -0
- package/dist/globe.cjs +4223 -0
- package/dist/globe.cjs.map +6 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/line-simplification.d.ts +7 -0
- package/dist/line-simplification.d.ts.map +1 -1
- package/dist/line-simplification.js +4 -13
- package/dist/line-simplification.js.map +1 -1
- package/dist/linear-referencing.d.ts +13 -1
- package/dist/linear-referencing.d.ts.map +1 -1
- package/dist/linear-referencing.js +29 -9
- package/dist/linear-referencing.js.map +1 -1
- package/dist/maps/map-transition.shared.cjs +364 -0
- package/dist/maps/map-transition.shared.cjs.map +6 -0
- package/dist/maps/myriahedral/unfold.d.ts +1 -1
- package/dist/maps/myriahedral/unfold.d.ts.map +1 -1
- package/dist/maps/myriahedral/unfold.js +1 -1
- package/dist/maps/myriahedral/unfold.js.map +1 -1
- package/dist/maps/presets.cjs +2 -2
- package/dist/maps/presets.cjs.map +2 -2
- package/dist/maps/transitions.cjs +3 -342
- package/dist/maps/transitions.cjs.map +3 -3
- package/dist/maps.cjs +15 -319
- package/dist/maps.cjs.map +3 -3
- package/dist/measure-referencing.d.ts +16 -0
- package/dist/measure-referencing.d.ts.map +1 -0
- package/dist/measure-referencing.js +143 -0
- package/dist/measure-referencing.js.map +1 -0
- package/dist/polygon-simplification.d.ts +6 -0
- package/dist/polygon-simplification.d.ts.map +1 -0
- package/dist/polygon-simplification.js +141 -0
- package/dist/polygon-simplification.js.map +1 -0
- package/dist/projection/experimental/core.cjs +63 -1317
- package/dist/projection/experimental/core.cjs.map +3 -3
- package/dist/projection/experimental/core.d.ts +1 -1
- package/dist/projection/experimental/core.d.ts.map +1 -1
- package/dist/projection/experimental/crs/projjson.cjs +26 -45
- package/dist/projection/experimental/crs/projjson.cjs.map +3 -3
- package/dist/projection/experimental/crs/types.shared.cjs +44 -0
- package/dist/projection/experimental/crs/types.shared.cjs.map +6 -0
- package/dist/projection/experimental/crs/wkt.cjs +36 -52
- package/dist/projection/experimental/crs/wkt.cjs.map +3 -3
- package/dist/projection/experimental/entries/projections/ob_tran.cjs +9 -23
- package/dist/projection/experimental/entries/projections/ob_tran.cjs.map +3 -3
- package/dist/projection/experimental/lazy-projections/aea.cjs +1 -1
- package/dist/projection/experimental/lazy-projections/aea.js +1 -1
- package/dist/projection/experimental/lazy-projections/aeqd.cjs +1 -1
- package/dist/projection/experimental/lazy-projections/aeqd.js +1 -1
- package/dist/projection/experimental/lazy-projections/bonne.cjs +1 -1
- package/dist/projection/experimental/lazy-projections/bonne.js +1 -1
- package/dist/projection/experimental/lazy-projections/cass.cjs +1 -1
- package/dist/projection/experimental/lazy-projections/cass.js +1 -1
- package/dist/projection/experimental/lazy-projections/cea.cjs +1 -1
- package/dist/projection/experimental/lazy-projections/cea.js +1 -1
- package/dist/projection/experimental/lazy-projections/eck6.cjs +1 -1
- package/dist/projection/experimental/lazy-projections/eck6.js +1 -1
- package/dist/projection/experimental/lazy-projections/eqc.cjs +1 -1
- package/dist/projection/experimental/lazy-projections/eqc.js +1 -1
- package/dist/projection/experimental/lazy-projections/eqdc.cjs +1 -1
- package/dist/projection/experimental/lazy-projections/eqdc.js +1 -1
- package/dist/projection/experimental/lazy-projections/eqearth.cjs +1 -1
- package/dist/projection/experimental/lazy-projections/eqearth.js +1 -1
- package/dist/projection/experimental/lazy-projections/equi.cjs +1 -1
- package/dist/projection/experimental/lazy-projections/equi.js +1 -1
- package/dist/projection/experimental/lazy-projections/etmerc.cjs +1 -1
- package/dist/projection/experimental/lazy-projections/etmerc.js +1 -1
- package/dist/projection/experimental/lazy-projections/geocent.cjs +1 -1
- package/dist/projection/experimental/lazy-projections/geocent.js +1 -1
- package/dist/projection/experimental/lazy-projections/geos.cjs +1 -1
- package/dist/projection/experimental/lazy-projections/geos.js +1 -1
- package/dist/projection/experimental/lazy-projections/gnom.cjs +1 -1
- package/dist/projection/experimental/lazy-projections/gnom.js +1 -1
- package/dist/projection/experimental/lazy-projections/gstmerc.cjs +1 -1
- package/dist/projection/experimental/lazy-projections/gstmerc.js +1 -1
- package/dist/projection/experimental/lazy-projections/index.cjs +60 -903
- package/dist/projection/experimental/lazy-projections/index.cjs.map +3 -3
- package/dist/projection/experimental/lazy-projections/krovak.cjs +1 -1
- package/dist/projection/experimental/lazy-projections/krovak.js +1 -1
- package/dist/projection/experimental/lazy-projections/laea.cjs +1 -1
- package/dist/projection/experimental/lazy-projections/laea.js +1 -1
- package/dist/projection/experimental/lazy-projections/lcc.cjs +1 -1
- package/dist/projection/experimental/lazy-projections/lcc.js +1 -1
- package/dist/projection/experimental/lazy-projections/merc.cjs +1 -1
- package/dist/projection/experimental/lazy-projections/merc.js +1 -1
- package/dist/projection/experimental/lazy-projections/mill.cjs +1 -1
- package/dist/projection/experimental/lazy-projections/mill.js +1 -1
- package/dist/projection/experimental/lazy-projections/moll.cjs +1 -1
- package/dist/projection/experimental/lazy-projections/moll.js +1 -1
- package/dist/projection/experimental/lazy-projections/nzmg.cjs +1 -1
- package/dist/projection/experimental/lazy-projections/nzmg.js +1 -1
- package/dist/projection/experimental/lazy-projections/ob_tran.cjs +1 -1
- package/dist/projection/experimental/lazy-projections/ob_tran.js +1 -1
- package/dist/projection/experimental/lazy-projections/omerc.cjs +1 -1
- package/dist/projection/experimental/lazy-projections/omerc.js +1 -1
- package/dist/projection/experimental/lazy-projections/ortho.cjs +1 -1
- package/dist/projection/experimental/lazy-projections/ortho.js +1 -1
- package/dist/projection/experimental/lazy-projections/poly.cjs +1 -1
- package/dist/projection/experimental/lazy-projections/poly.js +1 -1
- package/dist/projection/experimental/lazy-projections/qsc.cjs +1 -1
- package/dist/projection/experimental/lazy-projections/qsc.js +1 -1
- package/dist/projection/experimental/lazy-projections/robin.cjs +1 -1
- package/dist/projection/experimental/lazy-projections/robin.js +1 -1
- package/dist/projection/experimental/lazy-projections/sinu.cjs +1 -1
- package/dist/projection/experimental/lazy-projections/sinu.js +1 -1
- package/dist/projection/experimental/lazy-projections/somerc.cjs +1 -1
- package/dist/projection/experimental/lazy-projections/somerc.js +1 -1
- package/dist/projection/experimental/lazy-projections/stere.cjs +1 -1
- package/dist/projection/experimental/lazy-projections/stere.js +1 -1
- package/dist/projection/experimental/lazy-projections/sterea.cjs +1 -1
- package/dist/projection/experimental/lazy-projections/sterea.js +1 -1
- package/dist/projection/experimental/lazy-projections/tmerc.cjs +1 -1
- package/dist/projection/experimental/lazy-projections/tmerc.js +1 -1
- package/dist/projection/experimental/lazy-projections/tpers.cjs +1 -1
- package/dist/projection/experimental/lazy-projections/tpers.js +1 -1
- package/dist/projection/experimental/lazy-projections/utm.cjs +1 -1
- package/dist/projection/experimental/lazy-projections/utm.js +1 -1
- package/dist/projection/experimental/lazy-projections/vandg.cjs +1 -1
- package/dist/projection/experimental/lazy-projections/vandg.js +1 -1
- package/dist/projection/experimental/projection-engine.shared.cjs +1184 -0
- package/dist/projection/experimental/projection-engine.shared.cjs.map +6 -0
- package/dist/projection/experimental/typescript-projection.shared.cjs +1703 -0
- package/dist/projection/experimental/typescript-projection.shared.cjs.map +6 -0
- package/dist/projection/index.cjs +622 -1535
- package/dist/projection/index.cjs.map +3 -3
- package/dist/projection/pipeline.cjs +44 -58
- package/dist/projection/pipeline.cjs.map +3 -3
- package/dist/projection/transform-analysis.cjs +20 -936
- package/dist/projection/transform-analysis.cjs.map +3 -3
- package/dist/spatial-box-clipping.d.ts +9 -0
- package/dist/spatial-box-clipping.d.ts.map +1 -0
- package/dist/spatial-box-clipping.js +123 -0
- package/dist/spatial-box-clipping.js.map +1 -0
- package/dist/spatial-dwithin.d.ts +19 -0
- package/dist/spatial-dwithin.d.ts.map +1 -0
- package/dist/spatial-dwithin.js +107 -0
- package/dist/spatial-dwithin.js.map +1 -0
- package/dist/spatial-hulls.d.ts +6 -0
- package/dist/spatial-hulls.d.ts.map +1 -0
- package/dist/spatial-hulls.js +176 -0
- package/dist/spatial-hulls.js.map +1 -0
- package/dist/spatial-line-intersection-result.d.ts +4 -0
- package/dist/spatial-line-intersection-result.d.ts.map +1 -0
- package/dist/spatial-line-intersection-result.js +79 -0
- package/dist/spatial-line-intersection-result.js.map +1 -0
- package/dist/spatial-line-polygon-intersection.d.ts +4 -0
- package/dist/spatial-line-polygon-intersection.d.ts.map +1 -0
- package/dist/spatial-line-polygon-intersection.js +130 -0
- package/dist/spatial-line-polygon-intersection.js.map +1 -0
- package/dist/spatial-planar-intersects.d.ts +11 -0
- package/dist/spatial-planar-intersects.d.ts.map +1 -1
- package/dist/spatial-planar-intersects.js +20 -12
- package/dist/spatial-planar-intersects.js.map +1 -1
- package/dist/spatial-planar.d.ts +9 -0
- package/dist/spatial-planar.d.ts.map +1 -1
- package/dist/spatial-planar.js +13 -1
- package/dist/spatial-planar.js.map +1 -1
- package/dist/spatial-polygon-overlay.d.ts +5 -0
- package/dist/spatial-polygon-overlay.d.ts.map +1 -0
- package/dist/spatial-polygon-overlay.js +23 -0
- package/dist/spatial-polygon-overlay.js.map +1 -0
- package/dist/spatial-sql.d.ts +13 -2
- package/dist/spatial-sql.d.ts.map +1 -1
- package/dist/spatial-sql.js +30 -12
- package/dist/spatial-sql.js.map +1 -1
- package/dist/spatial-subdivision.d.ts +9 -0
- package/dist/spatial-subdivision.d.ts.map +1 -0
- package/dist/spatial-subdivision.js +61 -0
- package/dist/spatial-subdivision.js.map +1 -0
- package/dist/spatial-touches.d.ts +13 -0
- package/dist/spatial-touches.d.ts.map +1 -0
- package/dist/spatial-touches.js +192 -0
- package/dist/spatial-touches.js.map +1 -0
- package/dist/st-functions.cjs +2411 -112
- package/dist/st-functions.cjs.map +3 -3
- package/dist/st-functions.d.ts +67 -2
- package/dist/st-functions.d.ts.map +1 -1
- package/dist/st-functions.js +195 -12
- package/dist/st-functions.js.map +1 -1
- package/dist/st-geodesic-functions.d.ts +33 -0
- package/dist/st-geodesic-functions.d.ts.map +1 -0
- package/dist/st-geodesic-functions.js +84 -0
- package/dist/st-geodesic-functions.js.map +1 -0
- package/dist/st-hull-functions.cjs +386 -0
- package/dist/st-hull-functions.cjs.map +6 -0
- package/dist/st-hull-functions.d.ts +17 -0
- package/dist/st-hull-functions.d.ts.map +1 -0
- package/dist/st-hull-functions.js +14 -0
- package/dist/st-hull-functions.js.map +1 -0
- package/dist/st-overlay-functions.cjs +621 -0
- package/dist/st-overlay-functions.cjs.map +6 -0
- package/dist/st-overlay-functions.d.ts +36 -0
- package/dist/st-overlay-functions.d.ts.map +1 -0
- package/dist/st-overlay-functions.js +183 -0
- package/dist/st-overlay-functions.js.map +1 -0
- package/dist/st-viewport-functions.cjs +481 -0
- package/dist/st-viewport-functions.cjs.map +6 -0
- package/dist/st-viewport-functions.d.ts +13 -0
- package/dist/st-viewport-functions.d.ts.map +1 -0
- package/dist/st-viewport-functions.js +81 -0
- package/dist/st-viewport-functions.js.map +1 -0
- package/dist/subdivide-geodesic-polyline.d.ts +1 -1
- package/dist/subdivide-geodesic-polyline.d.ts.map +1 -1
- package/dist/subdivide-geodesic-polyline.js +1 -1
- package/dist/subdivide-geodesic-polyline.js.map +1 -1
- package/dist/subdivide-globe-mesh.d.ts +1 -1
- package/dist/subdivide-globe-mesh.d.ts.map +1 -1
- package/dist/subdivide-globe-mesh.js +1 -1
- package/dist/subdivide-globe-mesh.js.map +1 -1
- package/dist/subdivide-rhumb-polyline.d.ts +1 -1
- package/dist/subdivide-rhumb-polyline.d.ts.map +1 -1
- package/dist/subdivide-rhumb-polyline.js +1 -1
- package/dist/subdivide-rhumb-polyline.js.map +1 -1
- package/dist/tasks/index.cjs +808 -2993
- package/dist/tasks/index.cjs.map +3 -3
- package/dist/terrain/geometry.d.ts +1 -1
- package/dist/terrain/geometry.d.ts.map +1 -1
- package/dist/terrain/geometry.js +1 -1
- package/dist/terrain/geometry.js.map +1 -1
- package/dist/terrain/index.cjs +95 -22
- package/dist/terrain/index.cjs.map +3 -3
- package/dist/terrain/index.d.ts +1 -0
- package/dist/terrain/index.d.ts.map +1 -1
- package/dist/terrain/index.js +1 -0
- package/dist/terrain/index.js.map +1 -1
- package/dist/terrain/regional-watersheds.d.ts +44 -0
- package/dist/terrain/regional-watersheds.d.ts.map +1 -0
- package/dist/terrain/regional-watersheds.js +108 -0
- package/dist/terrain/regional-watersheds.js.map +1 -0
- package/dist/terrain/tile-cutout-update.d.ts.map +1 -1
- package/dist/terrain/tile-cutout-update.js +28 -22
- package/dist/terrain/tile-cutout-update.js.map +1 -1
- package/dist/tiles.cjs +354 -0
- package/dist/tiles.cjs.map +6 -0
- package/dist/turf-functions.cjs +16 -9
- package/dist/turf-functions.cjs.map +1 -1
- package/package.json +154 -117
- package/src/coordinates.ts +5 -0
- package/src/entries/ellipsoid.ts +7 -32
- package/src/geodesics.ts +40 -0
- package/src/geographic-atlas/sampling.ts +1 -1
- package/src/geographic-cuts.ts +21 -0
- package/src/geographic-seams/subdivide-cut.ts +1 -1
- package/src/index.ts +2 -0
- package/src/line-simplification.ts +4 -16
- package/src/linear-referencing.ts +44 -16
- package/src/maps/myriahedral/unfold.ts +1 -1
- package/src/measure-referencing.ts +165 -0
- package/src/polygon-simplification.ts +185 -0
- package/src/projection/experimental/core.ts +1 -1
- package/src/projection/experimental/lazy-projections/aea.ts +1 -1
- package/src/projection/experimental/lazy-projections/aeqd.ts +1 -1
- package/src/projection/experimental/lazy-projections/bonne.ts +1 -1
- package/src/projection/experimental/lazy-projections/cass.ts +1 -1
- package/src/projection/experimental/lazy-projections/cea.ts +1 -1
- package/src/projection/experimental/lazy-projections/eck6.ts +1 -1
- package/src/projection/experimental/lazy-projections/eqc.ts +1 -1
- package/src/projection/experimental/lazy-projections/eqdc.ts +1 -1
- package/src/projection/experimental/lazy-projections/eqearth.ts +1 -1
- package/src/projection/experimental/lazy-projections/equi.ts +1 -1
- package/src/projection/experimental/lazy-projections/etmerc.ts +1 -1
- package/src/projection/experimental/lazy-projections/geocent.ts +1 -1
- package/src/projection/experimental/lazy-projections/geos.ts +1 -1
- package/src/projection/experimental/lazy-projections/gnom.ts +1 -1
- package/src/projection/experimental/lazy-projections/gstmerc.ts +1 -1
- package/src/projection/experimental/lazy-projections/krovak.ts +1 -1
- package/src/projection/experimental/lazy-projections/laea.ts +1 -1
- package/src/projection/experimental/lazy-projections/lcc.ts +1 -1
- package/src/projection/experimental/lazy-projections/merc.ts +1 -1
- package/src/projection/experimental/lazy-projections/mill.ts +1 -1
- package/src/projection/experimental/lazy-projections/moll.ts +1 -1
- package/src/projection/experimental/lazy-projections/nzmg.ts +1 -1
- package/src/projection/experimental/lazy-projections/ob_tran.ts +1 -1
- package/src/projection/experimental/lazy-projections/omerc.ts +1 -1
- package/src/projection/experimental/lazy-projections/ortho.ts +1 -1
- package/src/projection/experimental/lazy-projections/poly.ts +1 -1
- package/src/projection/experimental/lazy-projections/qsc.ts +1 -1
- package/src/projection/experimental/lazy-projections/robin.ts +1 -1
- package/src/projection/experimental/lazy-projections/sinu.ts +1 -1
- package/src/projection/experimental/lazy-projections/somerc.ts +1 -1
- package/src/projection/experimental/lazy-projections/stere.ts +1 -1
- package/src/projection/experimental/lazy-projections/sterea.ts +1 -1
- package/src/projection/experimental/lazy-projections/tmerc.ts +1 -1
- package/src/projection/experimental/lazy-projections/tpers.ts +1 -1
- package/src/projection/experimental/lazy-projections/utm.ts +1 -1
- package/src/projection/experimental/lazy-projections/vandg.ts +1 -1
- package/src/spatial-box-clipping.ts +140 -0
- package/src/spatial-dwithin.ts +135 -0
- package/src/spatial-hulls.ts +203 -0
- package/src/spatial-line-intersection-result.ts +93 -0
- package/src/spatial-line-polygon-intersection.ts +147 -0
- package/src/spatial-planar-intersects.ts +21 -15
- package/src/spatial-planar.ts +20 -1
- package/src/spatial-polygon-overlay.ts +30 -0
- package/src/spatial-sql.ts +47 -12
- package/src/spatial-subdivision.ts +75 -0
- package/src/spatial-touches.ts +218 -0
- package/src/st-functions.ts +283 -15
- package/src/st-geodesic-functions.ts +121 -0
- package/src/st-hull-functions.ts +25 -0
- package/src/st-overlay-functions.ts +244 -0
- package/src/st-viewport-functions.ts +98 -0
- package/src/subdivide-geodesic-polyline.ts +2 -2
- package/src/subdivide-globe-mesh.ts +2 -2
- package/src/subdivide-rhumb-polyline.ts +2 -2
- package/src/terrain/geometry.ts +1 -1
- package/src/terrain/index.ts +7 -0
- package/src/terrain/regional-watersheds.ts +153 -0
- package/src/terrain/tile-cutout-update.ts +32 -26
- package/dist/index.cjs +0 -18674
- package/dist/index.cjs.map +0 -6
- package/dist/turf-expressions.cjs +0 -1997
- package/dist/turf-expressions.cjs.map +0 -6
- package/dist/turf-expressions.d.ts +0 -3
- package/dist/turf-expressions.d.ts.map +0 -1
- package/dist/turf-expressions.js +0 -7
- package/dist/turf-expressions.js.map +0 -1
- package/src/turf-expressions.ts +0 -7
package/dist/maps.cjs
CHANGED
|
@@ -33,8 +33,8 @@ __export(maps_exports, {
|
|
|
33
33
|
MAP_PROJECTIONS: () => MAP_PROJECTIONS,
|
|
34
34
|
MYRIAHEDRAL_PRESETS: () => MYRIAHEDRAL_PRESETS,
|
|
35
35
|
MapEngine: () => MapEngine,
|
|
36
|
-
MapTransition: () => MapTransition,
|
|
37
|
-
MapTransitionGeometry: () => MapTransitionGeometry,
|
|
36
|
+
MapTransition: () => import_map_transition2.MapTransition,
|
|
37
|
+
MapTransitionGeometry: () => import_map_transition2.MapTransitionGeometry,
|
|
38
38
|
MyriahedralMap: () => MyriahedralMap,
|
|
39
39
|
REGIONAL_PROJECTIONS: () => REGIONAL_PROJECTIONS,
|
|
40
40
|
WORLD_PROJECTIONS: () => WORLD_PROJECTIONS,
|
|
@@ -1894,7 +1894,7 @@ function createGraticule(columns) {
|
|
|
1894
1894
|
|
|
1895
1895
|
// dist/maps/myriahedral/unfold.js
|
|
1896
1896
|
var import_matrix2 = require("@math.gl/core/matrix");
|
|
1897
|
-
var
|
|
1897
|
+
var import_primitives = require("@math.gl/geometry/primitives");
|
|
1898
1898
|
|
|
1899
1899
|
// dist/maps/myriahedral/mesh.js
|
|
1900
1900
|
var subtract3 = (a, b) => [a[0] - b[0], a[1] - b[1], a[2] - b[2]];
|
|
@@ -2137,7 +2137,7 @@ function restoreLayout(data) {
|
|
|
2137
2137
|
const { mesh, panels, targetAngles } = data;
|
|
2138
2138
|
if (panels.length !== mesh.faces.length || targetAngles.length !== panels.length || !targetAngles.every(Number.isFinite) || data.rootTransform.length !== 16 || !data.rootTransform.every(Number.isFinite))
|
|
2139
2139
|
throw new Error("Invalid prepared hinge layout");
|
|
2140
|
-
const tree = new
|
|
2140
|
+
const tree = new import_primitives.HingeTree(panels);
|
|
2141
2141
|
const rootTransform = new import_matrix2.Matrix4(data.rootTransform);
|
|
2142
2142
|
const poses = new Float64Array(panels.length * 16), angles = new Float64Array(panels.length);
|
|
2143
2143
|
const evaluate = (amount) => {
|
|
@@ -7266,316 +7266,11 @@ function parseElasticMap(text, options = {}) {
|
|
|
7266
7266
|
return { version: 1, name: first[1], radius: options.radius ?? 6371, sections };
|
|
7267
7267
|
}
|
|
7268
7268
|
|
|
7269
|
-
// dist/maps
|
|
7270
|
-
var
|
|
7271
|
-
var directWorldProjections = /* @__PURE__ */ new Set([
|
|
7272
|
-
"gilbert",
|
|
7273
|
-
"aitoff",
|
|
7274
|
-
"august",
|
|
7275
|
-
"baker",
|
|
7276
|
-
"boggs",
|
|
7277
|
-
"bromley",
|
|
7278
|
-
"collignon",
|
|
7279
|
-
"craster",
|
|
7280
|
-
"eckert1",
|
|
7281
|
-
"eckert2",
|
|
7282
|
-
"eckert3",
|
|
7283
|
-
"eckert4",
|
|
7284
|
-
"eckert5",
|
|
7285
|
-
"eckert6",
|
|
7286
|
-
"fahey",
|
|
7287
|
-
"foucaut",
|
|
7288
|
-
"ginzburg4",
|
|
7289
|
-
"ginzburg5",
|
|
7290
|
-
"ginzburg6",
|
|
7291
|
-
"ginzburg8",
|
|
7292
|
-
"ginzburg9",
|
|
7293
|
-
"homolosine",
|
|
7294
|
-
"kavrayskiy7",
|
|
7295
|
-
"larrivee",
|
|
7296
|
-
"laskowski",
|
|
7297
|
-
"miller",
|
|
7298
|
-
"mollweide",
|
|
7299
|
-
"mt-flat-polar-parabolic",
|
|
7300
|
-
"mt-flat-polar-quartic",
|
|
7301
|
-
"mt-flat-polar-sinusoidal",
|
|
7302
|
-
"natural-earth2",
|
|
7303
|
-
"nell-hammer",
|
|
7304
|
-
"patterson",
|
|
7305
|
-
"robinson",
|
|
7306
|
-
"sinusoidal",
|
|
7307
|
-
"times",
|
|
7308
|
-
"van-der-grinten",
|
|
7309
|
-
"van-der-grinten2",
|
|
7310
|
-
"van-der-grinten3",
|
|
7311
|
-
"van-der-grinten4",
|
|
7312
|
-
"wagner4",
|
|
7313
|
-
"wagner6",
|
|
7314
|
-
"winkel3",
|
|
7315
|
-
"bonne",
|
|
7316
|
-
"bottomley",
|
|
7317
|
-
"cylindrical-equal-area",
|
|
7318
|
-
"cylindrical-stereographic",
|
|
7319
|
-
"foucaut-sinusoidal",
|
|
7320
|
-
"hammer",
|
|
7321
|
-
"hill",
|
|
7322
|
-
"hufnagel",
|
|
7323
|
-
"hyperelliptical",
|
|
7324
|
-
"lagrange",
|
|
7325
|
-
"loximuthal",
|
|
7326
|
-
"wagner7",
|
|
7327
|
-
"quartic-authalic",
|
|
7328
|
-
"wagner"
|
|
7329
|
-
]);
|
|
7330
|
-
var MapTransitionGeometry = class {
|
|
7331
|
-
constructor(parts, strategy, radius) {
|
|
7332
|
-
this.strategy = strategy;
|
|
7333
|
-
this.radius = radius;
|
|
7334
|
-
this.parts = Object.freeze(parts.map((p) => Object.freeze({
|
|
7335
|
-
...p,
|
|
7336
|
-
sourceCoordinates: freezeRings(p.sourceCoordinates),
|
|
7337
|
-
from: freezeRings(p.from),
|
|
7338
|
-
to: freezeRings(p.to)
|
|
7339
|
-
})));
|
|
7340
|
-
}
|
|
7341
|
-
evaluate(amount) {
|
|
7342
|
-
validateAmount(amount);
|
|
7343
|
-
return this.parts.flatMap((part) => {
|
|
7344
|
-
const sourcePhase = part.sourceRegionId !== void 0;
|
|
7345
|
-
const blend = Math.max(0, Math.min(1, (amount - 0.4) / 0.2));
|
|
7346
|
-
const opacity = this.strategy === "direct" ? 1 : sourcePhase ? 1 - blend : blend;
|
|
7347
|
-
if (!opacity)
|
|
7348
|
-
return [];
|
|
7349
|
-
const t = this.strategy === "direct" ? amount : sourcePhase ? Math.min(1, amount / 0.4) : Math.max(0, (amount - 0.6) / 0.4);
|
|
7350
|
-
return [
|
|
7351
|
-
{
|
|
7352
|
-
kind: part.kind,
|
|
7353
|
-
sourceRegionId: part.sourceRegionId,
|
|
7354
|
-
targetRegionId: part.targetRegionId,
|
|
7355
|
-
opacity,
|
|
7356
|
-
coordinates: part.sourceCoordinates.map((ring, j) => ring.map((p, i) => {
|
|
7357
|
-
const a = part.from[j][i], b = part.to[j][i];
|
|
7358
|
-
if (this.strategy === "direct")
|
|
7359
|
-
return [a[0] * (1 - t) + b[0] * t, a[1] * (1 - t) + b[1] * t, 0];
|
|
7360
|
-
const globe = geographic(p).map((v) => v * this.radius);
|
|
7361
|
-
const flat = sourcePhase ? a : b, weight = sourcePhase ? 1 - t : t;
|
|
7362
|
-
return [
|
|
7363
|
-
flat[0] * weight + globe[0] * (1 - weight),
|
|
7364
|
-
flat[1] * weight + globe[1] * (1 - weight),
|
|
7365
|
-
globe[2] * (1 - weight)
|
|
7366
|
-
];
|
|
7367
|
-
}))
|
|
7368
|
-
}
|
|
7369
|
-
];
|
|
7370
|
-
});
|
|
7371
|
-
}
|
|
7372
|
-
};
|
|
7373
|
-
var MapTransition = class {
|
|
7374
|
-
constructor(source, target, options = {}) {
|
|
7375
|
-
this.source = source;
|
|
7376
|
-
this.target = target;
|
|
7377
|
-
const requested = options.strategy ?? "auto";
|
|
7378
|
-
if (!["auto", "direct", "via-globe"].includes(requested))
|
|
7379
|
-
throw new Error("Unknown transition strategy");
|
|
7380
|
-
const compatible = source === target || fullCoverage(source) && fullCoverage(target);
|
|
7381
|
-
if (requested === "direct" && !compatible)
|
|
7382
|
-
throw new Error("Direct morph requires complete supported geographic coverage; use auto or via-globe");
|
|
7383
|
-
this.strategy = requested === "via-globe" ? "via-globe" : compatible ? "direct" : "via-globe";
|
|
7384
|
-
this.reason = this.strategy === "direct" ? "Geometry is refined against both maps before interpolating corresponding geographic positions." : "Coverage or surface topology requires separate source and destination geometry through the globe.";
|
|
7385
|
-
}
|
|
7386
|
-
projectPoint(position2, amount) {
|
|
7387
|
-
validateAmount(amount);
|
|
7388
|
-
const a = this.source.projectPoint(position2), b = this.target.projectPoint(position2);
|
|
7389
|
-
if (this.strategy === "direct")
|
|
7390
|
-
return a && b ? [
|
|
7391
|
-
a.position[0] * (1 - amount) + b.position[0] * amount,
|
|
7392
|
-
a.position[1] * (1 - amount) + b.position[1] * amount,
|
|
7393
|
-
0
|
|
7394
|
-
] : null;
|
|
7395
|
-
const hit = amount < 0.5 ? a : b;
|
|
7396
|
-
if (!hit)
|
|
7397
|
-
return null;
|
|
7398
|
-
const t = amount < 0.5 ? Math.max(0, 1 - amount / 0.4) : Math.max(0, (amount - 0.6) / 0.4);
|
|
7399
|
-
const globe = geographic(position2).map((v) => v * this.globeRadius);
|
|
7400
|
-
return [
|
|
7401
|
-
hit.position[0] * t + globe[0] * (1 - t),
|
|
7402
|
-
hit.position[1] * t + globe[1] * (1 - t),
|
|
7403
|
-
globe[2] * (1 - t)
|
|
7404
|
-
];
|
|
7405
|
-
}
|
|
7406
|
-
get globeRadius() {
|
|
7407
|
-
return Math.max(this.source.description.radius ?? 1, this.target.description.radius ?? 1);
|
|
7408
|
-
}
|
|
7409
|
-
prepareLine(line, options) {
|
|
7410
|
-
const first = this.source.projectLine(line, options), last = this.target.projectLine(line, options);
|
|
7411
|
-
const parts = [];
|
|
7412
|
-
if (this.strategy === "direct" && this.source === this.target) {
|
|
7413
|
-
for (const p of first)
|
|
7414
|
-
parts.push({
|
|
7415
|
-
kind: "line",
|
|
7416
|
-
sourceRegionId: p.regionId,
|
|
7417
|
-
targetRegionId: p.regionId,
|
|
7418
|
-
sourceCoordinates: [p.sourceCoordinates],
|
|
7419
|
-
from: [p.coordinates],
|
|
7420
|
-
to: [p.coordinates]
|
|
7421
|
-
});
|
|
7422
|
-
} else if (this.strategy === "direct") {
|
|
7423
|
-
for (const a of first)
|
|
7424
|
-
for (const b of this.target.projectLine(a.sourceCoordinates, options)) {
|
|
7425
|
-
const source = this.source.regions.find((r) => r.id === a.regionId);
|
|
7426
|
-
parts.push({
|
|
7427
|
-
kind: "line",
|
|
7428
|
-
sourceRegionId: a.regionId,
|
|
7429
|
-
targetRegionId: b.regionId,
|
|
7430
|
-
sourceCoordinates: [b.sourceCoordinates],
|
|
7431
|
-
from: [b.sourceCoordinates.map((p) => placed(source, p))],
|
|
7432
|
-
to: [b.coordinates]
|
|
7433
|
-
});
|
|
7434
|
-
}
|
|
7435
|
-
} else {
|
|
7436
|
-
for (const p of first)
|
|
7437
|
-
parts.push({
|
|
7438
|
-
kind: "line",
|
|
7439
|
-
sourceRegionId: p.regionId,
|
|
7440
|
-
sourceCoordinates: [p.sourceCoordinates],
|
|
7441
|
-
from: [p.coordinates],
|
|
7442
|
-
to: [p.coordinates]
|
|
7443
|
-
});
|
|
7444
|
-
for (const p of last)
|
|
7445
|
-
parts.push({
|
|
7446
|
-
kind: "line",
|
|
7447
|
-
targetRegionId: p.regionId,
|
|
7448
|
-
sourceCoordinates: [p.sourceCoordinates],
|
|
7449
|
-
from: [p.coordinates],
|
|
7450
|
-
to: [p.coordinates]
|
|
7451
|
-
});
|
|
7452
|
-
}
|
|
7453
|
-
return new MapTransitionGeometry(parts, this.strategy, this.globeRadius);
|
|
7454
|
-
}
|
|
7455
|
-
preparePolygon(rings, options) {
|
|
7456
|
-
const first = this.source.projectPolygon(rings, options), last = this.target.projectPolygon(rings, options), parts = [];
|
|
7457
|
-
if (this.strategy === "direct" && this.source === this.target) {
|
|
7458
|
-
for (const p of first)
|
|
7459
|
-
parts.push({
|
|
7460
|
-
kind: "polygon",
|
|
7461
|
-
sourceRegionId: p.regionId,
|
|
7462
|
-
targetRegionId: p.regionId,
|
|
7463
|
-
sourceCoordinates: p.sourceCoordinates,
|
|
7464
|
-
from: p.coordinates,
|
|
7465
|
-
to: p.coordinates
|
|
7466
|
-
});
|
|
7467
|
-
} else if (this.strategy === "direct") {
|
|
7468
|
-
for (const a of first) {
|
|
7469
|
-
const source = this.source.regions.find((r) => r.id === a.regionId);
|
|
7470
|
-
const left = geographicRings(a.sourceCoordinates);
|
|
7471
|
-
const center3 = left[0][0][0];
|
|
7472
|
-
for (const b of last) {
|
|
7473
|
-
const target = this.target.regions.find((r) => r.id === b.regionId);
|
|
7474
|
-
const right = geographicRings(b.sourceCoordinates, center3);
|
|
7475
|
-
for (const rings2 of import_polygon_clipping2.default.intersection(left, right)) {
|
|
7476
|
-
const coordinates2 = rings2;
|
|
7477
|
-
parts.push({
|
|
7478
|
-
kind: "polygon",
|
|
7479
|
-
sourceRegionId: a.regionId,
|
|
7480
|
-
targetRegionId: b.regionId,
|
|
7481
|
-
sourceCoordinates: coordinates2,
|
|
7482
|
-
from: coordinates2.map((r) => r.map((p) => placed(source, p))),
|
|
7483
|
-
to: coordinates2.map((r) => r.map((p) => placed(target, p)))
|
|
7484
|
-
});
|
|
7485
|
-
}
|
|
7486
|
-
}
|
|
7487
|
-
}
|
|
7488
|
-
} else {
|
|
7489
|
-
for (const p of first)
|
|
7490
|
-
parts.push({
|
|
7491
|
-
kind: "polygon",
|
|
7492
|
-
sourceRegionId: p.regionId,
|
|
7493
|
-
sourceCoordinates: p.sourceCoordinates,
|
|
7494
|
-
from: p.coordinates,
|
|
7495
|
-
to: p.coordinates
|
|
7496
|
-
});
|
|
7497
|
-
for (const p of last)
|
|
7498
|
-
parts.push({
|
|
7499
|
-
kind: "polygon",
|
|
7500
|
-
targetRegionId: p.regionId,
|
|
7501
|
-
sourceCoordinates: p.sourceCoordinates,
|
|
7502
|
-
from: p.coordinates,
|
|
7503
|
-
to: p.coordinates
|
|
7504
|
-
});
|
|
7505
|
-
}
|
|
7506
|
-
return new MapTransitionGeometry(parts, this.strategy, this.globeRadius);
|
|
7507
|
-
}
|
|
7508
|
-
};
|
|
7509
|
-
function placed(region, p) {
|
|
7510
|
-
const q = region.project(p), [a, b, c, d, x, y] = region.placement ?? [1, 0, 0, 1, 0, 0];
|
|
7511
|
-
const result = [a * q[0] + c * q[1] + x, b * q[0] + d * q[1] + y];
|
|
7512
|
-
if (!result.every(Number.isFinite))
|
|
7513
|
-
throw new Error("Undefined projection in common transition coverage");
|
|
7514
|
-
return result;
|
|
7515
|
-
}
|
|
7516
|
-
function freezeRings(rings) {
|
|
7517
|
-
return Object.freeze(rings.map((r) => Object.freeze(r.map((p) => Object.freeze([...p])))));
|
|
7518
|
-
}
|
|
7519
|
-
function validateAmount(t) {
|
|
7520
|
-
if (!Number.isFinite(t) || t < 0 || t > 1)
|
|
7521
|
-
throw new Error("Transition amount must be within [0,1]");
|
|
7522
|
-
}
|
|
7523
|
-
var coverageCache = /* @__PURE__ */ new WeakMap();
|
|
7524
|
-
function fullCoverage(map) {
|
|
7525
|
-
const cached = coverageCache.get(map);
|
|
7526
|
-
if (cached !== void 0)
|
|
7527
|
-
return cached;
|
|
7528
|
-
const d = map.description.definition;
|
|
7529
|
-
let covered = false;
|
|
7530
|
-
if (d.type === "elastic") {
|
|
7531
|
-
const world = rectangle(-180, -90, 180, 90);
|
|
7532
|
-
let completeSections = true;
|
|
7533
|
-
const domains = d.data.sections.map((s) => {
|
|
7534
|
-
const domain = s.complement ? import_polygon_clipping2.default.difference(world, [s.boundary]) : import_polygon_clipping2.default.intersection(world, [s.boundary]);
|
|
7535
|
-
const runs = [];
|
|
7536
|
-
for (let y = 0; y < s.rows - 1; y++) {
|
|
7537
|
-
let start = -1;
|
|
7538
|
-
for (let x = 0; x < s.columns; x++) {
|
|
7539
|
-
const valid2 = x < s.columns - 1 && [
|
|
7540
|
-
y * s.columns + x,
|
|
7541
|
-
y * s.columns + x + 1,
|
|
7542
|
-
(y + 1) * s.columns + x,
|
|
7543
|
-
(y + 1) * s.columns + x + 1
|
|
7544
|
-
].every((i) => s.values[2 * i] !== null);
|
|
7545
|
-
if (valid2 && start < 0)
|
|
7546
|
-
start = x;
|
|
7547
|
-
if (!valid2 && start >= 0) {
|
|
7548
|
-
runs.push(rectangle(-180 + 360 * start / (s.columns - 1), -90 + 180 * y / (s.rows - 1), -180 + 360 * x / (s.columns - 1), -90 + 180 * (y + 1) / (s.rows - 1)));
|
|
7549
|
-
start = -1;
|
|
7550
|
-
}
|
|
7551
|
-
}
|
|
7552
|
-
}
|
|
7553
|
-
const valid = runs.length ? import_polygon_clipping2.default.union(runs[0], ...runs.slice(1)) : [];
|
|
7554
|
-
if (!valid.length || import_polygon_clipping2.default.difference(domain, valid).length)
|
|
7555
|
-
completeSections = false;
|
|
7556
|
-
return valid.length ? import_polygon_clipping2.default.intersection(domain, valid) : [];
|
|
7557
|
-
});
|
|
7558
|
-
const overlaps = domains.some((domain, i) => domains.slice(i + 1).some((other) => import_polygon_clipping2.default.intersection(domain, other).length > 0));
|
|
7559
|
-
covered = completeSections && !overlaps && import_polygon_clipping2.default.difference(world, ...domains).length === 0;
|
|
7560
|
-
} else if (d.type === "world") {
|
|
7561
|
-
covered = directWorldProjections.has(d.projection) && Object.keys(d.parameters ?? {}).length === 0;
|
|
7562
|
-
}
|
|
7563
|
-
coverageCache.set(map, covered);
|
|
7564
|
-
return covered;
|
|
7565
|
-
}
|
|
7566
|
-
function geographicRings(rings, center3) {
|
|
7567
|
-
return rings.map((ring) => {
|
|
7568
|
-
let previous = center3 ?? ring[0][0];
|
|
7569
|
-
return ring.map(([lon, lat]) => {
|
|
7570
|
-
const x = lon + 360 * Math.round((previous - lon) / 360);
|
|
7571
|
-
previous = x;
|
|
7572
|
-
return [Math.round(x * 1e9) / 1e9, Math.round(lat * 1e9) / 1e9];
|
|
7573
|
-
});
|
|
7574
|
-
});
|
|
7575
|
-
}
|
|
7269
|
+
// dist/maps.js
|
|
7270
|
+
var import_map_transition2 = require("./maps/map-transition.shared.cjs");
|
|
7576
7271
|
|
|
7577
7272
|
// dist/maps/global-polygons.js
|
|
7578
|
-
var
|
|
7273
|
+
var import_polygon_clipping2 = __toESM(require("polygon-clipping"), 1);
|
|
7579
7274
|
var TOL = 2e-12;
|
|
7580
7275
|
var arcCross = (a, b) => cross(a, [b[0] - a[0], b[1] - a[1], b[2] - a[2]]);
|
|
7581
7276
|
var angle3 = (a, b) => Math.atan2(Math.hypot(...arcCross(a, b)), dot(a, b));
|
|
@@ -7710,14 +7405,14 @@ function cutSphericalPolygon(rings, options) {
|
|
|
7710
7405
|
}
|
|
7711
7406
|
if (!outer.length)
|
|
7712
7407
|
continue;
|
|
7713
|
-
const merged = outer.length === 1 ? [outer] :
|
|
7714
|
-
const filled = holes.length ?
|
|
7408
|
+
const merged = outer.length === 1 ? [outer] : import_polygon_clipping2.default.union([outer[0]], ...outer.slice(1).map((r) => [r]));
|
|
7409
|
+
const filled = holes.length ? import_polygon_clipping2.default.difference(merged, ...holes.map((r) => [r])) : merged;
|
|
7715
7410
|
const mask = [
|
|
7716
7411
|
[sx, 0, 0],
|
|
7717
7412
|
[0, sy, 0],
|
|
7718
7413
|
[0, 0, sz]
|
|
7719
7414
|
].map((p) => [dot(x, p) / dot(center3, p), dot(y, p) / dot(center3, p)]);
|
|
7720
|
-
const polygons =
|
|
7415
|
+
const polygons = import_polygon_clipping2.default.intersection(filled, [mask]);
|
|
7721
7416
|
for (const polygon of polygons) {
|
|
7722
7417
|
let vectors = polygon.map((r) => r.map(([a, b]) => unit([0, 1, 2].map((i) => center3[i] + a * x[i] + b * y[i]))));
|
|
7723
7418
|
vectors = vectors.map((r) => {
|
|
@@ -8910,7 +8605,7 @@ var mapPresets = [
|
|
|
8910
8605
|
];
|
|
8911
8606
|
|
|
8912
8607
|
// dist/maps/geometry.js
|
|
8913
|
-
var
|
|
8608
|
+
var import_polygon_clipping3 = __toESM(require("polygon-clipping"), 1);
|
|
8914
8609
|
|
|
8915
8610
|
// dist/maps/prepare-features.js
|
|
8916
8611
|
var vertices = () => ({ positions: [], sourcePositions: [] });
|
|
@@ -9143,11 +8838,12 @@ function prepareMapFeatures(map, features, options = {}) {
|
|
|
9143
8838
|
}
|
|
9144
8839
|
|
|
9145
8840
|
// dist/maps/geometry.js
|
|
9146
|
-
var mapGeometry = { polygonClipping:
|
|
8841
|
+
var mapGeometry = { polygonClipping: import_polygon_clipping3.default, projectSphericalPolygon, prepareMapFeatures };
|
|
9147
8842
|
function withMapGeometry(map) {
|
|
9148
|
-
return Object.assign(map, { polygonClipping:
|
|
8843
|
+
return Object.assign(map, { polygonClipping: import_polygon_clipping3.default });
|
|
9149
8844
|
}
|
|
9150
8845
|
|
|
9151
8846
|
// dist/maps/transitions.js
|
|
9152
|
-
var
|
|
8847
|
+
var import_map_transition = require("./maps/map-transition.shared.cjs");
|
|
8848
|
+
var mapTransitions = { MapTransition: import_map_transition.MapTransition };
|
|
9153
8849
|
//# sourceMappingURL=maps.cjs.map
|