@nika-js/onlymap 0.13.1 → 0.13.3

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.
Files changed (64) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +3 -2
  3. package/bin/dem-tiles.mjs +270 -0
  4. package/bin/onlymapjs.mjs +138 -34
  5. package/dist/{basemap-zG1-omic.js → basemap-5NHR6Gio.js} +2 -2
  6. package/dist/{build-Bbi4SleC.js → build-DJjheWZ2.js} +10 -10
  7. package/dist/camera-altitude.d.ts +29 -0
  8. package/dist/{client-CIH6ToMI.js → client-0mQmDog8.js} +2 -2
  9. package/dist/color.d.ts +15 -0
  10. package/dist/credit-chrome.d.ts +11 -0
  11. package/dist/data-layer.d.ts +7 -15
  12. package/dist/elements/om-map.d.ts +41 -1
  13. package/dist/geodesy.d.ts +2 -0
  14. package/dist/{geoparquet-CyWsYt9S.js → geoparquet-B_nO2OyP.js} +3 -3
  15. package/dist/{globe-view-Xelgj_KW.js → globe-view-BFUa9ksE.js} +1 -1
  16. package/dist/ground-controller.d.ts +39 -0
  17. package/dist/{hillshade-Zbg50lm6.js → hillshade-B_CxPhtA.js} +61 -64
  18. package/dist/{hillshade-shader-DI2uLSNU.js → hillshade-shader-r7GxxjXj.js} +12 -11
  19. package/dist/hillshade-shader.d.ts +2 -2
  20. package/dist/hillshade.d.ts +0 -29
  21. package/dist/{index-JFuN4DCn.js → index-A1FYw2dy.js} +1 -1
  22. package/dist/{index-BbVnkgld.js → index-BvNxS6dM.js} +38 -38
  23. package/dist/{index-ClAPAqcm.js → index-CObPGkze.js} +38 -38
  24. package/dist/{index-BL_YCKiW.js → index-CU7RnKnO.js} +62 -62
  25. package/dist/{index-6eeSlSqN.js → index-CgIuV5Oh.js} +3 -3
  26. package/dist/{index-DnCmvLuC.js → index-ChmxbIdj.js} +61 -61
  27. package/dist/{index-BwtXeP_F.js → index-DT5d7kFO.js} +1 -1
  28. package/dist/{index-CpFNIkOO.js → index-DWijIMti.js} +22217 -20712
  29. package/dist/{index-BtRsa5oc.js → index-YMu_yLXO.js} +18 -18
  30. package/dist/index.d.ts +1 -1
  31. package/dist/{lerc-C3SKC6CU.js → lerc-Bl4vym9y.js} +1 -1
  32. package/dist/onlymap.standalone.js +39073 -37485
  33. package/dist/onlymapjs.js +49 -49
  34. package/dist/plane-gpu/plane-basemap.d.ts +0 -14
  35. package/dist/{post-process-effect-C3P9VwC9.js → post-process-effect-gFGVlC77.js} +1 -1
  36. package/dist/programmatic.d.ts +3 -1
  37. package/dist/{raster-BgCnz9-Z.js → raster-1ShXyF12.js} +4 -4
  38. package/dist/{raster-pipeline-CKdpKgFo.js → raster-pipeline-BMS54TX2.js} +11 -11
  39. package/dist/runtime-core.d.ts +147 -0
  40. package/dist/sea-surface.d.ts +18 -0
  41. package/dist/terrain-derive.d.ts +39 -0
  42. package/dist/terrain-ground.d.ts +31 -0
  43. package/dist/terrain-heightfield.d.ts +17 -9
  44. package/dist/terrain-inspect-Cndlmxig.js +96 -0
  45. package/dist/terrain-inspect.d.ts +34 -0
  46. package/dist/terrain-nodata.d.ts +50 -0
  47. package/dist/terrain-priority.d.ts +92 -0
  48. package/dist/terrain-sample.d.ts +6 -0
  49. package/dist/terrain-skirt.d.ts +6140 -0
  50. package/dist/terrain-texture-mask.d.ts +40 -0
  51. package/dist/terrain-tint.d.ts +61 -0
  52. package/dist/terrain.d.ts +132 -8
  53. package/dist/{text-on-path-BpVLX8Yt.js → text-on-path-QInco4aP.js} +1 -1
  54. package/dist/tile-url.d.ts +94 -0
  55. package/dist/version.d.ts +1 -1
  56. package/dist/viewport-filter.d.ts +9 -0
  57. package/dist/volumetrics.d.ts +11 -0
  58. package/dist/{zarr-Cur_pzNa.js → zarr-CYD8fyBe.js} +2 -2
  59. package/docs/cartograph.md +2 -2
  60. package/llms.txt +2 -2
  61. package/onlymapjs.html-data.json +163 -3
  62. package/package.json +2 -1
  63. package/skills/onlymapjs/SKILL.md +6 -2
  64. package/skills/onlymapjs/references/syntax.md +12 -3
@@ -1,32 +1,3 @@
1
- /**
2
- * Hillshade / shaded relief — the lazy chunk (docs/design/hillshade.md).
3
- *
4
- * WHAT THIS IS, AND IS NOT. Cartographic shaded relief is RENDERED TEXTURE:
5
- * pixels, never numbers. Nothing here is queryable, classified or reported,
6
- * which is the line issue #13 drew when it put "raster analysis
7
- * (hillshade/slope)" out of scope — the boundary there is QUERYABILITY, not
8
- * the arithmetic. This ships no analytic product.
9
- *
10
- * It is a LAYER, not a mode of `terrain=`. `terrain=` means a 3D surface: it
11
- * replaces the basemap, changes what the camera means, and is meaningless at
12
- * pitch 0. Relief on a print sheet has to compose underneath the data layers
13
- * like any other layer — and, decisively, a layer draws inside deck's own
14
- * framebuffer, so it lands in `snapshot()` and UNDER `<om-effect>`. Relief a
15
- * print finish could not reach would be worth very little.
16
- *
17
- * THE SEAM IS THE WHOLE DESIGN PROBLEM. A hillshade is a derivative, so every
18
- * fragment needs its neighbours — and at a tile's edge the neighbours live in
19
- * a different tile. Sampling with clamp-to-edge instead makes the derivative
20
- * collapse to zero along every border, drawing a pale grid over the world:
21
- * the single most recognisable way a hand-rolled hillshade looks broken.
22
- * Rather than bind nine textures per draw, each tile is decoded on the CPU
23
- * (`dem-decode.ts`, which exists because these bytes are heights and must not
24
- * be colour-managed) into a heightfield with a ONE-PIXEL APRON copied from
25
- * its eight neighbours. The shader then samples one texture with no edge
26
- * cases at all, and the neighbour fetches are nearly free because a
27
- * neighbour is almost always a tile the map is drawing anyway — see
28
- * `tileCache`.
29
- */
30
1
  import { CompositeLayer, type Layer } from "@deck.gl/core";
