@nika-js/onlymap 0.8.1 → 0.8.2
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/CHANGELOG.md +6 -0
- package/dist/{LercDecode.es-DKhLh4TO.js → LercDecode.es-BSylOuVc.js} +1 -1
- package/dist/{basemap-BjXMRr_M.js → basemap-CMaYhtEE.js} +1 -1
- package/dist/cartograph/elements/om-frame.d.ts +8 -0
- package/dist/cartograph.js +106 -94
- package/dist/cartograph.standalone.js +199 -187
- package/dist/{geoparquet-D9pYDrCk.js → geoparquet-DZjsJtQQ.js} +1 -1
- package/dist/{index-CqtubBZ4.js → index-BQkmbcQr.js} +1 -1
- package/dist/{index-D6R4z3Zs.js → index-Cw9SL11B.js} +15 -12
- package/dist/{index-BGQidVp5.js → index-DRFEoCuu.js} +1 -1
- package/dist/{index-Zm8MxpvR.js → index-Dl0UKZF-.js} +2 -2
- package/dist/{index-BdKNZcs-.js → index-tSk19VJe.js} +1 -1
- package/dist/{lerc-BdHcL8pi.js → lerc-Dphd_hZG.js} +2 -2
- package/dist/onlymap.standalone.js +6 -3
- package/dist/onlymapjs.js +1 -1
- package/dist/{raster-B7rPpOTP.js → raster-Bb9CjpGL.js} +3 -3
- package/dist/{raster-pipeline-X2-mnFQx.js → raster-pipeline-D_Hw3Wax.js} +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/{zarr-BF-buFRB.js → zarr-DJA83o9G.js} +2 -2
- package/package.json +1 -1
|
@@ -31,7 +31,7 @@ function Ei(t) {
|
|
|
31
31
|
function Re(t) {
|
|
32
32
|
return typeof t?.paintCartograph == "function";
|
|
33
33
|
}
|
|
34
|
-
const
|
|
34
|
+
const bt = (t, e) => {
|
|
35
35
|
const i = t.getAttribute(e);
|
|
36
36
|
if (i == null || i.trim() === "") return null;
|
|
37
37
|
const s = Number(i);
|
|
@@ -39,12 +39,12 @@ const pt = (t, e) => {
|
|
|
39
39
|
};
|
|
40
40
|
function $(t) {
|
|
41
41
|
return {
|
|
42
|
-
x:
|
|
43
|
-
y:
|
|
44
|
-
w:
|
|
45
|
-
h:
|
|
46
|
-
rotation:
|
|
47
|
-
z:
|
|
42
|
+
x: bt(t, "x") ?? 0,
|
|
43
|
+
y: bt(t, "y") ?? 0,
|
|
44
|
+
w: bt(t, "w") ?? 0,
|
|
45
|
+
h: bt(t, "h") ?? 0,
|
|
46
|
+
rotation: bt(t, "rotation") ?? 0,
|
|
47
|
+
z: bt(t, "z")
|
|
48
48
|
};
|
|
49
49
|
}
|
|
50
50
|
function Qe(t, e = 0) {
|
|
@@ -157,14 +157,14 @@ function Ni(t, e) {
|
|
|
157
157
|
if (nt === 0 && se === 0) return 0;
|
|
158
158
|
const $t = Math.atan2(se, nt) * l;
|
|
159
159
|
return $t >= 0 ? $t : $t + 360;
|
|
160
|
-
}, [v, _] = [M(c, r), M(m, o)],
|
|
160
|
+
}, [v, _] = [M(c, r), M(m, o)], p = a - i, E = g - d;
|
|
161
161
|
let S = 0;
|
|
162
162
|
d * g !== 0 && (S = _ - v, S > 180 ? S -= 360 : S < -180 && (S += 360));
|
|
163
163
|
const P = 2 * Math.sqrt(d * g) * Math.sin(S * h / 2), A = (i + a) / 2, G = (d + g) / 2;
|
|
164
164
|
let N = v + _;
|
|
165
165
|
d * g !== 0 && (Math.abs(v - _) > 180 && (N += v + _ < 360 ? 360 : -360), N /= 2);
|
|
166
166
|
const F = 1 - 0.17 * Math.cos((N - 30) * h) + 0.24 * Math.cos(2 * N * h) + 0.32 * Math.cos((3 * N + 6) * h) - 0.2 * Math.cos((4 * N - 63) * h), x = 1 + 0.015 * (A - 50) ** 2 / Math.sqrt(20 + (A - 50) ** 2), C = 1 + 0.045 * G, R = 1 + 0.015 * G * F, U = -2 * Math.sqrt(G ** 7 / (G ** 7 + 25 ** 7)) * Math.sin(60 * Math.exp(-(((N - 275) / 25) ** 2)) * h);
|
|
167
|
-
return Math.sqrt((
|
|
167
|
+
return Math.sqrt((p / x) ** 2 + (E / C) ** 2 + (P / R) ** 2 + U * (E / C) * (P / R));
|
|
168
168
|
}
|
|
169
169
|
const zr = 10;
|
|
170
170
|
function Br(t, e = zr) {
|
|
@@ -259,8 +259,8 @@ async function ui(t, e = {}) {
|
|
|
259
259
|
let c = r;
|
|
260
260
|
const m = Math.min(f / (h / 25.4), f / (l / 25.4)), d = Math.sqrt(u / (h / 25.4 * (l / 25.4))), g = Math.min(m, d);
|
|
261
261
|
c > g && (c = Math.floor(g), s.push(`Requested ${r} dpi exceeds this browser's canvas budget for a ${h.toFixed(0)}×${l.toFixed(0)}mm page; rendered at ${c} dpi instead.`)), s.push(...await Vr(i)), typeof document < "u" && document.fonts?.ready && await document.fonts.ready;
|
|
262
|
-
const M = Ei(c), v = Math.max(1, Math.round(h * M.pxPerMm)), _ = Math.max(1, Math.round(l * M.pxPerMm)),
|
|
263
|
-
for (const x of
|
|
262
|
+
const M = Ei(c), v = Math.max(1, Math.round(h * M.pxPerMm)), _ = Math.max(1, Math.round(l * M.pxPerMm)), p = Kr(i);
|
|
263
|
+
for (const x of p)
|
|
264
264
|
if (!(!Re(x) || !x.prepareCartograph))
|
|
265
265
|
try {
|
|
266
266
|
await x.prepareCartograph(Ei(c));
|
|
@@ -273,7 +273,7 @@ async function ui(t, e = {}) {
|
|
|
273
273
|
if (!S) throw new Error("[onlymapjs/cartograph] renderCartograph: could not get a 2D canvas context.");
|
|
274
274
|
const P = typeof getComputedStyle == "function" ? getComputedStyle(i) : null;
|
|
275
275
|
S.fillStyle = Y(P?.backgroundColor) ?? "#ffffff", S.fillRect(0, 0, v, _);
|
|
276
|
-
for (const x of
|
|
276
|
+
for (const x of p) {
|
|
277
277
|
if (!Re(x)) continue;
|
|
278
278
|
const C = $(x);
|
|
279
279
|
if (S.save(), S.translate((C.x + o) * M.pxPerMm, (C.y + o) * M.pxPerMm), C.rotation) {
|
|
@@ -294,7 +294,7 @@ async function ui(t, e = {}) {
|
|
|
294
294
|
}
|
|
295
295
|
const G = li(e.cvd === "page" ? i.getAttribute("cvd") : e.cvd);
|
|
296
296
|
G && !Wr(S, v, _, G) && s.push("Colour-vision simulation was skipped: a cross-origin image on the page makes the export canvas unreadable.");
|
|
297
|
-
for (const x of
|
|
297
|
+
for (const x of p) Re(x) && x.discardCartograph?.();
|
|
298
298
|
const N = e.format === "jpeg" ? "image/jpeg" : "image/png";
|
|
299
299
|
N === "image/jpeg" && i.querySelector("om-text") && s.push("JPEG compresses text edges — prefer PNG for a page carrying labels.");
|
|
300
300
|
const F = await new Promise((x) => E.toBlob(x, N, e.quality));
|
|
@@ -521,14 +521,14 @@ function oa(t, e, i) {
|
|
|
521
521
|
if (e === "single" || e === "double") {
|
|
522
522
|
const M = e === "double" ? 2 : 1, v = n / M;
|
|
523
523
|
for (let _ = 0; _ < M; _++)
|
|
524
|
-
for (let
|
|
524
|
+
for (let p = 0; p < t.segments; p++)
|
|
525
525
|
l.push({
|
|
526
|
-
x:
|
|
526
|
+
x: p * h,
|
|
527
527
|
y: o + _ * v,
|
|
528
528
|
w: h,
|
|
529
529
|
h: v,
|
|
530
530
|
// "double" is a checkerboard: the second row's phase is inverted.
|
|
531
|
-
filled: (
|
|
531
|
+
filled: (p + _) % 2 === 0
|
|
532
532
|
});
|
|
533
533
|
} else {
|
|
534
534
|
f.push({ x1: 0, y1: o + n, x2: t.totalMm, y2: o + n });
|
|
@@ -549,11 +549,11 @@ function oa(t, e, i) {
|
|
|
549
549
|
})), m = (M) => M.length * s * 0.62, d = [];
|
|
550
550
|
let g = -1 / 0;
|
|
551
551
|
for (const M of c) {
|
|
552
|
-
const v = m(M.text) / 2, _ = M.anchor === "start" ? M.x : M.anchor === "end" ? M.x - v * 2 : M.x - v,
|
|
552
|
+
const v = m(M.text) / 2, _ = M.anchor === "start" ? M.x : M.anchor === "end" ? M.x - v * 2 : M.x - v, p = _ + m(M.text);
|
|
553
553
|
if (!(!(M.index === 0 || M.index === u) && _ < g + s * 0.4)) {
|
|
554
554
|
if (M.index === u && _ < g + s * 0.4)
|
|
555
555
|
for (; d.length > 1 && d[d.length - 1].x + m(d[d.length - 1].text) / 2 > _ - s * 0.4; ) d.pop();
|
|
556
|
-
d.push({ text: M.text, x: M.x, y: M.y, anchor: M.anchor }), g =
|
|
556
|
+
d.push({ text: M.text, x: M.x, y: M.y, anchor: M.anchor }), g = p;
|
|
557
557
|
}
|
|
558
558
|
}
|
|
559
559
|
return { bars: l, strokes: f, labels: d, fontMm: s, strokeMm: r, segmentMeters: t.segmentMeters, unitLabel: t.unitLabel, scaleDenominator: t.scaleDenominator };
|
|
@@ -927,32 +927,32 @@ class zs extends st {
|
|
|
927
927
|
maxWidth: a,
|
|
928
928
|
fontSizePx: d,
|
|
929
929
|
lineHeightPx: g,
|
|
930
|
-
measure: (
|
|
930
|
+
measure: (p) => e.measureText(p).width
|
|
931
931
|
}), _ = o?.textAlign || "start";
|
|
932
|
-
for (const
|
|
933
|
-
if (
|
|
934
|
-
e.fillText(
|
|
932
|
+
for (const p of v.lines) {
|
|
933
|
+
if (p.baselineY > n + g) break;
|
|
934
|
+
e.fillText(p.text, ya(_, a, p.width), p.baselineY);
|
|
935
935
|
}
|
|
936
936
|
e.restore();
|
|
937
937
|
}
|
|
938
938
|
}
|
|
939
939
|
q("om-text", zs);
|
|
940
940
|
const _a = 63710087714e-4;
|
|
941
|
-
let
|
|
941
|
+
let pa = _a;
|
|
942
942
|
const ne = Math.PI / 180;
|
|
943
|
-
function Bs(t, e, i =
|
|
943
|
+
function Bs(t, e, i = pa) {
|
|
944
944
|
const s = (e[1] - t[1]) * ne, r = (e[0] - t[0]) * ne, a = t[1] * ne, n = e[1] * ne, o = Math.sin(s / 2) ** 2 + Math.cos(a) * Math.cos(n) * Math.sin(r / 2) ** 2;
|
|
945
945
|
return 2 * i * Math.asin(Math.min(1, Math.sqrt(o)));
|
|
946
946
|
}
|
|
947
|
-
const
|
|
948
|
-
function
|
|
947
|
+
const pe = 6378137, zi = Math.PI / 180, Ye = 180 / Math.PI, Bi = 85.0511287798066;
|
|
948
|
+
function ba([t, e]) {
|
|
949
949
|
const i = Math.max(-Bi, Math.min(Bi, e));
|
|
950
|
-
return [
|
|
950
|
+
return [pe * t * zi, pe * Math.log(Math.tan(Math.PI / 4 + i * zi / 2))];
|
|
951
951
|
}
|
|
952
952
|
function wa([t, e]) {
|
|
953
|
-
return [t /
|
|
953
|
+
return [t / pe * Ye, (2 * Math.atan(Math.exp(e / pe)) - Math.PI / 2) * Ye];
|
|
954
954
|
}
|
|
955
|
-
const Ws = { code: "EPSG:3857", forward:
|
|
955
|
+
const Ws = { code: "EPSG:3857", forward: ba, inverse: wa }, Sa = { code: "EPSG:4326", forward: ([t, e]) => [t, e], inverse: ([t, e]) => [t, e] };
|
|
956
956
|
function It(t) {
|
|
957
957
|
if (t == null) return null;
|
|
958
958
|
const e = t.trim();
|
|
@@ -1043,7 +1043,7 @@ const Ga = (t) => {
|
|
|
1043
1043
|
let e = ((t + 180) % 360 + 360) % 360 - 180;
|
|
1044
1044
|
return e === -180 && (e = 180), e;
|
|
1045
1045
|
};
|
|
1046
|
-
function
|
|
1046
|
+
function be({ corners: t, widthMm: e, heightMm: i, crsForward: s }) {
|
|
1047
1047
|
const r = s ?? Ws, a = t[0][0], n = t.map(([m, d]) => [Vi(m, a), d]), o = n.map((m) => r.forward(m)), h = [
|
|
1048
1048
|
[0, 0],
|
|
1049
1049
|
[e, 0],
|
|
@@ -1295,12 +1295,12 @@ class Vs extends st {
|
|
|
1295
1295
|
const { w: e, h: i } = $(this);
|
|
1296
1296
|
if (e <= 0 || i <= 0) return null;
|
|
1297
1297
|
if (this.mode === "live")
|
|
1298
|
-
return this.liveCorners ?
|
|
1298
|
+
return this.liveCorners ? be({ corners: this.liveCorners, widthMm: e, heightMm: i }) : null;
|
|
1299
1299
|
const s = we(this.getAttribute("corners"));
|
|
1300
1300
|
if (!s) return null;
|
|
1301
1301
|
const r = It(this.getAttribute("crs")) ?? "EPSG:3857", a = this.getAttribute("crs-def");
|
|
1302
1302
|
let n = a ? null : Tt(r);
|
|
1303
|
-
return !n && this.resolvedForwardKey === `${r}|${a ?? ""}` && (n = this.resolvedForward), n ?
|
|
1303
|
+
return !n && this.resolvedForwardKey === `${r}|${a ?? ""}` && (n = this.resolvedForward), n ? be({ corners: s, widthMm: e, heightMm: i, crsForward: n }) : null;
|
|
1304
1304
|
}
|
|
1305
1305
|
/** The raster a static frame draws — its first <img> child, if any. */
|
|
1306
1306
|
get raster() {
|
|
@@ -1394,7 +1394,7 @@ class Vs extends st {
|
|
|
1394
1394
|
this.mounting && this.abandonMount(), this.captureImage = null, this.liveMap && (this.liveMapOwned ? this.releaseLiveMap() : this.liveMap.hidden = !0);
|
|
1395
1395
|
}
|
|
1396
1396
|
releaseLiveMap() {
|
|
1397
|
-
this.liveMapOwned ? this.liveMap?.remove() : this.liveMap && (this.liveMap.hidden = !0), this.liveMap = null, this.liveMapOwned = !1, this.mountedSource = null, this.liveCorners = null, this.captureImage = null;
|
|
1397
|
+
this.liveMap?.removeEventListener("om-view-changed", this.onLiveViewChanged), this.liveMapOwned ? this.liveMap?.remove() : this.liveMap && (this.liveMap.hidden = !0), this.liveMap = null, this.liveMapOwned = !1, this.mountedSource = null, this.liveCorners = null, this.captureImage = null;
|
|
1398
1398
|
}
|
|
1399
1399
|
updateLiveCorners(e = qt(this)) {
|
|
1400
1400
|
if (!e) return;
|
|
@@ -1416,7 +1416,7 @@ class Vs extends st {
|
|
|
1416
1416
|
if (!a) return;
|
|
1417
1417
|
je(r, a);
|
|
1418
1418
|
const n = r;
|
|
1419
|
-
n.style.position = "absolute", n.style.inset = "0", n.style.display = "block", this.liveMapOwned = r.parentElement !== this, this.liveMapOwned && this.appendChild(r), r.setAttribute("data-om-carto-frame", ""), this.liveMap = n, this.mountedSource = e, this.sizeLiveMap(), this.clearPlaceholder();
|
|
1419
|
+
n.style.position = "absolute", n.style.inset = "0", n.style.display = "block", this.liveMapOwned = r.parentElement !== this, this.liveMapOwned && this.appendChild(r), r.setAttribute("data-om-carto-frame", ""), this.liveMap = n, n.addEventListener("om-view-changed", this.onLiveViewChanged), this.mountedSource = e, this.sizeLiveMap(), this.clearPlaceholder();
|
|
1420
1420
|
const { w: o, h } = $(this);
|
|
1421
1421
|
if (this.liveCorners = Ze(s, a, o * ot, h * ot), await n.ready, i !== this.mountToken || (je(r, a), await n.whenSettled?.({ timeout: 2e4 }), i !== this.mountToken)) return;
|
|
1422
1422
|
this.signalReady();
|
|
@@ -1441,11 +1441,23 @@ class Vs extends st {
|
|
|
1441
1441
|
* depends on the box's aspect and the current zoom.
|
|
1442
1442
|
*/
|
|
1443
1443
|
capMapPitch() {
|
|
1444
|
-
const e = Mt()
|
|
1445
|
-
if (!e || !
|
|
1446
|
-
const
|
|
1447
|
-
|
|
1444
|
+
const e = Mt();
|
|
1445
|
+
if (!e || !this.liveMap) return;
|
|
1446
|
+
const i = this.liveMap.getViewStateInternal?.(), s = i ? { center: [i.longitude, i.latitude], zoom: i.zoom, bearing: i.bearing, pitch: i.pitch } : qt(this);
|
|
1447
|
+
if (!s) return;
|
|
1448
|
+
const { w: r, h: a } = $(this), n = ka(e, s, r * ot, a * ot), o = n >= 60 ? null : String(n);
|
|
1449
|
+
o !== this.liveMap.getAttribute("max-pitch") && (o === null ? this.liveMap.removeAttribute("max-pitch") : this.liveMap.setAttribute("max-pitch", o));
|
|
1448
1450
|
}
|
|
1451
|
+
/**
|
|
1452
|
+
* The ceiling follows the camera, so a zoom changes it.
|
|
1453
|
+
*
|
|
1454
|
+
* Bound once so add/remove pair up. Cheap enough to run on every reported
|
|
1455
|
+
* view: a probe is four unprojections and the attribute is only written when
|
|
1456
|
+
* the whole-degree answer actually moves.
|
|
1457
|
+
*/
|
|
1458
|
+
onLiveViewChanged = () => {
|
|
1459
|
+
this.capMapPitch();
|
|
1460
|
+
};
|
|
1449
1461
|
// -------------------------------------------------------------------------
|
|
1450
1462
|
// Locator inset (overview-of)
|
|
1451
1463
|
// -------------------------------------------------------------------------
|
|
@@ -1473,8 +1485,8 @@ class Vs extends st {
|
|
|
1473
1485
|
[c, l]
|
|
1474
1486
|
];
|
|
1475
1487
|
for (const [v, _] of m)
|
|
1476
|
-
for (let
|
|
1477
|
-
const E =
|
|
1488
|
+
for (let p = 0; p < Xi; p++) {
|
|
1489
|
+
const E = p / Xi, S = [v[0] + (_[0] - v[0]) * E, v[1] + (_[1] - v[1]) * E], P = r.project(S);
|
|
1478
1490
|
P && h.push(`${P.xMm.toFixed(3)},${P.yMm.toFixed(3)}`);
|
|
1479
1491
|
}
|
|
1480
1492
|
if (h.length < 3) {
|
|
@@ -1970,11 +1982,11 @@ class Zs extends st {
|
|
|
1970
1982
|
let d = m(2);
|
|
1971
1983
|
const g = this.getAttribute("title");
|
|
1972
1984
|
g && (e.fillStyle = u, e.font = `600 ${m(2.6)}px ${c}`, e.textBaseline = "top", e.fillText(g, m(2), d), d += m(4));
|
|
1973
|
-
const M = this.rows, v = Number(this.getAttribute("columns")), _ = Math.min(M.length || 1, Number.isFinite(v) && v > 1 ? Math.floor(v) : 1),
|
|
1985
|
+
const M = this.rows, v = Number(this.getAttribute("columns")), _ = Math.min(M.length || 1, Number.isFinite(v) && v > 1 ? Math.floor(v) : 1), p = Math.max(1, Math.ceil(M.length / _)), E = 3, S = Math.max(1, (s - 4 - E * (_ - 1)) / _), P = d;
|
|
1974
1986
|
let A = -1, G = 2;
|
|
1975
1987
|
e.font = `${m(2.6)}px ${c}`;
|
|
1976
1988
|
for (const [N, F] of M.entries()) {
|
|
1977
|
-
const x = Math.min(_ - 1, Math.floor(N /
|
|
1989
|
+
const x = Math.min(_ - 1, Math.floor(N / p));
|
|
1978
1990
|
if (x !== A && (A = x, G = 2 + A * (S + E), d = A === 0 ? P : m(2)), d > n || (e.fillStyle = F.color, F.shape === "line" ? e.fillRect(m(G), d + m(1.2), m(3.2), m(0.9)) : F.shape === "point" ? (e.beginPath(), e.arc(m(G + 1.6), d + m(1.6), m(1.6), 0, Math.PI * 2), e.fill()) : e.fillRect(m(G), d, m(3.2), m(3.2)), e.fillStyle = u, e.textBaseline = "top", e.fillText(F.label, m(G + 4.7), d + m(0.3)), d += m(4.2), !F.legend)) continue;
|
|
1979
1991
|
const C = F.legend;
|
|
1980
1992
|
if (e.save(), e.font = `${m(2.1)}px ${c}`, e.globalAlpha = 0.7, e.fillText(C.field, m(G + 2.7), d), e.globalAlpha = 1, d += m(2.8), C.kind === "ramp") {
|
|
@@ -2009,18 +2021,18 @@ function ts(t, e = 5) {
|
|
|
2009
2021
|
}
|
|
2010
2022
|
function Xa({ georef: t, plane: e = tr, interval: i, intervalX: s, intervalY: r, labels: a = "outside", format: n }) {
|
|
2011
2023
|
if (t.degenerate) return null;
|
|
2012
|
-
const o = t.corners.map((
|
|
2013
|
-
if (h.some((
|
|
2024
|
+
const o = t.corners.map((p) => e.fromLngLat(p)), h = o.map((p) => p[0]), l = o.map((p) => p[1]);
|
|
2025
|
+
if (h.some((p) => !Number.isFinite(p)) || l.some((p) => !Number.isFinite(p))) return null;
|
|
2014
2026
|
const f = Math.min(...h), u = Math.max(...h), c = Math.min(...l), m = Math.max(...l), d = es(s ?? i, ts(u - f)), g = es(r ?? i, ts(m - c));
|
|
2015
2027
|
if (d <= 0 || g <= 0 || (u - f) / d > 500 || (m - c) / g > 500) return null;
|
|
2016
2028
|
const M = [], v = [], _ = n ?? Ja;
|
|
2017
|
-
for (let
|
|
2018
|
-
const E = is(t, e,
|
|
2019
|
-
E && (M.push(E), a !== "none" && rs(v, E, t, _(
|
|
2029
|
+
for (let p = Math.ceil(f / d) * d; p <= u + 1e-9; p += d) {
|
|
2030
|
+
const E = is(t, e, p, c, m, "x");
|
|
2031
|
+
E && (M.push(E), a !== "none" && rs(v, E, t, _(p, "x"), "x", a));
|
|
2020
2032
|
}
|
|
2021
|
-
for (let
|
|
2022
|
-
const E = is(t, e,
|
|
2023
|
-
E && (M.push(E), a !== "none" && rs(v, E, t, _(
|
|
2033
|
+
for (let p = Math.ceil(c / g) * g; p <= m + 1e-9; p += g) {
|
|
2034
|
+
const E = is(t, e, p, f, u, "y");
|
|
2035
|
+
E && (M.push(E), a !== "none" && rs(v, E, t, _(p, "y"), "y", a));
|
|
2024
2036
|
}
|
|
2025
2037
|
return { lines: M, labels: v, intervalX: d, intervalY: g };
|
|
2026
2038
|
}
|
|
@@ -2413,7 +2425,7 @@ function Et(t, e) {
|
|
|
2413
2425
|
function _n(t, e) {
|
|
2414
2426
|
return t.x < e.x + e.w && e.x < t.x + t.w && t.y < e.y + e.h && e.y < t.y + t.h;
|
|
2415
2427
|
}
|
|
2416
|
-
function
|
|
2428
|
+
function pn(t, e) {
|
|
2417
2429
|
const i = t.getAttribute("style");
|
|
2418
2430
|
if (!i) return null;
|
|
2419
2431
|
const s = new RegExp(`(?:^|;)\\s*${e}\\s*:\\s*(-?[\\d.]+)mm`, "i").exec(i);
|
|
@@ -2425,11 +2437,11 @@ function rr(t) {
|
|
|
2425
2437
|
}, s = [...t.querySelectorAll("om-cartograph")];
|
|
2426
2438
|
if (s.length === 0 && t.tagName?.toLowerCase() === "om-cartograph" && s.push(t), s.length === 0)
|
|
2427
2439
|
return { valid: !0, errors: [], warnings: [] };
|
|
2428
|
-
for (const n of s)
|
|
2440
|
+
for (const n of s) bn(n, i);
|
|
2429
2441
|
const r = e.filter((n) => n.severity === "error"), a = e.filter((n) => n.severity === "warning");
|
|
2430
2442
|
return { valid: r.length === 0, errors: r, warnings: a };
|
|
2431
2443
|
}
|
|
2432
|
-
function
|
|
2444
|
+
function bn(t, e) {
|
|
2433
2445
|
const i = t.getAttribute("size"), s = Et(t, "width") != null && Et(t, "height") != null;
|
|
2434
2446
|
i && !Ri.includes(i) && !s && e(
|
|
2435
2447
|
"error",
|
|
@@ -2513,7 +2525,7 @@ function Sn(t, e, i, s, r, a) {
|
|
|
2513
2525
|
["height", e.h]
|
|
2514
2526
|
];
|
|
2515
2527
|
for (const [f, u] of l) {
|
|
2516
|
-
const c =
|
|
2528
|
+
const c = pn(t, f);
|
|
2517
2529
|
c != null && Math.abs(c - u) > 0.01 && a(
|
|
2518
2530
|
"error",
|
|
2519
2531
|
t,
|
|
@@ -2535,7 +2547,7 @@ function En(t, e) {
|
|
|
2535
2547
|
), t.querySelector(":scope > img") || e("error", t, "Static frame has no <img> child to place.", "Add the georeferenced raster as an <img> child — it is also what renders with JavaScript disabled.");
|
|
2536
2548
|
const a = $(t), n = Tt(t.getAttribute("crs"));
|
|
2537
2549
|
if (r && n && a.w > 0 && a.h > 0) {
|
|
2538
|
-
const o =
|
|
2550
|
+
const o = be({ corners: r, widthMm: a.w, heightMm: a.h, crsForward: n });
|
|
2539
2551
|
if (o.degenerate)
|
|
2540
2552
|
e("error", t, "Frame corners are degenerate (collinear or coincident) — nothing can be placed on this frame.", "Check the corner order: tl, tr, br, bl.", "corners");
|
|
2541
2553
|
else {
|
|
@@ -2636,7 +2648,7 @@ function An(t, e, i) {
|
|
|
2636
2648
|
if (!r) return;
|
|
2637
2649
|
const a = we(r.getAttribute("corners")), n = Tt(r.getAttribute("crs")), o = $(r);
|
|
2638
2650
|
if (!a || !n || o.w <= 0 || o.h <= 0) return;
|
|
2639
|
-
const h =
|
|
2651
|
+
const h = be({ corners: a, widthMm: o.w, heightMm: o.h, crsForward: n }), l = $(t), f = Ls({
|
|
2640
2652
|
groundMetersPerMm: h.groundMetersPerMm(),
|
|
2641
2653
|
maxWidthMm: l.w,
|
|
2642
2654
|
segments: Et(t, "segments") ?? void 0,
|
|
@@ -2698,7 +2710,7 @@ function Nn(t) {
|
|
|
2698
2710
|
t("EPSG:" + (32600 + e), "+proj=utm +zone=" + e + " +datum=WGS84 +units=m"), t("EPSG:" + (32700 + e), "+proj=utm +zone=" + e + " +south +datum=WGS84 +units=m");
|
|
2699
2711
|
t("EPSG:5041", "+title=WGS 84 / UPS North (E,N) +proj=stere +lat_0=90 +lon_0=0 +k=0.994 +x_0=2000000 +y_0=2000000 +datum=WGS84 +units=m"), t("EPSG:5042", "+title=WGS 84 / UPS South (E,N) +proj=stere +lat_0=-90 +lon_0=0 +k=0.994 +x_0=2000000 +y_0=2000000 +datum=WGS84 +units=m"), 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"];
|
|
2700
2712
|
}
|
|
2701
|
-
var _t = 1,
|
|
2713
|
+
var _t = 1, pt = 2, Nt = 3, Cn = 4, ii = 5, as = 6378137, In = 6356752314e-3, ns = 0.0066943799901413165, zt = 484813681109536e-20, y = Math.PI / 2, Tn = 0.16666666666666666, Rn = 0.04722222222222222, kn = 0.022156084656084655, b = 1e-10, L = 0.017453292519943295, H = 57.29577951308232, I = Math.PI / 4, Kt = Math.PI * 2, O = 3.14159265359, V = {};
|
|
2702
2714
|
V.greenwich = 0;
|
|
2703
2715
|
V.lisbon = -9.131906111111;
|
|
2704
2716
|
V.paris = 2.337229166667;
|
|
@@ -3542,7 +3554,7 @@ function so(t) {
|
|
|
3542
3554
|
if (i * H > 90 && i * H < -90 && e * H > 180 && e * H < -180)
|
|
3543
3555
|
return null;
|
|
3544
3556
|
var s, r;
|
|
3545
|
-
if (Math.abs(Math.abs(i) - y) <=
|
|
3557
|
+
if (Math.abs(Math.abs(i) - y) <= b)
|
|
3546
3558
|
return null;
|
|
3547
3559
|
if (this.sphere)
|
|
3548
3560
|
s = this.x0 + this.a * this.k0 * w(e - this.long0, this.over), r = this.y0 + this.a * this.k0 * Math.log(Math.tan(I + 0.5 * i));
|
|
@@ -3846,7 +3858,7 @@ function Mo(t, e, i, s, r) {
|
|
|
3846
3858
|
var a = ut(gr, s);
|
|
3847
3859
|
a || (a = mo), t = a.a, e = a.b, i = a.rf;
|
|
3848
3860
|
}
|
|
3849
|
-
return i && !e && (e = (1 - 1 / i) * t), (i === 0 || Math.abs(t - e) <
|
|
3861
|
+
return i && !e && (e = (1 - 1 / i) * t), (i === 0 || Math.abs(t - e) < b) && (r = !0, e = t), {
|
|
3850
3862
|
a: t,
|
|
3851
3863
|
b: e,
|
|
3852
3864
|
rf: i,
|
|
@@ -5211,27 +5223,27 @@ for (var vo in ge) {
|
|
|
5211
5223
|
}
|
|
5212
5224
|
function yo(t, e, i, s, r, a, n) {
|
|
5213
5225
|
var o = {};
|
|
5214
|
-
return o.datum_type = ii, e && (o.datum_type = Cn, o.datum_params = e.map(parseFloat), (o.datum_params[0] !== 0 || o.datum_params[1] !== 0 || o.datum_params[2] !== 0) && (o.datum_type = _t), o.datum_params.length > 3 && (o.datum_params[3] !== 0 || o.datum_params[4] !== 0 || o.datum_params[5] !== 0 || o.datum_params[6] !== 0) && (o.datum_type =
|
|
5226
|
+
return o.datum_type = ii, e && (o.datum_type = Cn, o.datum_params = e.map(parseFloat), (o.datum_params[0] !== 0 || o.datum_params[1] !== 0 || o.datum_params[2] !== 0) && (o.datum_type = _t), o.datum_params.length > 3 && (o.datum_params[3] !== 0 || o.datum_params[4] !== 0 || o.datum_params[5] !== 0 || o.datum_params[6] !== 0) && (o.datum_type = pt, o.datum_params[3] *= zt, o.datum_params[4] *= zt, o.datum_params[5] *= zt, o.datum_params[6] = o.datum_params[6] / 1e6 + 1)), n && (o.datum_type = Nt, o.grids = n), o.a = i, o.b = s, o.es = r, o.ep2 = a, o;
|
|
5215
5227
|
}
|
|
5216
5228
|
var di = {};
|
|
5217
5229
|
function _o(t, e, i) {
|
|
5218
|
-
return e instanceof ArrayBuffer ?
|
|
5230
|
+
return e instanceof ArrayBuffer ? po(t, e, i) : { ready: bo(t, e) };
|
|
5219
5231
|
}
|
|
5220
|
-
function
|
|
5232
|
+
function po(t, e, i) {
|
|
5221
5233
|
var s = !0;
|
|
5222
5234
|
i !== void 0 && i.includeErrorFields === !1 && (s = !1);
|
|
5223
5235
|
var r = new DataView(e), a = Eo(r), n = xo(r, a), o = Po(r, n, a, s), h = { header: n, subgrids: o };
|
|
5224
5236
|
return di[t] = h, h;
|
|
5225
5237
|
}
|
|
5226
|
-
async function
|
|
5238
|
+
async function bo(t, e) {
|
|
5227
5239
|
for (var i = [], s = await e.getImageCount(), r = s - 1; r >= 0; r--) {
|
|
5228
5240
|
var a = await e.getImage(r), n = await a.readRasters(), o = n, h = [a.getWidth(), a.getHeight()], l = a.getBoundingBox().map(ds), f = typeof a.fileDirectory.getValue == "function" ? a.fileDirectory.getValue("ModelPixelScale") : (
|
|
5229
5241
|
/** @type {any} */
|
|
5230
5242
|
a.fileDirectory.ModelPixelScale
|
|
5231
5243
|
), u = [f[0], f[1]].map(ds), c = l[0] + (h[0] - 1) * u[0], m = l[3] - (h[1] - 1) * u[1], d = o[0], g = o[1], M = [];
|
|
5232
|
-
for (let
|
|
5244
|
+
for (let p = h[1] - 1; p >= 0; p--)
|
|
5233
5245
|
for (let E = h[0] - 1; E >= 0; E--) {
|
|
5234
|
-
var v =
|
|
5246
|
+
var v = p * h[0] + E;
|
|
5235
5247
|
M.push([-ct(g[v]), ct(d[v])]);
|
|
5236
5248
|
}
|
|
5237
5249
|
i.push({
|
|
@@ -5376,7 +5388,7 @@ function Q(t, e) {
|
|
|
5376
5388
|
Q.projections = fo;
|
|
5377
5389
|
Q.projections.start();
|
|
5378
5390
|
function Co(t, e) {
|
|
5379
|
-
return t.datum_type !== e.datum_type || t.a !== e.a || Math.abs(t.es - e.es) > 5e-11 ? !1 : t.datum_type === _t ? t.datum_params[0] === e.datum_params[0] && t.datum_params[1] === e.datum_params[1] && t.datum_params[2] === e.datum_params[2] : t.datum_type ===
|
|
5391
|
+
return t.datum_type !== e.datum_type || t.a !== e.a || Math.abs(t.es - e.es) > 5e-11 ? !1 : t.datum_type === _t ? t.datum_params[0] === e.datum_params[0] && t.datum_params[1] === e.datum_params[1] && t.datum_params[2] === e.datum_params[2] : t.datum_type === pt ? t.datum_params[0] === e.datum_params[0] && t.datum_params[1] === e.datum_params[1] && t.datum_params[2] === e.datum_params[2] && t.datum_params[3] === e.datum_params[3] && t.datum_params[4] === e.datum_params[4] && t.datum_params[5] === e.datum_params[5] && t.datum_params[6] === e.datum_params[6] : !0;
|
|
5380
5392
|
}
|
|
5381
5393
|
function Mr(t, e, i) {
|
|
5382
5394
|
var s = t.x, r = t.y, a = t.z ? t.z : 0, n, o, h, l;
|
|
@@ -5397,7 +5409,7 @@ function Mr(t, e, i) {
|
|
|
5397
5409
|
};
|
|
5398
5410
|
}
|
|
5399
5411
|
function vr(t, e, i, s) {
|
|
5400
|
-
var r = 1e-12, a = r * r, n = 30, o, h, l, f, u, c, m, d, g, M, v, _,
|
|
5412
|
+
var r = 1e-12, a = r * r, n = 30, o, h, l, f, u, c, m, d, g, M, v, _, p, E = t.x, S = t.y, P = t.z ? t.z : 0, A, G, N;
|
|
5401
5413
|
if (o = Math.sqrt(E * E + S * S), h = Math.sqrt(E * E + S * S + P * P), o / i < r) {
|
|
5402
5414
|
if (A = 0, h / i < r)
|
|
5403
5415
|
return G = y, N = -s, {
|
|
@@ -5407,10 +5419,10 @@ function vr(t, e, i, s) {
|
|
|
5407
5419
|
};
|
|
5408
5420
|
} else
|
|
5409
5421
|
A = Math.atan2(S, E);
|
|
5410
|
-
l = P / h, f = o / h, u = 1 / Math.sqrt(1 - e * (2 - e) * f * f), d = f * (1 - e) * u, g = l * u,
|
|
5422
|
+
l = P / h, f = o / h, u = 1 / Math.sqrt(1 - e * (2 - e) * f * f), d = f * (1 - e) * u, g = l * u, p = 0;
|
|
5411
5423
|
do
|
|
5412
|
-
|
|
5413
|
-
while (_ * _ > a &&
|
|
5424
|
+
p++, m = i / Math.sqrt(1 - e * g * g), N = o * d + P * g - m * (1 - e * g * g), c = e * m / (m + N), u = 1 / Math.sqrt(1 - c * (2 - c) * f * f), M = f * (1 - c) * u, v = l * u, _ = v * d - M * g, d = M, g = v;
|
|
5425
|
+
while (_ * _ > a && p < n);
|
|
5414
5426
|
return G = Math.atan(v / Math.abs(M)), {
|
|
5415
5427
|
x: A,
|
|
5416
5428
|
y: G,
|
|
@@ -5424,7 +5436,7 @@ function Io(t, e, i) {
|
|
|
5424
5436
|
y: t.y + i[1],
|
|
5425
5437
|
z: t.z + i[2]
|
|
5426
5438
|
};
|
|
5427
|
-
if (e ===
|
|
5439
|
+
if (e === pt) {
|
|
5428
5440
|
var s = i[0], r = i[1], a = i[2], n = i[3], o = i[4], h = i[5], l = i[6];
|
|
5429
5441
|
return {
|
|
5430
5442
|
x: l * (t.x - h * t.y + o * t.z) + s,
|
|
@@ -5440,7 +5452,7 @@ function To(t, e, i) {
|
|
|
5440
5452
|
y: t.y - i[1],
|
|
5441
5453
|
z: t.z - i[2]
|
|
5442
5454
|
};
|
|
5443
|
-
if (e ===
|
|
5455
|
+
if (e === pt) {
|
|
5444
5456
|
var s = i[0], r = i[1], a = i[2], n = i[3], o = i[4], h = i[5], l = i[6], f = (t.x - s) / l, u = (t.y - r) / l, c = (t.z - a) / l;
|
|
5445
5457
|
return {
|
|
5446
5458
|
x: f + h * u - o * c,
|
|
@@ -5450,7 +5462,7 @@ function To(t, e, i) {
|
|
|
5450
5462
|
}
|
|
5451
5463
|
}
|
|
5452
5464
|
function ue(t) {
|
|
5453
|
-
return t === _t || t ===
|
|
5465
|
+
return t === _t || t === pt;
|
|
5454
5466
|
}
|
|
5455
5467
|
function Ro(t, e, i) {
|
|
5456
5468
|
if (Co(t, e) || t.datum_type === ii || e.datum_type === ii)
|
|
@@ -5619,7 +5631,7 @@ function vs(t) {
|
|
|
5619
5631
|
throw new TypeError("coordinates must be finite numbers");
|
|
5620
5632
|
}
|
|
5621
5633
|
function Fo(t, e) {
|
|
5622
|
-
return (t.datum.datum_type === _t || t.datum.datum_type ===
|
|
5634
|
+
return (t.datum.datum_type === _t || t.datum.datum_type === pt || t.datum.datum_type === Nt) && e.datumCode !== "WGS84" || (e.datum.datum_type === _t || e.datum.datum_type === pt || e.datum.datum_type === Nt) && t.datumCode !== "WGS84";
|
|
5623
5635
|
}
|
|
5624
5636
|
function Pe(t, e, i, s) {
|
|
5625
5637
|
var r, a = i.z !== void 0;
|
|
@@ -5715,11 +5727,11 @@ function Uo(t, e, i) {
|
|
|
5715
5727
|
}
|
|
5716
5728
|
var _s = 6, yr = "AJSAJS", _r = "AFAFAF", At = 65, B = 73, X = 79, Ut = 86, jt = 90;
|
|
5717
5729
|
const jo = {
|
|
5718
|
-
forward:
|
|
5730
|
+
forward: pr,
|
|
5719
5731
|
inverse: Do,
|
|
5720
|
-
toPoint:
|
|
5732
|
+
toPoint: br
|
|
5721
5733
|
};
|
|
5722
|
-
function
|
|
5734
|
+
function pr(t, e) {
|
|
5723
5735
|
return e = e || 5, Wo(zo({
|
|
5724
5736
|
lat: t[1],
|
|
5725
5737
|
lon: t[0]
|
|
@@ -5729,14 +5741,14 @@ function Do(t) {
|
|
|
5729
5741
|
var e = Mi(Sr(t.toUpperCase()));
|
|
5730
5742
|
return e.lat && e.lon ? [e.lon, e.lat, e.lon, e.lat] : [e.left, e.bottom, e.right, e.top];
|
|
5731
5743
|
}
|
|
5732
|
-
function
|
|
5744
|
+
function br(t) {
|
|
5733
5745
|
var e = Mi(Sr(t.toUpperCase()));
|
|
5734
5746
|
return e.lat && e.lon ? [e.lon, e.lat] : [(e.left + e.right) / 2, (e.top + e.bottom) / 2];
|
|
5735
5747
|
}
|
|
5736
5748
|
function Ke(t) {
|
|
5737
5749
|
return t * (Math.PI / 180);
|
|
5738
5750
|
}
|
|
5739
|
-
function
|
|
5751
|
+
function ps(t) {
|
|
5740
5752
|
return 180 * (t / Math.PI);
|
|
5741
5753
|
}
|
|
5742
5754
|
function zo(t) {
|
|
@@ -5754,12 +5766,12 @@ function Mi(t) {
|
|
|
5754
5766
|
var e = t.northing, i = t.easting, s = t.zoneLetter, r = t.zoneNumber;
|
|
5755
5767
|
if (r < 0 || r > 60)
|
|
5756
5768
|
return null;
|
|
5757
|
-
var a = 0.9996, n = 6378137, o = 669438e-8, h, l = (1 - Math.sqrt(1 - o)) / (1 + Math.sqrt(1 - o)), f, u, c, m, d, g, M, v, _,
|
|
5758
|
-
s < "N" && (E -= 1e7), M = (r - 1) * 6 - 180 + 3, h = o / (1 - o), g = E / a, v = g / (n * (1 - o / 4 - 3 * o * o / 64 - 5 * o * o * o / 256)), _ = v + (3 * l / 2 - 27 * l * l * l / 32) * Math.sin(2 * v) + (21 * l * l / 16 - 55 * l * l * l * l / 32) * Math.sin(4 * v) + 151 * l * l * l / 96 * Math.sin(6 * v), f = n / Math.sqrt(1 - o * Math.sin(_) * Math.sin(_)), u = Math.tan(_) * Math.tan(_), c = h * Math.cos(_) * Math.cos(_), m = n * (1 - o) / Math.pow(1 - o * Math.sin(_) * Math.sin(_), 1.5), d =
|
|
5769
|
+
var a = 0.9996, n = 6378137, o = 669438e-8, h, l = (1 - Math.sqrt(1 - o)) / (1 + Math.sqrt(1 - o)), f, u, c, m, d, g, M, v, _, p = i - 5e5, E = e;
|
|
5770
|
+
s < "N" && (E -= 1e7), M = (r - 1) * 6 - 180 + 3, h = o / (1 - o), g = E / a, v = g / (n * (1 - o / 4 - 3 * o * o / 64 - 5 * o * o * o / 256)), _ = v + (3 * l / 2 - 27 * l * l * l / 32) * Math.sin(2 * v) + (21 * l * l / 16 - 55 * l * l * l * l / 32) * Math.sin(4 * v) + 151 * l * l * l / 96 * Math.sin(6 * v), f = n / Math.sqrt(1 - o * Math.sin(_) * Math.sin(_)), u = Math.tan(_) * Math.tan(_), c = h * Math.cos(_) * Math.cos(_), m = n * (1 - o) / Math.pow(1 - o * Math.sin(_) * Math.sin(_), 1.5), d = p / (f * a);
|
|
5759
5771
|
var S = _ - f * Math.tan(_) / m * (d * d / 2 - (5 + 3 * u + 10 * c - 4 * c * c - 9 * h) * d * d * d * d / 24 + (61 + 90 * u + 298 * c + 45 * u * u - 252 * h - 3 * c * c) * d * d * d * d * d * d / 720);
|
|
5760
|
-
S =
|
|
5772
|
+
S = ps(S);
|
|
5761
5773
|
var P = (d - (1 + 2 * u + c) * d * d * d / 6 + (5 - 2 * c + 28 * u - 3 * c * c + 8 * h + 24 * u * u) * d * d * d * d * d / 120) / Math.cos(_);
|
|
5762
|
-
P = M +
|
|
5774
|
+
P = M + ps(P);
|
|
5763
5775
|
var A;
|
|
5764
5776
|
if (t.accuracy) {
|
|
5765
5777
|
var G = Mi({
|
|
@@ -5826,10 +5838,10 @@ function Sr(t) {
|
|
|
5826
5838
|
of digits after the zone letter and two 100km letters - front
|
|
5827
5839
|
half for easting meters, second half for
|
|
5828
5840
|
northing meters` + t;
|
|
5829
|
-
var c = u / 2, m = 0, d = 0, g, M, v, _,
|
|
5830
|
-
return c > 0 && (g = 1e5 / Math.pow(10, c), M = t.substring(a, a + c), m = parseFloat(M) * g, v = t.substring(a + c), d = parseFloat(v) * g), _ = m + l,
|
|
5841
|
+
var c = u / 2, m = 0, d = 0, g, M, v, _, p;
|
|
5842
|
+
return c > 0 && (g = 1e5 / Math.pow(10, c), M = t.substring(a, a + c), m = parseFloat(M) * g, v = t.substring(a + c), d = parseFloat(v) * g), _ = m + l, p = d + f, {
|
|
5831
5843
|
easting: _,
|
|
5832
|
-
northing:
|
|
5844
|
+
northing: p,
|
|
5833
5845
|
zoneLetter: o,
|
|
5834
5846
|
zoneNumber: n,
|
|
5835
5847
|
accuracy: g
|
|
@@ -5944,15 +5956,15 @@ function Rt(t, e, i) {
|
|
|
5944
5956
|
console.warn("proj4.Point will be removed in version 3, use proj4.toPoint");
|
|
5945
5957
|
}
|
|
5946
5958
|
Rt.fromMGRS = function(t) {
|
|
5947
|
-
return new Rt(
|
|
5959
|
+
return new Rt(br(t));
|
|
5948
5960
|
};
|
|
5949
5961
|
Rt.prototype.toMGRS = function(t) {
|
|
5950
|
-
return
|
|
5962
|
+
return pr([this.x, this.y], t);
|
|
5951
5963
|
};
|
|
5952
|
-
var Jo = 1, Yo = 0.25,
|
|
5964
|
+
var Jo = 1, Yo = 0.25, bs = 0.046875, ws = 0.01953125, Ss = 0.01068115234375, Zo = 0.75, th = 0.46875, eh = 0.013020833333333334, ih = 0.007120768229166667, sh = 0.3645833333333333, rh = 0.005696614583333333, ah = 0.3076171875;
|
|
5953
5965
|
function vi(t) {
|
|
5954
5966
|
var e = [];
|
|
5955
|
-
e[0] = Jo - t * (Yo + t * (
|
|
5967
|
+
e[0] = Jo - t * (Yo + t * (bs + t * (ws + t * Ss))), e[1] = t * (Zo - t * (bs + t * (ws + t * Ss)));
|
|
5956
5968
|
var i = t * t;
|
|
5957
5969
|
return e[2] = i * (th - t * (eh + t * ih)), i *= t, e[3] = i * (sh - t * rh), e[4] = i * t * ah, e;
|
|
5958
5970
|
}
|
|
@@ -5963,7 +5975,7 @@ var nh = 20;
|
|
|
5963
5975
|
function yi(t, e, i) {
|
|
5964
5976
|
for (var s = 1 / (1 - e), r = t, a = nh; a; --a) {
|
|
5965
5977
|
var n = Math.sin(r), o = 1 - e * n * n;
|
|
5966
|
-
if (o = (kt(r, n, Math.cos(r), i) - t) * (o * Math.sqrt(o)) * s, r -= o, Math.abs(o) <
|
|
5978
|
+
if (o = (kt(r, n, Math.cos(r), i) - t) * (o * Math.sqrt(o)) * s, r -= o, Math.abs(o) < b)
|
|
5967
5979
|
return r;
|
|
5968
5980
|
}
|
|
5969
5981
|
return r;
|
|
@@ -5974,16 +5986,16 @@ function oh() {
|
|
|
5974
5986
|
function hh(t) {
|
|
5975
5987
|
var e = t.x, i = t.y, s = w(e - this.long0, this.over), r, a, n, o = Math.sin(i), h = Math.cos(i);
|
|
5976
5988
|
if (this.es) {
|
|
5977
|
-
var f = h * s, u = Math.pow(f, 2), c = this.ep2 * Math.pow(h, 2), m = Math.pow(c, 2), d = Math.abs(h) >
|
|
5989
|
+
var f = h * s, u = Math.pow(f, 2), c = this.ep2 * Math.pow(h, 2), m = Math.pow(c, 2), d = Math.abs(h) > b ? Math.tan(i) : 0, g = Math.pow(d, 2), M = Math.pow(g, 2);
|
|
5978
5990
|
r = 1 - this.es * Math.pow(o, 2), f = f / Math.sqrt(r);
|
|
5979
5991
|
var v = kt(i, o, h, this.en);
|
|
5980
5992
|
a = this.a * (this.k0 * f * (1 + u / 6 * (1 - g + c + u / 20 * (5 - 18 * g + M + 14 * c - 58 * g * c + u / 42 * (61 + 179 * M - M * g - 479 * g))))) + this.x0, n = this.a * (this.k0 * (v - this.ml0 + o * s * f / 2 * (1 + u / 12 * (5 - g + 9 * c + 4 * m + u / 30 * (61 + M - 58 * g + 270 * c - 330 * g * c + u / 56 * (1385 + 543 * M - M * g - 3111 * g)))))) + this.y0;
|
|
5981
5993
|
} else {
|
|
5982
5994
|
var l = h * Math.sin(s);
|
|
5983
|
-
if (Math.abs(Math.abs(l) - 1) <
|
|
5995
|
+
if (Math.abs(Math.abs(l) - 1) < b)
|
|
5984
5996
|
return 93;
|
|
5985
5997
|
if (a = 0.5 * this.a * this.k0 * Math.log((1 + l) / (1 - l)) + this.x0, n = h * Math.cos(s) / Math.sqrt(1 - Math.pow(l, 2)), l = Math.abs(n), l >= 1) {
|
|
5986
|
-
if (l - 1 >
|
|
5998
|
+
if (l - 1 > b)
|
|
5987
5999
|
return 93;
|
|
5988
6000
|
n = 0;
|
|
5989
6001
|
} else
|
|
@@ -5996,10 +6008,10 @@ function lh(t) {
|
|
|
5996
6008
|
var e, i, s, r, a = (t.x - this.x0) * (1 / this.a), n = (t.y - this.y0) * (1 / this.a);
|
|
5997
6009
|
if (this.es)
|
|
5998
6010
|
if (e = this.ml0 + n / this.k0, i = yi(e, this.es, this.en), Math.abs(i) < y) {
|
|
5999
|
-
var u = Math.sin(i), c = Math.cos(i), m = Math.abs(c) >
|
|
6011
|
+
var u = Math.sin(i), c = Math.cos(i), m = Math.abs(c) > b ? Math.tan(i) : 0, d = this.ep2 * Math.pow(c, 2), g = Math.pow(d, 2), M = Math.pow(m, 2), v = Math.pow(M, 2);
|
|
6000
6012
|
e = 1 - this.es * Math.pow(u, 2);
|
|
6001
|
-
var _ = a * Math.sqrt(e) / this.k0,
|
|
6002
|
-
e = e * m, s = i - e *
|
|
6013
|
+
var _ = a * Math.sqrt(e) / this.k0, p = Math.pow(_, 2);
|
|
6014
|
+
e = e * m, s = i - e * p / (1 - this.es) * 0.5 * (1 - p / 12 * (5 + 3 * M - 9 * d * M + d - 4 * g - p / 30 * (61 + 90 * M - 252 * d * M + 45 * v + 46 * d - p / 56 * (1385 + 3633 * M + 4095 * v + 1574 * v * M)))), r = w(this.long0 + _ * (1 - p / 6 * (1 + 2 * M + d - p / 20 * (5 + 28 * M + 24 * v + 8 * d * M + 6 * d - p / 42 * (61 + 662 * M + 1320 * v + 720 * v * M)))) / c, this.over);
|
|
6003
6015
|
} else
|
|
6004
6016
|
s = y * Yt(n), r = 0;
|
|
6005
6017
|
else {
|
|
@@ -6099,8 +6111,8 @@ function _h(t, e) {
|
|
|
6099
6111
|
}
|
|
6100
6112
|
return t;
|
|
6101
6113
|
}
|
|
6102
|
-
var
|
|
6103
|
-
function
|
|
6114
|
+
var ph = "etmerc";
|
|
6115
|
+
function bh() {
|
|
6104
6116
|
var t = _h(this.zone, this.long0);
|
|
6105
6117
|
if (t === void 0)
|
|
6106
6118
|
throw new Error("unknown utm zone");
|
|
@@ -6108,38 +6120,38 @@ function ph() {
|
|
|
6108
6120
|
}
|
|
6109
6121
|
var wh = ["Universal Transverse Mercator System", "utm"];
|
|
6110
6122
|
const Sh = {
|
|
6111
|
-
init:
|
|
6123
|
+
init: bh,
|
|
6112
6124
|
names: wh,
|
|
6113
|
-
dependsOn:
|
|
6125
|
+
dependsOn: ph
|
|
6114
6126
|
};
|
|
6115
|
-
function
|
|
6127
|
+
function pi(t, e) {
|
|
6116
6128
|
return Math.pow((1 - t) / (1 + t), e);
|
|
6117
6129
|
}
|
|
6118
6130
|
var Eh = 20;
|
|
6119
6131
|
function xh() {
|
|
6120
6132
|
var t = Math.sin(this.lat0), e = Math.cos(this.lat0);
|
|
6121
|
-
e *= e, this.rc = Math.sqrt(1 - this.es) / (1 - this.es * t * t), this.C = Math.sqrt(1 + this.es * e * e / (1 - this.es)), this.phic0 = Math.asin(t / this.C), this.ratexp = 0.5 * this.C * this.e, this.K = Math.tan(0.5 * this.phic0 + I) / (Math.pow(Math.tan(0.5 * this.lat0 + I), this.C) *
|
|
6133
|
+
e *= e, this.rc = Math.sqrt(1 - this.es) / (1 - this.es * t * t), this.C = Math.sqrt(1 + this.es * e * e / (1 - this.es)), this.phic0 = Math.asin(t / this.C), this.ratexp = 0.5 * this.C * this.e, this.K = Math.tan(0.5 * this.phic0 + I) / (Math.pow(Math.tan(0.5 * this.lat0 + I), this.C) * pi(this.e * t, this.ratexp));
|
|
6122
6134
|
}
|
|
6123
6135
|
function Ph(t) {
|
|
6124
6136
|
var e = t.x, i = t.y;
|
|
6125
|
-
return t.y = 2 * Math.atan(this.K * Math.pow(Math.tan(0.5 * i + I), this.C) *
|
|
6137
|
+
return t.y = 2 * Math.atan(this.K * Math.pow(Math.tan(0.5 * i + I), this.C) * pi(this.e * Math.sin(i), this.ratexp)) - y, t.x = this.C * e, t;
|
|
6126
6138
|
}
|
|
6127
6139
|
function Ah(t) {
|
|
6128
|
-
for (var e = 1e-14, i = t.x / this.C, s = t.y, r = Math.pow(Math.tan(0.5 * s + I) / this.K, 1 / this.C), a = Eh; a > 0 && (s = 2 * Math.atan(r *
|
|
6140
|
+
for (var e = 1e-14, i = t.x / this.C, s = t.y, r = Math.pow(Math.tan(0.5 * s + I) / this.K, 1 / this.C), a = Eh; a > 0 && (s = 2 * Math.atan(r * pi(this.e * Math.sin(t.y), -0.5 * this.e)) - y, !(Math.abs(s - t.y) < e)); --a)
|
|
6129
6141
|
t.y = s;
|
|
6130
6142
|
return a ? (t.x = i, t.y = s, t) : null;
|
|
6131
6143
|
}
|
|
6132
|
-
const
|
|
6144
|
+
const bi = {
|
|
6133
6145
|
init: xh,
|
|
6134
6146
|
forward: Ph,
|
|
6135
6147
|
inverse: Ah
|
|
6136
6148
|
};
|
|
6137
6149
|
function Gh() {
|
|
6138
|
-
|
|
6150
|
+
bi.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"));
|
|
6139
6151
|
}
|
|
6140
6152
|
function Nh(t) {
|
|
6141
6153
|
var e, i, s, r;
|
|
6142
|
-
return t.x = w(t.x - this.long0, this.over),
|
|
6154
|
+
return t.x = w(t.x - this.long0, this.over), bi.forward.apply(this, [t]), e = Math.sin(t.y), i = Math.cos(t.y), s = Math.cos(t.x), r = this.k0 * this.R2 / (1 + this.sinc0 * e + this.cosc0 * i * s), t.x = r * i * Math.sin(t.x), t.y = r * (this.cosc0 * e - this.sinc0 * i * s), t.x = this.a * t.x + this.x0, t.y = this.a * t.y + this.y0, t;
|
|
6143
6155
|
}
|
|
6144
6156
|
function Ch(t) {
|
|
6145
6157
|
var e, i, s, r, a;
|
|
@@ -6148,7 +6160,7 @@ function Ch(t) {
|
|
|
6148
6160
|
e = Math.sin(n), i = Math.cos(n), r = Math.asin(i * this.sinc0 + t.y * e * this.cosc0 / a), s = Math.atan2(t.x * e, a * this.cosc0 * i - t.y * this.sinc0 * e);
|
|
6149
6161
|
} else
|
|
6150
6162
|
r = this.phic0, s = 0;
|
|
6151
|
-
return t.x = s, t.y = r,
|
|
6163
|
+
return t.x = s, t.y = r, bi.inverse.apply(this, [t]), t.x = w(t.x + this.long0, this.over), t;
|
|
6152
6164
|
}
|
|
6153
6165
|
var Ih = ["Stereographic_North_Pole", "Oblique_Stereographic", "sterea", "Oblique Stereographic Alternative", "Double_Stereographic"];
|
|
6154
6166
|
const Th = {
|
|
@@ -6161,24 +6173,24 @@ function wi(t, e, i) {
|
|
|
6161
6173
|
return e *= i, Math.tan(0.5 * (y + t)) * Math.pow((1 - e) / (1 + e), 0.5 * i);
|
|
6162
6174
|
}
|
|
6163
6175
|
function Rh() {
|
|
6164
|
-
this.x0 = this.x0 || 0, this.y0 = this.y0 || 0, this.lat0 = this.lat0 || 0, this.long0 = this.long0 || 0, this.coslat0 = Math.cos(this.lat0), this.sinlat0 = Math.sin(this.lat0), this.sphere ? this.k0 === 1 && !isNaN(this.lat_ts) && Math.abs(this.coslat0) <=
|
|
6176
|
+
this.x0 = this.x0 || 0, this.y0 = this.y0 || 0, this.lat0 = this.lat0 || 0, this.long0 = this.long0 || 0, this.coslat0 = Math.cos(this.lat0), this.sinlat0 = Math.sin(this.lat0), this.sphere ? this.k0 === 1 && !isNaN(this.lat_ts) && Math.abs(this.coslat0) <= b && (this.k0 = 0.5 * (1 + Yt(this.lat0) * Math.sin(this.lat_ts))) : (Math.abs(this.coslat0) <= b && (this.lat0 > 0 ? this.con = 1 : this.con = -1), this.cons = Math.sqrt(Math.pow(1 + this.e, 1 + this.e) * Math.pow(1 - this.e, 1 - this.e)), this.k0 === 1 && !isNaN(this.lat_ts) && Math.abs(this.coslat0) <= b && Math.abs(Math.cos(this.lat_ts)) > b && (this.k0 = 0.5 * this.cons * it(this.e, Math.sin(this.lat_ts), Math.cos(this.lat_ts)) / Z(this.e, this.con * this.lat_ts, this.con * Math.sin(this.lat_ts))), this.ms1 = it(this.e, this.sinlat0, this.coslat0), this.X0 = 2 * Math.atan(wi(this.lat0, this.sinlat0, this.e)) - y, this.cosX0 = Math.cos(this.X0), this.sinX0 = Math.sin(this.X0));
|
|
6165
6177
|
}
|
|
6166
6178
|
function kh(t) {
|
|
6167
6179
|
var e = t.x, i = t.y, s = Math.sin(i), r = Math.cos(i), a, n, o, h, l, f, u = w(e - this.long0, this.over);
|
|
6168
|
-
return Math.abs(Math.abs(e - this.long0) - Math.PI) <=
|
|
6180
|
+
return Math.abs(Math.abs(e - this.long0) - Math.PI) <= b && Math.abs(i + this.lat0) <= b ? (t.x = NaN, t.y = NaN, t) : this.sphere ? (a = 2 * this.k0 / (1 + this.sinlat0 * s + this.coslat0 * r * Math.cos(u)), t.x = this.a * a * r * Math.sin(u) + this.x0, t.y = this.a * a * (this.coslat0 * s - this.sinlat0 * r * Math.cos(u)) + this.y0, t) : (n = 2 * Math.atan(wi(i, s, this.e)) - y, h = Math.cos(n), o = Math.sin(n), Math.abs(this.coslat0) <= b ? (l = Z(this.e, i * this.con, this.con * s), f = 2 * this.a * this.k0 * l / this.cons, t.x = this.x0 + f * Math.sin(e - this.long0), t.y = this.y0 - this.con * f * Math.cos(e - this.long0), t) : (Math.abs(this.sinlat0) < b ? (a = 2 * this.a * this.k0 / (1 + h * Math.cos(u)), t.y = a * o) : (a = 2 * this.a * this.k0 * this.ms1 / (this.cosX0 * (1 + this.sinX0 * o + this.cosX0 * h * Math.cos(u))), t.y = a * (this.cosX0 * o - this.sinX0 * h * Math.cos(u)) + this.y0), t.x = a * h * Math.sin(u) + this.x0, t));
|
|
6169
6181
|
}
|
|
6170
6182
|
function $h(t) {
|
|
6171
6183
|
t.x -= this.x0, t.y -= this.y0;
|
|
6172
6184
|
var e, i, s, r, a, n = Math.sqrt(t.x * t.x + t.y * t.y);
|
|
6173
6185
|
if (this.sphere) {
|
|
6174
6186
|
var o = 2 * Math.atan(n / (2 * this.a * this.k0));
|
|
6175
|
-
return e = this.long0, i = this.lat0, n <=
|
|
6176
|
-
} else if (Math.abs(this.coslat0) <=
|
|
6177
|
-
if (n <=
|
|
6187
|
+
return e = this.long0, i = this.lat0, n <= b ? (t.x = e, t.y = i, t) : (i = Math.asin(Math.cos(o) * this.sinlat0 + t.y * Math.sin(o) * this.coslat0 / n), Math.abs(this.coslat0) < b ? this.lat0 > 0 ? e = w(this.long0 + Math.atan2(t.x, -1 * t.y), this.over) : e = w(this.long0 + Math.atan2(t.x, t.y), this.over) : e = w(this.long0 + Math.atan2(t.x * Math.sin(o), n * this.coslat0 * Math.cos(o) - t.y * this.sinlat0 * Math.sin(o)), this.over), t.x = e, t.y = i, t);
|
|
6188
|
+
} else if (Math.abs(this.coslat0) <= b) {
|
|
6189
|
+
if (n <= b)
|
|
6178
6190
|
return i = this.lat0, e = this.long0, t.x = e, t.y = i, t;
|
|
6179
6191
|
t.x *= this.con, t.y *= this.con, s = n * this.cons / (2 * this.a * this.k0), i = this.con * Qt(this.e, s), e = this.con * w(this.con * this.long0 + Math.atan2(t.x, -1 * t.y), this.over);
|
|
6180
6192
|
} else
|
|
6181
|
-
r = 2 * Math.atan(n * this.cosX0 / (2 * this.a * this.k0 * this.ms1)), e = this.long0, n <=
|
|
6193
|
+
r = 2 * Math.atan(n * this.cosX0 / (2 * this.a * this.k0 * this.ms1)), e = this.long0, n <= b ? a = this.X0 : (a = Math.asin(Math.cos(r) * this.sinX0 + t.y * Math.sin(r) * this.cosX0 / n), e = w(this.long0 + Math.atan2(t.x * Math.sin(r), n * this.cosX0 * Math.cos(r) - t.y * this.sinX0 * Math.sin(r)), this.over)), i = -1 * Qt(this.e, Math.tan(0.5 * (y + a)));
|
|
6182
6194
|
return t.x = e, t.y = i, t;
|
|
6183
6195
|
}
|
|
6184
6196
|
var Lh = ["stere", "Stereographic_South_Pole", "Polar_Stereographic_variant_A", "Polar_Stereographic_variant_B", "Polar_Stereographic"];
|
|
@@ -6226,18 +6238,18 @@ function Bh() {
|
|
|
6226
6238
|
this.no_off = zh(this), this.no_rot = "no_rot" in this;
|
|
6227
6239
|
var _ = !1;
|
|
6228
6240
|
"alpha" in this && (_ = !0);
|
|
6229
|
-
var
|
|
6230
|
-
if ("rectified_grid_angle" in this && (
|
|
6241
|
+
var p = !1;
|
|
6242
|
+
if ("rectified_grid_angle" in this && (p = !0), _ && (v = this.alpha), p && (f = this.rectified_grid_angle, _ || (v = 0, _ = !0)), _ || p)
|
|
6231
6243
|
c = this.longc;
|
|
6232
6244
|
else if (m = this.long1, g = this.lat1, d = this.long2, M = this.lat2, Math.abs(g - M) <= wt || (t = Math.abs(g)) <= wt || Math.abs(t - y) <= wt || Math.abs(Math.abs(this.lat0) - y) <= wt || Math.abs(Math.abs(M) - y) <= wt)
|
|
6233
6245
|
throw new Error();
|
|
6234
6246
|
var E = 1 - this.es;
|
|
6235
|
-
e = Math.sqrt(E), Math.abs(this.lat0) >
|
|
6247
|
+
e = Math.sqrt(E), Math.abs(this.lat0) > b ? (o = Math.sin(this.lat0), i = Math.cos(this.lat0), t = 1 - this.es * o * o, this.B = i * i, this.B = Math.sqrt(1 + this.es * this.B * this.B / E), this.A = this.B * this.k0 * e / t, s = this.B * e / (i * Math.sqrt(t)), r = s * s - 1, r <= 0 ? r = 0 : (r = Math.sqrt(r), this.lat0 < 0 && (r = -r)), this.E = r += s, this.E *= Math.pow(Z(this.e, this.lat0, o), this.B)) : (this.B = 1 / e, this.A = this.k0, this.E = s = r = 1), _ || p ? (_ ? (u = Math.asin(Math.sin(v) / s), p || (f = v)) : (u = f, v = Math.asin(s * Math.sin(u))), this.lam0 = c - Math.asin(0.5 * (r - 1 / r) * Math.tan(u)) / this.B) : (a = Math.pow(Z(this.e, g, Math.sin(g)), this.B), n = Math.pow(Z(this.e, M, Math.sin(M)), this.B), r = this.E / a, h = (n - a) / (n + a), l = this.E * this.E, l = (l - n * a) / (l + n * a), t = m - d, t < -Math.PI ? d -= Kt : t > Math.PI && (d += Kt), this.lam0 = w(0.5 * (m + d) - Math.atan(l * Math.tan(0.5 * this.B * (m - d)) / h) / this.B, this.over), u = Math.atan(2 * Math.sin(this.B * w(m - this.lam0, this.over)) / (r - 1 / r)), f = v = Math.asin(s * Math.sin(u))), this.singam = Math.sin(u), this.cosgam = Math.cos(u), this.sinrot = Math.sin(f), this.cosrot = Math.cos(f), this.rB = 1 / this.B, this.ArB = this.A * this.rB, this.BrA = 1 / this.ArB, this.no_off ? this.u_0 = 0 : (this.u_0 = Math.abs(this.ArB * Math.atan(Math.sqrt(s * s - 1) / Math.cos(v))), this.lat0 < 0 && (this.u_0 = -this.u_0)), r = 0.5 * u, this.v_pole_n = this.ArB * Math.log(Math.tan(I - r)), this.v_pole_s = this.ArB * Math.log(Math.tan(I + r));
|
|
6236
6248
|
}
|
|
6237
6249
|
function Wh(t) {
|
|
6238
6250
|
var e = {}, i, s, r, a, n, o, h, l;
|
|
6239
|
-
if (t.x = t.x - this.lam0, Math.abs(Math.abs(t.y) - y) >
|
|
6240
|
-
if (n = this.E / Math.pow(Z(this.e, t.y, Math.sin(t.y)), this.B), o = 1 / n, i = 0.5 * (n - o), s = 0.5 * (n + o), a = Math.sin(this.B * t.x), r = (i * this.singam - a * this.cosgam) / s, Math.abs(Math.abs(r) - 1) <
|
|
6251
|
+
if (t.x = t.x - this.lam0, Math.abs(Math.abs(t.y) - y) > b) {
|
|
6252
|
+
if (n = this.E / Math.pow(Z(this.e, t.y, Math.sin(t.y)), this.B), o = 1 / n, i = 0.5 * (n - o), s = 0.5 * (n + o), a = Math.sin(this.B * t.x), r = (i * this.singam - a * this.cosgam) / s, Math.abs(Math.abs(r) - 1) < b)
|
|
6241
6253
|
throw new Error();
|
|
6242
6254
|
l = 0.5 * this.ArB * Math.log((1 - r) / (1 + r)), o = Math.cos(this.B * t.x), Math.abs(o) < wt ? h = this.A * t.x : h = this.ArB * Math.atan2(i * this.cosgam + a * this.singam, o);
|
|
6243
6255
|
} else
|
|
@@ -6246,7 +6258,7 @@ function Wh(t) {
|
|
|
6246
6258
|
}
|
|
6247
6259
|
function Hh(t) {
|
|
6248
6260
|
var e, i, s, r, a, n, o, h = {};
|
|
6249
|
-
if (t.x = (t.x - this.x0) * (1 / this.a), t.y = (t.y - this.y0) * (1 / this.a), this.no_rot ? (i = t.y, e = t.x) : (i = t.x * this.cosrot - t.y * this.sinrot, e = t.y * this.cosrot + t.x * this.sinrot + this.u_0), s = Math.exp(-this.BrA * i), r = 0.5 * (s - 1 / s), a = 0.5 * (s + 1 / s), n = Math.sin(this.BrA * e), o = (n * this.cosgam + r * this.singam) / a, Math.abs(Math.abs(o) - 1) <
|
|
6261
|
+
if (t.x = (t.x - this.x0) * (1 / this.a), t.y = (t.y - this.y0) * (1 / this.a), this.no_rot ? (i = t.y, e = t.x) : (i = t.x * this.cosrot - t.y * this.sinrot, e = t.y * this.cosrot + t.x * this.sinrot + this.u_0), s = Math.exp(-this.BrA * i), r = 0.5 * (s - 1 / s), a = 0.5 * (s + 1 / s), n = Math.sin(this.BrA * e), o = (n * this.cosgam + r * this.singam) / a, Math.abs(Math.abs(o) - 1) < b)
|
|
6250
6262
|
h.x = 0, h.y = o < 0 ? -y : y;
|
|
6251
6263
|
else {
|
|
6252
6264
|
if (h.y = this.E / Math.sqrt((1 + o) / (1 - o)), h.y = Qt(this.e, Math.pow(h.y, 1 / this.B)), h.y === 1 / 0)
|
|
@@ -6263,18 +6275,18 @@ const Kh = {
|
|
|
6263
6275
|
names: Vh
|
|
6264
6276
|
};
|
|
6265
6277
|
function Xh() {
|
|
6266
|
-
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) <
|
|
6278
|
+
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) < b)) {
|
|
6267
6279
|
var t = this.b / this.a;
|
|
6268
6280
|
this.e = Math.sqrt(1 - t * t);
|
|
6269
|
-
var e = Math.sin(this.lat1), i = Math.cos(this.lat1), s = it(this.e, e, i), r = Z(this.e, this.lat1, e), a = Math.sin(this.lat2), n = Math.cos(this.lat2), o = it(this.e, a, n), h = Z(this.e, this.lat2, a), l = Math.abs(Math.abs(this.lat0) - y) <
|
|
6270
|
-
Math.abs(this.lat1 - this.lat2) >
|
|
6281
|
+
var e = Math.sin(this.lat1), i = Math.cos(this.lat1), s = it(this.e, e, i), r = Z(this.e, this.lat1, e), a = Math.sin(this.lat2), n = Math.cos(this.lat2), o = it(this.e, a, n), h = Z(this.e, this.lat2, a), l = Math.abs(Math.abs(this.lat0) - y) < b ? 0 : Z(this.e, this.lat0, Math.sin(this.lat0));
|
|
6282
|
+
Math.abs(this.lat1 - this.lat2) > b ? this.ns = Math.log(s / o) / Math.log(r / h) : this.ns = e, isNaN(this.ns) && (this.ns = e), this.f0 = s / (this.ns * Math.pow(r, this.ns)), this.rh = this.a * this.f0 * Math.pow(l, this.ns), this.title || (this.title = "Lambert Conformal Conic");
|
|
6271
6283
|
}
|
|
6272
6284
|
}
|
|
6273
6285
|
function Qh(t) {
|
|
6274
6286
|
var e = t.x, i = t.y;
|
|
6275
|
-
Math.abs(2 * Math.abs(i) - Math.PI) <=
|
|
6287
|
+
Math.abs(2 * Math.abs(i) - Math.PI) <= b && (i = Yt(i) * (y - 2 * b));
|
|
6276
6288
|
var s = Math.abs(Math.abs(i) - y), r, a;
|
|
6277
|
-
if (s >
|
|
6289
|
+
if (s > b)
|
|
6278
6290
|
r = Z(this.e, i, Math.sin(i)), a = this.a * this.f0 * Math.pow(r, this.ns);
|
|
6279
6291
|
else {
|
|
6280
6292
|
if (s = i * this.ns, s <= 0)
|
|
@@ -6384,7 +6396,7 @@ function ol(t) {
|
|
|
6384
6396
|
s = Math.asin(Math.sin(a) * Math.cos(e)), r = Math.atan2(Math.tan(e), Math.cos(a));
|
|
6385
6397
|
} else {
|
|
6386
6398
|
var n = this.ml0 / this.a + i, o = Ae(n, this.e0, this.e1, this.e2, this.e3);
|
|
6387
|
-
if (Math.abs(Math.abs(o) - y) <=
|
|
6399
|
+
if (Math.abs(Math.abs(o) - y) <= b)
|
|
6388
6400
|
return t.x = this.long0, t.y = y, i < 0 && (t.y *= -1), t;
|
|
6389
6401
|
var h = Si(this.a, this.e, Math.sin(o)), l = h * h * h / this.a / this.a * (1 - this.es), f = Math.pow(Math.tan(o), 2), u = e * this.a / h, c = u * u;
|
|
6390
6402
|
s = o - h * Math.tan(o) / l * u * u * (0.5 - (1 + 3 * f) * u * u / 24), r = u * (1 - c * (f / 3 + (1 + 3 * f) * f * c / 15)) / Math.cos(o);
|
|
@@ -6414,7 +6426,7 @@ function Ar(t, e) {
|
|
|
6414
6426
|
var ai = 1, ni = 2, oi = 3, ye = 4;
|
|
6415
6427
|
function Ml() {
|
|
6416
6428
|
var t = Math.abs(this.lat0);
|
|
6417
|
-
if (Math.abs(t - y) <
|
|
6429
|
+
if (Math.abs(t - y) < b ? this.mode = this.lat0 < 0 ? ai : ni : Math.abs(t) < b ? this.mode = oi : this.mode = ye, this.es > 0) {
|
|
6418
6430
|
var e;
|
|
6419
6431
|
switch (this.qp = et(this.e, 1), this.mmf = 0.5 / (1 - this.es), this.apa = Pr(this.es), this.mode) {
|
|
6420
6432
|
case ni:
|
|
@@ -6437,11 +6449,11 @@ function vl(t) {
|
|
|
6437
6449
|
var e, i, s, r, a, n, o, h, l, f, u = t.x, c = t.y;
|
|
6438
6450
|
if (u = w(u - this.long0, this.over), this.sphere) {
|
|
6439
6451
|
if (a = Math.sin(c), f = Math.cos(c), s = Math.cos(u), this.mode === this.OBLIQ || this.mode === this.EQUIT) {
|
|
6440
|
-
if (i = this.mode === this.EQUIT ? 1 + f * s : 1 + this.sinph0 * a + this.cosph0 * f * s, i <=
|
|
6452
|
+
if (i = this.mode === this.EQUIT ? 1 + f * s : 1 + this.sinph0 * a + this.cosph0 * f * s, i <= b)
|
|
6441
6453
|
return null;
|
|
6442
6454
|
i = Math.sqrt(2 / i), e = i * f * Math.sin(u), i *= this.mode === this.EQUIT ? a : this.cosph0 * a - this.sinph0 * f * s;
|
|
6443
6455
|
} else if (this.mode === this.N_POLE || this.mode === this.S_POLE) {
|
|
6444
|
-
if (this.mode === this.N_POLE && (s = -s), Math.abs(c + this.lat0) <
|
|
6456
|
+
if (this.mode === this.N_POLE && (s = -s), Math.abs(c + this.lat0) < b)
|
|
6445
6457
|
return null;
|
|
6446
6458
|
i = I - c * 0.5, i = 2 * (this.mode === this.S_POLE ? Math.cos(i) : Math.sin(i)), e = i * Math.sin(u), i *= s;
|
|
6447
6459
|
}
|
|
@@ -6460,7 +6472,7 @@ function vl(t) {
|
|
|
6460
6472
|
l = c - y, n = this.qp + n;
|
|
6461
6473
|
break;
|
|
6462
6474
|
}
|
|
6463
|
-
if (Math.abs(l) <
|
|
6475
|
+
if (Math.abs(l) < b)
|
|
6464
6476
|
return null;
|
|
6465
6477
|
switch (this.mode) {
|
|
6466
6478
|
case this.OBLIQ:
|
|
@@ -6484,10 +6496,10 @@ function yl(t) {
|
|
|
6484
6496
|
return null;
|
|
6485
6497
|
switch (r = 2 * Math.asin(r), (this.mode === this.OBLIQ || this.mode === this.EQUIT) && (c = Math.sin(r), f = Math.cos(r)), this.mode) {
|
|
6486
6498
|
case this.EQUIT:
|
|
6487
|
-
r = Math.abs(u) <=
|
|
6499
|
+
r = Math.abs(u) <= b ? 0 : Math.asin(i * c / u), e *= c, i = f * u;
|
|
6488
6500
|
break;
|
|
6489
6501
|
case this.OBLIQ:
|
|
6490
|
-
r = Math.abs(u) <=
|
|
6502
|
+
r = Math.abs(u) <= b ? this.lat0 : Math.asin(f * this.sinph0 + i * c * this.cosph0 / u), e *= c * this.cosph0, i = (f - Math.sin(r) * this.sinph0) * u;
|
|
6491
6503
|
break;
|
|
6492
6504
|
case this.N_POLE:
|
|
6493
6505
|
i = -i, r = y - r;
|
|
@@ -6499,7 +6511,7 @@ function yl(t) {
|
|
|
6499
6511
|
s = i === 0 && (this.mode === this.EQUIT || this.mode === this.OBLIQ) ? 0 : Math.atan2(e, i);
|
|
6500
6512
|
} else {
|
|
6501
6513
|
if (l = 0, this.mode === this.OBLIQ || this.mode === this.EQUIT) {
|
|
6502
|
-
if (e /= this.dd, i *= this.dd, h = Math.sqrt(e * e + i * i), h <
|
|
6514
|
+
if (e /= this.dd, i *= this.dd, h = Math.sqrt(e * e + i * i), h < b)
|
|
6503
6515
|
return t.x = this.long0, t.y = this.lat0, t;
|
|
6504
6516
|
n = 2 * Math.asin(0.5 * h / this.rq), a = Math.cos(n), e *= n = Math.sin(n), this.mode === this.OBLIQ ? (l = a * this.sinb1 + i * n * this.cosb1 / h, o = this.qp * l, i = h * this.cosb1 * a - i * this.sinb1 * n) : (l = i * n / h, o = this.qp * l, i = h * a);
|
|
6505
6517
|
} else if (this.mode === this.N_POLE || this.mode === this.S_POLE) {
|
|
@@ -6512,7 +6524,7 @@ function yl(t) {
|
|
|
6512
6524
|
return t.x = w(this.long0 + s, this.over), t.y = r, t;
|
|
6513
6525
|
}
|
|
6514
6526
|
var _l = ["Lambert Azimuthal Equal Area", "Lambert_Azimuthal_Equal_Area", "laea"];
|
|
6515
|
-
const
|
|
6527
|
+
const pl = {
|
|
6516
6528
|
init: Ml,
|
|
6517
6529
|
forward: vl,
|
|
6518
6530
|
inverse: yl,
|
|
@@ -6525,8 +6537,8 @@ const bl = {
|
|
|
6525
6537
|
function ft(t) {
|
|
6526
6538
|
return Math.abs(t) > 1 && (t = t > 1 ? 1 : -1), Math.asin(t);
|
|
6527
6539
|
}
|
|
6528
|
-
function
|
|
6529
|
-
Math.abs(this.lat1 + this.lat2) <
|
|
6540
|
+
function bl() {
|
|
6541
|
+
Math.abs(this.lat1 + this.lat2) < b || (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 = it(this.e3, this.sin_po, this.cos_po), this.qs1 = et(this.e3, this.sin_po), this.sin_po = Math.sin(this.lat2), this.cos_po = Math.cos(this.lat2), this.t2 = this.sin_po, this.ms2 = it(this.e3, this.sin_po, this.cos_po), this.qs2 = et(this.e3, this.sin_po), this.sin_po = Math.sin(this.lat0), this.cos_po = Math.cos(this.lat0), this.t3 = this.sin_po, this.qs0 = et(this.e3, this.sin_po), Math.abs(this.lat1 - this.lat2) > b ? 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);
|
|
6530
6542
|
}
|
|
6531
6543
|
function wl(t) {
|
|
6532
6544
|
var e = t.x, i = t.y;
|
|
@@ -6540,7 +6552,7 @@ function Sl(t) {
|
|
|
6540
6552
|
}
|
|
6541
6553
|
function El(t, e) {
|
|
6542
6554
|
var i, s, r, a, n, o = ft(0.5 * e);
|
|
6543
|
-
if (t <
|
|
6555
|
+
if (t < b)
|
|
6544
6556
|
return o;
|
|
6545
6557
|
for (var h = t * t, l = 1; l <= 25; l++)
|
|
6546
6558
|
if (i = Math.sin(o), s = Math.cos(o), r = t * i, a = 1 - r * r, n = 0.5 * a * a / s * (e / (1 - h) - i / a + 0.5 / t * Math.log((1 - r) / (1 + r))), o = o + n, Math.abs(n) <= 1e-7)
|
|
@@ -6549,7 +6561,7 @@ function El(t, e) {
|
|
|
6549
6561
|
}
|
|
6550
6562
|
var xl = ["Albers_Conic_Equal_Area", "Albers_Equal_Area", "Albers", "aea"];
|
|
6551
6563
|
const Pl = {
|
|
6552
|
-
init:
|
|
6564
|
+
init: bl,
|
|
6553
6565
|
forward: wl,
|
|
6554
6566
|
inverse: Sl,
|
|
6555
6567
|
names: xl,
|
|
@@ -6560,7 +6572,7 @@ function Al() {
|
|
|
6560
6572
|
}
|
|
6561
6573
|
function Gl(t) {
|
|
6562
6574
|
var e, i, s, r, a, n, o, h, l = t.x, f = t.y;
|
|
6563
|
-
return s = w(l - this.long0, this.over), e = Math.sin(f), i = Math.cos(f), r = Math.cos(s), n = this.sin_p14 * e + this.cos_p14 * i * r, a = 1, n > 0 || Math.abs(n) <=
|
|
6575
|
+
return s = w(l - this.long0, this.over), e = Math.sin(f), i = Math.cos(f), r = Math.cos(s), n = this.sin_p14 * e + this.cos_p14 * i * r, a = 1, n > 0 || Math.abs(n) <= b ? (o = this.x0 + this.a * a * i * Math.sin(s) / n, h = this.y0 + this.a * a * (this.cos_p14 * e - this.sin_p14 * i * r) / n) : (o = this.x0 + this.infinity_dist * i * Math.sin(s), h = this.y0 + this.infinity_dist * (this.cos_p14 * e - this.sin_p14 * i * r)), t.x = o, t.y = h, t;
|
|
6564
6576
|
}
|
|
6565
6577
|
function Nl(t) {
|
|
6566
6578
|
var e, i, s, r, a, n;
|
|
@@ -6632,8 +6644,8 @@ function zl() {
|
|
|
6632
6644
|
function Bl(t) {
|
|
6633
6645
|
var e = t.x, i = t.y, s, r, a, n = w(e - this.long0, this.over);
|
|
6634
6646
|
if (a = n * Math.sin(i), this.sphere)
|
|
6635
|
-
Math.abs(i) <=
|
|
6636
|
-
else if (Math.abs(i) <=
|
|
6647
|
+
Math.abs(i) <= b ? (s = this.a * n, r = -1 * this.a * this.lat0) : (s = this.a * Math.sin(a) / Math.tan(i), r = this.a * (mt(i - this.lat0) + (1 - Math.cos(a)) / Math.tan(i)));
|
|
6648
|
+
else if (Math.abs(i) <= b)
|
|
6637
6649
|
s = this.a * n, r = -1 * this.ml0;
|
|
6638
6650
|
else {
|
|
6639
6651
|
var o = Si(this.a, this.e, Math.sin(i)) / Math.tan(i);
|
|
@@ -6644,25 +6656,25 @@ function Bl(t) {
|
|
|
6644
6656
|
function Wl(t) {
|
|
6645
6657
|
var e, i, s, r, a, n, o, h, l;
|
|
6646
6658
|
if (s = t.x - this.x0, r = t.y - this.y0, this.sphere)
|
|
6647
|
-
if (Math.abs(r + this.a * this.lat0) <=
|
|
6659
|
+
if (Math.abs(r + this.a * this.lat0) <= b)
|
|
6648
6660
|
e = w(s / this.a + this.long0, this.over), i = 0;
|
|
6649
6661
|
else {
|
|
6650
6662
|
n = this.lat0 + r / this.a, o = s * s / this.a / this.a + n * n, h = n;
|
|
6651
6663
|
var f;
|
|
6652
6664
|
for (a = Es; a; --a)
|
|
6653
|
-
if (f = Math.tan(h), l = -1 * (n * (h * f + 1) - h - 0.5 * (h * h + o) * f) / ((h - n) / f - 1), h += l, Math.abs(l) <=
|
|
6665
|
+
if (f = Math.tan(h), l = -1 * (n * (h * f + 1) - h - 0.5 * (h * h + o) * f) / ((h - n) / f - 1), h += l, Math.abs(l) <= b) {
|
|
6654
6666
|
i = h;
|
|
6655
6667
|
break;
|
|
6656
6668
|
}
|
|
6657
6669
|
e = w(this.long0 + Math.asin(s * Math.tan(h) / this.a) / Math.sin(i), this.over);
|
|
6658
6670
|
}
|
|
6659
|
-
else if (Math.abs(r + this.ml0) <=
|
|
6671
|
+
else if (Math.abs(r + this.ml0) <= b)
|
|
6660
6672
|
i = 0, e = w(this.long0 + s / this.a, this.over);
|
|
6661
6673
|
else {
|
|
6662
6674
|
n = (this.ml0 + r) / this.a, o = s * s / this.a / this.a + n * n, h = n;
|
|
6663
6675
|
var u, c, m, d, g;
|
|
6664
6676
|
for (a = Es; a; --a)
|
|
6665
|
-
if (g = this.e * Math.sin(h), u = Math.sqrt(1 - g * g) * Math.tan(h), c = this.a * z(this.e0, this.e1, this.e2, this.e3, h), m = this.e0 - 2 * this.e1 * Math.cos(2 * h) + 4 * this.e2 * Math.cos(4 * h) - 6 * this.e3 * Math.cos(6 * h), d = c / this.a, l = (n * (u * d + 1) - d - 0.5 * u * (d * d + o)) / (this.es * Math.sin(2 * h) * (d * d + o - 2 * n * d) / (4 * u) + (n - d) * (u * m - 2 / Math.sin(2 * h)) - m), h -= l, Math.abs(l) <=
|
|
6677
|
+
if (g = this.e * Math.sin(h), u = Math.sqrt(1 - g * g) * Math.tan(h), c = this.a * z(this.e0, this.e1, this.e2, this.e3, h), m = this.e0 - 2 * this.e1 * Math.cos(2 * h) + 4 * this.e2 * Math.cos(4 * h) - 6 * this.e3 * Math.cos(6 * h), d = c / this.a, l = (n * (u * d + 1) - d - 0.5 * u * (d * d + o)) / (this.es * Math.sin(2 * h) * (d * d + o - 2 * n * d) / (4 * u) + (n - d) * (u * m - 2 / Math.sin(2 * h)) - m), h -= l, Math.abs(l) <= b) {
|
|
6666
6678
|
i = h;
|
|
6667
6679
|
break;
|
|
6668
6680
|
}
|
|
@@ -6694,15 +6706,15 @@ function Ql(t) {
|
|
|
6694
6706
|
for (e = 1; e <= 6; e++)
|
|
6695
6707
|
f = h * n - l * o, u = l * n + h * o, h = f, l = u, c = c + this.C_re[e] * h - this.C_im[e] * l, m = m + this.C_im[e] * h + this.C_re[e] * l;
|
|
6696
6708
|
for (var d = 0; d < this.iterations; d++) {
|
|
6697
|
-
var g = c, M = m, v, _,
|
|
6709
|
+
var g = c, M = m, v, _, p = n, E = o;
|
|
6698
6710
|
for (e = 2; e <= 6; e++)
|
|
6699
|
-
v = g * c - M * m, _ = M * c + g * m, g = v, M = _,
|
|
6711
|
+
v = g * c - M * m, _ = M * c + g * m, g = v, M = _, p = p + (e - 1) * (this.B_re[e] * g - this.B_im[e] * M), E = E + (e - 1) * (this.B_im[e] * g + this.B_re[e] * M);
|
|
6700
6712
|
g = 1, M = 0;
|
|
6701
6713
|
var S = this.B_re[1], P = this.B_im[1];
|
|
6702
6714
|
for (e = 2; e <= 6; e++)
|
|
6703
6715
|
v = g * c - M * m, _ = M * c + g * m, g = v, M = _, S = S + e * (this.B_re[e] * g - this.B_im[e] * M), P = P + e * (this.B_im[e] * g + this.B_re[e] * M);
|
|
6704
6716
|
var A = S * S + P * P;
|
|
6705
|
-
c = (
|
|
6717
|
+
c = (p * S + E * P) / A, m = (E * S - p * P) / A;
|
|
6706
6718
|
}
|
|
6707
6719
|
var G = c, N = m, F = 1, x = 0;
|
|
6708
6720
|
for (e = 1; e <= 9; e++)
|
|
@@ -6747,7 +6759,7 @@ function Gr(t) {
|
|
|
6747
6759
|
else
|
|
6748
6760
|
for (var a = this.n * Math.sin(r), n = r0; n; --n) {
|
|
6749
6761
|
var o = (this.m * r + Math.sin(r) - a) / (this.m + Math.cos(r));
|
|
6750
|
-
if (r -= o, Math.abs(o) <
|
|
6762
|
+
if (r -= o, Math.abs(o) < b)
|
|
6751
6763
|
break;
|
|
6752
6764
|
}
|
|
6753
6765
|
e = this.a * this.C_x * s * (this.m + Math.cos(r)), i = this.a * this.C_y * r;
|
|
@@ -6759,7 +6771,7 @@ function Gr(t) {
|
|
|
6759
6771
|
}
|
|
6760
6772
|
function Nr(t) {
|
|
6761
6773
|
var e, i, s, r;
|
|
6762
|
-
return t.x -= this.x0, s = t.x / this.a, t.y -= this.y0, e = t.y / this.a, this.sphere ? (e /= this.C_y, s = s / (this.C_x * (this.m + Math.cos(e))), this.m ? e = ft((this.m * e + Math.sin(e)) / this.n) : this.n !== 1 && (e = ft(Math.sin(e) / this.n)), s = w(s + this.long0, this.over), e = mt(e)) : (e = yi(t.y / this.a, this.es, this.en), r = Math.abs(e), r < y ? (r = Math.sin(e), i = this.long0 + t.x * Math.sqrt(1 - this.es * r * r) / (this.a * Math.cos(e)), s = w(i, this.over)) : r -
|
|
6774
|
+
return t.x -= this.x0, s = t.x / this.a, t.y -= this.y0, e = t.y / this.a, this.sphere ? (e /= this.C_y, s = s / (this.C_x * (this.m + Math.cos(e))), this.m ? e = ft((this.m * e + Math.sin(e)) / this.n) : this.n !== 1 && (e = ft(Math.sin(e) / this.n)), s = w(s + this.long0, this.over), e = mt(e)) : (e = yi(t.y / this.a, this.es, this.en), r = Math.abs(e), r < y ? (r = Math.sin(e), i = this.long0 + t.x * Math.sqrt(1 - this.es * r * r) / (this.a * Math.cos(e)), s = w(i, this.over)) : r - b < y && (s = this.long0)), t.x = s, t.y = e, t;
|
|
6763
6775
|
}
|
|
6764
6776
|
var n0 = ["Sinusoidal", "sinu"];
|
|
6765
6777
|
const o0 = {
|
|
@@ -6784,10 +6796,10 @@ function m0() {
|
|
|
6784
6796
|
function d0(t) {
|
|
6785
6797
|
for (var e = t.x, i = t.y, s = w(e - this.long0, this.over), r = i, a = Math.PI * Math.sin(i); ; ) {
|
|
6786
6798
|
var n = -(r + Math.sin(r) - a) / (1 + Math.cos(r));
|
|
6787
|
-
if (r += n, Math.abs(n) <
|
|
6799
|
+
if (r += n, Math.abs(n) < b)
|
|
6788
6800
|
break;
|
|
6789
6801
|
}
|
|
6790
|
-
r /= 2, Math.PI / 2 - Math.abs(i) <
|
|
6802
|
+
r /= 2, Math.PI / 2 - Math.abs(i) < b && (s = 0);
|
|
6791
6803
|
var o = 0.900316316158 * this.a * s * Math.cos(r) + this.x0, h = 1.4142135623731 * this.a * Math.sin(r) + this.y0;
|
|
6792
6804
|
return t.x = o, t.y = h, t;
|
|
6793
6805
|
}
|
|
@@ -6807,7 +6819,7 @@ const v0 = {
|
|
|
6807
6819
|
names: M0
|
|
6808
6820
|
};
|
|
6809
6821
|
function y0() {
|
|
6810
|
-
Math.abs(this.lat1 + this.lat2) <
|
|
6822
|
+
Math.abs(this.lat1 + this.lat2) < b || (this.lat2 = this.lat2 || this.lat1, this.temp = this.b / this.a, this.es = 1 - Math.pow(this.temp, 2), this.e = Math.sqrt(this.es), this.e0 = Zt(this.es), this.e1 = te(this.es), this.e2 = ee(this.es), this.e3 = ie(this.es), this.sin_phi = Math.sin(this.lat1), this.cos_phi = Math.cos(this.lat1), this.ms1 = it(this.e, this.sin_phi, this.cos_phi), this.ml1 = z(this.e0, this.e1, this.e2, this.e3, this.lat1), Math.abs(this.lat1 - this.lat2) < b ? this.ns = this.sin_phi : (this.sin_phi = Math.sin(this.lat2), this.cos_phi = Math.cos(this.lat2), this.ms2 = it(this.e, this.sin_phi, this.cos_phi), this.ml2 = z(this.e0, this.e1, this.e2, this.e3, this.lat2), this.ns = (this.ms1 - this.ms2) / (this.ml2 - this.ml1)), this.g = this.ml1 + this.ms1 / this.ns, this.ml0 = z(this.e0, this.e1, this.e2, this.e3, this.lat0), this.rh = this.a * (this.g - this.ml0));
|
|
6811
6823
|
}
|
|
6812
6824
|
function _0(t) {
|
|
6813
6825
|
var e = t.x, i = t.y, s;
|
|
@@ -6820,7 +6832,7 @@ function _0(t) {
|
|
|
6820
6832
|
var a = this.ns * w(e - this.long0, this.over), n = this.x0 + s * Math.sin(a), o = this.y0 + this.rh - s * Math.cos(a);
|
|
6821
6833
|
return t.x = n, t.y = o, t;
|
|
6822
6834
|
}
|
|
6823
|
-
function
|
|
6835
|
+
function p0(t) {
|
|
6824
6836
|
t.x -= this.x0, t.y = this.rh - t.y + this.y0;
|
|
6825
6837
|
var e, i, s, r;
|
|
6826
6838
|
this.ns >= 0 ? (i = Math.sqrt(t.x * t.x + t.y * t.y), e = 1) : (i = -Math.sqrt(t.x * t.x + t.y * t.y), e = -1);
|
|
@@ -6830,21 +6842,21 @@ function b0(t) {
|
|
|
6830
6842
|
var n = this.g - i / this.a;
|
|
6831
6843
|
return s = Ae(n, this.e0, this.e1, this.e2, this.e3), r = w(this.long0 + a / this.ns, this.over), t.x = r, t.y = s, t;
|
|
6832
6844
|
}
|
|
6833
|
-
var
|
|
6845
|
+
var b0 = ["Equidistant_Conic", "eqdc"];
|
|
6834
6846
|
const w0 = {
|
|
6835
6847
|
init: y0,
|
|
6836
6848
|
forward: _0,
|
|
6837
|
-
inverse:
|
|
6838
|
-
names:
|
|
6849
|
+
inverse: p0,
|
|
6850
|
+
names: b0
|
|
6839
6851
|
};
|
|
6840
6852
|
function S0() {
|
|
6841
6853
|
this.R = this.a;
|
|
6842
6854
|
}
|
|
6843
6855
|
function E0(t) {
|
|
6844
6856
|
var e = t.x, i = t.y, s = w(e - this.long0, this.over), r, a;
|
|
6845
|
-
Math.abs(i) <=
|
|
6857
|
+
Math.abs(i) <= b && (r = this.x0 + this.R * s, a = this.y0);
|
|
6846
6858
|
var n = ft(2 * Math.abs(i / Math.PI));
|
|
6847
|
-
(Math.abs(s) <=
|
|
6859
|
+
(Math.abs(s) <= b || Math.abs(Math.abs(i) - y) <= b) && (r = this.x0, i >= 0 ? a = this.y0 + Math.PI * this.R * Math.tan(0.5 * n) : a = this.y0 + Math.PI * this.R * -Math.tan(0.5 * n));
|
|
6848
6860
|
var o = 0.5 * Math.abs(Math.PI / s - s / Math.PI), h = o * o, l = Math.sin(n), f = Math.cos(n), u = f / (l + f - 1), c = u * u, m = u * (2 / l - 1), d = m * m, g = Math.PI * this.R * (o * (u - d) + Math.sqrt(h * (u - d) * (u - d) - (d + h) * (c - d))) / (d + h);
|
|
6849
6861
|
s < 0 && (g = -g), r = this.x0 + g;
|
|
6850
6862
|
var M = h + u;
|
|
@@ -6852,7 +6864,7 @@ function E0(t) {
|
|
|
6852
6864
|
}
|
|
6853
6865
|
function x0(t) {
|
|
6854
6866
|
var e, i, s, r, a, n, o, h, l, f, u, c, m;
|
|
6855
|
-
return t.x -= this.x0, t.y -= this.y0, u = Math.PI * this.R, s = t.x / u, r = t.y / u, a = s * s + r * r, n = -Math.abs(r) * (1 + a), o = n - 2 * r * r + s * s, h = -2 * n + 1 + 2 * r * r + a * a, m = r * r / h + (2 * o * o * o / h / h / h - 9 * n * o / h / h) / 27, l = (n - o * o / 3 / h) / h, f = 2 * Math.sqrt(-l / 3), u = 3 * m / l / f, Math.abs(u) > 1 && (u >= 0 ? u = 1 : u = -1), c = Math.acos(u) / 3, t.y >= 0 ? i = (-f * Math.cos(c + Math.PI / 3) - o / 3 / h) * Math.PI : i = -(-f * Math.cos(c + Math.PI / 3) - o / 3 / h) * Math.PI, Math.abs(s) <
|
|
6867
|
+
return t.x -= this.x0, t.y -= this.y0, u = Math.PI * this.R, s = t.x / u, r = t.y / u, a = s * s + r * r, n = -Math.abs(r) * (1 + a), o = n - 2 * r * r + s * s, h = -2 * n + 1 + 2 * r * r + a * a, m = r * r / h + (2 * o * o * o / h / h / h - 9 * n * o / h / h) / 27, l = (n - o * o / 3 / h) / h, f = 2 * Math.sqrt(-l / 3), u = 3 * m / l / f, Math.abs(u) > 1 && (u >= 0 ? u = 1 : u = -1), c = Math.acos(u) / 3, t.y >= 0 ? i = (-f * Math.cos(c + Math.PI / 3) - o / 3 / h) * Math.PI : i = -(-f * Math.cos(c + Math.PI / 3) - o / 3 / h) * Math.PI, Math.abs(s) < b ? e = this.long0 : e = w(this.long0 + Math.PI * (a - 1 + Math.sqrt(1 + 2 * (s * s - r * r) + a * a)) / 2 / s, this.over), t.x = e, t.y = i, t;
|
|
6856
6868
|
}
|
|
6857
6869
|
var P0 = ["Van_der_Grinten_I", "VanDerGrinten", "Van_der_Grinten", "vandg"];
|
|
6858
6870
|
const A0 = {
|
|
@@ -6863,23 +6875,23 @@ const A0 = {
|
|
|
6863
6875
|
};
|
|
6864
6876
|
function G0(t, e, i, s, r, a) {
|
|
6865
6877
|
const n = s - e, o = Math.atan((1 - a) * Math.tan(t)), h = Math.atan((1 - a) * Math.tan(i)), l = Math.sin(o), f = Math.cos(o), u = Math.sin(h), c = Math.cos(h);
|
|
6866
|
-
let m = n, d, g = 100, M, v, _,
|
|
6878
|
+
let m = n, d, g = 100, M, v, _, p, E, S, P, A, G, N, F, x, C, R;
|
|
6867
6879
|
do {
|
|
6868
6880
|
if (M = Math.sin(m), v = Math.cos(m), _ = Math.sqrt(
|
|
6869
6881
|
c * M * (c * M) + (f * u - l * c * v) * (f * u - l * c * v)
|
|
6870
6882
|
), _ === 0)
|
|
6871
6883
|
return { azi1: 0, s12: 0 };
|
|
6872
|
-
|
|
6884
|
+
p = l * u + f * c * v, E = Math.atan2(_, p), S = f * c * M / _, P = 1 - S * S, A = P !== 0 ? p - 2 * l * u / P : 0, G = a / 16 * P * (4 + a * (4 - 3 * P)), d = m, m = n + (1 - G) * a * S * (E + G * _ * (A + G * p * (-1 + 2 * A * A)));
|
|
6873
6885
|
} while (Math.abs(m - d) > 1e-12 && --g > 0);
|
|
6874
|
-
return g === 0 ? { azi1: NaN, s12: NaN } : (N = P * (r * r - r * (1 - a) * (r * (1 - a))) / (r * (1 - a) * (r * (1 - a))), F = 1 + N / 16384 * (4096 + N * (-768 + N * (320 - 175 * N))), x = N / 1024 * (256 + N * (-128 + N * (74 - 47 * N))), C = x * _ * (A + x / 4 * (
|
|
6886
|
+
return g === 0 ? { azi1: NaN, s12: NaN } : (N = P * (r * r - r * (1 - a) * (r * (1 - a))) / (r * (1 - a) * (r * (1 - a))), F = 1 + N / 16384 * (4096 + N * (-768 + N * (320 - 175 * N))), x = N / 1024 * (256 + N * (-128 + N * (74 - 47 * N))), C = x * _ * (A + x / 4 * (p * (-1 + 2 * A * A) - x / 6 * A * (-3 + 4 * _ * _) * (-3 + 4 * A * A))), R = r * (1 - a) * F * (E - C), { azi1: Math.atan2(c * M, f * u - l * c * v), s12: R });
|
|
6875
6887
|
}
|
|
6876
6888
|
function N0(t, e, i, s, r, a) {
|
|
6877
6889
|
const n = Math.atan((1 - a) * Math.tan(t)), o = Math.sin(n), h = Math.cos(n), l = Math.sin(i), f = Math.cos(i), u = Math.atan2(o, h * f), c = h * l, m = 1 - c * c, d = m * (r * r - r * (1 - a) * (r * (1 - a))) / (r * (1 - a) * (r * (1 - a))), g = 1 + d / 16384 * (4096 + d * (-768 + d * (320 - 175 * d))), M = d / 1024 * (256 + d * (-128 + d * (74 - 47 * d)));
|
|
6878
|
-
let v = s / (r * (1 - a) * g), _,
|
|
6890
|
+
let v = s / (r * (1 - a) * g), _, p = 100, E, S, P, A;
|
|
6879
6891
|
do
|
|
6880
6892
|
E = Math.cos(2 * u + v), S = Math.sin(v), P = Math.cos(v), A = M * S * (E + M / 4 * (P * (-1 + 2 * E * E) - M / 6 * E * (-3 + 4 * S * S) * (-3 + 4 * E * E))), _ = v, v = s / (r * (1 - a) * g) + A;
|
|
6881
|
-
while (Math.abs(v - _) > 1e-12 && --
|
|
6882
|
-
if (
|
|
6893
|
+
while (Math.abs(v - _) > 1e-12 && --p > 0);
|
|
6894
|
+
if (p === 0)
|
|
6883
6895
|
return { lat2: NaN, lon2: NaN };
|
|
6884
6896
|
const G = o * S - h * P * f, N = Math.atan2(
|
|
6885
6897
|
o * P + h * S * f,
|
|
@@ -6895,12 +6907,12 @@ function C0() {
|
|
|
6895
6907
|
}
|
|
6896
6908
|
function I0(t) {
|
|
6897
6909
|
var e = t.x, i = t.y, s = Math.sin(t.y), r = Math.cos(t.y), a = w(e - this.long0, this.over), n, o, h, l, f, u, c, m, d, g, M;
|
|
6898
|
-
return this.sphere ? Math.abs(this.sin_p12 - 1) <=
|
|
6910
|
+
return this.sphere ? Math.abs(this.sin_p12 - 1) <= b ? (t.x = this.x0 + this.a * (y - i) * Math.sin(a), t.y = this.y0 - this.a * (y - i) * Math.cos(a), t) : Math.abs(this.sin_p12 + 1) <= b ? (t.x = this.x0 + this.a * (y + i) * Math.sin(a), t.y = this.y0 + this.a * (y + i) * Math.cos(a), t) : (d = this.sin_p12 * s + this.cos_p12 * r * Math.cos(a), c = Math.acos(d), m = c ? c / Math.sin(c) : 1, t.x = this.x0 + this.a * m * r * Math.sin(a), t.y = this.y0 + this.a * m * (this.cos_p12 * s - this.sin_p12 * r * Math.cos(a)), t) : (n = Zt(this.es), o = te(this.es), h = ee(this.es), l = ie(this.es), Math.abs(this.sin_p12 - 1) <= b ? (f = this.a * z(n, o, h, l, y), u = this.a * z(n, o, h, l, i), t.x = this.x0 + (f - u) * Math.sin(a), t.y = this.y0 - (f - u) * Math.cos(a), t) : Math.abs(this.sin_p12 + 1) <= b ? (f = this.a * z(n, o, h, l, y), u = this.a * z(n, o, h, l, i), t.x = this.x0 + (f + u) * Math.sin(a), t.y = this.y0 + (f + u) * Math.cos(a), t) : Math.abs(e) < b && Math.abs(i - this.lat0) < b ? (t.x = t.y = 0, t) : (g = G0(this.lat0, this.long0, i, e, this.a, this.f), M = g.azi1, t.x = g.s12 * Math.sin(M), t.y = g.s12 * Math.cos(M), t));
|
|
6899
6911
|
}
|
|
6900
6912
|
function T0(t) {
|
|
6901
6913
|
t.x -= this.x0, t.y -= this.y0;
|
|
6902
6914
|
var e, i, s, r, a, n, o, h, l, f, u, c, m, d, g, M;
|
|
6903
|
-
return this.sphere ? (e = Math.sqrt(t.x * t.x + t.y * t.y), e > 2 * y * this.a ? void 0 : (i = e / this.a, s = Math.sin(i), r = Math.cos(i), a = this.long0, Math.abs(e) <=
|
|
6915
|
+
return this.sphere ? (e = Math.sqrt(t.x * t.x + t.y * t.y), e > 2 * y * this.a ? void 0 : (i = e / this.a, s = Math.sin(i), r = Math.cos(i), a = this.long0, Math.abs(e) <= b ? n = this.lat0 : (n = ft(r * this.sin_p12 + t.y * s * this.cos_p12 / e), o = Math.abs(this.lat0) - y, Math.abs(o) <= b ? this.lat0 >= 0 ? a = w(this.long0 + Math.atan2(t.x, -t.y), this.over) : a = w(this.long0 - Math.atan2(-t.x, t.y), this.over) : a = w(this.long0 + Math.atan2(t.x * s, e * this.cos_p12 * r - t.y * this.sin_p12 * s), this.over)), t.x = a, t.y = n, t)) : (h = Zt(this.es), l = te(this.es), f = ee(this.es), u = ie(this.es), Math.abs(this.sin_p12 - 1) <= b ? (c = this.a * z(h, l, f, u, y), e = Math.sqrt(t.x * t.x + t.y * t.y), m = c - e, n = Ae(m / this.a, h, l, f, u), a = w(this.long0 + Math.atan2(t.x, -1 * t.y), this.over), t.x = a, t.y = n, t) : Math.abs(this.sin_p12 + 1) <= b ? (c = this.a * z(h, l, f, u, y), e = Math.sqrt(t.x * t.x + t.y * t.y), m = e - c, n = Ae(m / this.a, h, l, f, u), a = w(this.long0 + Math.atan2(t.x, t.y), this.over), t.x = a, t.y = n, t) : (d = Math.atan2(t.x, t.y), g = Math.sqrt(t.x * t.x + t.y * t.y), M = N0(this.lat0, this.long0, d, g, this.a, this.f), t.x = M.lon2, t.y = M.lat2, t));
|
|
6904
6916
|
}
|
|
6905
6917
|
var R0 = ["Azimuthal_Equidistant", "aeqd"];
|
|
6906
6918
|
const k0 = {
|
|
@@ -6914,11 +6926,11 @@ function $0() {
|
|
|
6914
6926
|
}
|
|
6915
6927
|
function L0(t) {
|
|
6916
6928
|
var e, i, s, r, a, n, o, h, l = t.x, f = t.y;
|
|
6917
|
-
return s = w(l - (this.long0 || 0), this.over), e = Math.sin(f), i = Math.cos(f), r = Math.cos(s), n = this.sin_p14 * e + this.cos_p14 * i * r, a = 1, (n > 0 || Math.abs(n) <=
|
|
6929
|
+
return s = w(l - (this.long0 || 0), this.over), e = Math.sin(f), i = Math.cos(f), r = Math.cos(s), n = this.sin_p14 * e + this.cos_p14 * i * r, a = 1, (n > 0 || Math.abs(n) <= b) && (o = this.a * a * i * Math.sin(s), h = (this.y0 || 0) + this.a * a * (this.cos_p14 * e - this.sin_p14 * i * r)), t.x = o, t.y = h, t;
|
|
6918
6930
|
}
|
|
6919
6931
|
function O0(t) {
|
|
6920
6932
|
var e, i, s, r, a, n, o, h, l;
|
|
6921
|
-
return t.x -= this.x0 || 0, t.y -= this.y0 || 0, e = Math.sqrt(t.x * t.x + t.y * t.y), i = ft(e / this.a), s = Math.sin(i), r = Math.cos(i), h = this.long0 || 0, l = this.lat0 || 0, n = h, Math.abs(e) <=
|
|
6933
|
+
return t.x -= this.x0 || 0, t.y -= this.y0 || 0, e = Math.sqrt(t.x * t.x + t.y * t.y), i = ft(e / this.a), s = Math.sin(i), r = Math.cos(i), h = this.long0 || 0, l = this.lat0 || 0, n = h, Math.abs(e) <= b ? (o = l, t.x = n, t.y = o, t) : (o = ft(r * this.sin_p14 + t.y * s * this.cos_p14 / e), a = Math.abs(l) - y, Math.abs(a) <= b ? (l >= 0 ? n = w(h + Math.atan2(t.x, -t.y), this.over) : n = w(h - Math.atan2(-t.x, t.y), this.over), t.x = n, t.y = o, t) : (n = w(h + Math.atan2(t.x * s, e * this.cos_p14 * r - t.y * this.sin_p14 * s), this.over), t.x = n, t.y = o, t));
|
|
6922
6934
|
}
|
|
6923
6935
|
var F0 = ["ortho"];
|
|
6924
6936
|
const q0 = {
|
|
@@ -6973,7 +6985,7 @@ function D0(t) {
|
|
|
6973
6985
|
}
|
|
6974
6986
|
function me(t, e, i, s) {
|
|
6975
6987
|
var r;
|
|
6976
|
-
return t <
|
|
6988
|
+
return t < b ? (s.value = T.AREA_0, r = 0) : (r = Math.atan2(e, i), Math.abs(r) <= I ? s.value = T.AREA_0 : r > I && r <= y + I ? (s.value = T.AREA_1, r -= y) : r > y + I || r <= -(y + I) ? (s.value = T.AREA_2, r = r >= 0 ? r - O : r + O) : (s.value = T.AREA_3, r += y)), r;
|
|
6977
6989
|
}
|
|
6978
6990
|
function Ct(t, e) {
|
|
6979
6991
|
var i = t + e;
|
|
@@ -7070,7 +7082,7 @@ function Q0(t) {
|
|
|
7070
7082
|
var s = Dt[i], r = 5 * (e.y - s[0]) / (Dt[i + 1][0] - s[0]);
|
|
7071
7083
|
r = V0(function(a) {
|
|
7072
7084
|
return (Ge(s, a) - e.y) / H0(s, a);
|
|
7073
|
-
}, r,
|
|
7085
|
+
}, r, b, 100), e.x /= Ge(hi[i], r), e.y = (5 * i + r) * L, t.y < 0 && (e.y = -e.y);
|
|
7074
7086
|
}
|
|
7075
7087
|
return e.x = w(e.x + this.long0, this.over), e;
|
|
7076
7088
|
}
|
|
@@ -7126,7 +7138,7 @@ function rc() {
|
|
|
7126
7138
|
Ft[i].num && (this[i] = parseFloat(this[i]));
|
|
7127
7139
|
}
|
|
7128
7140
|
Ft[i].degrees && (this[i] = this[i] * L);
|
|
7129
|
-
}.bind(this)), Math.abs(Math.abs(this.lat0) - y) <
|
|
7141
|
+
}.bind(this)), Math.abs(Math.abs(this.lat0) - y) < b ? this.mode = this.lat0 < 0 ? D.S_POLE : D.N_POLE : Math.abs(this.lat0) < b ? this.mode = D.EQUIT : (this.mode = D.OBLIQ, this.sinph0 = Math.sin(this.lat0), this.cosph0 = Math.cos(this.lat0)), this.pn1 = this.h / this.a, this.pn1 <= 0 || this.pn1 > 1e10)
|
|
7130
7142
|
throw new Error("Invalid height");
|
|
7131
7143
|
this.p = 1 + this.pn1, this.rp = 1 / this.p, this.h1 = 1 / this.pn1, this.pfact = (this.p + 1) * this.h1, this.es = 0;
|
|
7132
7144
|
var t = this.tilt, e = this.azi;
|
|
@@ -7171,7 +7183,7 @@ function nc(t) {
|
|
|
7171
7183
|
var e = { x: t.x, y: t.y }, i, s, r;
|
|
7172
7184
|
r = 1 / (this.pn1 - t.y * this.sw), i = this.pn1 * t.x * r, s = this.pn1 * t.y * this.cw * r, t.x = i * this.cg + s * this.sg, t.y = s * this.cg - i * this.sg;
|
|
7173
7185
|
var a = W(t.x, t.y);
|
|
7174
|
-
if (Math.abs(a) <
|
|
7186
|
+
if (Math.abs(a) < b)
|
|
7175
7187
|
e.x = 0, e.y = t.y;
|
|
7176
7188
|
else {
|
|
7177
7189
|
var n, o;
|
|
@@ -7277,13 +7289,13 @@ function _c() {
|
|
|
7277
7289
|
this.am1 = Math.sin(this.phi1),
|
|
7278
7290
|
t = Math.cos(this.phi1),
|
|
7279
7291
|
this.en
|
|
7280
|
-
), this.am1 = t / (Math.sqrt(1 - this.es * this.am1 * this.am1) * this.am1), this.inverse =
|
|
7292
|
+
), this.am1 = t / (Math.sqrt(1 - this.es * this.am1 * this.am1) * this.am1), this.inverse = bc, this.forward = pc) : (Math.abs(this.phi1) + Jt >= y ? this.cphi1 = 0 : this.cphi1 = 1 / Math.tan(this.phi1), this.inverse = Sc, this.forward = wc);
|
|
7281
7293
|
}
|
|
7282
|
-
function
|
|
7294
|
+
function pc(t) {
|
|
7283
7295
|
var e = w(t.x - (this.long0 || 0), this.over), i = t.y, s, r, a;
|
|
7284
7296
|
return s = this.am1 + this.m1 - kt(i, r = Math.sin(i), a = Math.cos(i), this.en), r = a * e / (s * Math.sqrt(1 - this.es * r * r)), t.x = s * Math.sin(r), t.y = this.am1 - s * Math.cos(r), t.x = this.a * t.x + (this.x0 || 0), t.y = this.a * t.y + (this.y0 || 0), t;
|
|
7285
7297
|
}
|
|
7286
|
-
function
|
|
7298
|
+
function bc(t) {
|
|
7287
7299
|
t.x = (t.x - (this.x0 || 0)) / this.a, t.y = (t.y - (this.y0 || 0)) / this.a;
|
|
7288
7300
|
var e, i, s, r;
|
|
7289
7301
|
if (i = W(t.x, t.y = this.am1 - t.y), r = yi(this.am1 + this.m1 - i, this.es, this.en), (e = Math.abs(r)) < y)
|
|
@@ -7371,7 +7383,7 @@ function Pc() {
|
|
|
7371
7383
|
if (!i)
|
|
7372
7384
|
throw new Error("No valid parameters provided for ob_tran projection.");
|
|
7373
7385
|
const { lamp: a, phip: n } = Nc(this, i);
|
|
7374
|
-
this.lamp = a, Math.abs(n) >
|
|
7386
|
+
this.lamp = a, Math.abs(n) > b ? (this.cphip = Math.cos(n), this.sphip = Math.sin(n), this.projectionType = xs.OBLIQUE) : this.projectionType = xs.TRANSVERSE;
|
|
7375
7387
|
}
|
|
7376
7388
|
function Ac(t) {
|
|
7377
7389
|
return this.projectionType.forward(this, t);
|
|
@@ -7383,20 +7395,20 @@ function Nc(t, e) {
|
|
|
7383
7395
|
let i, s;
|
|
7384
7396
|
if (e === Ce.ROTATE) {
|
|
7385
7397
|
let r = t.oLongC, a = t.oLatC, n = t.oAlpha;
|
|
7386
|
-
if (Math.abs(Math.abs(a) - y) <=
|
|
7398
|
+
if (Math.abs(Math.abs(a) - y) <= b)
|
|
7387
7399
|
throw new Error("Invalid value for o_lat_c: " + t.o_lat_c + " should be < 90°");
|
|
7388
7400
|
s = r + Math.atan2(-1 * Math.cos(n), -1 * Math.sin(n) * Math.sin(a)), i = Math.asin(Math.cos(a) * Math.sin(n));
|
|
7389
7401
|
} else if (e === Ce.NEW_POLE)
|
|
7390
7402
|
s = t.oLongP, i = t.oLatP;
|
|
7391
7403
|
else {
|
|
7392
7404
|
let r = t.oLong1, a = t.oLat1, n = t.oLong2, o = t.oLat2, h = Math.abs(a);
|
|
7393
|
-
if (Math.abs(a) > y -
|
|
7405
|
+
if (Math.abs(a) > y - b)
|
|
7394
7406
|
throw new Error("Invalid value for o_lat_1: " + t.o_lat_1 + " should be < 90°");
|
|
7395
|
-
if (Math.abs(o) > y -
|
|
7407
|
+
if (Math.abs(o) > y - b)
|
|
7396
7408
|
throw new Error("Invalid value for o_lat_2: " + t.o_lat_2 + " should be < 90°");
|
|
7397
|
-
if (Math.abs(a - o) <
|
|
7409
|
+
if (Math.abs(a - o) < b)
|
|
7398
7410
|
throw new Error("Invalid value for o_lat_1 and o_lat_2: o_lat_1 should be different from o_lat_2");
|
|
7399
|
-
if (h <
|
|
7411
|
+
if (h < b)
|
|
7400
7412
|
throw new Error("Invalid value for o_lat_1: o_lat_1 should be different from zero");
|
|
7401
7413
|
s = Math.atan2(
|
|
7402
7414
|
Math.cos(a) * Math.sin(o) * Math.cos(r) - Math.sin(a) * Math.cos(o) * Math.cos(n),
|
|
@@ -7472,7 +7484,7 @@ const $c = {
|
|
|
7472
7484
|
names: kc
|
|
7473
7485
|
};
|
|
7474
7486
|
function Lc(t) {
|
|
7475
|
-
t.Proj.projections.add(Me), t.Proj.projections.add(ve), t.Proj.projections.add(Sh), t.Proj.projections.add(Th), t.Proj.projections.add(Oh), t.Proj.projections.add(Dh), t.Proj.projections.add(Kh), t.Proj.projections.add(Zh), t.Proj.projections.add(rl), t.Proj.projections.add(ll), t.Proj.projections.add(
|
|
7487
|
+
t.Proj.projections.add(Me), t.Proj.projections.add(ve), t.Proj.projections.add(Sh), t.Proj.projections.add(Th), t.Proj.projections.add(Oh), t.Proj.projections.add(Dh), t.Proj.projections.add(Kh), t.Proj.projections.add(Zh), t.Proj.projections.add(rl), t.Proj.projections.add(ll), t.Proj.projections.add(pl), t.Proj.projections.add(Pl), t.Proj.projections.add(Il), t.Proj.projections.add(Ol), t.Proj.projections.add(Dl), t.Proj.projections.add(Vl), t.Proj.projections.add(Yl), t.Proj.projections.add(s0), t.Proj.projections.add(o0), t.Proj.projections.add(f0), t.Proj.projections.add(v0), t.Proj.projections.add(w0), t.Proj.projections.add(A0), t.Proj.projections.add(k0), t.Proj.projections.add(q0), t.Proj.projections.add(B0), t.Proj.projections.add(Y0), t.Proj.projections.add(sc), t.Proj.projections.add(hc), t.Proj.projections.add(mc), t.Proj.projections.add(yc), t.Proj.projections.add(xc), t.Proj.projections.add($c);
|
|
7476
7488
|
}
|
|
7477
7489
|
const Rr = Object.assign(Uo, {
|
|
7478
7490
|
defaultDatum: "WGS84",
|
|
@@ -7609,7 +7621,7 @@ export {
|
|
|
7609
7621
|
ga as clearUnlinked,
|
|
7610
7622
|
jc as cornersFromBounds,
|
|
7611
7623
|
Ze as cornersFromCamera,
|
|
7612
|
-
|
|
7624
|
+
be as createFrameGeoref,
|
|
7613
7625
|
Ur as createZip,
|
|
7614
7626
|
Wc as defineCartographElements,
|
|
7615
7627
|
Ni as deltaE00,
|
|
@@ -7627,7 +7639,7 @@ export {
|
|
|
7627
7639
|
Br as lintLegendColours,
|
|
7628
7640
|
Gs as loadCore,
|
|
7629
7641
|
ka as maxGeoreferenceablePitch,
|
|
7630
|
-
|
|
7642
|
+
ba as mercatorForward,
|
|
7631
7643
|
wa as mercatorInverse,
|
|
7632
7644
|
ts as niceInterval,
|
|
7633
7645
|
$s as niceNumberBelow,
|