@swissgeo/coordinates 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/ol.cjs +1 -1
- package/dist/ol.d.ts +4 -3
- package/dist/ol.js +320 -320
- package/package.json +3 -3
- package/src/DevApp.vue +2 -1
- package/src/ol.ts +11 -10
package/dist/ol.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { v as
|
|
2
|
-
const
|
|
1
|
+
import { v as Oe, L as P, E as _t } from "./registerProj4-CwR_kPOz.js";
|
|
2
|
+
const Le = {
|
|
3
3
|
/**
|
|
4
4
|
* Triggered when a property is changed.
|
|
5
5
|
* @event module:ol/Object.ObjectEvent#propertychange
|
|
6
6
|
* @api
|
|
7
7
|
*/
|
|
8
8
|
PROPERTYCHANGE: "propertychange"
|
|
9
|
-
},
|
|
9
|
+
}, be = {
|
|
10
10
|
/**
|
|
11
11
|
* Generic change event. Triggered when the revision counter is increased.
|
|
12
12
|
* @event module:ol/events/Event~BaseEvent#change
|
|
@@ -14,7 +14,7 @@ const be = {
|
|
|
14
14
|
*/
|
|
15
15
|
CHANGE: "change"
|
|
16
16
|
};
|
|
17
|
-
class
|
|
17
|
+
class Ue {
|
|
18
18
|
constructor() {
|
|
19
19
|
this.disposed = !1;
|
|
20
20
|
}
|
|
@@ -31,7 +31,7 @@ class Ve {
|
|
|
31
31
|
disposeInternal() {
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function le(i, t) {
|
|
35
35
|
return i > t ? 1 : i < t ? -1 : 0;
|
|
36
36
|
}
|
|
37
37
|
function wt(i, t, e) {
|
|
@@ -70,12 +70,12 @@ function wt(i, t, e) {
|
|
|
70
70
|
}
|
|
71
71
|
return n - 1;
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function Ve(i, t) {
|
|
74
74
|
const e = Array.isArray(t) ? t : [t], n = e.length;
|
|
75
75
|
for (let s = 0; s < n; s++)
|
|
76
76
|
i[i.length] = e[s];
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function De(i, t) {
|
|
79
79
|
const e = i.length;
|
|
80
80
|
if (e !== t.length)
|
|
81
81
|
return !1;
|
|
@@ -84,8 +84,8 @@ function We(i, t) {
|
|
|
84
84
|
return !1;
|
|
85
85
|
return !0;
|
|
86
86
|
}
|
|
87
|
-
function
|
|
88
|
-
const n = t ||
|
|
87
|
+
function We(i, t, e) {
|
|
88
|
+
const n = t || le;
|
|
89
89
|
return i.every(function(s, r) {
|
|
90
90
|
if (r === 0)
|
|
91
91
|
return !0;
|
|
@@ -95,24 +95,24 @@ function $e(i, t, e) {
|
|
|
95
95
|
}
|
|
96
96
|
function Ct() {
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function $e(i) {
|
|
99
99
|
let t, e, n;
|
|
100
100
|
return function() {
|
|
101
101
|
const s = Array.prototype.slice.call(arguments);
|
|
102
|
-
return (!e || this !== n || !
|
|
102
|
+
return (!e || this !== n || !De(s, e)) && (n = this, e = s, t = i.apply(this, arguments)), t;
|
|
103
103
|
};
|
|
104
104
|
}
|
|
105
|
-
function
|
|
105
|
+
function ue(i) {
|
|
106
106
|
for (const t in i)
|
|
107
107
|
delete i[t];
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function He(i) {
|
|
110
110
|
let t;
|
|
111
111
|
for (t in i)
|
|
112
112
|
return !1;
|
|
113
113
|
return !t;
|
|
114
114
|
}
|
|
115
|
-
class
|
|
115
|
+
class he {
|
|
116
116
|
/**
|
|
117
117
|
* @param {string} type Type.
|
|
118
118
|
*/
|
|
@@ -135,7 +135,7 @@ class ce {
|
|
|
135
135
|
this.propagationStopped = !0;
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
|
-
class
|
|
138
|
+
class ke extends Ue {
|
|
139
139
|
/**
|
|
140
140
|
* @param {*} [target] Default event target for dispatched events.
|
|
141
141
|
*/
|
|
@@ -166,7 +166,7 @@ class qe extends Ve {
|
|
|
166
166
|
const e = typeof t == "string", n = e ? t : t.type, s = this.listeners_ && this.listeners_[n];
|
|
167
167
|
if (!s)
|
|
168
168
|
return;
|
|
169
|
-
const r = e ? new
|
|
169
|
+
const r = e ? new he(t) : (
|
|
170
170
|
/** @type {Event} */
|
|
171
171
|
t
|
|
172
172
|
);
|
|
@@ -194,7 +194,7 @@ class qe extends Ve {
|
|
|
194
194
|
* @override
|
|
195
195
|
*/
|
|
196
196
|
disposeInternal() {
|
|
197
|
-
this.listeners_ &&
|
|
197
|
+
this.listeners_ && ue(this.listeners_);
|
|
198
198
|
}
|
|
199
199
|
/**
|
|
200
200
|
* Get the listeners for a specified event type. Listeners are returned in the
|
|
@@ -242,13 +242,13 @@ function Et(i, t, e, n, s) {
|
|
|
242
242
|
};
|
|
243
243
|
return i.addEventListener(t, e), r;
|
|
244
244
|
}
|
|
245
|
-
function
|
|
245
|
+
function jt(i, t, e, n) {
|
|
246
246
|
return Et(i, t, e, n, !0);
|
|
247
247
|
}
|
|
248
|
-
function
|
|
249
|
-
i && i.target && (i.target.removeEventListener(i.type, i.listener),
|
|
248
|
+
function zt(i) {
|
|
249
|
+
i && i.target && (i.target.removeEventListener(i.type, i.listener), ue(i));
|
|
250
250
|
}
|
|
251
|
-
class
|
|
251
|
+
class qe extends ke {
|
|
252
252
|
constructor() {
|
|
253
253
|
super(), this.on = /** @type {ObservableOnSignature<import("./events").EventsKey>} */
|
|
254
254
|
this.onInternal, this.once = /** @type {ObservableOnSignature<import("./events").EventsKey>} */
|
|
@@ -260,7 +260,7 @@ class Be extends qe {
|
|
|
260
260
|
* @api
|
|
261
261
|
*/
|
|
262
262
|
changed() {
|
|
263
|
-
++this.revision_, this.dispatchEvent(
|
|
263
|
+
++this.revision_, this.dispatchEvent(be.CHANGE);
|
|
264
264
|
}
|
|
265
265
|
/**
|
|
266
266
|
* Get the version number for this object. Each time the object is modified,
|
|
@@ -303,9 +303,9 @@ class Be extends qe {
|
|
|
303
303
|
const s = t.length;
|
|
304
304
|
n = new Array(s);
|
|
305
305
|
for (let r = 0; r < s; ++r)
|
|
306
|
-
n[r] =
|
|
306
|
+
n[r] = jt(this, t[r], e);
|
|
307
307
|
} else
|
|
308
|
-
n =
|
|
308
|
+
n = jt(
|
|
309
309
|
this,
|
|
310
310
|
/** @type {string} */
|
|
311
311
|
t,
|
|
@@ -325,7 +325,7 @@ class Be extends qe {
|
|
|
325
325
|
e.ol_key
|
|
326
326
|
);
|
|
327
327
|
if (n)
|
|
328
|
-
|
|
328
|
+
Be(n);
|
|
329
329
|
else if (Array.isArray(t))
|
|
330
330
|
for (let s = 0, r = t.length; s < r; ++s)
|
|
331
331
|
this.removeEventListener(t[s], e);
|
|
@@ -333,12 +333,12 @@ class Be extends qe {
|
|
|
333
333
|
this.removeEventListener(t, e);
|
|
334
334
|
}
|
|
335
335
|
}
|
|
336
|
-
function
|
|
336
|
+
function Be(i) {
|
|
337
337
|
if (Array.isArray(i))
|
|
338
338
|
for (let t = 0, e = i.length; t < e; ++t)
|
|
339
|
-
|
|
339
|
+
zt(i[t]);
|
|
340
340
|
else
|
|
341
|
-
|
|
341
|
+
zt(
|
|
342
342
|
/** @type {import("./events.js").EventsKey} */
|
|
343
343
|
i
|
|
344
344
|
);
|
|
@@ -346,11 +346,11 @@ function Ke(i) {
|
|
|
346
346
|
function E() {
|
|
347
347
|
throw new Error("Unimplemented abstract method.");
|
|
348
348
|
}
|
|
349
|
-
let
|
|
350
|
-
function
|
|
351
|
-
return i.ol_uid || (i.ol_uid = String(++
|
|
349
|
+
let Ke = 0;
|
|
350
|
+
function Je(i) {
|
|
351
|
+
return i.ol_uid || (i.ol_uid = String(++Ke));
|
|
352
352
|
}
|
|
353
|
-
class
|
|
353
|
+
class Gt extends he {
|
|
354
354
|
/**
|
|
355
355
|
* @param {string} type The event type.
|
|
356
356
|
* @param {string} key The property name.
|
|
@@ -360,12 +360,12 @@ class Ot extends ce {
|
|
|
360
360
|
super(t), this.key = e, this.oldValue = n;
|
|
361
361
|
}
|
|
362
362
|
}
|
|
363
|
-
class
|
|
363
|
+
class ce extends qe {
|
|
364
364
|
/**
|
|
365
365
|
* @param {Object<string, *>} [values] An object with key-value pairs.
|
|
366
366
|
*/
|
|
367
367
|
constructor(t) {
|
|
368
|
-
super(), this.on, this.once, this.un,
|
|
368
|
+
super(), this.on, this.once, this.un, Je(this), this.values_ = null, t !== void 0 && this.setProperties(t);
|
|
369
369
|
}
|
|
370
370
|
/**
|
|
371
371
|
* Gets a value.
|
|
@@ -412,7 +412,7 @@ class fe extends Be {
|
|
|
412
412
|
*/
|
|
413
413
|
notify(t, e) {
|
|
414
414
|
let n;
|
|
415
|
-
n = `change:${t}`, this.hasListener(n) && this.dispatchEvent(new
|
|
415
|
+
n = `change:${t}`, this.hasListener(n) && this.dispatchEvent(new Gt(n, t, e)), n = Le.PROPERTYCHANGE, this.hasListener(n) && this.dispatchEvent(new Gt(n, t, e));
|
|
416
416
|
}
|
|
417
417
|
/**
|
|
418
418
|
* @param {string} key Key name.
|
|
@@ -472,7 +472,7 @@ class fe extends Be {
|
|
|
472
472
|
unset(t, e) {
|
|
473
473
|
if (this.values_ && t in this.values_) {
|
|
474
474
|
const n = this.values_[t];
|
|
475
|
-
delete this.values_[t],
|
|
475
|
+
delete this.values_[t], He(this.values_) && (this.values_ = null), e || this.notify(t, n);
|
|
476
476
|
}
|
|
477
477
|
}
|
|
478
478
|
}
|
|
@@ -488,58 +488,58 @@ const M = {
|
|
|
488
488
|
BELOW: 8,
|
|
489
489
|
LEFT: 16
|
|
490
490
|
};
|
|
491
|
-
function
|
|
491
|
+
function fe(i, t, e) {
|
|
492
492
|
let n, s;
|
|
493
493
|
return t < i[0] ? n = i[0] - t : i[2] < t ? n = t - i[2] : n = 0, e < i[1] ? s = i[1] - e : i[3] < e ? s = e - i[3] : s = 0, n * n + s * s;
|
|
494
494
|
}
|
|
495
|
-
function
|
|
495
|
+
function Qe(i, t, e) {
|
|
496
496
|
return i[0] <= t && t <= i[2] && i[1] <= e && e <= i[3];
|
|
497
497
|
}
|
|
498
|
-
function
|
|
498
|
+
function Ot(i, t) {
|
|
499
499
|
const e = i[0], n = i[1], s = i[2], r = i[3], o = t[0], a = t[1];
|
|
500
500
|
let l = M.UNKNOWN;
|
|
501
501
|
return o < e ? l = l | M.LEFT : o > s && (l = l | M.RIGHT), a < n ? l = l | M.BELOW : a > r && (l = l | M.ABOVE), l === M.UNKNOWN && (l = M.INTERSECTING), l;
|
|
502
502
|
}
|
|
503
|
-
function
|
|
503
|
+
function ge() {
|
|
504
504
|
return [1 / 0, 1 / 0, -1 / 0, -1 / 0];
|
|
505
505
|
}
|
|
506
506
|
function ct(i, t, e, n, s) {
|
|
507
507
|
return s ? (s[0] = i, s[1] = t, s[2] = e, s[3] = n, s) : [i, t, e, n];
|
|
508
508
|
}
|
|
509
|
-
function
|
|
509
|
+
function de(i) {
|
|
510
510
|
return ct(1 / 0, 1 / 0, -1 / 0, -1 / 0, i);
|
|
511
511
|
}
|
|
512
|
-
function
|
|
512
|
+
function tn(i, t) {
|
|
513
513
|
const e = i[0], n = i[1];
|
|
514
514
|
return ct(e, n, e, n, t);
|
|
515
515
|
}
|
|
516
|
-
function
|
|
517
|
-
const r =
|
|
518
|
-
return
|
|
516
|
+
function en(i, t, e, n, s) {
|
|
517
|
+
const r = de(s);
|
|
518
|
+
return me(r, i, t, e, n);
|
|
519
519
|
}
|
|
520
|
-
function
|
|
520
|
+
function me(i, t, e, n, s) {
|
|
521
521
|
for (; e < n; e += s)
|
|
522
|
-
|
|
522
|
+
nn(i, t[e], t[e + 1]);
|
|
523
523
|
return i;
|
|
524
524
|
}
|
|
525
|
-
function
|
|
525
|
+
function nn(i, t, e) {
|
|
526
526
|
i[0] = Math.min(i[0], t), i[1] = Math.min(i[1], e), i[2] = Math.max(i[2], t), i[3] = Math.max(i[3], e);
|
|
527
527
|
}
|
|
528
|
-
function
|
|
528
|
+
function sn(i, t) {
|
|
529
529
|
let e;
|
|
530
|
-
return e = t(
|
|
530
|
+
return e = t(rn(i)), e || (e = t(on(i)), e) || (e = t(un(i)), e) || (e = t(_e(i)), e) ? e : !1;
|
|
531
531
|
}
|
|
532
|
-
function
|
|
532
|
+
function rn(i) {
|
|
533
533
|
return [i[0], i[1]];
|
|
534
534
|
}
|
|
535
|
-
function
|
|
535
|
+
function on(i) {
|
|
536
536
|
return [i[2], i[1]];
|
|
537
537
|
}
|
|
538
538
|
function rt(i) {
|
|
539
539
|
return [(i[0] + i[2]) / 2, (i[1] + i[3]) / 2];
|
|
540
540
|
}
|
|
541
|
-
function
|
|
542
|
-
const [r, o, a, l, h, u, c, f] =
|
|
541
|
+
function an(i, t, e, n, s) {
|
|
542
|
+
const [r, o, a, l, h, u, c, f] = ln(
|
|
543
543
|
i,
|
|
544
544
|
t,
|
|
545
545
|
e,
|
|
@@ -553,7 +553,7 @@ function ln(i, t, e, n, s) {
|
|
|
553
553
|
s
|
|
554
554
|
);
|
|
555
555
|
}
|
|
556
|
-
function
|
|
556
|
+
function ln(i, t, e, n) {
|
|
557
557
|
const s = t * n[0] / 2, r = t * n[1] / 2, o = Math.cos(e), a = Math.sin(e), l = s * o, h = s * a, u = r * o, c = r * a, f = i[0], g = i[1];
|
|
558
558
|
return [
|
|
559
559
|
f - l + c,
|
|
@@ -571,27 +571,27 @@ function un(i, t, e, n) {
|
|
|
571
571
|
function k(i) {
|
|
572
572
|
return i[3] - i[1];
|
|
573
573
|
}
|
|
574
|
-
function
|
|
574
|
+
function _e(i) {
|
|
575
575
|
return [i[0], i[3]];
|
|
576
576
|
}
|
|
577
|
-
function
|
|
577
|
+
function un(i) {
|
|
578
578
|
return [i[2], i[3]];
|
|
579
579
|
}
|
|
580
580
|
function D(i) {
|
|
581
581
|
return i[2] - i[0];
|
|
582
582
|
}
|
|
583
|
-
function
|
|
583
|
+
function hn(i, t) {
|
|
584
584
|
return i[0] <= t[2] && i[2] >= t[0] && i[1] <= t[3] && i[3] >= t[1];
|
|
585
585
|
}
|
|
586
|
-
function
|
|
586
|
+
function Re(i) {
|
|
587
587
|
return i[2] < i[0] || i[3] < i[1];
|
|
588
588
|
}
|
|
589
|
-
function
|
|
589
|
+
function cn(i, t) {
|
|
590
590
|
return t ? (t[0] = i[0], t[1] = i[1], t[2] = i[2], t[3] = i[3], t) : i;
|
|
591
591
|
}
|
|
592
|
-
function
|
|
592
|
+
function fn(i, t, e) {
|
|
593
593
|
let n = !1;
|
|
594
|
-
const s =
|
|
594
|
+
const s = Ot(i, t), r = Ot(i, e);
|
|
595
595
|
if (s === M.INTERSECTING || r === M.INTERSECTING)
|
|
596
596
|
n = !0;
|
|
597
597
|
else {
|
|
@@ -601,10 +601,10 @@ function gn(i, t, e) {
|
|
|
601
601
|
}
|
|
602
602
|
return n;
|
|
603
603
|
}
|
|
604
|
-
function
|
|
604
|
+
function p(i, t, e) {
|
|
605
605
|
return Math.min(Math.max(i, t), e);
|
|
606
606
|
}
|
|
607
|
-
function
|
|
607
|
+
function gn(i, t, e, n, s, r) {
|
|
608
608
|
const o = s - e, a = r - n;
|
|
609
609
|
if (o !== 0 || a !== 0) {
|
|
610
610
|
const l = ((i - e) * o + (t - n) * a) / (o * o + a * a);
|
|
@@ -616,39 +616,39 @@ function U(i, t, e, n) {
|
|
|
616
616
|
const s = e - i, r = n - t;
|
|
617
617
|
return s * s + r * r;
|
|
618
618
|
}
|
|
619
|
-
function
|
|
619
|
+
function Lt(i) {
|
|
620
620
|
return i * 180 / Math.PI;
|
|
621
621
|
}
|
|
622
622
|
function H(i) {
|
|
623
623
|
return i * Math.PI / 180;
|
|
624
624
|
}
|
|
625
|
-
function
|
|
625
|
+
function bt(i, t) {
|
|
626
626
|
const e = i % t;
|
|
627
627
|
return e * t < 0 ? e + t : e;
|
|
628
628
|
}
|
|
629
|
-
function
|
|
629
|
+
function dn(i, t, e) {
|
|
630
630
|
return i + e * (t - i);
|
|
631
631
|
}
|
|
632
|
-
function
|
|
632
|
+
function xe(i, t) {
|
|
633
633
|
const e = Math.pow(10, t);
|
|
634
634
|
return Math.round(i * e) / e;
|
|
635
635
|
}
|
|
636
636
|
function K(i, t) {
|
|
637
|
-
return Math.floor(
|
|
637
|
+
return Math.floor(xe(i, t));
|
|
638
638
|
}
|
|
639
639
|
function J(i, t) {
|
|
640
|
-
return Math.ceil(
|
|
640
|
+
return Math.ceil(xe(i, t));
|
|
641
641
|
}
|
|
642
|
-
function
|
|
642
|
+
function Tt(i, t, e) {
|
|
643
643
|
if (i >= t && i < e)
|
|
644
644
|
return i;
|
|
645
645
|
const n = e - t;
|
|
646
646
|
return ((i - t) % n + n) % n + t;
|
|
647
647
|
}
|
|
648
|
-
function
|
|
648
|
+
function mn(...i) {
|
|
649
649
|
console.warn(...i);
|
|
650
650
|
}
|
|
651
|
-
function
|
|
651
|
+
function _n(i, t) {
|
|
652
652
|
return i[0] += +t[0], i[1] += +t[1], i;
|
|
653
653
|
}
|
|
654
654
|
function ot(i, t) {
|
|
@@ -660,18 +660,18 @@ function ot(i, t) {
|
|
|
660
660
|
}
|
|
661
661
|
return e;
|
|
662
662
|
}
|
|
663
|
-
function
|
|
663
|
+
function Rn(i, t) {
|
|
664
664
|
const e = Math.cos(t), n = Math.sin(t), s = i[0] * e - i[1] * n, r = i[1] * e + i[0] * n;
|
|
665
665
|
return i[0] = s, i[1] = r, i;
|
|
666
666
|
}
|
|
667
|
-
function
|
|
667
|
+
function xn(i, t, e) {
|
|
668
668
|
const n = t.getExtent();
|
|
669
669
|
let s = 0;
|
|
670
670
|
return t.canWrapX() && (i[0] < n[0] || i[0] > n[2]) && (e = e || D(n), s = Math.floor(
|
|
671
671
|
(i[0] - n[0]) / e
|
|
672
672
|
)), s;
|
|
673
673
|
}
|
|
674
|
-
const
|
|
674
|
+
const Me = {
|
|
675
675
|
// use the radius of the Normal sphere
|
|
676
676
|
radians: 6370997 / (2 * Math.PI),
|
|
677
677
|
degrees: 2 * Math.PI * 6370997 / 360,
|
|
@@ -725,7 +725,7 @@ class ft {
|
|
|
725
725
|
* @api
|
|
726
726
|
*/
|
|
727
727
|
getMetersPerUnit() {
|
|
728
|
-
return this.metersPerUnit_ ||
|
|
728
|
+
return this.metersPerUnit_ || Me[this.units_];
|
|
729
729
|
}
|
|
730
730
|
/**
|
|
731
731
|
* Get the world extent for this projection.
|
|
@@ -812,7 +812,7 @@ class ft {
|
|
|
812
812
|
return this.getPointResolutionFunc_;
|
|
813
813
|
}
|
|
814
814
|
}
|
|
815
|
-
const B = 6378137, b = Math.PI * B,
|
|
815
|
+
const B = 6378137, b = Math.PI * B, Mn = [-b, -b, b, b], Cn = [-180, -85, 180, 85], Q = B * Math.log(Math.tan(Math.PI / 2));
|
|
816
816
|
class z extends ft {
|
|
817
817
|
/**
|
|
818
818
|
* @param {string} code Code.
|
|
@@ -821,16 +821,16 @@ class z extends ft {
|
|
|
821
821
|
super({
|
|
822
822
|
code: t,
|
|
823
823
|
units: "m",
|
|
824
|
-
extent:
|
|
824
|
+
extent: Mn,
|
|
825
825
|
global: !0,
|
|
826
|
-
worldExtent:
|
|
826
|
+
worldExtent: Cn,
|
|
827
827
|
getPointResolution: function(e, n) {
|
|
828
828
|
return e / Math.cosh(n[1] / B);
|
|
829
829
|
}
|
|
830
830
|
});
|
|
831
831
|
}
|
|
832
832
|
}
|
|
833
|
-
const
|
|
833
|
+
const Ut = [
|
|
834
834
|
new z("EPSG:3857"),
|
|
835
835
|
new z("EPSG:102100"),
|
|
836
836
|
new z("EPSG:102113"),
|
|
@@ -838,7 +838,7 @@ const Vt = [
|
|
|
838
838
|
new z("http://www.opengis.net/def/crs/EPSG/0/3857"),
|
|
839
839
|
new z("http://www.opengis.net/gml/srs/epsg.xml#3857")
|
|
840
840
|
];
|
|
841
|
-
function
|
|
841
|
+
function En(i, t, e, n) {
|
|
842
842
|
const s = i.length;
|
|
843
843
|
e = e > 1 ? e : 2, n = n ?? e, t === void 0 && (e > 2 ? t = i.slice() : t = new Array(s));
|
|
844
844
|
for (let r = 0; r < s; r += n) {
|
|
@@ -855,7 +855,7 @@ function Tn(i, t, e, n) {
|
|
|
855
855
|
t[r] = 180 * i[r] / b, t[r + 1] = 360 * Math.atan(Math.exp(i[r + 1] / B)) / Math.PI - 90;
|
|
856
856
|
return t;
|
|
857
857
|
}
|
|
858
|
-
const
|
|
858
|
+
const pn = 6378137, Vt = [-180, -90, 180, 90], In = Math.PI * pn / 180;
|
|
859
859
|
class X extends ft {
|
|
860
860
|
/**
|
|
861
861
|
* @param {string} code Code.
|
|
@@ -865,15 +865,15 @@ class X extends ft {
|
|
|
865
865
|
super({
|
|
866
866
|
code: t,
|
|
867
867
|
units: "degrees",
|
|
868
|
-
extent:
|
|
868
|
+
extent: Vt,
|
|
869
869
|
axisOrientation: e,
|
|
870
870
|
global: !0,
|
|
871
|
-
metersPerUnit:
|
|
872
|
-
worldExtent:
|
|
871
|
+
metersPerUnit: In,
|
|
872
|
+
worldExtent: Vt
|
|
873
873
|
});
|
|
874
874
|
}
|
|
875
875
|
}
|
|
876
|
-
const
|
|
876
|
+
const Dt = [
|
|
877
877
|
new X("CRS:84"),
|
|
878
878
|
new X("EPSG:4326", "neu"),
|
|
879
879
|
new X("urn:ogc:def:crs:OGC:1.3:CRS84"),
|
|
@@ -882,12 +882,12 @@ const Wt = [
|
|
|
882
882
|
new X("http://www.opengis.net/gml/srs/epsg.xml#4326", "neu"),
|
|
883
883
|
new X("http://www.opengis.net/def/crs/EPSG/0/4326", "neu")
|
|
884
884
|
];
|
|
885
|
-
let
|
|
885
|
+
let pt = {};
|
|
886
886
|
function it(i) {
|
|
887
|
-
return
|
|
887
|
+
return pt[i] || pt[i.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/, "EPSG:$3")] || null;
|
|
888
888
|
}
|
|
889
|
-
function
|
|
890
|
-
|
|
889
|
+
function yn(i, t) {
|
|
890
|
+
pt[i] = t;
|
|
891
891
|
}
|
|
892
892
|
let V = {};
|
|
893
893
|
function Z(i, t, e) {
|
|
@@ -897,34 +897,34 @@ function Z(i, t, e) {
|
|
|
897
897
|
function st(i, t) {
|
|
898
898
|
return i in V && t in V[i] ? V[i][t] : null;
|
|
899
899
|
}
|
|
900
|
-
const at = 0.9996,
|
|
901
|
-
function
|
|
902
|
-
const n = i - 5e5, o = (e.north ? t : t - 1e7) / at / (lt * Te), a = o +
|
|
900
|
+
const at = 0.9996, T = 669438e-8, gt = T * T, dt = gt * T, N = T / (1 - T), Wt = Math.sqrt(1 - T), W = (1 - Wt) / (1 + Wt), Ce = W * W, St = Ce * W, At = St * W, Ee = At * W, Te = 1 - T / 4 - 3 * gt / 64 - 5 * dt / 256, wn = 3 * T / 8 + 3 * gt / 32 + 45 * dt / 1024, Sn = 15 * gt / 256 + 45 * dt / 1024, An = 35 * dt / 3072, vn = 3 / 2 * W - 27 / 32 * St + 269 / 512 * Ee, Pn = 21 / 16 * Ce - 55 / 32 * At, Fn = 151 / 96 * St - 417 / 128 * Ee, Xn = 1097 / 512 * At, lt = 6378137;
|
|
901
|
+
function Nn(i, t, e) {
|
|
902
|
+
const n = i - 5e5, o = (e.north ? t : t - 1e7) / at / (lt * Te), a = o + vn * Math.sin(2 * o) + Pn * Math.sin(4 * o) + Fn * Math.sin(6 * o) + Xn * Math.sin(8 * o), l = Math.sin(a), h = l * l, u = Math.cos(a), c = l / u, f = c * c, g = f * f, d = 1 - T * h, m = Math.sqrt(1 - T * h), _ = lt / m, x = (1 - T) / d, R = N * u ** 2, w = R * R, C = n / (_ * at), F = C * C, $ = F * C, Yt = $ * C, Zt = Yt * C, ze = Zt * C, Ge = a - c / x * (F / 2 - Yt / 24 * (5 + 3 * f + 10 * R - 4 * w - 9 * N)) + ze / 720 * (61 + 90 * f + 298 * R + 45 * g - 252 * N - 3 * w);
|
|
903
903
|
let mt = (C - $ / 6 * (1 + 2 * f + R) + Zt / 120 * (5 - 2 * R + 28 * f - 3 * w + 8 * N + 24 * g)) / u;
|
|
904
|
-
return mt =
|
|
905
|
-
mt + H(
|
|
904
|
+
return mt = Tt(
|
|
905
|
+
mt + H(pe(e.number)),
|
|
906
906
|
-Math.PI,
|
|
907
907
|
Math.PI
|
|
908
|
-
), [
|
|
908
|
+
), [Lt(mt), Lt(Ge)];
|
|
909
909
|
}
|
|
910
|
-
const
|
|
911
|
-
function
|
|
912
|
-
i =
|
|
913
|
-
const n = H(t), s = Math.sin(n), r = Math.cos(n), o = s / r, a = o * o, l = a * a, h = H(i), u =
|
|
910
|
+
const $t = -80, Ht = 84, Yn = -180, Zn = 180;
|
|
911
|
+
function jn(i, t, e) {
|
|
912
|
+
i = Tt(i, Yn, Zn), t < $t ? t = $t : t > Ht && (t = Ht);
|
|
913
|
+
const n = H(t), s = Math.sin(n), r = Math.cos(n), o = s / r, a = o * o, l = a * a, h = H(i), u = pe(e.number), c = H(u), f = lt / Math.sqrt(1 - T * s ** 2), g = N * r ** 2, d = r * Tt(h - c, -Math.PI, Math.PI), m = d * d, _ = m * d, x = _ * d, R = x * d, w = R * d, C = lt * (Te * n - wn * Math.sin(2 * n) + Sn * Math.sin(4 * n) - An * Math.sin(6 * n)), F = at * f * (d + _ / 6 * (1 - a + g) + R / 120 * (5 - 18 * a + l + 72 * g - 58 * N)) + 5e5;
|
|
914
914
|
let $ = at * (C + f * o * (m / 2 + x / 24 * (5 - a + 9 * g + 4 * g ** 2) + w / 720 * (61 - 58 * a + l + 600 * g - 330 * N)));
|
|
915
915
|
return e.north || ($ += 1e7), [F, $];
|
|
916
916
|
}
|
|
917
|
-
function
|
|
917
|
+
function pe(i) {
|
|
918
918
|
return (i - 1) * 6 - 180 + 3;
|
|
919
919
|
}
|
|
920
|
-
const
|
|
920
|
+
const zn = [
|
|
921
921
|
/^EPSG:(\d+)$/,
|
|
922
922
|
/^urn:ogc:def:crs:EPSG::(\d+)$/,
|
|
923
923
|
/^http:\/\/www\.opengis\.net\/def\/crs\/EPSG\/0\/(\d+)$/
|
|
924
924
|
];
|
|
925
|
-
function
|
|
925
|
+
function Ie(i) {
|
|
926
926
|
let t = 0;
|
|
927
|
-
for (const s of
|
|
927
|
+
for (const s of zn) {
|
|
928
928
|
const r = i.match(s);
|
|
929
929
|
if (r) {
|
|
930
930
|
t = parseInt(r[1]);
|
|
@@ -936,7 +936,7 @@ function ye(i) {
|
|
|
936
936
|
let e = 0, n = !1;
|
|
937
937
|
return t > 32700 && t < 32761 ? e = t - 32700 : t > 32600 && t < 32661 && (n = !0, e = t - 32600), e ? { number: e, north: n } : null;
|
|
938
938
|
}
|
|
939
|
-
function
|
|
939
|
+
function kt(i, t) {
|
|
940
940
|
return function(e, n, s, r) {
|
|
941
941
|
const o = e.length;
|
|
942
942
|
s = s > 1 ? s : 2, r = r ?? s, n || (s > 2 ? n = e.slice() : n = new Array(o));
|
|
@@ -947,22 +947,22 @@ function qt(i, t) {
|
|
|
947
947
|
return n;
|
|
948
948
|
};
|
|
949
949
|
}
|
|
950
|
-
function
|
|
951
|
-
return
|
|
950
|
+
function Gn(i) {
|
|
951
|
+
return Ie(i) ? new ft({ code: i, units: "m" }) : null;
|
|
952
952
|
}
|
|
953
|
-
function
|
|
954
|
-
const t =
|
|
953
|
+
function On(i) {
|
|
954
|
+
const t = Ie(i.getCode());
|
|
955
955
|
return t ? {
|
|
956
|
-
forward:
|
|
957
|
-
inverse:
|
|
956
|
+
forward: kt(jn, t),
|
|
957
|
+
inverse: kt(Nn, t)
|
|
958
958
|
} : null;
|
|
959
959
|
}
|
|
960
|
-
const
|
|
960
|
+
const Ln = [On], bn = [Gn];
|
|
961
961
|
let It = !0;
|
|
962
|
-
function
|
|
962
|
+
function Un(i) {
|
|
963
963
|
It = !1;
|
|
964
964
|
}
|
|
965
|
-
function
|
|
965
|
+
function ye(i, t) {
|
|
966
966
|
if (t !== void 0) {
|
|
967
967
|
for (let e = 0, n = i.length; e < n; ++e)
|
|
968
968
|
t[e] = i[e];
|
|
@@ -972,9 +972,9 @@ function we(i, t) {
|
|
|
972
972
|
return t;
|
|
973
973
|
}
|
|
974
974
|
function ut(i) {
|
|
975
|
-
|
|
975
|
+
yn(i.getCode(), i), Z(i, i, ye);
|
|
976
976
|
}
|
|
977
|
-
function
|
|
977
|
+
function Vn(i) {
|
|
978
978
|
i.forEach(ut);
|
|
979
979
|
}
|
|
980
980
|
function j(i) {
|
|
@@ -983,7 +983,7 @@ function j(i) {
|
|
|
983
983
|
const t = it(i);
|
|
984
984
|
if (t)
|
|
985
985
|
return t;
|
|
986
|
-
for (const e of
|
|
986
|
+
for (const e of bn) {
|
|
987
987
|
const n = e(i);
|
|
988
988
|
if (n)
|
|
989
989
|
return n;
|
|
@@ -991,13 +991,13 @@ function j(i) {
|
|
|
991
991
|
return null;
|
|
992
992
|
}
|
|
993
993
|
function yt(i) {
|
|
994
|
-
|
|
994
|
+
Vn(i), i.forEach(function(t) {
|
|
995
995
|
i.forEach(function(e) {
|
|
996
|
-
t !== e && Z(t, e,
|
|
996
|
+
t !== e && Z(t, e, ye);
|
|
997
997
|
});
|
|
998
998
|
});
|
|
999
999
|
}
|
|
1000
|
-
function
|
|
1000
|
+
function Dn(i, t, e, n) {
|
|
1001
1001
|
i.forEach(function(s) {
|
|
1002
1002
|
t.forEach(function(r) {
|
|
1003
1003
|
Z(s, r, e), Z(r, s, n);
|
|
@@ -1010,7 +1010,7 @@ function vt(i, t) {
|
|
|
1010
1010
|
i
|
|
1011
1011
|
) : j(t);
|
|
1012
1012
|
}
|
|
1013
|
-
function
|
|
1013
|
+
function qt(i) {
|
|
1014
1014
|
return (
|
|
1015
1015
|
/**
|
|
1016
1016
|
* @param {Array<number>} input Input.
|
|
@@ -1031,25 +1031,25 @@ function Bt(i) {
|
|
|
1031
1031
|
}
|
|
1032
1032
|
);
|
|
1033
1033
|
}
|
|
1034
|
-
function
|
|
1034
|
+
function Wn(i, t, e, n) {
|
|
1035
1035
|
const s = j(i), r = j(t);
|
|
1036
1036
|
Z(
|
|
1037
1037
|
s,
|
|
1038
1038
|
r,
|
|
1039
|
-
|
|
1039
|
+
qt(e)
|
|
1040
1040
|
), Z(
|
|
1041
1041
|
r,
|
|
1042
1042
|
s,
|
|
1043
|
-
|
|
1043
|
+
qt(n)
|
|
1044
1044
|
);
|
|
1045
1045
|
}
|
|
1046
|
-
function
|
|
1046
|
+
function $n(i, t) {
|
|
1047
1047
|
const e = i.getCode(), n = t.getCode();
|
|
1048
1048
|
let s = st(e, n);
|
|
1049
1049
|
if (s)
|
|
1050
1050
|
return s;
|
|
1051
1051
|
let r = null, o = null;
|
|
1052
|
-
for (const l of
|
|
1052
|
+
for (const l of Ln)
|
|
1053
1053
|
r || (r = l(i)), o || (o = l(t));
|
|
1054
1054
|
if (!r && !o)
|
|
1055
1055
|
return null;
|
|
@@ -1081,53 +1081,53 @@ function Rt(i, t) {
|
|
|
1081
1081
|
return n = i(e, n, s, r), t(n, n, s, r);
|
|
1082
1082
|
};
|
|
1083
1083
|
}
|
|
1084
|
-
function
|
|
1084
|
+
function Bt(i, t) {
|
|
1085
1085
|
const e = j(i), n = j(t);
|
|
1086
|
-
return
|
|
1086
|
+
return $n(e, n);
|
|
1087
1087
|
}
|
|
1088
|
-
function
|
|
1088
|
+
function Kt(i, t) {
|
|
1089
1089
|
return i;
|
|
1090
1090
|
}
|
|
1091
1091
|
function S(i, t) {
|
|
1092
|
-
return It && !ot(i, [0, 0]) && i[0] >= -180 && i[0] <= 180 && i[1] >= -90 && i[1] <= 90 && (It = !1,
|
|
1092
|
+
return It && !ot(i, [0, 0]) && i[0] >= -180 && i[0] <= 180 && i[1] >= -90 && i[1] <= 90 && (It = !1, mn(
|
|
1093
1093
|
"Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates."
|
|
1094
1094
|
)), i;
|
|
1095
1095
|
}
|
|
1096
|
-
function
|
|
1096
|
+
function Hn(i, t) {
|
|
1097
1097
|
return i;
|
|
1098
1098
|
}
|
|
1099
1099
|
function tt(i, t) {
|
|
1100
1100
|
return i;
|
|
1101
1101
|
}
|
|
1102
|
-
function
|
|
1102
|
+
function Jt(i, t, e) {
|
|
1103
1103
|
return function(n) {
|
|
1104
1104
|
let s, r;
|
|
1105
1105
|
if (i.canWrapX()) {
|
|
1106
1106
|
const o = i.getExtent(), a = D(o);
|
|
1107
|
-
n = n.slice(0), r =
|
|
1107
|
+
n = n.slice(0), r = xn(n, i, a), r && (n[0] = n[0] - r * a), n[0] = p(n[0], o[0], o[2]), n[1] = p(n[1], o[1], o[3]), s = e(n);
|
|
1108
1108
|
} else
|
|
1109
1109
|
s = e(n);
|
|
1110
1110
|
return r && t.canWrapX() && (s[0] += r * D(t.getExtent())), s;
|
|
1111
1111
|
};
|
|
1112
1112
|
}
|
|
1113
|
-
function
|
|
1114
|
-
yt(
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1113
|
+
function kn() {
|
|
1114
|
+
yt(Ut), yt(Dt), Dn(
|
|
1115
|
+
Dt,
|
|
1116
|
+
Ut,
|
|
1117
|
+
En,
|
|
1118
1118
|
Tn
|
|
1119
1119
|
);
|
|
1120
1120
|
}
|
|
1121
|
-
|
|
1121
|
+
kn();
|
|
1122
1122
|
new Array(6);
|
|
1123
|
-
function
|
|
1123
|
+
function qn() {
|
|
1124
1124
|
return [1, 0, 0, 1, 0, 0];
|
|
1125
1125
|
}
|
|
1126
|
-
function
|
|
1126
|
+
function Bn(i, t, e, n, s, r, o, a) {
|
|
1127
1127
|
const l = Math.sin(r), h = Math.cos(r);
|
|
1128
1128
|
return i[0] = n * h, i[1] = s * l, i[2] = -n * l, i[3] = s * h, i[4] = o * n * h - a * n * l + t, i[5] = o * s * l + a * s * h + e, i;
|
|
1129
1129
|
}
|
|
1130
|
-
function
|
|
1130
|
+
function Kn(i, t, e, n, s, r, o) {
|
|
1131
1131
|
r = r || [], o = o || 2;
|
|
1132
1132
|
let a = 0;
|
|
1133
1133
|
for (let l = t; l < e; l += n) {
|
|
@@ -1138,7 +1138,7 @@ function Jn(i, t, e, n, s, r, o) {
|
|
|
1138
1138
|
}
|
|
1139
1139
|
return r && r.length != a && (r.length = a), r;
|
|
1140
1140
|
}
|
|
1141
|
-
function
|
|
1141
|
+
function Jn(i, t, e, n, s, r, o) {
|
|
1142
1142
|
o = o || [];
|
|
1143
1143
|
const a = Math.cos(s), l = Math.sin(s), h = r[0], u = r[1];
|
|
1144
1144
|
let c = 0;
|
|
@@ -1150,7 +1150,7 @@ function Qn(i, t, e, n, s, r, o) {
|
|
|
1150
1150
|
}
|
|
1151
1151
|
return o && o.length != c && (o.length = c), o;
|
|
1152
1152
|
}
|
|
1153
|
-
function
|
|
1153
|
+
function Qn(i, t, e, n, s, r, o, a) {
|
|
1154
1154
|
a = a || [];
|
|
1155
1155
|
const l = o[0], h = o[1];
|
|
1156
1156
|
let u = 0;
|
|
@@ -1162,7 +1162,7 @@ function ti(i, t, e, n, s, r, o, a) {
|
|
|
1162
1162
|
}
|
|
1163
1163
|
return a && a.length != u && (a.length = u), a;
|
|
1164
1164
|
}
|
|
1165
|
-
function
|
|
1165
|
+
function ti(i, t, e, n, s, r, o) {
|
|
1166
1166
|
o = o || [];
|
|
1167
1167
|
let a = 0;
|
|
1168
1168
|
for (let l = t; l < e; l += n) {
|
|
@@ -1172,10 +1172,10 @@ function ei(i, t, e, n, s, r, o) {
|
|
|
1172
1172
|
}
|
|
1173
1173
|
return o && o.length != a && (o.length = a), o;
|
|
1174
1174
|
}
|
|
1175
|
-
const
|
|
1176
|
-
class
|
|
1175
|
+
const Qt = qn(), ei = [NaN, NaN];
|
|
1176
|
+
class ni extends ce {
|
|
1177
1177
|
constructor() {
|
|
1178
|
-
super(), this.extent_ =
|
|
1178
|
+
super(), this.extent_ = ge(), this.extentRevision_ = -1, this.simplifiedGeometryMaxMinSquaredTolerance = 0, this.simplifiedGeometryRevision = 0, this.simplifyTransformedInternal = $e(
|
|
1179
1179
|
(t, e, n) => {
|
|
1180
1180
|
if (!n)
|
|
1181
1181
|
return this.getSimplifiedGeometry(e);
|
|
@@ -1223,7 +1223,7 @@ class ii extends fe {
|
|
|
1223
1223
|
* @return {boolean} Contains (x, y).
|
|
1224
1224
|
*/
|
|
1225
1225
|
containsXY(t, e) {
|
|
1226
|
-
return this.closestPointXY(t, e,
|
|
1226
|
+
return this.closestPointXY(t, e, ei, Number.MIN_VALUE) === 0;
|
|
1227
1227
|
}
|
|
1228
1228
|
/**
|
|
1229
1229
|
* Return the closest point of the geometry to the passed point as
|
|
@@ -1264,9 +1264,9 @@ class ii extends fe {
|
|
|
1264
1264
|
getExtent(t) {
|
|
1265
1265
|
if (this.extentRevision_ != this.getRevision()) {
|
|
1266
1266
|
const e = this.computeExtent(this.extent_);
|
|
1267
|
-
(isNaN(e[0]) || isNaN(e[1])) &&
|
|
1267
|
+
(isNaN(e[0]) || isNaN(e[1])) && de(e), this.extentRevision_ = this.getRevision();
|
|
1268
1268
|
}
|
|
1269
|
-
return
|
|
1269
|
+
return cn(this.extent_, t);
|
|
1270
1270
|
}
|
|
1271
1271
|
/**
|
|
1272
1272
|
* Rotate the geometry around a given coordinate. This modifies the geometry
|
|
@@ -1373,8 +1373,8 @@ class ii extends fe {
|
|
|
1373
1373
|
transform(t, e) {
|
|
1374
1374
|
const n = j(t), s = n.getUnits() == "tile-pixels" ? function(r, o, a) {
|
|
1375
1375
|
const l = n.getExtent(), h = n.getWorldExtent(), u = k(h) / k(l);
|
|
1376
|
-
|
|
1377
|
-
|
|
1376
|
+
Bn(
|
|
1377
|
+
Qt,
|
|
1378
1378
|
h[0],
|
|
1379
1379
|
h[3],
|
|
1380
1380
|
u,
|
|
@@ -1383,20 +1383,20 @@ class ii extends fe {
|
|
|
1383
1383
|
0,
|
|
1384
1384
|
0
|
|
1385
1385
|
);
|
|
1386
|
-
const c =
|
|
1386
|
+
const c = Kn(
|
|
1387
1387
|
r,
|
|
1388
1388
|
0,
|
|
1389
1389
|
r.length,
|
|
1390
1390
|
a,
|
|
1391
|
-
|
|
1391
|
+
Qt,
|
|
1392
1392
|
o
|
|
1393
|
-
), f =
|
|
1393
|
+
), f = Bt(n, e);
|
|
1394
1394
|
return f ? f(c, c, a) : c;
|
|
1395
|
-
} :
|
|
1395
|
+
} : Bt(n, e);
|
|
1396
1396
|
return this.applyTransform(s), this;
|
|
1397
1397
|
}
|
|
1398
1398
|
}
|
|
1399
|
-
class Pt extends
|
|
1399
|
+
class Pt extends ni {
|
|
1400
1400
|
constructor() {
|
|
1401
1401
|
super(), this.layout = "XY", this.stride = 2, this.flatCoordinates;
|
|
1402
1402
|
}
|
|
@@ -1407,7 +1407,7 @@ class Pt extends ii {
|
|
|
1407
1407
|
* @override
|
|
1408
1408
|
*/
|
|
1409
1409
|
computeExtent(t) {
|
|
1410
|
-
return
|
|
1410
|
+
return en(
|
|
1411
1411
|
this.flatCoordinates,
|
|
1412
1412
|
0,
|
|
1413
1413
|
this.flatCoordinates.length,
|
|
@@ -1485,7 +1485,7 @@ class Pt extends ii {
|
|
|
1485
1485
|
* @param {Array<number>} flatCoordinates Flat coordinates.
|
|
1486
1486
|
*/
|
|
1487
1487
|
setFlatCoordinates(t, e) {
|
|
1488
|
-
this.stride =
|
|
1488
|
+
this.stride = te(t), this.layout = t, this.flatCoordinates = e;
|
|
1489
1489
|
}
|
|
1490
1490
|
/**
|
|
1491
1491
|
* @abstract
|
|
@@ -1504,7 +1504,7 @@ class Pt extends ii {
|
|
|
1504
1504
|
setLayout(t, e, n) {
|
|
1505
1505
|
let s;
|
|
1506
1506
|
if (t)
|
|
1507
|
-
s =
|
|
1507
|
+
s = te(t);
|
|
1508
1508
|
else {
|
|
1509
1509
|
for (let r = 0; r < n; ++r) {
|
|
1510
1510
|
if (e.length === 0) {
|
|
@@ -1514,7 +1514,7 @@ class Pt extends ii {
|
|
|
1514
1514
|
e = /** @type {Array<unknown>} */
|
|
1515
1515
|
e[0];
|
|
1516
1516
|
}
|
|
1517
|
-
s = e.length, t =
|
|
1517
|
+
s = e.length, t = ii(s);
|
|
1518
1518
|
}
|
|
1519
1519
|
this.layout = t, this.stride = s;
|
|
1520
1520
|
}
|
|
@@ -1548,7 +1548,7 @@ class Pt extends ii {
|
|
|
1548
1548
|
const n = this.getFlatCoordinates();
|
|
1549
1549
|
if (n) {
|
|
1550
1550
|
const s = this.getStride();
|
|
1551
|
-
|
|
1551
|
+
Jn(
|
|
1552
1552
|
n,
|
|
1553
1553
|
0,
|
|
1554
1554
|
n.length,
|
|
@@ -1574,7 +1574,7 @@ class Pt extends ii {
|
|
|
1574
1574
|
const s = this.getFlatCoordinates();
|
|
1575
1575
|
if (s) {
|
|
1576
1576
|
const r = this.getStride();
|
|
1577
|
-
|
|
1577
|
+
Qn(
|
|
1578
1578
|
s,
|
|
1579
1579
|
0,
|
|
1580
1580
|
s.length,
|
|
@@ -1598,7 +1598,7 @@ class Pt extends ii {
|
|
|
1598
1598
|
const n = this.getFlatCoordinates();
|
|
1599
1599
|
if (n) {
|
|
1600
1600
|
const s = this.getStride();
|
|
1601
|
-
|
|
1601
|
+
ti(
|
|
1602
1602
|
n,
|
|
1603
1603
|
0,
|
|
1604
1604
|
n.length,
|
|
@@ -1610,17 +1610,17 @@ class Pt extends ii {
|
|
|
1610
1610
|
}
|
|
1611
1611
|
}
|
|
1612
1612
|
}
|
|
1613
|
-
function
|
|
1613
|
+
function ii(i) {
|
|
1614
1614
|
let t;
|
|
1615
1615
|
return i == 2 ? t = "XY" : i == 3 ? t = "XYZ" : i == 4 && (t = "XYZM"), /** @type {import("./Geometry.js").GeometryLayout} */
|
|
1616
1616
|
t;
|
|
1617
1617
|
}
|
|
1618
|
-
function
|
|
1618
|
+
function te(i) {
|
|
1619
1619
|
let t;
|
|
1620
1620
|
return i == "XY" ? t = 2 : i == "XYZ" || i == "XYM" ? t = 3 : i == "XYZM" && (t = 4), /** @type {number} */
|
|
1621
1621
|
t;
|
|
1622
1622
|
}
|
|
1623
|
-
function
|
|
1623
|
+
function we(i, t, e, n) {
|
|
1624
1624
|
let s = 0;
|
|
1625
1625
|
const r = i[e - n], o = i[e - n + 1];
|
|
1626
1626
|
let a = 0, l = 0;
|
|
@@ -1630,15 +1630,15 @@ function Se(i, t, e, n) {
|
|
|
1630
1630
|
}
|
|
1631
1631
|
return s / 2;
|
|
1632
1632
|
}
|
|
1633
|
-
function
|
|
1633
|
+
function si(i, t, e, n) {
|
|
1634
1634
|
let s = 0;
|
|
1635
1635
|
for (let r = 0, o = e.length; r < o; ++r) {
|
|
1636
1636
|
const a = e[r];
|
|
1637
|
-
s +=
|
|
1637
|
+
s += we(i, t, a, n), t = a;
|
|
1638
1638
|
}
|
|
1639
1639
|
return s;
|
|
1640
1640
|
}
|
|
1641
|
-
function
|
|
1641
|
+
function ee(i, t, e, n, s, r, o) {
|
|
1642
1642
|
const a = i[t], l = i[t + 1], h = i[e] - a, u = i[e + 1] - l;
|
|
1643
1643
|
let c;
|
|
1644
1644
|
if (h === 0 && u === 0)
|
|
@@ -1649,7 +1649,7 @@ function ne(i, t, e, n, s, r, o) {
|
|
|
1649
1649
|
c = e;
|
|
1650
1650
|
else if (f > 0) {
|
|
1651
1651
|
for (let g = 0; g < n; ++g)
|
|
1652
|
-
o[g] =
|
|
1652
|
+
o[g] = dn(
|
|
1653
1653
|
i[t + g],
|
|
1654
1654
|
i[e + g],
|
|
1655
1655
|
f
|
|
@@ -1663,7 +1663,7 @@ function ne(i, t, e, n, s, r, o) {
|
|
|
1663
1663
|
o[f] = i[c + f];
|
|
1664
1664
|
o.length = n;
|
|
1665
1665
|
}
|
|
1666
|
-
function
|
|
1666
|
+
function Se(i, t, e, n, s) {
|
|
1667
1667
|
let r = i[t], o = i[t + 1];
|
|
1668
1668
|
for (t += n; t < e; t += n) {
|
|
1669
1669
|
const a = i[t], l = i[t + 1], h = U(r, o, a, l);
|
|
@@ -1671,14 +1671,14 @@ function Ae(i, t, e, n, s) {
|
|
|
1671
1671
|
}
|
|
1672
1672
|
return s;
|
|
1673
1673
|
}
|
|
1674
|
-
function
|
|
1674
|
+
function ri(i, t, e, n, s) {
|
|
1675
1675
|
for (let r = 0, o = e.length; r < o; ++r) {
|
|
1676
1676
|
const a = e[r];
|
|
1677
|
-
s =
|
|
1677
|
+
s = Se(i, t, a, n, s), t = a;
|
|
1678
1678
|
}
|
|
1679
1679
|
return s;
|
|
1680
1680
|
}
|
|
1681
|
-
function
|
|
1681
|
+
function Ae(i, t, e, n, s, r, o, a, l, h, u) {
|
|
1682
1682
|
if (t == e)
|
|
1683
1683
|
return h;
|
|
1684
1684
|
let c, f;
|
|
@@ -1698,7 +1698,7 @@ function ve(i, t, e, n, s, r, o, a, l, h, u) {
|
|
|
1698
1698
|
u = u || [NaN, NaN];
|
|
1699
1699
|
let g = t + n;
|
|
1700
1700
|
for (; g < e; )
|
|
1701
|
-
if (
|
|
1701
|
+
if (ee(
|
|
1702
1702
|
i,
|
|
1703
1703
|
g - n,
|
|
1704
1704
|
g,
|
|
@@ -1715,7 +1715,7 @@ function ve(i, t, e, n, s, r, o, a, l, h, u) {
|
|
|
1715
1715
|
(Math.sqrt(f) - Math.sqrt(h)) / s | 0,
|
|
1716
1716
|
1
|
|
1717
1717
|
);
|
|
1718
|
-
if (
|
|
1718
|
+
if (ee(
|
|
1719
1719
|
i,
|
|
1720
1720
|
e - n,
|
|
1721
1721
|
t,
|
|
@@ -1730,11 +1730,11 @@ function ve(i, t, e, n, s, r, o, a, l, h, u) {
|
|
|
1730
1730
|
}
|
|
1731
1731
|
return h;
|
|
1732
1732
|
}
|
|
1733
|
-
function
|
|
1733
|
+
function oi(i, t, e, n, s, r, o, a, l, h, u) {
|
|
1734
1734
|
u = u || [NaN, NaN];
|
|
1735
1735
|
for (let c = 0, f = e.length; c < f; ++c) {
|
|
1736
1736
|
const g = e[c];
|
|
1737
|
-
h =
|
|
1737
|
+
h = Ae(
|
|
1738
1738
|
i,
|
|
1739
1739
|
t,
|
|
1740
1740
|
g,
|
|
@@ -1750,12 +1750,12 @@ function ai(i, t, e, n, s, r, o, a, l, h, u) {
|
|
|
1750
1750
|
}
|
|
1751
1751
|
return h;
|
|
1752
1752
|
}
|
|
1753
|
-
function
|
|
1753
|
+
function ai(i, t, e, n) {
|
|
1754
1754
|
for (let s = 0, r = e.length; s < r; ++s)
|
|
1755
1755
|
i[t++] = e[s];
|
|
1756
1756
|
return t;
|
|
1757
1757
|
}
|
|
1758
|
-
function
|
|
1758
|
+
function ve(i, t, e, n) {
|
|
1759
1759
|
for (let s = 0, r = e.length; s < r; ++s) {
|
|
1760
1760
|
const o = e[s];
|
|
1761
1761
|
for (let a = 0; a < n; ++a)
|
|
@@ -1763,11 +1763,11 @@ function Pe(i, t, e, n) {
|
|
|
1763
1763
|
}
|
|
1764
1764
|
return t;
|
|
1765
1765
|
}
|
|
1766
|
-
function
|
|
1766
|
+
function li(i, t, e, n, s) {
|
|
1767
1767
|
s = s || [];
|
|
1768
1768
|
let r = 0;
|
|
1769
1769
|
for (let o = 0, a = e.length; o < a; ++o) {
|
|
1770
|
-
const l =
|
|
1770
|
+
const l = ve(
|
|
1771
1771
|
i,
|
|
1772
1772
|
t,
|
|
1773
1773
|
e[o],
|
|
@@ -1777,19 +1777,19 @@ function ui(i, t, e, n, s) {
|
|
|
1777
1777
|
}
|
|
1778
1778
|
return s.length = r, s;
|
|
1779
1779
|
}
|
|
1780
|
-
function
|
|
1780
|
+
function Pe(i, t, e, n, s) {
|
|
1781
1781
|
s = s !== void 0 ? s : [];
|
|
1782
1782
|
let r = 0;
|
|
1783
1783
|
for (let o = t; o < e; o += n)
|
|
1784
1784
|
s[r++] = i.slice(o, o + n);
|
|
1785
1785
|
return s.length = r, s;
|
|
1786
1786
|
}
|
|
1787
|
-
function
|
|
1787
|
+
function ui(i, t, e, n, s) {
|
|
1788
1788
|
s = s !== void 0 ? s : [];
|
|
1789
1789
|
let r = 0;
|
|
1790
1790
|
for (let o = 0, a = e.length; o < a; ++o) {
|
|
1791
1791
|
const l = e[o];
|
|
1792
|
-
s[r++] =
|
|
1792
|
+
s[r++] = Pe(
|
|
1793
1793
|
i,
|
|
1794
1794
|
t,
|
|
1795
1795
|
l,
|
|
@@ -1799,7 +1799,7 @@ function hi(i, t, e, n, s) {
|
|
|
1799
1799
|
}
|
|
1800
1800
|
return s.length = r, s;
|
|
1801
1801
|
}
|
|
1802
|
-
function
|
|
1802
|
+
function hi(i, t, e, n, s, r, o) {
|
|
1803
1803
|
const a = (e - t) / n;
|
|
1804
1804
|
if (a < 3) {
|
|
1805
1805
|
for (; t < e; t += n)
|
|
@@ -1815,7 +1815,7 @@ function ci(i, t, e, n, s, r, o) {
|
|
|
1815
1815
|
let g = 0;
|
|
1816
1816
|
const d = i[f], m = i[f + 1], _ = i[c], x = i[c + 1];
|
|
1817
1817
|
for (let R = f + n; R < c; R += n) {
|
|
1818
|
-
const w = i[R], C = i[R + 1], F =
|
|
1818
|
+
const w = i[R], C = i[R + 1], F = gn(w, C, d, m, _, x);
|
|
1819
1819
|
F > g && (u = R, g = F);
|
|
1820
1820
|
}
|
|
1821
1821
|
g > s && (l[(u - t) / n] = 1, f + n < u && h.push(f, u), u + n < c && h.push(u, c));
|
|
@@ -1827,7 +1827,7 @@ function ci(i, t, e, n, s, r, o) {
|
|
|
1827
1827
|
function G(i, t) {
|
|
1828
1828
|
return t * Math.round(i / t);
|
|
1829
1829
|
}
|
|
1830
|
-
function
|
|
1830
|
+
function ci(i, t, e, n, s, r, o) {
|
|
1831
1831
|
if (t == e)
|
|
1832
1832
|
return o;
|
|
1833
1833
|
let a = G(i[t], s), l = G(i[t + 1], s);
|
|
@@ -1850,10 +1850,10 @@ function fi(i, t, e, n, s, r, o) {
|
|
|
1850
1850
|
}
|
|
1851
1851
|
return r[o++] = h, r[o++] = u, o;
|
|
1852
1852
|
}
|
|
1853
|
-
function
|
|
1853
|
+
function fi(i, t, e, n, s, r, o, a) {
|
|
1854
1854
|
for (let l = 0, h = e.length; l < h; ++l) {
|
|
1855
1855
|
const u = e[l];
|
|
1856
|
-
o =
|
|
1856
|
+
o = ci(
|
|
1857
1857
|
i,
|
|
1858
1858
|
t,
|
|
1859
1859
|
u,
|
|
@@ -1900,15 +1900,15 @@ class q extends Pt {
|
|
|
1900
1900
|
* @override
|
|
1901
1901
|
*/
|
|
1902
1902
|
closestPointXY(t, e, n, s) {
|
|
1903
|
-
return s <
|
|
1904
|
-
|
|
1903
|
+
return s < fe(this.getExtent(), t, e) ? s : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt(
|
|
1904
|
+
Se(
|
|
1905
1905
|
this.flatCoordinates,
|
|
1906
1906
|
0,
|
|
1907
1907
|
this.flatCoordinates.length,
|
|
1908
1908
|
this.stride,
|
|
1909
1909
|
0
|
|
1910
1910
|
)
|
|
1911
|
-
), this.maxDeltaRevision_ = this.getRevision()),
|
|
1911
|
+
), this.maxDeltaRevision_ = this.getRevision()), Ae(
|
|
1912
1912
|
this.flatCoordinates,
|
|
1913
1913
|
0,
|
|
1914
1914
|
this.flatCoordinates.length,
|
|
@@ -1927,7 +1927,7 @@ class q extends Pt {
|
|
|
1927
1927
|
* @api
|
|
1928
1928
|
*/
|
|
1929
1929
|
getArea() {
|
|
1930
|
-
return
|
|
1930
|
+
return we(
|
|
1931
1931
|
this.flatCoordinates,
|
|
1932
1932
|
0,
|
|
1933
1933
|
this.flatCoordinates.length,
|
|
@@ -1941,7 +1941,7 @@ class q extends Pt {
|
|
|
1941
1941
|
* @override
|
|
1942
1942
|
*/
|
|
1943
1943
|
getCoordinates() {
|
|
1944
|
-
return
|
|
1944
|
+
return Pe(
|
|
1945
1945
|
this.flatCoordinates,
|
|
1946
1946
|
0,
|
|
1947
1947
|
this.flatCoordinates.length,
|
|
@@ -1956,7 +1956,7 @@ class q extends Pt {
|
|
|
1956
1956
|
*/
|
|
1957
1957
|
getSimplifiedGeometryInternal(t) {
|
|
1958
1958
|
const e = [];
|
|
1959
|
-
return e.length =
|
|
1959
|
+
return e.length = hi(
|
|
1960
1960
|
this.flatCoordinates,
|
|
1961
1961
|
0,
|
|
1962
1962
|
this.flatCoordinates.length,
|
|
@@ -1993,7 +1993,7 @@ class q extends Pt {
|
|
|
1993
1993
|
* @override
|
|
1994
1994
|
*/
|
|
1995
1995
|
setCoordinates(t, e) {
|
|
1996
|
-
this.setLayout(e, t, 1), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length =
|
|
1996
|
+
this.setLayout(e, t, 1), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = ve(
|
|
1997
1997
|
this.flatCoordinates,
|
|
1998
1998
|
0,
|
|
1999
1999
|
t,
|
|
@@ -2058,7 +2058,7 @@ class Ft extends Pt {
|
|
|
2058
2058
|
* @override
|
|
2059
2059
|
*/
|
|
2060
2060
|
computeExtent(t) {
|
|
2061
|
-
return
|
|
2061
|
+
return tn(this.flatCoordinates, t);
|
|
2062
2062
|
}
|
|
2063
2063
|
/**
|
|
2064
2064
|
* Get the type of this geometry.
|
|
@@ -2077,7 +2077,7 @@ class Ft extends Pt {
|
|
|
2077
2077
|
* @override
|
|
2078
2078
|
*/
|
|
2079
2079
|
intersectsExtent(t) {
|
|
2080
|
-
return
|
|
2080
|
+
return Qe(t, this.flatCoordinates[0], this.flatCoordinates[1]);
|
|
2081
2081
|
}
|
|
2082
2082
|
/**
|
|
2083
2083
|
* @param {!Array<*>} coordinates Coordinates.
|
|
@@ -2086,7 +2086,7 @@ class Ft extends Pt {
|
|
|
2086
2086
|
* @override
|
|
2087
2087
|
*/
|
|
2088
2088
|
setCoordinates(t, e) {
|
|
2089
|
-
this.setLayout(e, t, 0), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length =
|
|
2089
|
+
this.setLayout(e, t, 0), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = ai(
|
|
2090
2090
|
this.flatCoordinates,
|
|
2091
2091
|
0,
|
|
2092
2092
|
t,
|
|
@@ -2094,8 +2094,8 @@ class Ft extends Pt {
|
|
|
2094
2094
|
), this.changed();
|
|
2095
2095
|
}
|
|
2096
2096
|
}
|
|
2097
|
-
function
|
|
2098
|
-
return !
|
|
2097
|
+
function gi(i, t, e, n, s) {
|
|
2098
|
+
return !sn(
|
|
2099
2099
|
s,
|
|
2100
2100
|
/**
|
|
2101
2101
|
* @param {import("../../coordinate.js").Coordinate} coordinate Coordinate.
|
|
@@ -2121,7 +2121,7 @@ function Y(i, t, e, n, s, r) {
|
|
|
2121
2121
|
}
|
|
2122
2122
|
return o !== 0;
|
|
2123
2123
|
}
|
|
2124
|
-
function
|
|
2124
|
+
function Fe(i, t, e, n, s, r) {
|
|
2125
2125
|
if (e.length === 0 || !Y(i, t, e[0], n, s, r))
|
|
2126
2126
|
return !1;
|
|
2127
2127
|
for (let o = 1, a = e.length; o < a; ++o)
|
|
@@ -2129,7 +2129,7 @@ function Xe(i, t, e, n, s, r) {
|
|
|
2129
2129
|
return !1;
|
|
2130
2130
|
return !0;
|
|
2131
2131
|
}
|
|
2132
|
-
function
|
|
2132
|
+
function di(i, t, e, n, s, r, o) {
|
|
2133
2133
|
let a, l, h, u, c, f, g;
|
|
2134
2134
|
const d = s[r + 1], m = [];
|
|
2135
2135
|
for (let R = 0, w = e.length; R < w; ++R) {
|
|
@@ -2138,14 +2138,14 @@ function mi(i, t, e, n, s, r, o) {
|
|
|
2138
2138
|
c = i[a], g = i[a + 1], (d <= f && g <= d || f <= d && d <= g) && (h = (d - f) / (g - f) * (c - u) + u, m.push(h)), u = c, f = g;
|
|
2139
2139
|
}
|
|
2140
2140
|
let _ = NaN, x = -1 / 0;
|
|
2141
|
-
for (m.sort(
|
|
2141
|
+
for (m.sort(le), u = m[0], a = 1, l = m.length; a < l; ++a) {
|
|
2142
2142
|
c = m[a];
|
|
2143
2143
|
const R = Math.abs(c - u);
|
|
2144
|
-
R > x && (h = (u + c) / 2,
|
|
2144
|
+
R > x && (h = (u + c) / 2, Fe(i, t, e, n, h, d) && (_ = h, x = R)), u = c;
|
|
2145
2145
|
}
|
|
2146
2146
|
return isNaN(_) && (_ = s[r]), [_, d, x];
|
|
2147
2147
|
}
|
|
2148
|
-
function
|
|
2148
|
+
function mi(i, t, e, n, s) {
|
|
2149
2149
|
let r;
|
|
2150
2150
|
for (t += n; t < e; t += n)
|
|
2151
2151
|
if (r = s(
|
|
@@ -2155,8 +2155,8 @@ function _i(i, t, e, n, s) {
|
|
|
2155
2155
|
return r;
|
|
2156
2156
|
return !1;
|
|
2157
2157
|
}
|
|
2158
|
-
function
|
|
2159
|
-
return r = r ??
|
|
2158
|
+
function Xe(i, t, e, n, s, r) {
|
|
2159
|
+
return r = r ?? me(ge(), i, t, e, n), hn(s, r) ? r[0] >= s[0] && r[2] <= s[2] || r[1] >= s[1] && r[3] <= s[3] ? !0 : mi(
|
|
2160
2160
|
i,
|
|
2161
2161
|
t,
|
|
2162
2162
|
e,
|
|
@@ -2168,12 +2168,12 @@ function Ne(i, t, e, n, s, r) {
|
|
|
2168
2168
|
* `false` otherwise.
|
|
2169
2169
|
*/
|
|
2170
2170
|
function(o, a) {
|
|
2171
|
-
return
|
|
2171
|
+
return fn(s, o, a);
|
|
2172
2172
|
}
|
|
2173
2173
|
) : !1;
|
|
2174
2174
|
}
|
|
2175
|
-
function
|
|
2176
|
-
return !!(
|
|
2175
|
+
function Ne(i, t, e, n, s) {
|
|
2176
|
+
return !!(Xe(i, t, e, n, s) || Y(
|
|
2177
2177
|
i,
|
|
2178
2178
|
t,
|
|
2179
2179
|
e,
|
|
@@ -2203,19 +2203,19 @@ function Ye(i, t, e, n, s) {
|
|
|
2203
2203
|
s[3]
|
|
2204
2204
|
));
|
|
2205
2205
|
}
|
|
2206
|
-
function
|
|
2207
|
-
if (!
|
|
2206
|
+
function _i(i, t, e, n, s) {
|
|
2207
|
+
if (!Ne(i, t, e[0], n, s))
|
|
2208
2208
|
return !1;
|
|
2209
2209
|
if (e.length === 1)
|
|
2210
2210
|
return !0;
|
|
2211
2211
|
for (let r = 1, o = e.length; r < o; ++r)
|
|
2212
|
-
if (
|
|
2212
|
+
if (gi(
|
|
2213
2213
|
i,
|
|
2214
2214
|
e[r - 1],
|
|
2215
2215
|
e[r],
|
|
2216
2216
|
n,
|
|
2217
2217
|
s
|
|
2218
|
-
) && !
|
|
2218
|
+
) && !Xe(
|
|
2219
2219
|
i,
|
|
2220
2220
|
e[r - 1],
|
|
2221
2221
|
e[r],
|
|
@@ -2225,7 +2225,7 @@ function Ri(i, t, e, n, s) {
|
|
|
2225
2225
|
return !1;
|
|
2226
2226
|
return !0;
|
|
2227
2227
|
}
|
|
2228
|
-
function
|
|
2228
|
+
function Ri(i, t, e, n) {
|
|
2229
2229
|
for (; t < e - n; ) {
|
|
2230
2230
|
for (let s = 0; s < n; ++s) {
|
|
2231
2231
|
const r = i[t + s];
|
|
@@ -2234,7 +2234,7 @@ function xi(i, t, e, n) {
|
|
|
2234
2234
|
t += n, e -= n;
|
|
2235
2235
|
}
|
|
2236
2236
|
}
|
|
2237
|
-
function
|
|
2237
|
+
function Ye(i, t, e, n) {
|
|
2238
2238
|
let s = 0, r = i[e - n], o = i[e - n + 1];
|
|
2239
2239
|
for (; t < e; t += n) {
|
|
2240
2240
|
const a = i[t], l = i[t + 1];
|
|
@@ -2242,10 +2242,10 @@ function Ze(i, t, e, n) {
|
|
|
2242
2242
|
}
|
|
2243
2243
|
return s === 0 ? void 0 : s > 0;
|
|
2244
2244
|
}
|
|
2245
|
-
function
|
|
2245
|
+
function xi(i, t, e, n, s) {
|
|
2246
2246
|
s = s !== void 0 ? s : !1;
|
|
2247
2247
|
for (let r = 0, o = e.length; r < o; ++r) {
|
|
2248
|
-
const a = e[r], l =
|
|
2248
|
+
const a = e[r], l = Ye(
|
|
2249
2249
|
i,
|
|
2250
2250
|
t,
|
|
2251
2251
|
a,
|
|
@@ -2260,16 +2260,16 @@ function Mi(i, t, e, n, s) {
|
|
|
2260
2260
|
}
|
|
2261
2261
|
return !0;
|
|
2262
2262
|
}
|
|
2263
|
-
function
|
|
2263
|
+
function ne(i, t, e, n, s) {
|
|
2264
2264
|
s = s !== void 0 ? s : !1;
|
|
2265
2265
|
for (let r = 0, o = e.length; r < o; ++r) {
|
|
2266
|
-
const a = e[r], l =
|
|
2266
|
+
const a = e[r], l = Ye(
|
|
2267
2267
|
i,
|
|
2268
2268
|
t,
|
|
2269
2269
|
a,
|
|
2270
2270
|
n
|
|
2271
2271
|
);
|
|
2272
|
-
(r === 0 ? s && l || !s && !l : s && !l || !s && l) &&
|
|
2272
|
+
(r === 0 ? s && l || !s && !l : s && !l || !s && l) && Ri(i, t, a, n), t = a;
|
|
2273
2273
|
}
|
|
2274
2274
|
return t;
|
|
2275
2275
|
}
|
|
@@ -2302,7 +2302,7 @@ class ht extends Pt {
|
|
|
2302
2302
|
* @api
|
|
2303
2303
|
*/
|
|
2304
2304
|
appendLinearRing(t) {
|
|
2305
|
-
this.flatCoordinates ?
|
|
2305
|
+
this.flatCoordinates ? Ve(this.flatCoordinates, t.getFlatCoordinates()) : this.flatCoordinates = t.getFlatCoordinates().slice(), this.ends_.push(this.flatCoordinates.length), this.changed();
|
|
2306
2306
|
}
|
|
2307
2307
|
/**
|
|
2308
2308
|
* Make a complete copy of the geometry.
|
|
@@ -2327,15 +2327,15 @@ class ht extends Pt {
|
|
|
2327
2327
|
* @override
|
|
2328
2328
|
*/
|
|
2329
2329
|
closestPointXY(t, e, n, s) {
|
|
2330
|
-
return s <
|
|
2331
|
-
|
|
2330
|
+
return s < fe(this.getExtent(), t, e) ? s : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt(
|
|
2331
|
+
ri(
|
|
2332
2332
|
this.flatCoordinates,
|
|
2333
2333
|
0,
|
|
2334
2334
|
this.ends_,
|
|
2335
2335
|
this.stride,
|
|
2336
2336
|
0
|
|
2337
2337
|
)
|
|
2338
|
-
), this.maxDeltaRevision_ = this.getRevision()),
|
|
2338
|
+
), this.maxDeltaRevision_ = this.getRevision()), oi(
|
|
2339
2339
|
this.flatCoordinates,
|
|
2340
2340
|
0,
|
|
2341
2341
|
this.ends_,
|
|
@@ -2355,7 +2355,7 @@ class ht extends Pt {
|
|
|
2355
2355
|
* @override
|
|
2356
2356
|
*/
|
|
2357
2357
|
containsXY(t, e) {
|
|
2358
|
-
return
|
|
2358
|
+
return Fe(
|
|
2359
2359
|
this.getOrientedFlatCoordinates(),
|
|
2360
2360
|
0,
|
|
2361
2361
|
this.ends_,
|
|
@@ -2370,7 +2370,7 @@ class ht extends Pt {
|
|
|
2370
2370
|
* @api
|
|
2371
2371
|
*/
|
|
2372
2372
|
getArea() {
|
|
2373
|
-
return
|
|
2373
|
+
return si(
|
|
2374
2374
|
this.getOrientedFlatCoordinates(),
|
|
2375
2375
|
0,
|
|
2376
2376
|
this.ends_,
|
|
@@ -2393,7 +2393,7 @@ class ht extends Pt {
|
|
|
2393
2393
|
*/
|
|
2394
2394
|
getCoordinates(t) {
|
|
2395
2395
|
let e;
|
|
2396
|
-
return t !== void 0 ? (e = this.getOrientedFlatCoordinates().slice(),
|
|
2396
|
+
return t !== void 0 ? (e = this.getOrientedFlatCoordinates().slice(), ne(e, 0, this.ends_, this.stride, t)) : e = this.flatCoordinates, ui(e, 0, this.ends_, this.stride);
|
|
2397
2397
|
}
|
|
2398
2398
|
/**
|
|
2399
2399
|
* @return {Array<number>} Ends.
|
|
@@ -2407,7 +2407,7 @@ class ht extends Pt {
|
|
|
2407
2407
|
getFlatInteriorPoint() {
|
|
2408
2408
|
if (this.flatInteriorPointRevision_ != this.getRevision()) {
|
|
2409
2409
|
const t = rt(this.getExtent());
|
|
2410
|
-
this.flatInteriorPoint_ =
|
|
2410
|
+
this.flatInteriorPoint_ = di(
|
|
2411
2411
|
this.getOrientedFlatCoordinates(),
|
|
2412
2412
|
0,
|
|
2413
2413
|
this.ends_,
|
|
@@ -2482,7 +2482,7 @@ class ht extends Pt {
|
|
|
2482
2482
|
getOrientedFlatCoordinates() {
|
|
2483
2483
|
if (this.orientedRevision_ != this.getRevision()) {
|
|
2484
2484
|
const t = this.flatCoordinates;
|
|
2485
|
-
|
|
2485
|
+
xi(t, 0, this.ends_, this.stride) ? this.orientedFlatCoordinates_ = t : (this.orientedFlatCoordinates_ = t.slice(), this.orientedFlatCoordinates_.length = ne(
|
|
2486
2486
|
this.orientedFlatCoordinates_,
|
|
2487
2487
|
0,
|
|
2488
2488
|
this.ends_,
|
|
@@ -2502,7 +2502,7 @@ class ht extends Pt {
|
|
|
2502
2502
|
*/
|
|
2503
2503
|
getSimplifiedGeometryInternal(t) {
|
|
2504
2504
|
const e = [], n = [];
|
|
2505
|
-
return e.length =
|
|
2505
|
+
return e.length = fi(
|
|
2506
2506
|
this.flatCoordinates,
|
|
2507
2507
|
0,
|
|
2508
2508
|
this.ends_,
|
|
@@ -2530,7 +2530,7 @@ class ht extends Pt {
|
|
|
2530
2530
|
* @override
|
|
2531
2531
|
*/
|
|
2532
2532
|
intersectsExtent(t) {
|
|
2533
|
-
return
|
|
2533
|
+
return _i(
|
|
2534
2534
|
this.getOrientedFlatCoordinates(),
|
|
2535
2535
|
0,
|
|
2536
2536
|
this.ends_,
|
|
@@ -2547,7 +2547,7 @@ class ht extends Pt {
|
|
|
2547
2547
|
*/
|
|
2548
2548
|
setCoordinates(t, e) {
|
|
2549
2549
|
this.setLayout(e, t, 2), this.flatCoordinates || (this.flatCoordinates = []);
|
|
2550
|
-
const n =
|
|
2550
|
+
const n = li(
|
|
2551
2551
|
this.flatCoordinates,
|
|
2552
2552
|
0,
|
|
2553
2553
|
t,
|
|
@@ -2557,8 +2557,8 @@ class ht extends Pt {
|
|
|
2557
2557
|
this.flatCoordinates.length = n.length === 0 ? 0 : n[n.length - 1], this.changed();
|
|
2558
2558
|
}
|
|
2559
2559
|
}
|
|
2560
|
-
function
|
|
2561
|
-
if (
|
|
2560
|
+
function ie(i) {
|
|
2561
|
+
if (Re(i))
|
|
2562
2562
|
throw new Error("Cannot create polygon from empty extent");
|
|
2563
2563
|
const t = i[0], e = i[1], n = i[2], s = i[3], r = [
|
|
2564
2564
|
t,
|
|
@@ -2585,7 +2585,7 @@ const A = {
|
|
|
2585
2585
|
RESOLUTION: "resolution",
|
|
2586
2586
|
ROTATION: "rotation"
|
|
2587
2587
|
};
|
|
2588
|
-
function
|
|
2588
|
+
function se(i, t, e) {
|
|
2589
2589
|
return (
|
|
2590
2590
|
/**
|
|
2591
2591
|
* @param {import("./coordinate.js").Coordinate|undefined} center Center.
|
|
@@ -2603,7 +2603,7 @@ function re(i, t, e) {
|
|
|
2603
2603
|
const l = t ? 0 : r[0] * s, h = t ? 0 : r[1] * s, u = a ? a[0] : 0, c = a ? a[1] : 0;
|
|
2604
2604
|
let f = i[0] + l / 2 + u, g = i[2] - l / 2 + u, d = i[1] + h / 2 + c, m = i[3] - h / 2 + c;
|
|
2605
2605
|
f > g && (f = (g + f) / 2, g = f), d > m && (d = (m + d) / 2, m = d);
|
|
2606
|
-
let _ =
|
|
2606
|
+
let _ = p(n[0], f, g), x = p(n[1], d, m);
|
|
2607
2607
|
if (o && e && s) {
|
|
2608
2608
|
const R = 30 * s;
|
|
2609
2609
|
_ += -R * Math.log(1 + Math.max(0, f - n[0]) / R) + R * Math.log(1 + Math.max(0, n[0] - g) / R), x += -R * Math.log(1 + Math.max(0, d - n[1]) / R) + R * Math.log(1 + Math.max(0, n[1] - m) / R);
|
|
@@ -2612,14 +2612,14 @@ function re(i, t, e) {
|
|
|
2612
2612
|
}
|
|
2613
2613
|
);
|
|
2614
2614
|
}
|
|
2615
|
-
function
|
|
2615
|
+
function Mi(i) {
|
|
2616
2616
|
return i;
|
|
2617
2617
|
}
|
|
2618
|
-
function
|
|
2618
|
+
function Ci(i) {
|
|
2619
2619
|
return Math.pow(i, 3);
|
|
2620
2620
|
}
|
|
2621
|
-
function
|
|
2622
|
-
return 1 -
|
|
2621
|
+
function Ei(i) {
|
|
2622
|
+
return 1 - Ci(1 - i);
|
|
2623
2623
|
}
|
|
2624
2624
|
function Ti(i) {
|
|
2625
2625
|
return 3 * i * i - 2 * i * i * i;
|
|
@@ -2631,9 +2631,9 @@ function Xt(i, t, e, n) {
|
|
|
2631
2631
|
function Nt(i, t, e) {
|
|
2632
2632
|
let n = Math.min(i, t);
|
|
2633
2633
|
const s = 50;
|
|
2634
|
-
return n *= Math.log(1 + s * Math.max(0, i / t - 1)) / s + 1, e && (n = Math.max(n, e), n /= Math.log(1 + s * Math.max(0, e / i - 1)) / s + 1),
|
|
2634
|
+
return n *= Math.log(1 + s * Math.max(0, i / t - 1)) / s + 1, e && (n = Math.max(n, e), n /= Math.log(1 + s * Math.max(0, e / i - 1)) / s + 1), p(n, e / 2, t * 2);
|
|
2635
2635
|
}
|
|
2636
|
-
function
|
|
2636
|
+
function pi(i, t, e, n) {
|
|
2637
2637
|
return t = t !== void 0 ? t : !0, /**
|
|
2638
2638
|
* @param {number|undefined} resolution Resolution.
|
|
2639
2639
|
* @param {number} direction Direction.
|
|
@@ -2654,13 +2654,13 @@ function Ii(i, t, e, n) {
|
|
|
2654
2654
|
s,
|
|
2655
2655
|
u,
|
|
2656
2656
|
h
|
|
2657
|
-
) :
|
|
2657
|
+
) : p(s, h, u);
|
|
2658
2658
|
const c = Math.min(u, s), f = Math.floor(wt(i, c, r));
|
|
2659
2659
|
return i[f] > u && f < i.length - 1 ? i[f + 1] : i[f];
|
|
2660
2660
|
}
|
|
2661
2661
|
};
|
|
2662
2662
|
}
|
|
2663
|
-
function
|
|
2663
|
+
function Ii(i, t, e, n, s, r) {
|
|
2664
2664
|
return n = n !== void 0 ? n : !0, e = e !== void 0 ? e : 0, /**
|
|
2665
2665
|
* @param {number|undefined} resolution Resolution.
|
|
2666
2666
|
* @param {number} direction Direction.
|
|
@@ -2681,17 +2681,17 @@ function yi(i, t, e, n, s, r) {
|
|
|
2681
2681
|
o,
|
|
2682
2682
|
u,
|
|
2683
2683
|
e
|
|
2684
|
-
) :
|
|
2684
|
+
) : p(o, e, u);
|
|
2685
2685
|
const c = 1e-9, f = Math.ceil(
|
|
2686
2686
|
Math.log(t / u) / Math.log(i) - c
|
|
2687
2687
|
), g = -a * (0.5 - c) + 0.5, d = Math.min(u, o), m = Math.floor(
|
|
2688
2688
|
Math.log(t / d) / Math.log(i) + g
|
|
2689
2689
|
), _ = Math.max(f, m), x = t / Math.pow(i, _);
|
|
2690
|
-
return
|
|
2690
|
+
return p(x, e, u);
|
|
2691
2691
|
}
|
|
2692
2692
|
};
|
|
2693
2693
|
}
|
|
2694
|
-
function
|
|
2694
|
+
function re(i, t, e, n, s) {
|
|
2695
2695
|
return e = e !== void 0 ? e : !0, /**
|
|
2696
2696
|
* @param {number|undefined} resolution Resolution.
|
|
2697
2697
|
* @param {number} direction Direction.
|
|
@@ -2707,7 +2707,7 @@ function oe(i, t, e, n, s) {
|
|
|
2707
2707
|
a,
|
|
2708
2708
|
s
|
|
2709
2709
|
) : i;
|
|
2710
|
-
return !e || !l ?
|
|
2710
|
+
return !e || !l ? p(r, t, h) : Nt(
|
|
2711
2711
|
r,
|
|
2712
2712
|
h,
|
|
2713
2713
|
t
|
|
@@ -2715,15 +2715,15 @@ function oe(i, t, e, n, s) {
|
|
|
2715
2715
|
}
|
|
2716
2716
|
};
|
|
2717
2717
|
}
|
|
2718
|
-
function
|
|
2718
|
+
function yi(i) {
|
|
2719
2719
|
if (i !== void 0)
|
|
2720
2720
|
return 0;
|
|
2721
2721
|
}
|
|
2722
|
-
function
|
|
2722
|
+
function oe(i) {
|
|
2723
2723
|
if (i !== void 0)
|
|
2724
2724
|
return i;
|
|
2725
2725
|
}
|
|
2726
|
-
function
|
|
2726
|
+
function wi(i) {
|
|
2727
2727
|
const t = 2 * Math.PI / i;
|
|
2728
2728
|
return (
|
|
2729
2729
|
/**
|
|
@@ -2739,7 +2739,7 @@ function Si(i) {
|
|
|
2739
2739
|
}
|
|
2740
2740
|
);
|
|
2741
2741
|
}
|
|
2742
|
-
function
|
|
2742
|
+
function Si(i) {
|
|
2743
2743
|
const t = H(5);
|
|
2744
2744
|
return (
|
|
2745
2745
|
/**
|
|
@@ -2752,13 +2752,13 @@ function Ai(i) {
|
|
|
2752
2752
|
}
|
|
2753
2753
|
);
|
|
2754
2754
|
}
|
|
2755
|
-
const
|
|
2756
|
-
class
|
|
2755
|
+
const Ze = 256, xt = 0;
|
|
2756
|
+
class Ai extends ce {
|
|
2757
2757
|
/**
|
|
2758
2758
|
* @param {ViewOptions} [options] View options.
|
|
2759
2759
|
*/
|
|
2760
2760
|
constructor(t) {
|
|
2761
|
-
super(), this.on, this.once, this.un, t = Object.assign({}, t), this.hints_ = [0, 0], this.animations_ = [], this.updateAnimationKey_, this.projection_ = vt(t.projection, "EPSG:3857"), this.viewportSize_ = [100, 100], this.targetCenter_ = null, this.targetResolution_, this.targetRotation_, this.nextCenter_ = null, this.nextResolution_, this.nextRotation_, this.cancelAnchor_ = void 0, t.projection &&
|
|
2761
|
+
super(), this.on, this.once, this.un, t = Object.assign({}, t), this.hints_ = [0, 0], this.animations_ = [], this.updateAnimationKey_, this.projection_ = vt(t.projection, "EPSG:3857"), this.viewportSize_ = [100, 100], this.targetCenter_ = null, this.targetResolution_, this.targetRotation_, this.nextCenter_ = null, this.nextResolution_, this.nextRotation_, this.cancelAnchor_ = void 0, t.projection && Un(), t.center && (t.center = S(t.center, this.projection_)), t.extent && (t.extent = tt(t.extent, this.projection_)), this.applyOptions_(t);
|
|
2762
2762
|
}
|
|
2763
2763
|
/**
|
|
2764
2764
|
* Set up the view with the given options.
|
|
@@ -2769,9 +2769,9 @@ class vi extends fe {
|
|
|
2769
2769
|
for (const a in I)
|
|
2770
2770
|
delete e[a];
|
|
2771
2771
|
this.setProperties(e, !0);
|
|
2772
|
-
const n =
|
|
2772
|
+
const n = Pi(t);
|
|
2773
2773
|
this.maxResolution_ = n.maxResolution, this.minResolution_ = n.minResolution, this.zoomFactor_ = n.zoomFactor, this.resolutions_ = t.resolutions, this.padding_ = t.padding, this.minZoom_ = n.minZoom;
|
|
2774
|
-
const s =
|
|
2774
|
+
const s = vi(t), r = n.constraint, o = Fi(t);
|
|
2775
2775
|
this.constraints_ = {
|
|
2776
2776
|
center: s,
|
|
2777
2777
|
resolution: r,
|
|
@@ -2894,10 +2894,10 @@ class vi extends fe {
|
|
|
2894
2894
|
};
|
|
2895
2895
|
if (u.center && (c.sourceCenter = o, c.targetCenter = u.center.slice(), o = c.targetCenter), u.zoom !== void 0 ? (c.sourceResolution = a, c.targetResolution = this.getResolutionForZoom(u.zoom), a = c.targetResolution) : u.resolution && (c.sourceResolution = a, c.targetResolution = u.resolution, a = c.targetResolution), u.rotation !== void 0) {
|
|
2896
2896
|
c.sourceRotation = l;
|
|
2897
|
-
const f =
|
|
2897
|
+
const f = bt(u.rotation - l + Math.PI, 2 * Math.PI) - Math.PI;
|
|
2898
2898
|
c.targetRotation = l + f, l = c.targetRotation;
|
|
2899
2899
|
}
|
|
2900
|
-
|
|
2900
|
+
Xi(c) ? c.complete = !0 : r += c.duration, h.push(c);
|
|
2901
2901
|
}
|
|
2902
2902
|
this.animations_.push(h), this.setHint(A.ANIMATING, 1), this.updateAnimations_();
|
|
2903
2903
|
}
|
|
@@ -2979,7 +2979,7 @@ class vi extends fe {
|
|
|
2979
2979
|
this.nextResolution_ = l.targetResolution, this.targetResolution_ = f, this.applyTargetState_(!0);
|
|
2980
2980
|
}
|
|
2981
2981
|
if (l.sourceRotation !== void 0 && l.targetRotation !== void 0) {
|
|
2982
|
-
const f = c === 1 ?
|
|
2982
|
+
const f = c === 1 ? bt(l.targetRotation + Math.PI, 2 * Math.PI) - Math.PI : l.sourceRotation + c * (l.targetRotation - l.sourceRotation);
|
|
2983
2983
|
if (l.anchor) {
|
|
2984
2984
|
const g = this.constraints_.rotation(
|
|
2985
2985
|
f,
|
|
@@ -3013,7 +3013,7 @@ class vi extends fe {
|
|
|
3013
3013
|
calculateCenterRotate(t, e) {
|
|
3014
3014
|
let n;
|
|
3015
3015
|
const s = this.getCenterInternal();
|
|
3016
|
-
return s !== void 0 && (n = [s[0] - e[0], s[1] - e[1]],
|
|
3016
|
+
return s !== void 0 && (n = [s[0] - e[0], s[1] - e[1]], Rn(n, t - this.getRotation()), _n(n, e)), n;
|
|
3017
3017
|
}
|
|
3018
3018
|
/**
|
|
3019
3019
|
* @param {number} resolution Target resolution.
|
|
@@ -3064,7 +3064,7 @@ class vi extends fe {
|
|
|
3064
3064
|
*/
|
|
3065
3065
|
getCenter() {
|
|
3066
3066
|
const t = this.getCenterInternal();
|
|
3067
|
-
return t &&
|
|
3067
|
+
return t && Kt(t, this.getProjection());
|
|
3068
3068
|
}
|
|
3069
3069
|
/**
|
|
3070
3070
|
* Get the view center without transforming to user projection.
|
|
@@ -3107,7 +3107,7 @@ class vi extends fe {
|
|
|
3107
3107
|
*/
|
|
3108
3108
|
calculateExtent(t) {
|
|
3109
3109
|
const e = this.calculateExtentInternal(t);
|
|
3110
|
-
return
|
|
3110
|
+
return Hn(e, this.getProjection());
|
|
3111
3111
|
}
|
|
3112
3112
|
/**
|
|
3113
3113
|
* @param {import("./size.js").Size} [size] Box pixel size. If not provided,
|
|
@@ -3130,7 +3130,7 @@ class vi extends fe {
|
|
|
3130
3130
|
/** @type {!number} */
|
|
3131
3131
|
this.getRotation()
|
|
3132
3132
|
);
|
|
3133
|
-
return y(s !== void 0, "The view rotation is not defined"),
|
|
3133
|
+
return y(s !== void 0, "The view rotation is not defined"), an(e, n, s, t);
|
|
3134
3134
|
}
|
|
3135
3135
|
/**
|
|
3136
3136
|
* Get the maximum resolution of the view.
|
|
@@ -3389,12 +3389,12 @@ class vi extends fe {
|
|
|
3389
3389
|
if (this.resolutions_?.length) {
|
|
3390
3390
|
if (this.resolutions_.length === 1)
|
|
3391
3391
|
return this.resolutions_[0];
|
|
3392
|
-
const e =
|
|
3392
|
+
const e = p(
|
|
3393
3393
|
Math.floor(t),
|
|
3394
3394
|
0,
|
|
3395
3395
|
this.resolutions_.length - 2
|
|
3396
3396
|
), n = this.resolutions_[e] / this.resolutions_[e + 1];
|
|
3397
|
-
return this.resolutions_[e] / Math.pow(n,
|
|
3397
|
+
return this.resolutions_[e] / Math.pow(n, p(t - e, 0, 1));
|
|
3398
3398
|
}
|
|
3399
3399
|
return this.maxResolution_ / Math.pow(this.zoomFactor_, t - this.minZoom_);
|
|
3400
3400
|
}
|
|
@@ -3416,17 +3416,17 @@ class vi extends fe {
|
|
|
3416
3416
|
"Invalid extent or geometry provided as `geometry`"
|
|
3417
3417
|
), Array.isArray(t)) {
|
|
3418
3418
|
y(
|
|
3419
|
-
!
|
|
3419
|
+
!Re(t),
|
|
3420
3420
|
"Cannot fit empty extent provided as `geometry`"
|
|
3421
3421
|
);
|
|
3422
3422
|
const s = tt(t, this.getProjection());
|
|
3423
|
-
n =
|
|
3423
|
+
n = ie(s);
|
|
3424
3424
|
} else if (t.getType() === "Circle") {
|
|
3425
3425
|
const s = tt(
|
|
3426
3426
|
t.getExtent(),
|
|
3427
3427
|
this.getProjection()
|
|
3428
3428
|
);
|
|
3429
|
-
n =
|
|
3429
|
+
n = ie(s), n.rotate(this.getRotation(), rt(s));
|
|
3430
3430
|
} else
|
|
3431
3431
|
n = t;
|
|
3432
3432
|
this.fitInternal(n, e);
|
|
@@ -3543,7 +3543,7 @@ class vi extends fe {
|
|
|
3543
3543
|
* @api
|
|
3544
3544
|
*/
|
|
3545
3545
|
adjustCenter(t) {
|
|
3546
|
-
const e =
|
|
3546
|
+
const e = Kt(this.targetCenter_, this.getProjection());
|
|
3547
3547
|
this.setCenter([
|
|
3548
3548
|
e[0] + t[0],
|
|
3549
3549
|
e[1] + t[1]
|
|
@@ -3735,7 +3735,7 @@ class vi extends fe {
|
|
|
3735
3735
|
center: l,
|
|
3736
3736
|
resolution: a,
|
|
3737
3737
|
duration: t,
|
|
3738
|
-
easing:
|
|
3738
|
+
easing: Ei,
|
|
3739
3739
|
anchor: n
|
|
3740
3740
|
}));
|
|
3741
3741
|
}
|
|
@@ -3819,30 +3819,30 @@ function nt(i, t) {
|
|
|
3819
3819
|
i(t);
|
|
3820
3820
|
}, 0);
|
|
3821
3821
|
}
|
|
3822
|
-
function
|
|
3822
|
+
function vi(i) {
|
|
3823
3823
|
if (i.extent !== void 0) {
|
|
3824
3824
|
const e = i.smoothExtentConstraint !== void 0 ? i.smoothExtentConstraint : !0;
|
|
3825
|
-
return
|
|
3825
|
+
return se(i.extent, i.constrainOnlyCenter, e);
|
|
3826
3826
|
}
|
|
3827
3827
|
const t = vt(i.projection, "EPSG:3857");
|
|
3828
3828
|
if (i.multiWorld !== !0 && t.isGlobal()) {
|
|
3829
3829
|
const e = t.getExtent().slice();
|
|
3830
|
-
return e[0] = -1 / 0, e[2] = 1 / 0,
|
|
3830
|
+
return e[0] = -1 / 0, e[2] = 1 / 0, se(e, !1, !1);
|
|
3831
3831
|
}
|
|
3832
|
-
return
|
|
3832
|
+
return Mi;
|
|
3833
3833
|
}
|
|
3834
|
-
function
|
|
3834
|
+
function Pi(i) {
|
|
3835
3835
|
let t, e, n, o = i.minZoom !== void 0 ? i.minZoom : xt, a = i.maxZoom !== void 0 ? i.maxZoom : 28;
|
|
3836
3836
|
const l = i.zoomFactor !== void 0 ? i.zoomFactor : 2, h = i.multiWorld !== void 0 ? i.multiWorld : !1, u = i.smoothResolutionConstraint !== void 0 ? i.smoothResolutionConstraint : !0, c = i.showFullExtent !== void 0 ? i.showFullExtent : !1, f = vt(i.projection, "EPSG:3857"), g = f.getExtent();
|
|
3837
3837
|
let d = i.constrainOnlyCenter, m = i.extent;
|
|
3838
3838
|
if (!h && !m && f.isGlobal() && (d = !1, m = g), i.resolutions !== void 0) {
|
|
3839
3839
|
const _ = i.resolutions;
|
|
3840
|
-
e = _[o], n = _[a] !== void 0 ? _[a] : _[_.length - 1], i.constrainResolution ? t =
|
|
3840
|
+
e = _[o], n = _[a] !== void 0 ? _[a] : _[_.length - 1], i.constrainResolution ? t = pi(
|
|
3841
3841
|
_,
|
|
3842
3842
|
u,
|
|
3843
3843
|
!d && m,
|
|
3844
3844
|
c
|
|
3845
|
-
) : t =
|
|
3845
|
+
) : t = re(
|
|
3846
3846
|
e,
|
|
3847
3847
|
n,
|
|
3848
3848
|
u,
|
|
@@ -3852,18 +3852,18 @@ function Fi(i) {
|
|
|
3852
3852
|
} else {
|
|
3853
3853
|
const x = (g ? Math.max(D(g), k(g)) : (
|
|
3854
3854
|
// use an extent that can fit the whole world if need be
|
|
3855
|
-
360 *
|
|
3856
|
-
)) /
|
|
3855
|
+
360 * Me.degrees / f.getMetersPerUnit()
|
|
3856
|
+
)) / Ze / Math.pow(2, xt), R = x / Math.pow(2, 28 - xt);
|
|
3857
3857
|
e = i.maxResolution, e !== void 0 ? o = 0 : e = x / Math.pow(l, o), n = i.minResolution, n === void 0 && (i.maxZoom !== void 0 ? i.maxResolution !== void 0 ? n = e / Math.pow(l, a) : n = x / Math.pow(l, a) : n = R), a = o + Math.floor(
|
|
3858
3858
|
Math.log(e / n) / Math.log(l)
|
|
3859
|
-
), n = e / Math.pow(l, a - o), i.constrainResolution ? t =
|
|
3859
|
+
), n = e / Math.pow(l, a - o), i.constrainResolution ? t = Ii(
|
|
3860
3860
|
l,
|
|
3861
3861
|
e,
|
|
3862
3862
|
n,
|
|
3863
3863
|
u,
|
|
3864
3864
|
!d && m,
|
|
3865
3865
|
c
|
|
3866
|
-
) : t =
|
|
3866
|
+
) : t = re(
|
|
3867
3867
|
e,
|
|
3868
3868
|
n,
|
|
3869
3869
|
u,
|
|
@@ -3879,14 +3879,14 @@ function Fi(i) {
|
|
|
3879
3879
|
zoomFactor: l
|
|
3880
3880
|
};
|
|
3881
3881
|
}
|
|
3882
|
-
function
|
|
3882
|
+
function Fi(i) {
|
|
3883
3883
|
if (i.enableRotation !== void 0 ? i.enableRotation : !0) {
|
|
3884
3884
|
const e = i.constrainRotation;
|
|
3885
|
-
return e === void 0 || e === !0 ?
|
|
3885
|
+
return e === void 0 || e === !0 ? Si() : e === !1 ? oe : typeof e == "number" ? wi(e) : oe;
|
|
3886
3886
|
}
|
|
3887
|
-
return
|
|
3887
|
+
return yi;
|
|
3888
3888
|
}
|
|
3889
|
-
function
|
|
3889
|
+
function Xi(i) {
|
|
3890
3890
|
return !(i.sourceCenter && i.targetCenter && !ot(i.sourceCenter, i.targetCenter) || i.sourceResolution !== i.targetResolution || i.sourceRotation !== i.targetRotation);
|
|
3891
3891
|
}
|
|
3892
3892
|
function Mt(i, t, e, n, s) {
|
|
@@ -3896,7 +3896,7 @@ function Mt(i, t, e, n, s) {
|
|
|
3896
3896
|
const h = a * r - l * o, u = l * r + a * o;
|
|
3897
3897
|
return [h, u];
|
|
3898
3898
|
}
|
|
3899
|
-
class
|
|
3899
|
+
class je {
|
|
3900
3900
|
/**
|
|
3901
3901
|
* @param {number} minX Minimum X.
|
|
3902
3902
|
* @param {number} maxX Maximum X.
|
|
@@ -3968,9 +3968,9 @@ class ze {
|
|
|
3968
3968
|
}
|
|
3969
3969
|
}
|
|
3970
3970
|
function O(i, t, e, n, s) {
|
|
3971
|
-
return s !== void 0 ? (s.minX = i, s.maxX = t, s.minY = e, s.maxY = n, s) : new
|
|
3971
|
+
return s !== void 0 ? (s.minX = i, s.maxX = t, s.minY = e, s.maxY = n, s) : new je(i, t, e, n);
|
|
3972
3972
|
}
|
|
3973
|
-
function
|
|
3973
|
+
function Ni(i) {
|
|
3974
3974
|
const t = Object.keys(i.defs), e = t.length;
|
|
3975
3975
|
let n, s;
|
|
3976
3976
|
for (n = 0; n < e; ++n) {
|
|
@@ -4000,27 +4000,27 @@ function Yi(i) {
|
|
|
4000
4000
|
yt([o, l]);
|
|
4001
4001
|
else {
|
|
4002
4002
|
const h = i(r, a);
|
|
4003
|
-
|
|
4003
|
+
Wn(
|
|
4004
4004
|
o,
|
|
4005
4005
|
l,
|
|
4006
|
-
|
|
4007
|
-
|
|
4006
|
+
Jt(o, l, h.forward),
|
|
4007
|
+
Jt(l, o, h.inverse)
|
|
4008
4008
|
);
|
|
4009
4009
|
}
|
|
4010
4010
|
}
|
|
4011
4011
|
}
|
|
4012
4012
|
}
|
|
4013
|
-
function
|
|
4013
|
+
function ae(i, t, e, n) {
|
|
4014
4014
|
return n !== void 0 ? (n[0] = i, n[1] = t, n[2] = e, n) : [i, t, e];
|
|
4015
4015
|
}
|
|
4016
4016
|
const L = [0, 0, 0], v = 5;
|
|
4017
|
-
class
|
|
4017
|
+
class Yi {
|
|
4018
4018
|
/**
|
|
4019
4019
|
* @param {Options} options Tile grid options.
|
|
4020
4020
|
*/
|
|
4021
4021
|
constructor(t) {
|
|
4022
4022
|
this.minZoom = t.minZoom !== void 0 ? t.minZoom : 0, this.resolutions_ = t.resolutions, y(
|
|
4023
|
-
|
|
4023
|
+
We(
|
|
4024
4024
|
this.resolutions_,
|
|
4025
4025
|
/**
|
|
4026
4026
|
* @param {number} a First resolution
|
|
@@ -4046,17 +4046,17 @@ class Zi {
|
|
|
4046
4046
|
"Number of `origins` and `resolutions` must be equal"
|
|
4047
4047
|
));
|
|
4048
4048
|
const n = t.extent;
|
|
4049
|
-
n !== void 0 && !this.origin_ && !this.origins_ && (this.origin_ =
|
|
4049
|
+
n !== void 0 && !this.origin_ && !this.origins_ && (this.origin_ = _e(n)), y(
|
|
4050
4050
|
!this.origin_ && this.origins_ || this.origin_ && !this.origins_,
|
|
4051
4051
|
"Either `origin` or `origins` must be configured, never both"
|
|
4052
4052
|
), this.tileSizes_ = null, t.tileSizes !== void 0 && (this.tileSizes_ = t.tileSizes, y(
|
|
4053
4053
|
this.tileSizes_.length == this.resolutions_.length,
|
|
4054
4054
|
"Number of `tileSizes` and `resolutions` must be equal"
|
|
4055
|
-
)), this.tileSize_ = t.tileSize !== void 0 ? t.tileSize : this.tileSizes_ ? null :
|
|
4055
|
+
)), this.tileSize_ = t.tileSize !== void 0 ? t.tileSize : this.tileSizes_ ? null : Ze, y(
|
|
4056
4056
|
!this.tileSize_ && this.tileSizes_ || this.tileSize_ && !this.tileSizes_,
|
|
4057
4057
|
"Either `tileSize` or `tileSizes` must be configured, never both"
|
|
4058
4058
|
), this.extent_ = n !== void 0 ? n : null, this.fullTileRanges_ = null, this.tmpSize_ = [0, 0], this.tmpExtent_ = [0, 0, 0, 0], t.sizes !== void 0 ? this.fullTileRanges_ = t.sizes.map((s, r) => {
|
|
4059
|
-
const o = new
|
|
4059
|
+
const o = new je(
|
|
4060
4060
|
Math.min(0, s[0]),
|
|
4061
4061
|
Math.max(s[0] - 1, -1),
|
|
4062
4062
|
Math.min(0, s[1]),
|
|
@@ -4284,7 +4284,7 @@ class Zi {
|
|
|
4284
4284
|
getTileCoordForXYAndResolution_(t, e, n, s, r) {
|
|
4285
4285
|
const o = this.getZForResolution(n), a = n / this.getResolution(o), l = this.getOrigin(o), h = et(this.getTileSize(o), this.tmpSize_);
|
|
4286
4286
|
let u = a * (t - l[0]) / n / h[0], c = a * (l[1] - e) / n / h[1];
|
|
4287
|
-
return s ? (u = J(u, v) - 1, c = J(c, v) - 1) : (u = K(u, v), c = K(c, v)),
|
|
4287
|
+
return s ? (u = J(u, v) - 1, c = J(c, v) - 1) : (u = K(u, v), c = K(c, v)), ae(o, u, c, r);
|
|
4288
4288
|
}
|
|
4289
4289
|
/**
|
|
4290
4290
|
* Although there is repetition between this method and `getTileCoordForXYAndResolution_`,
|
|
@@ -4304,7 +4304,7 @@ class Zi {
|
|
|
4304
4304
|
getTileCoordForXYAndZ_(t, e, n, s, r) {
|
|
4305
4305
|
const o = this.getOrigin(n), a = this.getResolution(n), l = et(this.getTileSize(n), this.tmpSize_);
|
|
4306
4306
|
let h = (t - o[0]) / a / l[0], u = (o[1] - e) / a / l[1];
|
|
4307
|
-
return s ? (h = J(h, v) - 1, u = J(u, v) - 1) : (h = K(h, v), u = K(u, v)),
|
|
4307
|
+
return s ? (h = J(h, v) - 1, u = J(u, v) - 1) : (h = K(h, v), u = K(u, v)), ae(n, h, u, r);
|
|
4308
4308
|
}
|
|
4309
4309
|
/**
|
|
4310
4310
|
* Get a tile coordinate given a map coordinate and zoom level.
|
|
@@ -4371,7 +4371,7 @@ class Zi {
|
|
|
4371
4371
|
t,
|
|
4372
4372
|
e || 0
|
|
4373
4373
|
);
|
|
4374
|
-
return
|
|
4374
|
+
return p(n, this.minZoom, this.maxZoom);
|
|
4375
4375
|
}
|
|
4376
4376
|
/**
|
|
4377
4377
|
* The tile with the provided tile coordinate intersects the given viewport.
|
|
@@ -4380,7 +4380,7 @@ class Zi {
|
|
|
4380
4380
|
* @return {boolean} The tile with the provided tile coordinate intersects the given viewport.
|
|
4381
4381
|
*/
|
|
4382
4382
|
tileCoordIntersectsViewport(t, e) {
|
|
4383
|
-
return
|
|
4383
|
+
return Ne(
|
|
4384
4384
|
e,
|
|
4385
4385
|
0,
|
|
4386
4386
|
e.length,
|
|
@@ -4399,7 +4399,7 @@ class Zi {
|
|
|
4399
4399
|
this.fullTileRanges_ = n;
|
|
4400
4400
|
}
|
|
4401
4401
|
}
|
|
4402
|
-
class
|
|
4402
|
+
class Zi extends Yi {
|
|
4403
4403
|
/**
|
|
4404
4404
|
* @param {Options} options WMTS options.
|
|
4405
4405
|
*/
|
|
@@ -4430,27 +4430,27 @@ class ji extends Zi {
|
|
|
4430
4430
|
return this.matrixIds_;
|
|
4431
4431
|
}
|
|
4432
4432
|
}
|
|
4433
|
-
function
|
|
4434
|
-
|
|
4433
|
+
function Gi(i) {
|
|
4434
|
+
Oe(i), Ni(i);
|
|
4435
4435
|
}
|
|
4436
|
-
function
|
|
4436
|
+
function ji(i) {
|
|
4437
4437
|
const t = P.getResolutionSteps(), e = t.find(
|
|
4438
4438
|
(n) => n.resolution === i
|
|
4439
4439
|
);
|
|
4440
4440
|
return e ? t.indexOf(e) : t.length - 1;
|
|
4441
4441
|
}
|
|
4442
|
-
function
|
|
4443
|
-
const t =
|
|
4442
|
+
function Oi(i = 0.25) {
|
|
4443
|
+
const t = ji(i);
|
|
4444
4444
|
let e = P.getResolutionSteps();
|
|
4445
|
-
return e.length > t && (e = e.slice(0, t + 1)), new
|
|
4445
|
+
return e.length > t && (e = e.slice(0, t + 1)), new Zi({
|
|
4446
4446
|
resolutions: e.map((n) => n.resolution),
|
|
4447
4447
|
origin: P.getTileOrigin(),
|
|
4448
4448
|
matrixIds: e.map((n, s) => s.toString()),
|
|
4449
4449
|
extent: P.bounds?.flatten
|
|
4450
4450
|
});
|
|
4451
4451
|
}
|
|
4452
|
-
function
|
|
4453
|
-
return new
|
|
4452
|
+
function Li() {
|
|
4453
|
+
return new Ai({
|
|
4454
4454
|
projection: P.epsg,
|
|
4455
4455
|
center: P.bounds.center,
|
|
4456
4456
|
zoom: P.getDefaultZoom(),
|
|
@@ -4461,7 +4461,7 @@ function bi() {
|
|
|
4461
4461
|
});
|
|
4462
4462
|
}
|
|
4463
4463
|
export {
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
|
|
4464
|
+
Oi as getLV95TileGrid,
|
|
4465
|
+
Li as getLV95View,
|
|
4466
|
+
Gi as registerSwissGeoProjections
|
|
4467
4467
|
};
|