31
2
  import { type ElevationDecoder } from "./terrain";
32
3
  import { type PaddedHeights } from "./hillshade-apron";
@@ -1,4 +1,4 @@
1
- import { bD as Su, bE as qu } from "./index-CpFNIkOO.js";
1
+ import { bM as Su, bN as qu } from "./index-DWijIMti.js";
2
2
  function Ru(r) {
3
3
  let n = 0, a = 0, s = 0, o = 0, l = 0, p = 0, f = 0, m = 0, d = 0;
4
4
  const E = /* @__PURE__ */ new Set();
@@ -1,6 +1,6 @@
1
- import { bJ as Bt, bV as Qt, bW as Yt, bX as Us } from "./index-CpFNIkOO.js";
2
- import { w as gs, t as Hs, f as Ws, m as Xs } from "./mgrs-BY9bIvp4.js";
3
- import { c as Qs } from "./convert-arrow-schema-DrAihRf9.js";
1
+ import { bS as Bt, c2 as Xt, c3 as Yt, c4 as Us } from "./index-DWijIMti.js";
2
+ import { w as gs, t as Hs, f as Ws, m as Qs } from "./mgrs-BY9bIvp4.js";
3
+ import { c as Xs } from "./convert-arrow-schema-DrAihRf9.js";
4
4
  import { y as Ys, A as bt, a as Ks, z as Vs, R as Zs } from "./recordbatch-Bpc0uxFn.js";
5
5
  class Js {
6
6
  schema;
@@ -8,7 +8,7 @@ class Js {
8
8
  arrowBuilders;
9
9
  length;
10
10
  constructor(s) {
11
- this.schema = s, this.arrowSchema = Qs(s), this.arrowBuilders = this.arrowSchema.fields.map((a) => Ys({ type: a.type, nullValues: [null] })), this.length = 0;
11
+ this.schema = s, this.arrowSchema = Xs(s), this.arrowBuilders = this.arrowSchema.fields.map((a) => Ys({ type: a.type, nullValues: [null] })), this.length = 0;
12
12
  }
13
13
  addObjectRow(s) {
14
14
  for (let a = 0; a < this.arrowBuilders.length; a++) {
@@ -456,7 +456,7 @@ const ca = "4.4.3", Es = [0, 0, 39, 10], fa = {
456
456
  function ua(t) {
457
457
  t("EPSG:4326", "+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"), t("EPSG:4269", "+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"), t("EPSG:3857", "+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"), t.WGS84 = t["EPSG:4326"], t["EPSG:3785"] = t["EPSG:3857"], t.GOOGLE = t["EPSG:3857"], t["EPSG:900913"] = t["EPSG:3857"], t["EPSG:102113"] = t["EPSG:3857"];
458
458
  }
459
- var tt = 1, st = 2, Ma = 4, qt = 5, ct = 484813681109536e-20, M = Math.PI / 2, va = 0.16666666666666666, da = 0.04722222222222222, ya = 0.022156084656084655, m = 1e-10, D = 0.017453292519943295, X = 57.29577951308232, p = Math.PI / 4, Ft = Math.PI * 2, N = 3.14159265359, T = {};
459
+ var tt = 1, st = 2, Ma = 4, qt = 5, ct = 484813681109536e-20, M = Math.PI / 2, va = 0.16666666666666666, da = 0.04722222222222222, ya = 0.022156084656084655, m = 1e-10, D = 0.017453292519943295, Q = 57.29577951308232, p = Math.PI / 4, Ft = Math.PI * 2, N = 3.14159265359, T = {};
460
460
  T.greenwich = 0;
461
461
  T.lisbon = -9.131906111111;
462
462
  T.paris = 2.337229166667;
@@ -679,7 +679,7 @@ function Pa() {
679
679
  }
680
680
  function Sa(t) {
681
681
  var s = t.x, a = t.y;
682
- if (a * X > 90 && a * X < -90 && s * X > 180 && s * X < -180)
682
+ if (a * Q > 90 && a * Q < -90 && s * Q > 180 && s * Q < -180)
683
683
  return null;
684
684
  var i, e;
685
685
  if (Math.abs(Math.abs(a) - M) <= m)
@@ -1208,7 +1208,7 @@ function Ss(t) {
1208
1208
  };
1209
1209
  return t.length > 2 && (s.z = t[2]), t.length > 3 && (s.m = t[3]), s;
1210
1210
  }
1211
- function Xa(t) {
1211
+ function Qa(t) {
1212
1212
  es(t.x), es(t.y);
1213
1213
  }
1214
1214
  function es(t) {
@@ -1220,12 +1220,12 @@ function es(t) {
1220
1220
  if (typeof t != "number" || t !== t || !isFinite(t))
1221
1221
  throw new TypeError("coordinates must be finite numbers");
1222
1222
  }
1223
- function Qa(t, s) {
1223
+ function Xa(t, s) {
1224
1224
  return (t.datum.datum_type === tt || t.datum.datum_type === st) && s.datumCode !== "WGS84" || (s.datum.datum_type === tt || s.datum.datum_type === st) && t.datumCode !== "WGS84";
1225
1225
  }
1226
1226
  function St(t, s, a) {
1227
1227
  var i;
1228
- if (Array.isArray(a) && (a = Ss(a)), Xa(a), t.datum && s.datum && Qa(t, s) && (i = new H("WGS84"), a = St(t, i, a), t = i), t.axis !== "enu" && (a = is(t, !1, a)), t.projName === "longlat")
1228
+ if (Array.isArray(a) && (a = Ss(a)), Qa(a), t.datum && s.datum && Xa(t, s) && (i = new H("WGS84"), a = St(t, i, a), t = i), t.axis !== "enu" && (a = is(t, !1, a)), t.projName === "longlat")
1229
1229
  a = {
1230
1230
  x: a.x * D,
1231
1231
  y: a.y * D,
@@ -1242,8 +1242,8 @@ function St(t, s, a) {
1242
1242
  y: a.y,
1243
1243
  z: a.z || 0
1244
1244
  }), s.projName === "longlat" ? a = {
1245
- x: a.x * X,
1246
- y: a.y * X,
1245
+ x: a.x * Q,
1246
+ y: a.y * Q,
1247
1247
  z: a.z || 0
1248
1248
  } : (a = s.forward(a), s.to_meter && (a = {
1249
1249
  x: a.x / s.to_meter,
@@ -1478,17 +1478,17 @@ function Ii(t) {
1478
1478
  t.y = i;
1479
1479
  return h ? (t.x = a, t.y = i, t) : null;
1480
1480
  }
1481
- const Xt = {
1481
+ const Qt = {
1482
1482
  init: pi,
1483
1483
  forward: Ri,
1484
1484
  inverse: Ii
1485
1485
  };
1486
1486
  function Pi() {
1487
- Xt.init.apply(this), this.rc && (this.sinc0 = Math.sin(this.phic0), this.cosc0 = Math.cos(this.phic0), this.R2 = 2 * this.rc, this.title || (this.title = "Oblique Stereographic Alternative"));
1487
+ Qt.init.apply(this), this.rc && (this.sinc0 = Math.sin(this.phic0), this.cosc0 = Math.cos(this.phic0), this.R2 = 2 * this.rc, this.title || (this.title = "Oblique Stereographic Alternative"));
1488
1488
  }
1489
1489
  function Si(t) {
1490
1490
  var s, a, i, e;
1491
- return t.x = b(t.x - this.long0), Xt.forward.apply(this, [t]), s = Math.sin(t.y), a = Math.cos(t.y), i = Math.cos(t.x), e = this.k0 * this.R2 / (1 + this.sinc0 * s + this.cosc0 * a * i), t.x = e * a * Math.sin(t.x), t.y = e * (this.cosc0 * s - this.sinc0 * a * i), t.x = this.a * t.x + this.x0, t.y = this.a * t.y + this.y0, t;
1491
+ return t.x = b(t.x - this.long0), Qt.forward.apply(this, [t]), s = Math.sin(t.y), a = Math.cos(t.y), i = Math.cos(t.x), e = this.k0 * this.R2 / (1 + this.sinc0 * s + this.cosc0 * a * i), t.x = e * a * Math.sin(t.x), t.y = e * (this.cosc0 * s - this.sinc0 * a * i), t.x = this.a * t.x + this.x0, t.y = this.a * t.y + this.y0, t;
1492
1492
  }
1493
1493
  function Ai(t) {
1494
1494
  var s, a, i, e, h;
@@ -1497,7 +1497,7 @@ function Ai(t) {
1497
1497
  s = Math.sin(r), a = Math.cos(r), e = Math.asin(a * this.sinc0 + t.y * s * this.cosc0 / h), i = Math.atan2(t.x * s, h * this.cosc0 * a - t.y * this.sinc0 * s);
1498
1498
  } else
1499
1499
  e = this.phic0, i = 0;
1500
- return t.x = i, t.y = e, Xt.inverse.apply(this, [t]), t.x = b(t.x + this.long0), t;
1500
+ return t.x = i, t.y = e, Qt.inverse.apply(this, [t]), t.x = b(t.x + this.long0), t;
1501
1501
  }
1502
1502
  var Ni = ["Stereographic_North_Pole", "Oblique_Stereographic", "Polar_Stereographic", "sterea", "Oblique Stereographic Alternative", "Double_Stereographic"];
1503
1503
  const Bi = {
@@ -1603,13 +1603,13 @@ function Hi(t) {
1603
1603
  return Math.abs(n - 1) < m ? (t.x = this.long0, t.y = M) : Math.abs(n + 1) < m ? (t.x = this.long0, t.y = -1 * M) : (t.y = ut(this.e, o), t.x = b(this.long0 - Math.atan2(e * Math.cos(this.gamma0) - r * Math.sin(this.gamma0), Math.cos(this.bl * s / this.al)) / this.bl)), t;
1604
1604
  }
1605
1605
  var Wi = ["Hotine_Oblique_Mercator", "Hotine Oblique Mercator", "Hotine_Oblique_Mercator_Azimuth_Natural_Origin", "Hotine_Oblique_Mercator_Azimuth_Center", "omerc"];
1606
- const Xi = {
1606
+ const Qi = {
1607
1607
  init: zi,
1608
1608
  forward: Ui,
1609
1609
  inverse: Hi,
1610
1610
  names: Wi
1611
1611
  };
1612
- function Qi() {
1612
+ function Xi() {
1613
1613
  if (this.lat2 || (this.lat2 = this.lat1), this.k0 || (this.k0 = 1), this.x0 = this.x0 || 0, this.y0 = this.y0 || 0, !(Math.abs(this.lat1 + this.lat2) < m)) {
1614
1614
  var t = this.b / this.a;
1615
1615
  this.e = Math.sqrt(1 - t * t);
@@ -1644,7 +1644,7 @@ function Ki(t) {
1644
1644
  }
1645
1645
  var Vi = ["Lambert Tangential Conformal Conic Projection", "Lambert_Conformal_Conic", "Lambert_Conformal_Conic_2SP", "lcc"];
1646
1646
  const Zi = {
1647
- init: Qi,
1647
+ init: Xi,
1648
1648
  forward: Yi,
1649
1649
  inverse: Ki,
1650
1650
  names: Vi
@@ -1737,7 +1737,7 @@ const oe = {
1737
1737
  inverse: re,
1738
1738
  names: ne
1739
1739
  };
1740
- function Q(t, s) {
1740
+ function X(t, s) {
1741
1741
  var a;
1742
1742
  return t > 1e-7 ? (a = t * s, (1 - t * t) * (s / (1 - a * a) - 0.5 / t * Math.log((1 - a) / (1 + a)))) : 2 * s;
1743
1743
  }
@@ -1746,7 +1746,7 @@ function Me() {
1746
1746
  var t = Math.abs(this.lat0);
1747
1747
  if (Math.abs(t - M) < m ? this.mode = this.lat0 < 0 ? this.S_POLE : this.N_POLE : Math.abs(t) < m ? this.mode = this.EQUIT : this.mode = this.OBLIQ, this.es > 0) {
1748
1748
  var s;
1749
- switch (this.qp = Q(this.e, 1), this.mmf = 0.5 / (1 - this.es), this.apa = we(this.es), this.mode) {
1749
+ switch (this.qp = X(this.e, 1), this.mmf = 0.5 / (1 - this.es), this.apa = we(this.es), this.mode) {
1750
1750
  case this.N_POLE:
1751
1751
  this.dd = 1;
1752
1752
  break;
@@ -1757,7 +1757,7 @@ function Me() {
1757
1757
  this.rq = Math.sqrt(0.5 * this.qp), this.dd = 1 / this.rq, this.xmf = 1, this.ymf = 0.5 * this.qp;
1758
1758
  break;
1759
1759
  case this.OBLIQ:
1760
- this.rq = Math.sqrt(0.5 * this.qp), s = Math.sin(this.lat0), this.sinb1 = Q(this.e, s) / this.qp, this.cosb1 = Math.sqrt(1 - this.sinb1 * this.sinb1), this.dd = Math.cos(this.lat0) / (Math.sqrt(1 - this.es * s * s) * this.rq * this.cosb1), this.ymf = (this.xmf = this.rq) / this.dd, this.xmf *= this.dd;
1760
+ this.rq = Math.sqrt(0.5 * this.qp), s = Math.sin(this.lat0), this.sinb1 = X(this.e, s) / this.qp, this.cosb1 = Math.sqrt(1 - this.sinb1 * this.sinb1), this.dd = Math.cos(this.lat0) / (Math.sqrt(1 - this.es * s * s) * this.rq * this.cosb1), this.ymf = (this.xmf = this.rq) / this.dd, this.xmf *= this.dd;
1761
1761
  break;
1762
1762
  }
1763
1763
  } else
@@ -1776,7 +1776,7 @@ function ve(t) {
1776
1776
  a = p - u * 0.5, a = 2 * (this.mode === this.S_POLE ? Math.cos(a) : Math.sin(a)), s = a * Math.sin(f), a *= i;
1777
1777
  }
1778
1778
  } else {
1779
- switch (n = 0, o = 0, l = 0, i = Math.cos(f), e = Math.sin(f), h = Math.sin(u), r = Q(this.e, h), (this.mode === this.OBLIQ || this.mode === this.EQUIT) && (n = r / this.qp, o = Math.sqrt(1 - n * n)), this.mode) {
1779
+ switch (n = 0, o = 0, l = 0, i = Math.cos(f), e = Math.sin(f), h = Math.sin(u), r = X(this.e, h), (this.mode === this.OBLIQ || this.mode === this.EQUIT) && (n = r / this.qp, o = Math.sqrt(1 - n * n)), this.mode) {
1780
1780
  case this.OBLIQ:
1781
1781
  l = 1 + this.sinb1 * n + this.cosb1 * o * i;
1782
1782
  break;
@@ -1865,12 +1865,12 @@ function K(t) {
1865
1865
  return Math.abs(t) > 1 && (t = t > 1 ? 1 : -1), Math.asin(t);
1866
1866
  }
1867
1867
  function Ie() {
1868
- Math.abs(this.lat1 + this.lat2) < m || (this.temp = this.b / this.a, this.es = 1 - Math.pow(this.temp, 2), this.e3 = Math.sqrt(this.es), this.sin_po = Math.sin(this.lat1), this.cos_po = Math.cos(this.lat1), this.t1 = this.sin_po, this.con = this.sin_po, this.ms1 = W(this.e3, this.sin_po, this.cos_po), this.qs1 = Q(this.e3, this.sin_po, this.cos_po), this.sin_po = Math.sin(this.lat2), this.cos_po = Math.cos(this.lat2), this.t2 = this.sin_po, this.ms2 = W(this.e3, this.sin_po, this.cos_po), this.qs2 = Q(this.e3, this.sin_po, this.cos_po), this.sin_po = Math.sin(this.lat0), this.cos_po = Math.cos(this.lat0), this.t3 = this.sin_po, this.qs0 = Q(this.e3, this.sin_po, this.cos_po), Math.abs(this.lat1 - this.lat2) > m ? this.ns0 = (this.ms1 * this.ms1 - this.ms2 * this.ms2) / (this.qs2 - this.qs1) : this.ns0 = this.con, this.c = this.ms1 * this.ms1 + this.ns0 * this.qs1, this.rh = this.a * Math.sqrt(this.c - this.ns0 * this.qs0) / this.ns0);
1868
+ Math.abs(this.lat1 + this.lat2) < m || (this.temp = this.b / this.a, this.es = 1 - Math.pow(this.temp, 2), this.e3 = Math.sqrt(this.es), this.sin_po = Math.sin(this.lat1), this.cos_po = Math.cos(this.lat1), this.t1 = this.sin_po, this.con = this.sin_po, this.ms1 = W(this.e3, this.sin_po, this.cos_po), this.qs1 = X(this.e3, this.sin_po, this.cos_po), this.sin_po = Math.sin(this.lat2), this.cos_po = Math.cos(this.lat2), this.t2 = this.sin_po, this.ms2 = W(this.e3, this.sin_po, this.cos_po), this.qs2 = X(this.e3, this.sin_po, this.cos_po), this.sin_po = Math.sin(this.lat0), this.cos_po = Math.cos(this.lat0), this.t3 = this.sin_po, this.qs0 = X(this.e3, this.sin_po, this.cos_po), Math.abs(this.lat1 - this.lat2) > m ? this.ns0 = (this.ms1 * this.ms1 - this.ms2 * this.ms2) / (this.qs2 - this.qs1) : this.ns0 = this.con, this.c = this.ms1 * this.ms1 + this.ns0 * this.qs1, this.rh = this.a * Math.sqrt(this.c - this.ns0 * this.qs0) / this.ns0);
1869
1869
  }
1870
1870
  function Pe(t) {
1871
1871
  var s = t.x, a = t.y;
1872
1872
  this.sin_phi = Math.sin(a), this.cos_phi = Math.cos(a);
1873
- var i = Q(this.e3, this.sin_phi, this.cos_phi), e = this.a * Math.sqrt(this.c - this.ns0 * i) / this.ns0, h = this.ns0 * b(s - this.long0), r = e * Math.sin(h) + this.x0, n = this.rh - e * Math.cos(h) + this.y0;
1873
+ var i = X(this.e3, this.sin_phi, this.cos_phi), e = this.a * Math.sqrt(this.c - this.ns0 * i) / this.ns0, h = this.ns0 * b(s - this.long0), r = e * Math.sin(h) + this.x0, n = this.rh - e * Math.cos(h) + this.y0;
1874
1874
  return t.x = r, t.y = n, t;
1875
1875
  }
1876
1876
  function Se(t) {
@@ -1929,7 +1929,7 @@ function qe(t) {
1929
1929
  if (this.sphere)
1930
1930
  i = this.x0 + this.a * h * Math.cos(this.lat_ts), e = this.y0 + this.a * Math.sin(a) / Math.cos(this.lat_ts);
1931
1931
  else {
1932
- var r = Q(this.e, Math.sin(a));
1932
+ var r = X(this.e, Math.sin(a));
1933
1933
  i = this.x0 + this.a * this.k0 * h, e = this.y0 + this.a * r * 0.5 / this.k0;
1934
1934
  }
1935
1935
  return t.x = i, t.y = e, t;
@@ -1958,14 +1958,14 @@ function He(t) {
1958
1958
  return t.x = b(this.long0 + (s - this.x0) / (this.a * this.rc)), t.y = nt(this.lat0 + (a - this.y0) / this.a), t;
1959
1959
  }
1960
1960
  var We = ["Equirectangular", "Equidistant_Cylindrical", "eqc"];
1961
- const Xe = {
1961
+ const Qe = {
1962
1962
  init: ze,
1963
1963
  forward: Ue,
1964
1964
  inverse: He,
1965
1965
  names: We
1966
1966
  };
1967
1967
  var cs = 20;
1968
- function Qe() {
1968
+ function Xe() {
1969
1969
  this.temp = this.b / this.a, this.es = 1 - Math.pow(this.temp, 2), this.e = Math.sqrt(this.es), this.e0 = vt(this.es), this.e1 = dt(this.es), this.e2 = yt(this.es), this.e3 = mt(this.es), this.ml0 = this.a * O(this.e0, this.e1, this.e2, this.e3, this.lat0);
1970
1970
  }
1971
1971
  function Ye(t) {
@@ -2011,7 +2011,7 @@ function Ke(t) {
2011
2011
  }
2012
2012
  var Ve = ["Polyconic", "poly"];
2013
2013
  const Ze = {
2014
- init: Qe,
2014
+ init: Xe,
2015
2015
  forward: Ye,
2016
2016
  inverse: Ke,
2017
2017
  names: Ve
@@ -2325,12 +2325,12 @@ var jt = [
2325
2325
  [0.9394, 840947e-8, -192841e-9, -42106e-10],
2326
2326
  [0.9761, 616527e-8, -256e-6, -42106e-10],
2327
2327
  [1, 328947e-8, -319159e-9, -42106e-10]
2328
- ], Ds = 0.8487, ks = 1.3523, Ls = X / 5, Hh = 1 / Ls, it = 18, Nt = function(t, s) {
2328
+ ], Ds = 0.8487, ks = 1.3523, Ls = Q / 5, Hh = 1 / Ls, it = 18, Nt = function(t, s) {
2329
2329
  return t[0] + s * (t[1] + s * (t[2] + s * t[3]));
2330
2330
  }, Wh = function(t, s) {
2331
2331
  return t[1] + s * (2 * t[2] + s * 3 * t[3]);
2332
2332
  };
2333
- function Xh(t, s, a, i) {
2333
+ function Qh(t, s, a, i) {
2334
2334
  for (var e = s; i; --i) {
2335
2335
  var h = t(e);
2336
2336
  if (e -= h, Math.abs(h) < a)
@@ -2338,12 +2338,12 @@ function Xh(t, s, a, i) {
2338
2338
  }
2339
2339
  return e;
2340
2340
  }
2341
- function Qh() {
2341
+ function Xh() {
2342
2342
  this.x0 = this.x0 || 0, this.y0 = this.y0 || 0, this.long0 = this.long0 || 0, this.es = 0, this.title = this.title || "Robinson";
2343
2343
  }
2344
2344
  function Yh(t) {
2345
2345
  var s = b(t.x - this.long0), a = Math.abs(t.y), i = Math.floor(a * Ls);
2346
- i < 0 ? i = 0 : i >= it && (i = it - 1), a = X * (a - Hh * i);
2346
+ i < 0 ? i = 0 : i >= it && (i = it - 1), a = Q * (a - Hh * i);
2347
2347
  var e = {
2348
2348
  x: Nt(jt[i], a) * s,
2349
2349
  y: Nt(lt[i], a)
@@ -2367,7 +2367,7 @@ function Kh(t) {
2367
2367
  else
2368
2368
  break;
2369
2369
  var i = lt[a], e = 5 * (s.y - i[0]) / (lt[a + 1][0] - i[0]);
2370
- e = Xh(function(h) {
2370
+ e = Qh(function(h) {
2371
2371
  return (Nt(i, h) - s.y) / Wh(i, h);
2372
2372
  }, e, m, 100), s.x /= Nt(jt[a], e), s.y = (5 * a + e) * D, t.y < 0 && (s.y = -s.y);
2373
2373
  }
@@ -2375,7 +2375,7 @@ function Kh(t) {
2375
2375
  }
2376
2376
  var Vh = ["Robinson", "robin"];
2377
2377
  const Zh = {
2378
- init: Qh,
2378
+ init: Xh,
2379
2379
  forward: Yh,
2380
2380
  inverse: Kh,
2381
2381
  names: Vh
@@ -2399,7 +2399,7 @@ const ir = {
2399
2399
  names: ar
2400
2400
  };
2401
2401
  function er(t) {
2402
- t.Proj.projections.add(li), t.Proj.projections.add(Rt), t.Proj.projections.add(wi), t.Proj.projections.add(Bi), t.Proj.projections.add(Oi), t.Proj.projections.add(ji), t.Proj.projections.add(Xi), t.Proj.projections.add(Zi), t.Proj.projections.add(ie), t.Proj.projections.add(oe), t.Proj.projections.add(Re), t.Proj.projections.add(Be), t.Proj.projections.add($e), t.Proj.projections.add(je), t.Proj.projections.add(Xe), t.Proj.projections.add(Ze), t.Proj.projections.add(ih), t.Proj.projections.add(oh), t.Proj.projections.add(vh), t.Proj.projections.add(bh), t.Proj.projections.add(ph), t.Proj.projections.add(Ah), t.Proj.projections.add(kh), t.Proj.projections.add(qh), t.Proj.projections.add(Uh), t.Proj.projections.add(Zh), t.Proj.projections.add(ir);
2402
+ t.Proj.projections.add(li), t.Proj.projections.add(Rt), t.Proj.projections.add(wi), t.Proj.projections.add(Bi), t.Proj.projections.add(Oi), t.Proj.projections.add(ji), t.Proj.projections.add(Qi), t.Proj.projections.add(Zi), t.Proj.projections.add(ie), t.Proj.projections.add(oe), t.Proj.projections.add(Re), t.Proj.projections.add(Be), t.Proj.projections.add($e), t.Proj.projections.add(je), t.Proj.projections.add(Qe), t.Proj.projections.add(Ze), t.Proj.projections.add(ih), t.Proj.projections.add(oh), t.Proj.projections.add(vh), t.Proj.projections.add(bh), t.Proj.projections.add(ph), t.Proj.projections.add(Ah), t.Proj.projections.add(kh), t.Proj.projections.add(qh), t.Proj.projections.add(Uh), t.Proj.projections.add(Zh), t.Proj.projections.add(ir);
2403
2403
  }
2404
2404
  q.defaultDatum = "WGS84";
2405
2405
  q.Proj = H;
@@ -2408,7 +2408,7 @@ q.Point = ht;
2408
2408
  q.toPoint = Ss;
2409
2409
  q.defs = k;
2410
2410
  q.transform = St;
2411
- q.mgrs = Xs;
2411
+ q.mgrs = Qs;
2412
2412
  q.version = "__VERSION__";
2413
2413
  er(q);
2414
2414
  class hr {
@@ -2686,11 +2686,11 @@ const gr = "4.4.3", br = {
2686
2686
  }
2687
2687
  };
2688
2688
  async function* _r(t, s, a) {
2689
- const { reproject: i = !1, _targetCrs: e = "WGS84" } = s?.gis || {}, { shx: h, cpg: r, prj: n } = await Gs(s, a), o = await Qt(Bt(t), ps, s, a), l = o[Symbol.asyncIterator]?.() || o[Symbol.iterator]?.();
2689
+ const { reproject: i = !1, _targetCrs: e = "WGS84" } = s?.gis || {}, { shx: h, cpg: r, prj: n } = await Gs(s, a), o = await Xt(Bt(t), ps, s, a), l = o[Symbol.asyncIterator]?.() || o[Symbol.iterator]?.();
2690
2690
  let c = null;
2691
2691
  const f = await a?.fetch(ft(a?.url || "", "dbf"));
2692
2692
  if (f?.ok) {
2693
- const g = await Qt(f, Os, {
2693
+ const g = await Xt(f, Os, {
2694
2694
  ...s,
2695
2695
  dbf: {
2696
2696
  ...s?.dbf,
@@ -1,7 +1,7 @@
1
- import { aI as tt, aJ as et, aK as j, ab as nt, ac as ot, aL as q, aM as rt, aN as O, a7 as st, a8 as U, aO as B, aP as it } from "./index-CpFNIkOO.js";
2
- const H = Math.PI / 180, T = tt * H;
3
- function K(t, r) {
4
- const n = Math.max(Math.cos(r * H), 1e-6);
1
+ import { aR as tt, aS as et, aT as q, ak as nt, aa as ot, aU as L, aV as rt, aW as D, af as st, ag as _, aX as B, aY as it } from "./index-DWijIMti.js";
2
+ const J = Math.PI / 180, T = tt * J;
3
+ function Q(t, r) {
4
+ const n = Math.max(Math.cos(r * J), 1e-6);
5
5
  return {
6
6
  toMetres(o) {
7
7
  return [(o[0] - t) * T * n, (o[1] - r) * T];
@@ -11,17 +11,17 @@ function K(t, r) {
11
11
  }
12
12
  };
13
13
  }
14
- function _(t) {
14
+ function O(t) {
15
15
  return Array.isArray(t) && typeof t[0] == "number" && typeof t[1] == "number";
16
16
  }
17
- function X(t) {
18
- return Array.isArray(t) && _(t[0]);
17
+ function $(t) {
18
+ return Array.isArray(t) && O(t[0]);
19
19
  }
20
- function Q(t) {
20
+ function V(t) {
21
21
  let r = 1 / 0, n = 1 / 0, o = -1 / 0, a = -1 / 0, s = !1;
22
22
  const e = (f) => {
23
23
  if (Array.isArray(f)) {
24
- if (_(f)) {
24
+ if (O(f)) {
25
25
  s = !0, f[0] < r && (r = f[0]), f[0] > o && (o = f[0]), f[1] < n && (n = f[1]), f[1] > a && (a = f[1]);
26
26
  return;
27
27
  }
@@ -31,9 +31,9 @@ function Q(t) {
31
31
  return e(t), s ? [(r + o) / 2, (n + a) / 2] : null;
32
32
  }
33
33
  function z(t, r) {
34
- return !Array.isArray(t) || _(t) ? t : X(t) ? r(t) : t.map((n) => z(n, r));
34
+ return !Array.isArray(t) || O(t) ? t : $(t) ? r(t) : t.map((n) => z(n, r));
35
35
  }
36
- function V(t) {
36
+ function K(t) {
37
37
  if (t.length < 3) return !1;
38
38
  const r = t[0], n = t[t.length - 1];
39
39
  return r[0] === n[0] && r[1] === n[1];
@@ -48,7 +48,7 @@ function at(t, r, n, o, a, s) {
48
48
  }
49
49
  function ct(t, r, n, o) {
50
50
  if (t.length <= 2 || !(r > 0)) return t;
51
- const a = K(n, o), s = new Float64Array(t.length), e = new Float64Array(t.length);
51
+ const a = Q(n, o), s = new Float64Array(t.length), e = new Float64Array(t.length);
52
52
  for (let l = 0; l < t.length; l++) {
53
53
  const [y, h] = a.toMetres(t[l]);
54
54
  s[l] = y, e[l] = h;
@@ -67,16 +67,16 @@ function ct(t, r, n, o) {
67
67
  }
68
68
  const u = [];
69
69
  for (let l = 0; l < t.length; l++) f[l] && u.push(t[l]);
70
- return V(t) && u.length < 4 ? t : u;
70
+ return K(t) && u.length < 4 ? t : u;
71
71
  }
72
72
  function ut(t, r) {
73
- const n = Q(t);
73
+ const n = V(t);
74
74
  return n ? z(t, (o) => ct(o, r, n[0], n[1])) : t;
75
75
  }
76
76
  const Y = 0.25;
77
77
  function ft(t, r) {
78
78
  let n = t;
79
- const o = V(t);
79
+ const o = K(t);
80
80
  for (let a = 0; a < r; a++) {
81
81
  const s = o ? n.slice(0, -1) : n;
82
82
  if (s.length < 3) return n;
@@ -107,8 +107,8 @@ function ht(t) {
107
107
  }
108
108
  function mt(t) {
109
109
  const r = [], n = (o) => {
110
- if (Array.isArray(o) && !X(o)) {
111
- if (X(o[0])) {
110
+ if (Array.isArray(o) && !$(o)) {
111
+ if ($(o[0])) {
112
112
  r.push(o);
113
113
  return;
114
114
  }
@@ -118,8 +118,8 @@ function mt(t) {
118
118
  return n(t), r;
119
119
  }
120
120
  function dt(t, r, n) {
121
- if (!j(t[0], r, n)) return !1;
122
- for (let o = 1; o < t.length; o++) if (j(t[o], r, n)) return !1;
121
+ if (!q(t[0], r, n)) return !1;
122
+ for (let o = 1; o < t.length; o++) if (q(t[o], r, n)) return !1;
123
123
  return !0;
124
124
  }
125
125
  function pt(t, r, n) {
@@ -159,7 +159,7 @@ function yt(t, r) {
159
159
  for (let o = 0; o < t.length; o++) n.push(...pt(t[o], o, r));
160
160
  return n;
161
161
  }
162
- const $ = 1e20;
162
+ const X = 1e20;
163
163
  function gt(t, r) {
164
164
  const n = new Uint8Array(r.width * r.height);
165
165
  if (t.length === 0) return n;
@@ -193,12 +193,12 @@ function gt(t, r) {
193
193
  }
194
194
  function C(t, r, n, o, a) {
195
195
  let s = 0;
196
- o[0] = 0, a[0] = -$, a[1] = $;
196
+ o[0] = 0, a[0] = -X, a[1] = X;
197
197
  for (let e = 1; e < r; e++) {
198
198
  let f = (t[e] + e * e - (t[o[s]] + o[s] * o[s])) / (2 * e - 2 * o[s]);
199
199
  for (; f <= a[s]; )
200
200
  s--, f = (t[e] + e * e - (t[o[s]] + o[s] * o[s])) / (2 * e - 2 * o[s]);
201
- s++, o[s] = e, a[s] = f, a[s + 1] = $;
201
+ s++, o[s] = e, a[s] = f, a[s + 1] = X;
202
202
  }
203
203
  s = 0;
204
204
  for (let e = 0; e < r; e++) {
@@ -209,7 +209,7 @@ function C(t, r, n, o, a) {
209
209
  }
210
210
  function W(t, r, n) {
211
211
  const o = new Float64Array(r * n);
212
- for (let i = 0; i < o.length; i++) o[i] = t[i] ? 0 : $;
212
+ for (let i = 0; i < o.length; i++) o[i] = t[i] ? 0 : X;
213
213
  const a = Math.max(r, n), s = new Float64Array(a), e = new Float64Array(a), f = new Int32Array(a), c = new Float64Array(a + 1);
214
214
  for (let i = 0; i < r; i++) {
215
215
  for (let u = 0; u < n; u++) s[u] = o[u * r + i];
@@ -346,7 +346,7 @@ function At(t) {
346
346
  function Ft(t) {
347
347
  const r = [], n = (o) => {
348
348
  if (Array.isArray(o)) {
349
- if (X(o)) {
349
+ if ($(o)) {
350
350
  const a = o, s = a[0], e = a[a.length - 1], f = a.length > 2 && s[0] === e[0] && s[1] === e[1];
351
351
  r.push(f ? a : [...a, [s[0], s[1]]]);
352
352
  return;
@@ -359,9 +359,9 @@ function Ft(t) {
359
359
  function St(t, r) {
360
360
  const n = Ft(t);
361
361
  if (n.length === 0) return [];
362
- const o = Q(t);
362
+ const o = V(t);
363
363
  if (!o) return [];
364
- const a = K(o[0], o[1]), s = n.map((m) => m.map((d) => a.toMetres(d))), e = Math.abs(r.distanceMetres);
364
+ const a = Q(o[0], o[1]), s = n.map((m) => m.map((d) => a.toMetres(d))), e = Math.abs(r.distanceMetres);
365
365
  if (!(e > 0)) return [];
366
366
  const f = Math.max(1, Math.round(r.repeat)), c = e * f, i = e / Math.max(1, r.cellsPerBand), u = xt(s, i, c + i * 4);
367
367
  if (!u) return [];
@@ -411,7 +411,7 @@ function It(t) {
411
411
  return Math.atan(Math.sinh(Math.PI * (1 - 2 * t))) * 180 / Math.PI;
412
412
  }
413
413
  async function Pt(t) {
414
- const [r, n, o, a] = t.bounds, s = Math.max(0, Math.round(t.zoom)), e = q(r, a, s), f = q(o, n, s), c = Math.min(e.x, f.x), i = Math.max(e.x, f.x), u = Math.min(e.y, f.y), l = Math.max(e.y, f.y), y = (i - c + 1) * (l - u + 1);
414
+ const [r, n, o, a] = t.bounds, s = Math.max(0, Math.round(t.zoom)), e = L(r, a, s), f = L(o, n, s), c = Math.min(e.x, f.x), i = Math.max(e.x, f.x), u = Math.min(e.y, f.y), l = Math.max(e.y, f.y), y = (i - c + 1) * (l - u + 1);
415
415
  if (y <= 0 || y > t.maxTiles) return null;
416
416
  const h = (i - c + 1) * I, m = (l - u + 1) * I, d = new Float32Array(h * m), p = new Uint8Array(h * m), M = await Promise.all(
417
417
  Array.from({ length: y }, (k, g) => {
@@ -425,8 +425,8 @@ async function Pt(t) {
425
425
  const A = (k - c) * I, x = (g - u) * I, P = Math.min(I, b.height), R = Math.min(I, b.width);
426
426
  for (let v = 0; v < P; v++)
427
427
  for (let E = 0; E < R; E++) {
428
- const D = (v * b.width + E) * 4, L = (x + v) * h + A + E;
429
- d[L] = ot(t.decoder, b.data[D], b.data[D + 1], b.data[D + 2]), p[L] = 1;
428
+ const U = (v * b.width + E) * 4, j = (x + v) * h + A + E;
429
+ d[j] = ot(t.decoder, b.data[U], b.data[U + 1], b.data[U + 2]), p[j] = 1;
430
430
  }
431
431
  }
432
432
  const F = { width: h, height: m, cell: 1, originX: 0, originY: 0 }, w = 2 ** s;
@@ -461,7 +461,7 @@ async function Rt(t) {
461
461
  return m;
462
462
  }
463
463
  const vt = /* @__PURE__ */ new Set(["LineString", "MultiLineString", "Polygon", "MultiPolygon"]);
464
- function J(t, r, n) {
464
+ function H(t, r, n) {
465
465
  return t.map((o) => {
466
466
  const s = o.geometry;
467
467
  if (!s || s.coordinates == null) return o;
@@ -488,7 +488,7 @@ async function Yt(t, r, n, o, a) {
488
488
  for (const e of n)
489
489
  switch (e.type) {
490
490
  case "simplify": {
491
- const f = O(e.params.tolerance);
491
+ const f = D(e.params.tolerance);
492
492
  if (!f) {
493
493
  S(a, '<om-transform type="simplify"> needs a tolerance with a unit.', 'Write tolerance="0.15mm" (paper) or tolerance="50m" (ground).');
494
494
  break;
@@ -500,7 +500,7 @@ async function Yt(t, r, n, o, a) {
500
500
  }
501
501
  {
502
502
  const i = /* @__PURE__ */ new Set();
503
- s = J(s, (u) => ut(u, c), (u) => i.add(u)), i.size > 0 && S(
503
+ s = H(s, (u) => ut(u, c), (u) => i.add(u)), i.size > 0 && S(
504
504
  a,
505
505
  `<om-transform type="simplify"> left ${[...i].join("/")} geometry untouched — there is no path to thin.`,
506
506
  "Simplify lines and polygons. A scatter of points has no redundant vertices, and thinning it would delete data."
@@ -516,7 +516,7 @@ async function Yt(t, r, n, o, a) {
516
516
  }
517
517
  {
518
518
  const c = /* @__PURE__ */ new Set();
519
- s = J(s, (i) => lt(i, Math.round(f)), (i) => c.add(i)), c.size > 0 && S(
519
+ s = H(s, (i) => lt(i, Math.round(f)), (i) => c.add(i)), c.size > 0 && S(
520
520
  a,
521
521
  `<om-transform type="smooth"> left ${[...c].join("/")} geometry untouched — there is no path to round.`,
522
522
  "Smooth lines and polygons. Rounding a scatter of points would replace every one of them with a location that is not in the data."
@@ -540,7 +540,7 @@ async function Yt(t, r, n, o, a) {
540
540
  break;
541
541
  }
542
542
  case "buffer": {
543
- const f = O(e.params.distance);
543
+ const f = D(e.params.distance);
544
544
  if (!f) {
545
545
  S(a, '<om-transform type="buffer"> needs a distance with a unit.', 'Write distance="1.2mm" (paper) or distance="500m" (ground).');
546
546
  break;
@@ -578,7 +578,7 @@ async function Yt(t, r, n, o, a) {
578
578
  break;
579
579
  }
580
580
  case "contour": {
581
- const f = e.params.src, c = Et(e.params.bounds), i = O(e.params.interval);
581
+ const f = e.params.src, c = Et(e.params.bounds), i = D(e.params.interval);
582
582
  if (!f || !c || !i) {
583
583
  S(
584
584
  a,
@@ -596,7 +596,7 @@ async function Yt(t, r, n, o, a) {
596
596
  S(a, `<om-transform type="contour"> src="${f}" is neither a terrain preset nor a {z}/{x}/{y} template.`, 'Use src="terrarium", or a raw tile URL plus decoder=.');
597
597
  break;
598
598
  }
599
- const y = e.params.decoder ?? (typeof u?.decoder == "string" ? u.decoder : void 0), h = y && y in U ? U[y] : u?.decoder ?? U.terrarium, m = e.params.zoom === void 0 ? 10 : Number(e.params.zoom), d = await Rt({
599
+ const y = e.params.decoder ?? (typeof u?.decoder == "string" ? u.decoder : void 0), h = y && y in _ ? _[y] : u?.decoder ?? _.terrarium, m = e.params.zoom === void 0 ? 10 : Number(e.params.zoom), d = await Rt({
600
600
  template: l,
601
601
  decoder: h,
602
602
  zoom: Number.isFinite(m) ? m : 10,
@@ -623,12 +623,12 @@ export {
623
623
  Nt as bufferRows,
624
624
  ft as chaikinRing,
625
625
  Rt as contourFromDem,
626
- Q as coordinateCentre,
626
+ V as coordinateCentre,
627
627
  W as distanceTransform,
628
628
  xt as gridFor,
629
629
  z as mapRings,
630
630
  Z as marchingSquares,
631
- K as metricFrame,
631
+ Q as metricFrame,
632
632
  Et as parseBounds,
633
633
  gt as rasterizeRings,
634
634
  Yt as runTransforms,