@geoql/v-maplibre 1.5.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/README.md +6 -2
  2. package/dist/controls/_shared/index.d.ts +1 -0
  3. package/dist/controls/_shared/useMapControl.d.ts +10 -0
  4. package/dist/controls/index.d.ts +6 -0
  5. package/dist/controls/layer/VControlLayer.vue.d.ts +38 -0
  6. package/dist/controls/layer/VControlLayerGroup.vue.d.ts +53 -0
  7. package/dist/controls/layer/events.d.ts +1 -0
  8. package/dist/controls/layer/index.d.ts +5 -0
  9. package/dist/controls/layer/types.d.ts +16 -0
  10. package/dist/controls/legend/VControlLegend.vue.d.ts +54 -0
  11. package/dist/controls/legend/events.d.ts +2 -0
  12. package/dist/controls/legend/index.d.ts +3 -0
  13. package/dist/controls/legend/types.d.ts +63 -0
  14. package/dist/decoder-CLokFc0V.js +9 -0
  15. package/dist/decoder-CLokFc0V.js.map +1 -0
  16. package/dist/deflate-yeu3ogBn.js +11 -0
  17. package/dist/deflate-yeu3ogBn.js.map +1 -0
  18. package/dist/geotiff-BUZniE5g.js +3106 -0
  19. package/dist/geotiff-BUZniE5g.js.map +1 -0
  20. package/dist/index-Bt_rREAc.js +168 -0
  21. package/dist/index-Bt_rREAc.js.map +1 -0
  22. package/dist/index-CA8I5Z2-.js +4667 -0
  23. package/dist/index-CA8I5Z2-.js.map +1 -0
  24. package/dist/index.d.ts +4 -4
  25. package/dist/index.js +2736 -1638
  26. package/dist/index.js.map +1 -1
  27. package/dist/jpeg-B7yImnpY.js +534 -0
  28. package/dist/jpeg-B7yImnpY.js.map +1 -0
  29. package/dist/layers/deckgl/_shared/useDeckOverlay.d.ts +2 -0
  30. package/dist/layers/deckgl/index.d.ts +2 -0
  31. package/dist/layers/deckgl/mosaic/VLayerDeckglMosaic.vue.d.ts +163 -0
  32. package/dist/layers/deckgl/mosaic/index.d.ts +2 -0
  33. package/dist/layers/deckgl/text/VLayerDeckglText.vue.d.ts +1 -1
  34. package/dist/layers/deckgl/wind-particle/VLayerDeckglWindParticle.vue.d.ts +1 -1
  35. package/dist/layers/index.d.ts +3 -2
  36. package/dist/layers/maplibre/canvas/VLayerMaplibreCanvas.vue.d.ts +1 -1
  37. package/dist/layers/maplibre/custom/isochrone/VLayerMaplibreIsochrone.vue.d.ts +71 -0
  38. package/dist/layers/maplibre/custom/isochrone/index.d.ts +1 -0
  39. package/dist/layers/maplibre/geojson/VLayerMaplibreGeojson.vue.d.ts +1 -1
  40. package/dist/layers/maplibre/image/VLayerMaplibreImage.vue.d.ts +1 -1
  41. package/dist/layers/maplibre/pmtile/VLayerMaplibrePmtile.vue.d.ts +1 -1
  42. package/dist/layers/maplibre/video/VLayerMaplibreVideo.vue.d.ts +1 -1
  43. package/dist/lerc-CqgA9njy.js +1032 -0
  44. package/dist/lerc-CqgA9njy.js.map +1 -0
  45. package/dist/lzw-DL9RcHOz.js +85 -0
  46. package/dist/lzw-DL9RcHOz.js.map +1 -0
  47. package/dist/markers/VMarker.vue.d.ts +1 -2
  48. package/dist/packbits-YEJGULcy.js +25 -0
  49. package/dist/packbits-YEJGULcy.js.map +1 -0
  50. package/dist/pako.esm-Bx5X36Wo.js +1075 -0
  51. package/dist/pako.esm-Bx5X36Wo.js.map +1 -0
  52. package/dist/popups/VPopup.vue.d.ts +1 -1
  53. package/dist/raw-CoQHiEnn.js +10 -0
  54. package/dist/raw-CoQHiEnn.js.map +1 -0
  55. package/dist/v-maplibre.css +1 -1
  56. package/dist/webimage-BXLN-zu8.js +20 -0
  57. package/dist/webimage-BXLN-zu8.js.map +1 -0
  58. package/package.json +100 -84
  59. package/dist/layers/maplibre/{cluster → custom/cluster}/VLayerMaplibreCluster.vue.d.ts +1 -1
  60. package/dist/layers/maplibre/{cluster → custom/cluster}/index.d.ts +0 -0
  61. package/dist/layers/maplibre/{route → custom/route}/VLayerMaplibreRoute.vue.d.ts +2 -2
  62. /package/dist/layers/maplibre/{route → custom/route}/index.d.ts +0 -0
@@ -0,0 +1,4667 @@
1
+ function na(t) {
2
+ t("EPSG:4326", "+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"), t("EPSG:4269", "+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"), t("EPSG:3857", "+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs");
3
+ for (var i = 1; i <= 60; ++i)
4
+ t("EPSG:" + (32600 + i), "+proj=utm +zone=" + i + " +datum=WGS84 +units=m"), t("EPSG:" + (32700 + i), "+proj=utm +zone=" + i + " +south +datum=WGS84 +units=m");
5
+ 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"];
6
+ }
7
+ var it = 1, at = 2, ft = 3, oa = 4, Zt = 5, vi = 6378137, la = 6356752314e-3, gi = 0.0066943799901413165, mt = 484813681109536e-20, v = Math.PI / 2, fa = 0.16666666666666666, ca = 0.04722222222222222, _a = 0.022156084656084655, m = 1e-10, C = 0.017453292519943295, $ = 57.29577951308232, b = Math.PI / 4, Pt = Math.PI * 2, R = 3.14159265359, F = {};
8
+ F.greenwich = 0;
9
+ F.lisbon = -9.131906111111;
10
+ F.paris = 2.337229166667;
11
+ F.bogota = -74.080916666667;
12
+ F.madrid = -3.687938888889;
13
+ F.rome = 12.452333333333;
14
+ F.bern = 7.439583333333;
15
+ F.jakarta = 106.807719444444;
16
+ F.ferro = -17.666666666667;
17
+ F.brussels = 4.367975;
18
+ F.stockholm = 18.058277777778;
19
+ F.athens = 23.7163375;
20
+ F.oslo = 10.722916666667;
21
+ const ua = {
22
+ mm: { to_meter: 1e-3 },
23
+ cm: { to_meter: 0.01 },
24
+ ft: { to_meter: 0.3048 },
25
+ "us-ft": { to_meter: 1200 / 3937 },
26
+ fath: { to_meter: 1.8288 },
27
+ kmi: { to_meter: 1852 },
28
+ "us-ch": { to_meter: 20.1168402336805 },
29
+ "us-mi": { to_meter: 1609.34721869444 },
30
+ km: { to_meter: 1e3 },
31
+ "ind-ft": { to_meter: 0.30479841 },
32
+ "ind-yd": { to_meter: 0.91439523 },
33
+ mi: { to_meter: 1609.344 },
34
+ yd: { to_meter: 0.9144 },
35
+ ch: { to_meter: 20.1168 },
36
+ link: { to_meter: 0.201168 },
37
+ dm: { to_meter: 0.1 },
38
+ in: { to_meter: 0.0254 },
39
+ "ind-ch": { to_meter: 20.11669506 },
40
+ "us-in": { to_meter: 0.025400050800101 },
41
+ "us-yd": { to_meter: 0.914401828803658 }
42
+ };
43
+ var di = /[\s_\-\/\(\)]/g;
44
+ function V(t, i) {
45
+ if (t[i])
46
+ return t[i];
47
+ for (var a = Object.keys(t), s = i.toLowerCase().replace(di, ""), e = -1, r, n; ++e < a.length; )
48
+ if (r = a[e], n = r.toLowerCase().replace(di, ""), n === s)
49
+ return t[r];
50
+ }
51
+ function Yt(t) {
52
+ var i = {}, a = t.split("+").map(function(h) {
53
+ return h.trim();
54
+ }).filter(function(h) {
55
+ return h;
56
+ }).reduce(function(h, o) {
57
+ var l = o.split("=");
58
+ return l.push(!0), h[l[0].toLowerCase()] = l[1], h;
59
+ }, {}), s, e, r, n = {
60
+ proj: "projName",
61
+ datum: "datumCode",
62
+ rf: function(h) {
63
+ i.rf = parseFloat(h);
64
+ },
65
+ lat_0: function(h) {
66
+ i.lat0 = h * C;
67
+ },
68
+ lat_1: function(h) {
69
+ i.lat1 = h * C;
70
+ },
71
+ lat_2: function(h) {
72
+ i.lat2 = h * C;
73
+ },
74
+ lat_ts: function(h) {
75
+ i.lat_ts = h * C;
76
+ },
77
+ lon_0: function(h) {
78
+ i.long0 = h * C;
79
+ },
80
+ lon_1: function(h) {
81
+ i.long1 = h * C;
82
+ },
83
+ lon_2: function(h) {
84
+ i.long2 = h * C;
85
+ },
86
+ alpha: function(h) {
87
+ i.alpha = parseFloat(h) * C;
88
+ },
89
+ gamma: function(h) {
90
+ i.rectified_grid_angle = parseFloat(h) * C;
91
+ },
92
+ lonc: function(h) {
93
+ i.longc = h * C;
94
+ },
95
+ x_0: function(h) {
96
+ i.x0 = parseFloat(h);
97
+ },
98
+ y_0: function(h) {
99
+ i.y0 = parseFloat(h);
100
+ },
101
+ k_0: function(h) {
102
+ i.k0 = parseFloat(h);
103
+ },
104
+ k: function(h) {
105
+ i.k0 = parseFloat(h);
106
+ },
107
+ a: function(h) {
108
+ i.a = parseFloat(h);
109
+ },
110
+ b: function(h) {
111
+ i.b = parseFloat(h);
112
+ },
113
+ r: function(h) {
114
+ i.a = i.b = parseFloat(h);
115
+ },
116
+ r_a: function() {
117
+ i.R_A = !0;
118
+ },
119
+ zone: function(h) {
120
+ i.zone = parseInt(h, 10);
121
+ },
122
+ south: function() {
123
+ i.utmSouth = !0;
124
+ },
125
+ towgs84: function(h) {
126
+ i.datum_params = h.split(",").map(function(o) {
127
+ return parseFloat(o);
128
+ });
129
+ },
130
+ to_meter: function(h) {
131
+ i.to_meter = parseFloat(h);
132
+ },
133
+ units: function(h) {
134
+ i.units = h;
135
+ var o = V(ua, h);
136
+ o && (i.to_meter = o.to_meter);
137
+ },
138
+ from_greenwich: function(h) {
139
+ i.from_greenwich = h * C;
140
+ },
141
+ pm: function(h) {
142
+ var o = V(F, h);
143
+ i.from_greenwich = (o || parseFloat(h)) * C;
144
+ },
145
+ nadgrids: function(h) {
146
+ h === "@null" ? i.datumCode = "none" : i.nadgrids = h;
147
+ },
148
+ axis: function(h) {
149
+ var o = "ewnsud";
150
+ h.length === 3 && o.indexOf(h.substr(0, 1)) !== -1 && o.indexOf(h.substr(1, 1)) !== -1 && o.indexOf(h.substr(2, 1)) !== -1 && (i.axis = h);
151
+ },
152
+ approx: function() {
153
+ i.approx = !0;
154
+ },
155
+ over: function() {
156
+ i.over = !0;
157
+ }
158
+ };
159
+ for (s in a)
160
+ e = a[s], s in n ? (r = n[s], typeof r == "function" ? r(e) : i[r] = e) : i[s] = e;
161
+ return typeof i.datumCode == "string" && i.datumCode !== "WGS84" && (i.datumCode = i.datumCode.toLowerCase()), i.projStr = t, i;
162
+ }
163
+ class qi {
164
+ static getId(i) {
165
+ const a = i.find((s) => Array.isArray(s) && s[0] === "ID");
166
+ return a && a.length >= 3 ? {
167
+ authority: a[1],
168
+ code: parseInt(a[2], 10)
169
+ } : null;
170
+ }
171
+ static convertUnit(i, a = "unit") {
172
+ if (!i || i.length < 3)
173
+ return { type: a, name: "unknown", conversion_factor: null };
174
+ const s = i[1], e = parseFloat(i[2]) || null, r = i.find((h) => Array.isArray(h) && h[0] === "ID"), n = r ? {
175
+ authority: r[1],
176
+ code: parseInt(r[2], 10)
177
+ } : null;
178
+ return {
179
+ type: a,
180
+ name: s,
181
+ conversion_factor: e,
182
+ id: n
183
+ };
184
+ }
185
+ static convertAxis(i) {
186
+ const a = i[1] || "Unknown";
187
+ let s;
188
+ const e = a.match(/^\((.)\)$/);
189
+ if (e) {
190
+ const l = e[1].toUpperCase();
191
+ if (l === "E") s = "east";
192
+ else if (l === "N") s = "north";
193
+ else if (l === "U") s = "up";
194
+ else throw new Error(`Unknown axis abbreviation: ${l}`);
195
+ } else
196
+ s = i[2] ? i[2].toLowerCase() : "unknown";
197
+ const r = i.find((l) => Array.isArray(l) && l[0] === "ORDER"), n = r ? parseInt(r[1], 10) : null, h = i.find(
198
+ (l) => Array.isArray(l) && (l[0] === "LENGTHUNIT" || l[0] === "ANGLEUNIT" || l[0] === "SCALEUNIT")
199
+ ), o = this.convertUnit(h);
200
+ return {
201
+ name: a,
202
+ direction: s,
203
+ // Use the valid PROJJSON direction value
204
+ unit: o,
205
+ order: n
206
+ };
207
+ }
208
+ static extractAxes(i) {
209
+ return i.filter((a) => Array.isArray(a) && a[0] === "AXIS").map((a) => this.convertAxis(a)).sort((a, s) => (a.order || 0) - (s.order || 0));
210
+ }
211
+ static convert(i, a = {}) {
212
+ switch (i[0]) {
213
+ case "PROJCRS":
214
+ a.type = "ProjectedCRS", a.name = i[1], a.base_crs = i.find((f) => Array.isArray(f) && f[0] === "BASEGEOGCRS") ? this.convert(i.find((f) => Array.isArray(f) && f[0] === "BASEGEOGCRS")) : null, a.conversion = i.find((f) => Array.isArray(f) && f[0] === "CONVERSION") ? this.convert(i.find((f) => Array.isArray(f) && f[0] === "CONVERSION")) : null;
215
+ const s = i.find((f) => Array.isArray(f) && f[0] === "CS");
216
+ s && (a.coordinate_system = {
217
+ type: s[1],
218
+ axis: this.extractAxes(i)
219
+ });
220
+ const e = i.find((f) => Array.isArray(f) && f[0] === "LENGTHUNIT");
221
+ if (e) {
222
+ const f = this.convertUnit(e);
223
+ a.coordinate_system.unit = f;
224
+ }
225
+ a.id = this.getId(i);
226
+ break;
227
+ case "BASEGEOGCRS":
228
+ case "GEOGCRS":
229
+ a.type = "GeographicCRS", a.name = i[1];
230
+ const r = i.find(
231
+ (f) => Array.isArray(f) && (f[0] === "DATUM" || f[0] === "ENSEMBLE")
232
+ );
233
+ if (r) {
234
+ const f = this.convert(r);
235
+ r[0] === "ENSEMBLE" ? a.datum_ensemble = f : a.datum = f;
236
+ const u = i.find((M) => Array.isArray(M) && M[0] === "PRIMEM");
237
+ u && u[1] !== "Greenwich" && (f.prime_meridian = {
238
+ name: u[1],
239
+ longitude: parseFloat(u[2])
240
+ });
241
+ }
242
+ a.coordinate_system = {
243
+ type: "ellipsoidal",
244
+ axis: this.extractAxes(i)
245
+ }, a.id = this.getId(i);
246
+ break;
247
+ case "DATUM":
248
+ a.type = "GeodeticReferenceFrame", a.name = i[1], a.ellipsoid = i.find((f) => Array.isArray(f) && f[0] === "ELLIPSOID") ? this.convert(i.find((f) => Array.isArray(f) && f[0] === "ELLIPSOID")) : null;
249
+ break;
250
+ case "ENSEMBLE":
251
+ a.type = "DatumEnsemble", a.name = i[1], a.members = i.filter((f) => Array.isArray(f) && f[0] === "MEMBER").map((f) => ({
252
+ type: "DatumEnsembleMember",
253
+ name: f[1],
254
+ id: this.getId(f)
255
+ // Extract ID as { authority, code }
256
+ }));
257
+ const n = i.find((f) => Array.isArray(f) && f[0] === "ENSEMBLEACCURACY");
258
+ n && (a.accuracy = parseFloat(n[1]));
259
+ const h = i.find((f) => Array.isArray(f) && f[0] === "ELLIPSOID");
260
+ h && (a.ellipsoid = this.convert(h)), a.id = this.getId(i);
261
+ break;
262
+ case "ELLIPSOID":
263
+ a.type = "Ellipsoid", a.name = i[1], a.semi_major_axis = parseFloat(i[2]), a.inverse_flattening = parseFloat(i[3]), i.find((f) => Array.isArray(f) && f[0] === "LENGTHUNIT") && this.convert(i.find((f) => Array.isArray(f) && f[0] === "LENGTHUNIT"), a);
264
+ break;
265
+ case "CONVERSION":
266
+ a.type = "Conversion", a.name = i[1], a.method = i.find((f) => Array.isArray(f) && f[0] === "METHOD") ? this.convert(i.find((f) => Array.isArray(f) && f[0] === "METHOD")) : null, a.parameters = i.filter((f) => Array.isArray(f) && f[0] === "PARAMETER").map((f) => this.convert(f));
267
+ break;
268
+ case "METHOD":
269
+ a.type = "Method", a.name = i[1], a.id = this.getId(i);
270
+ break;
271
+ case "PARAMETER":
272
+ a.type = "Parameter", a.name = i[1], a.value = parseFloat(i[2]), a.unit = this.convertUnit(
273
+ i.find(
274
+ (f) => Array.isArray(f) && (f[0] === "LENGTHUNIT" || f[0] === "ANGLEUNIT" || f[0] === "SCALEUNIT")
275
+ )
276
+ ), a.id = this.getId(i);
277
+ break;
278
+ case "BOUNDCRS":
279
+ a.type = "BoundCRS";
280
+ const o = i.find((f) => Array.isArray(f) && f[0] === "SOURCECRS");
281
+ if (o) {
282
+ const f = o.find((u) => Array.isArray(u));
283
+ a.source_crs = f ? this.convert(f) : null;
284
+ }
285
+ const l = i.find((f) => Array.isArray(f) && f[0] === "TARGETCRS");
286
+ if (l) {
287
+ const f = l.find((u) => Array.isArray(u));
288
+ a.target_crs = f ? this.convert(f) : null;
289
+ }
290
+ const _ = i.find((f) => Array.isArray(f) && f[0] === "ABRIDGEDTRANSFORMATION");
291
+ _ ? a.transformation = this.convert(_) : a.transformation = null;
292
+ break;
293
+ case "ABRIDGEDTRANSFORMATION":
294
+ if (a.type = "Transformation", a.name = i[1], a.method = i.find((f) => Array.isArray(f) && f[0] === "METHOD") ? this.convert(i.find((f) => Array.isArray(f) && f[0] === "METHOD")) : null, a.parameters = i.filter((f) => Array.isArray(f) && (f[0] === "PARAMETER" || f[0] === "PARAMETERFILE")).map((f) => {
295
+ if (f[0] === "PARAMETER")
296
+ return this.convert(f);
297
+ if (f[0] === "PARAMETERFILE")
298
+ return {
299
+ name: f[1],
300
+ value: f[2],
301
+ id: {
302
+ authority: "EPSG",
303
+ code: 8656
304
+ }
305
+ };
306
+ }), a.parameters.length === 7) {
307
+ const f = a.parameters[6];
308
+ f.name === "Scale difference" && (f.value = Math.round((f.value - 1) * 1e12) / 1e6);
309
+ }
310
+ a.id = this.getId(i);
311
+ break;
312
+ case "AXIS":
313
+ a.coordinate_system || (a.coordinate_system = { type: "unspecified", axis: [] }), a.coordinate_system.axis.push(this.convertAxis(i));
314
+ break;
315
+ case "LENGTHUNIT":
316
+ const c = this.convertUnit(i, "LinearUnit");
317
+ a.coordinate_system && a.coordinate_system.axis && a.coordinate_system.axis.forEach((f) => {
318
+ f.unit || (f.unit = c);
319
+ }), c.conversion_factor && c.conversion_factor !== 1 && a.semi_major_axis && (a.semi_major_axis = {
320
+ value: a.semi_major_axis,
321
+ unit: c
322
+ });
323
+ break;
324
+ default:
325
+ a.keyword = i[0];
326
+ break;
327
+ }
328
+ return a;
329
+ }
330
+ }
331
+ class Ma extends qi {
332
+ static convert(i, a = {}) {
333
+ return super.convert(i, a), a.coordinate_system && a.coordinate_system.subtype === "Cartesian" && delete a.coordinate_system, a.usage && delete a.usage, a;
334
+ }
335
+ }
336
+ class va extends qi {
337
+ static convert(i, a = {}) {
338
+ super.convert(i, a);
339
+ const s = i.find((r) => Array.isArray(r) && r[0] === "CS");
340
+ s && (a.coordinate_system = {
341
+ subtype: s[1],
342
+ axis: this.extractAxes(i)
343
+ });
344
+ const e = i.find((r) => Array.isArray(r) && r[0] === "USAGE");
345
+ if (e) {
346
+ const r = e.find((o) => Array.isArray(o) && o[0] === "SCOPE"), n = e.find((o) => Array.isArray(o) && o[0] === "AREA"), h = e.find((o) => Array.isArray(o) && o[0] === "BBOX");
347
+ a.usage = {}, r && (a.usage.scope = r[1]), n && (a.usage.area = n[1]), h && (a.usage.bbox = h.slice(1));
348
+ }
349
+ return a;
350
+ }
351
+ }
352
+ function ga(t) {
353
+ return t.find((i) => Array.isArray(i) && i[0] === "USAGE") ? "2019" : (t.find((i) => Array.isArray(i) && i[0] === "CS") || t[0] === "BOUNDCRS" || t[0] === "PROJCRS" || t[0] === "GEOGCRS", "2015");
354
+ }
355
+ function da(t) {
356
+ return (ga(t) === "2019" ? va : Ma).convert(t);
357
+ }
358
+ function ma(t) {
359
+ const i = t.toUpperCase();
360
+ return i.includes("PROJCRS") || i.includes("GEOGCRS") || i.includes("BOUNDCRS") || i.includes("VERTCRS") || i.includes("LENGTHUNIT") || i.includes("ANGLEUNIT") || i.includes("SCALEUNIT") ? "WKT2" : (i.includes("PROJCS") || i.includes("GEOGCS") || i.includes("LOCAL_CS") || i.includes("VERT_CS") || i.includes("UNIT"), "WKT1");
361
+ }
362
+ var xt = 1, Ui = 2, ki = 3, $t = 4, $i = 5, ri = -1, ya = /\s/, Ea = /[A-Za-z]/, Sa = /[A-Za-z84_]/, Qt = /[,\]]/, Fi = /[\d\.E\-\+]/;
363
+ function Q(t) {
364
+ if (typeof t != "string")
365
+ throw new Error("not a string");
366
+ this.text = t.trim(), this.level = 0, this.place = 0, this.root = null, this.stack = [], this.currentObject = null, this.state = xt;
367
+ }
368
+ Q.prototype.readCharicter = function() {
369
+ var t = this.text[this.place++];
370
+ if (this.state !== $t)
371
+ for (; ya.test(t); ) {
372
+ if (this.place >= this.text.length)
373
+ return;
374
+ t = this.text[this.place++];
375
+ }
376
+ switch (this.state) {
377
+ case xt:
378
+ return this.neutral(t);
379
+ case Ui:
380
+ return this.keyword(t);
381
+ case $t:
382
+ return this.quoted(t);
383
+ case $i:
384
+ return this.afterquote(t);
385
+ case ki:
386
+ return this.number(t);
387
+ case ri:
388
+ return;
389
+ }
390
+ };
391
+ Q.prototype.afterquote = function(t) {
392
+ if (t === '"') {
393
+ this.word += '"', this.state = $t;
394
+ return;
395
+ }
396
+ if (Qt.test(t)) {
397
+ this.word = this.word.trim(), this.afterItem(t);
398
+ return;
399
+ }
400
+ throw new Error(`havn't handled "` + t + '" in afterquote yet, index ' + this.place);
401
+ };
402
+ Q.prototype.afterItem = function(t) {
403
+ if (t === ",") {
404
+ this.word !== null && this.currentObject.push(this.word), this.word = null, this.state = xt;
405
+ return;
406
+ }
407
+ if (t === "]") {
408
+ this.level--, this.word !== null && (this.currentObject.push(this.word), this.word = null), this.state = xt, this.currentObject = this.stack.pop(), this.currentObject || (this.state = ri);
409
+ return;
410
+ }
411
+ };
412
+ Q.prototype.number = function(t) {
413
+ if (Fi.test(t)) {
414
+ this.word += t;
415
+ return;
416
+ }
417
+ if (Qt.test(t)) {
418
+ this.word = parseFloat(this.word), this.afterItem(t);
419
+ return;
420
+ }
421
+ throw new Error(`havn't handled "` + t + '" in number yet, index ' + this.place);
422
+ };
423
+ Q.prototype.quoted = function(t) {
424
+ if (t === '"') {
425
+ this.state = $i;
426
+ return;
427
+ }
428
+ this.word += t;
429
+ };
430
+ Q.prototype.keyword = function(t) {
431
+ if (Sa.test(t)) {
432
+ this.word += t;
433
+ return;
434
+ }
435
+ if (t === "[") {
436
+ var i = [];
437
+ i.push(this.word), this.level++, this.root === null ? this.root = i : this.currentObject.push(i), this.stack.push(this.currentObject), this.currentObject = i, this.state = xt;
438
+ return;
439
+ }
440
+ if (Qt.test(t)) {
441
+ this.afterItem(t);
442
+ return;
443
+ }
444
+ throw new Error(`havn't handled "` + t + '" in keyword yet, index ' + this.place);
445
+ };
446
+ Q.prototype.neutral = function(t) {
447
+ if (Ea.test(t)) {
448
+ this.word = t, this.state = Ui;
449
+ return;
450
+ }
451
+ if (t === '"') {
452
+ this.word = "", this.state = $t;
453
+ return;
454
+ }
455
+ if (Fi.test(t)) {
456
+ this.word = t, this.state = ki;
457
+ return;
458
+ }
459
+ if (Qt.test(t)) {
460
+ this.afterItem(t);
461
+ return;
462
+ }
463
+ throw new Error(`havn't handled "` + t + '" in neutral yet, index ' + this.place);
464
+ };
465
+ Q.prototype.output = function() {
466
+ for (; this.place < this.text.length; )
467
+ this.readCharicter();
468
+ if (this.state === ri)
469
+ return this.root;
470
+ throw new Error('unable to parse string "' + this.text + '". State is ' + this.state);
471
+ };
472
+ function wa(t) {
473
+ var i = new Q(t);
474
+ return i.output();
475
+ }
476
+ function Xt(t, i, a) {
477
+ Array.isArray(i) && (a.unshift(i), i = null);
478
+ var s = i ? {} : t, e = a.reduce(function(r, n) {
479
+ return ht(n, r), r;
480
+ }, s);
481
+ i && (t[i] = e);
482
+ }
483
+ function ht(t, i) {
484
+ if (!Array.isArray(t)) {
485
+ i[t] = !0;
486
+ return;
487
+ }
488
+ var a = t.shift();
489
+ if (a === "PARAMETER" && (a = t.shift()), t.length === 1) {
490
+ if (Array.isArray(t[0])) {
491
+ i[a] = {}, ht(t[0], i[a]);
492
+ return;
493
+ }
494
+ i[a] = t[0];
495
+ return;
496
+ }
497
+ if (!t.length) {
498
+ i[a] = !0;
499
+ return;
500
+ }
501
+ if (a === "TOWGS84") {
502
+ i[a] = t;
503
+ return;
504
+ }
505
+ if (a === "AXIS") {
506
+ a in i || (i[a] = []), i[a].push(t);
507
+ return;
508
+ }
509
+ Array.isArray(a) || (i[a] = {});
510
+ var s;
511
+ switch (a) {
512
+ case "UNIT":
513
+ case "PRIMEM":
514
+ case "VERT_DATUM":
515
+ i[a] = {
516
+ name: t[0].toLowerCase(),
517
+ convert: t[1]
518
+ }, t.length === 3 && ht(t[2], i[a]);
519
+ return;
520
+ case "SPHEROID":
521
+ case "ELLIPSOID":
522
+ i[a] = {
523
+ name: t[0],
524
+ a: t[1],
525
+ rf: t[2]
526
+ }, t.length === 4 && ht(t[3], i[a]);
527
+ return;
528
+ case "EDATUM":
529
+ case "ENGINEERINGDATUM":
530
+ case "LOCAL_DATUM":
531
+ case "DATUM":
532
+ case "VERT_CS":
533
+ case "VERTCRS":
534
+ case "VERTICALCRS":
535
+ t[0] = ["name", t[0]], Xt(i, a, t);
536
+ return;
537
+ case "COMPD_CS":
538
+ case "COMPOUNDCRS":
539
+ case "FITTED_CS":
540
+ // the followings are the crs defined in
541
+ // https://github.com/proj4js/proj4js/blob/1da4ed0b865d0fcb51c136090569210cdcc9019e/lib/parseCode.js#L11
542
+ case "PROJECTEDCRS":
543
+ case "PROJCRS":
544
+ case "GEOGCS":
545
+ case "GEOCCS":
546
+ case "PROJCS":
547
+ case "LOCAL_CS":
548
+ case "GEODCRS":
549
+ case "GEODETICCRS":
550
+ case "GEODETICDATUM":
551
+ case "ENGCRS":
552
+ case "ENGINEERINGCRS":
553
+ t[0] = ["name", t[0]], Xt(i, a, t), i[a].type = a;
554
+ return;
555
+ default:
556
+ for (s = -1; ++s < t.length; )
557
+ if (!Array.isArray(t[s]))
558
+ return ht(t, i[a]);
559
+ return Xt(i, a, t);
560
+ }
561
+ }
562
+ var Pa = 0.017453292519943295;
563
+ function z(t) {
564
+ return t * Pa;
565
+ }
566
+ function Di(t) {
567
+ const i = (t.projName || "").toLowerCase().replace(/_/g, " ");
568
+ !t.long0 && t.longc && (i === "albers conic equal area" || i === "lambert azimuthal equal area") && (t.long0 = t.longc), !t.lat_ts && t.lat1 && (i === "stereographic south pole" || i === "polar stereographic (variant b)") ? (t.lat0 = z(t.lat1 > 0 ? 90 : -90), t.lat_ts = t.lat1, delete t.lat1) : !t.lat_ts && t.lat0 && (i === "polar stereographic" || i === "polar stereographic (variant a)") && (t.lat_ts = t.lat0, t.lat0 = z(t.lat0 > 0 ? 90 : -90), delete t.lat1);
569
+ }
570
+ function mi(t) {
571
+ let i = { units: null, to_meter: void 0 };
572
+ return typeof t == "string" ? (i.units = t.toLowerCase(), i.units === "metre" && (i.units = "meter"), i.units === "meter" && (i.to_meter = 1)) : t && t.name && (i.units = t.name.toLowerCase(), i.units === "metre" && (i.units = "meter"), i.to_meter = t.conversion_factor), i;
573
+ }
574
+ function yi(t) {
575
+ return typeof t == "object" ? t.value * t.unit.conversion_factor : t;
576
+ }
577
+ function Ei(t, i) {
578
+ t.ellipsoid.radius ? (i.a = t.ellipsoid.radius, i.rf = 0) : (i.a = yi(t.ellipsoid.semi_major_axis), t.ellipsoid.inverse_flattening !== void 0 ? i.rf = t.ellipsoid.inverse_flattening : t.ellipsoid.semi_major_axis !== void 0 && t.ellipsoid.semi_minor_axis !== void 0 && (i.rf = i.a / (i.a - yi(t.ellipsoid.semi_minor_axis))));
579
+ }
580
+ function Ft(t, i = {}) {
581
+ return !t || typeof t != "object" ? t : t.type === "BoundCRS" ? (Ft(t.source_crs, i), t.transformation && (t.transformation.method && t.transformation.method.name === "NTv2" ? i.nadgrids = t.transformation.parameters[0].value : i.datum_params = t.transformation.parameters.map((a) => a.value)), i) : (Object.keys(t).forEach((a) => {
582
+ const s = t[a];
583
+ if (s !== null)
584
+ switch (a) {
585
+ case "name":
586
+ if (i.srsCode)
587
+ break;
588
+ i.name = s, i.srsCode = s;
589
+ break;
590
+ case "type":
591
+ s === "GeographicCRS" ? i.projName = "longlat" : s === "ProjectedCRS" && t.conversion && t.conversion.method && (i.projName = t.conversion.method.name);
592
+ break;
593
+ case "datum":
594
+ case "datum_ensemble":
595
+ s.ellipsoid && (i.ellps = s.ellipsoid.name, Ei(s, i)), s.prime_meridian && (i.from_greenwich = s.prime_meridian.longitude * Math.PI / 180);
596
+ break;
597
+ case "ellipsoid":
598
+ i.ellps = s.name, Ei(s, i);
599
+ break;
600
+ case "prime_meridian":
601
+ i.long0 = (s.longitude || 0) * Math.PI / 180;
602
+ break;
603
+ case "coordinate_system":
604
+ if (s.axis) {
605
+ if (i.axis = s.axis.map((e) => {
606
+ const r = e.direction;
607
+ if (r === "east") return "e";
608
+ if (r === "north") return "n";
609
+ if (r === "west") return "w";
610
+ if (r === "south") return "s";
611
+ throw new Error(`Unknown axis direction: ${r}`);
612
+ }).join("") + "u", s.unit) {
613
+ const { units: e, to_meter: r } = mi(s.unit);
614
+ i.units = e, i.to_meter = r;
615
+ } else if (s.axis[0] && s.axis[0].unit) {
616
+ const { units: e, to_meter: r } = mi(s.axis[0].unit);
617
+ i.units = e, i.to_meter = r;
618
+ }
619
+ }
620
+ break;
621
+ case "id":
622
+ s.authority && s.code && (i.title = s.authority + ":" + s.code);
623
+ break;
624
+ case "conversion":
625
+ s.method && s.method.name && (i.projName = s.method.name), s.parameters && s.parameters.forEach((e) => {
626
+ const r = e.name.toLowerCase().replace(/\s+/g, "_"), n = e.value;
627
+ e.unit && e.unit.conversion_factor ? i[r] = n * e.unit.conversion_factor : e.unit === "degree" ? i[r] = n * Math.PI / 180 : i[r] = n;
628
+ });
629
+ break;
630
+ case "unit":
631
+ s.name && (i.units = s.name.toLowerCase(), i.units === "metre" && (i.units = "meter")), s.conversion_factor && (i.to_meter = s.conversion_factor);
632
+ break;
633
+ case "base_crs":
634
+ Ft(s, i), i.datumCode = s.id ? s.id.authority + "_" + s.id.code : s.name;
635
+ break;
636
+ }
637
+ }), i.latitude_of_false_origin !== void 0 && (i.lat0 = i.latitude_of_false_origin), i.longitude_of_false_origin !== void 0 && (i.long0 = i.longitude_of_false_origin), i.latitude_of_standard_parallel !== void 0 && (i.lat0 = i.latitude_of_standard_parallel, i.lat1 = i.latitude_of_standard_parallel), i.latitude_of_1st_standard_parallel !== void 0 && (i.lat1 = i.latitude_of_1st_standard_parallel), i.latitude_of_2nd_standard_parallel !== void 0 && (i.lat2 = i.latitude_of_2nd_standard_parallel), i.latitude_of_projection_centre !== void 0 && (i.lat0 = i.latitude_of_projection_centre), i.longitude_of_projection_centre !== void 0 && (i.longc = i.longitude_of_projection_centre), i.easting_at_false_origin !== void 0 && (i.x0 = i.easting_at_false_origin), i.northing_at_false_origin !== void 0 && (i.y0 = i.northing_at_false_origin), i.latitude_of_natural_origin !== void 0 && (i.lat0 = i.latitude_of_natural_origin), i.longitude_of_natural_origin !== void 0 && (i.long0 = i.longitude_of_natural_origin), i.longitude_of_origin !== void 0 && (i.long0 = i.longitude_of_origin), i.false_easting !== void 0 && (i.x0 = i.false_easting), i.easting_at_projection_centre && (i.x0 = i.easting_at_projection_centre), i.false_northing !== void 0 && (i.y0 = i.false_northing), i.northing_at_projection_centre && (i.y0 = i.northing_at_projection_centre), i.standard_parallel_1 !== void 0 && (i.lat1 = i.standard_parallel_1), i.standard_parallel_2 !== void 0 && (i.lat2 = i.standard_parallel_2), i.scale_factor_at_natural_origin !== void 0 && (i.k0 = i.scale_factor_at_natural_origin), i.scale_factor_at_projection_centre !== void 0 && (i.k0 = i.scale_factor_at_projection_centre), i.scale_factor_on_pseudo_standard_parallel !== void 0 && (i.k0 = i.scale_factor_on_pseudo_standard_parallel), i.azimuth !== void 0 && (i.alpha = i.azimuth), i.azimuth_at_projection_centre !== void 0 && (i.alpha = i.azimuth_at_projection_centre), i.angle_from_rectified_to_skew_grid && (i.rectified_grid_angle = i.angle_from_rectified_to_skew_grid), Di(i), i);
638
+ }
639
+ var xa = [
640
+ "PROJECTEDCRS",
641
+ "PROJCRS",
642
+ "GEOGCS",
643
+ "GEOCCS",
644
+ "PROJCS",
645
+ "LOCAL_CS",
646
+ "GEODCRS",
647
+ "GEODETICCRS",
648
+ "GEODETICDATUM",
649
+ "ENGCRS",
650
+ "ENGINEERINGCRS"
651
+ ];
652
+ function Ga(t, i) {
653
+ var a = i[0], s = i[1];
654
+ !(a in t) && s in t && (t[a] = t[s], i.length === 3 && (t[a] = i[2](t[a])));
655
+ }
656
+ function Bi(t) {
657
+ for (var i = Object.keys(t), a = 0, s = i.length; a < s; ++a) {
658
+ var e = i[a];
659
+ xa.indexOf(e) !== -1 && ba(t[e]), typeof t[e] == "object" && Bi(t[e]);
660
+ }
661
+ }
662
+ function ba(t) {
663
+ if (t.AUTHORITY) {
664
+ var i = Object.keys(t.AUTHORITY)[0];
665
+ i && i in t.AUTHORITY && (t.title = i + ":" + t.AUTHORITY[i]);
666
+ }
667
+ if (t.type === "GEOGCS" ? t.projName = "longlat" : t.type === "LOCAL_CS" ? (t.projName = "identity", t.local = !0) : typeof t.PROJECTION == "object" ? t.projName = Object.keys(t.PROJECTION)[0] : t.projName = t.PROJECTION, t.AXIS) {
668
+ for (var a = "", s = 0, e = t.AXIS.length; s < e; ++s) {
669
+ var r = [t.AXIS[s][0].toLowerCase(), t.AXIS[s][1].toLowerCase()];
670
+ r[0].indexOf("north") !== -1 || (r[0] === "y" || r[0] === "lat") && r[1] === "north" ? a += "n" : r[0].indexOf("south") !== -1 || (r[0] === "y" || r[0] === "lat") && r[1] === "south" ? a += "s" : r[0].indexOf("east") !== -1 || (r[0] === "x" || r[0] === "lon") && r[1] === "east" ? a += "e" : (r[0].indexOf("west") !== -1 || (r[0] === "x" || r[0] === "lon") && r[1] === "west") && (a += "w");
671
+ }
672
+ a.length === 2 && (a += "u"), a.length === 3 && (t.axis = a);
673
+ }
674
+ t.UNIT && (t.units = t.UNIT.name.toLowerCase(), t.units === "metre" && (t.units = "meter"), t.UNIT.convert && (t.type === "GEOGCS" ? t.DATUM && t.DATUM.SPHEROID && (t.to_meter = t.UNIT.convert * t.DATUM.SPHEROID.a) : t.to_meter = t.UNIT.convert));
675
+ var n = t.GEOGCS;
676
+ t.type === "GEOGCS" && (n = t), n && (n.DATUM ? t.datumCode = n.DATUM.name.toLowerCase() : t.datumCode = n.name.toLowerCase(), t.datumCode.slice(0, 2) === "d_" && (t.datumCode = t.datumCode.slice(2)), t.datumCode === "new_zealand_1949" && (t.datumCode = "nzgd49"), (t.datumCode === "wgs_1984" || t.datumCode === "world_geodetic_system_1984") && (t.PROJECTION === "Mercator_Auxiliary_Sphere" && (t.sphere = !0), t.datumCode = "wgs84"), t.datumCode === "belge_1972" && (t.datumCode = "rnb72"), n.DATUM && n.DATUM.SPHEROID && (t.ellps = n.DATUM.SPHEROID.name.replace("_19", "").replace(/[Cc]larke\_18/, "clrk"), t.ellps.toLowerCase().slice(0, 13) === "international" && (t.ellps = "intl"), t.a = n.DATUM.SPHEROID.a, t.rf = parseFloat(n.DATUM.SPHEROID.rf, 10)), n.DATUM && n.DATUM.TOWGS84 && (t.datum_params = n.DATUM.TOWGS84), ~t.datumCode.indexOf("osgb_1936") && (t.datumCode = "osgb36"), ~t.datumCode.indexOf("osni_1952") && (t.datumCode = "osni52"), (~t.datumCode.indexOf("tm65") || ~t.datumCode.indexOf("geodetic_datum_of_1965")) && (t.datumCode = "ire65"), t.datumCode === "ch1903+" && (t.datumCode = "ch1903"), ~t.datumCode.indexOf("israel") && (t.datumCode = "isr93")), t.b && !isFinite(t.b) && (t.b = t.a), t.rectified_grid_angle && (t.rectified_grid_angle = z(t.rectified_grid_angle));
677
+ function h(_) {
678
+ var c = t.to_meter || 1;
679
+ return _ * c;
680
+ }
681
+ var o = function(_) {
682
+ return Ga(t, _);
683
+ }, l = [
684
+ ["standard_parallel_1", "Standard_Parallel_1"],
685
+ ["standard_parallel_1", "Latitude of 1st standard parallel"],
686
+ ["standard_parallel_2", "Standard_Parallel_2"],
687
+ ["standard_parallel_2", "Latitude of 2nd standard parallel"],
688
+ ["false_easting", "False_Easting"],
689
+ ["false_easting", "False easting"],
690
+ ["false-easting", "Easting at false origin"],
691
+ ["false_northing", "False_Northing"],
692
+ ["false_northing", "False northing"],
693
+ ["false_northing", "Northing at false origin"],
694
+ ["central_meridian", "Central_Meridian"],
695
+ ["central_meridian", "Longitude of natural origin"],
696
+ ["central_meridian", "Longitude of false origin"],
697
+ ["latitude_of_origin", "Latitude_Of_Origin"],
698
+ ["latitude_of_origin", "Central_Parallel"],
699
+ ["latitude_of_origin", "Latitude of natural origin"],
700
+ ["latitude_of_origin", "Latitude of false origin"],
701
+ ["scale_factor", "Scale_Factor"],
702
+ ["k0", "scale_factor"],
703
+ ["latitude_of_center", "Latitude_Of_Center"],
704
+ ["latitude_of_center", "Latitude_of_center"],
705
+ ["lat0", "latitude_of_center", z],
706
+ ["longitude_of_center", "Longitude_Of_Center"],
707
+ ["longitude_of_center", "Longitude_of_center"],
708
+ ["longc", "longitude_of_center", z],
709
+ ["x0", "false_easting", h],
710
+ ["y0", "false_northing", h],
711
+ ["long0", "central_meridian", z],
712
+ ["lat0", "latitude_of_origin", z],
713
+ ["lat0", "standard_parallel_1", z],
714
+ ["lat1", "standard_parallel_1", z],
715
+ ["lat2", "standard_parallel_2", z],
716
+ ["azimuth", "Azimuth"],
717
+ ["alpha", "azimuth", z],
718
+ ["srsCode", "name"]
719
+ ];
720
+ l.forEach(o), Di(t);
721
+ }
722
+ function Dt(t) {
723
+ if (typeof t == "object")
724
+ return Ft(t);
725
+ const i = ma(t);
726
+ var a = wa(t);
727
+ if (i === "WKT2") {
728
+ const r = da(a);
729
+ return Ft(r);
730
+ }
731
+ var s = a[0], e = {};
732
+ return ht(a, e), Bi(e), e[s];
733
+ }
734
+ function T(t) {
735
+ var i = this;
736
+ if (arguments.length === 2) {
737
+ var a = arguments[1];
738
+ typeof a == "string" ? a.charAt(0) === "+" ? T[
739
+ /** @type {string} */
740
+ t
741
+ ] = Yt(arguments[1]) : T[
742
+ /** @type {string} */
743
+ t
744
+ ] = Dt(arguments[1]) : a && typeof a == "object" && !("projName" in a) ? T[
745
+ /** @type {string} */
746
+ t
747
+ ] = Dt(arguments[1]) : (T[
748
+ /** @type {string} */
749
+ t
750
+ ] = a, a || delete T[
751
+ /** @type {string} */
752
+ t
753
+ ]);
754
+ } else if (arguments.length === 1) {
755
+ if (Array.isArray(t))
756
+ return t.map(function(s) {
757
+ return Array.isArray(s) ? T.apply(i, s) : T(s);
758
+ });
759
+ if (typeof t == "string") {
760
+ if (t in T)
761
+ return T[t];
762
+ } else "EPSG" in t ? T["EPSG:" + t.EPSG] = t : "ESRI" in t ? T["ESRI:" + t.ESRI] = t : "IAU2000" in t ? T["IAU2000:" + t.IAU2000] = t : console.log(t);
763
+ return;
764
+ }
765
+ }
766
+ na(T);
767
+ function Aa(t) {
768
+ return typeof t == "string";
769
+ }
770
+ function Na(t) {
771
+ return t in T;
772
+ }
773
+ function Ia(t) {
774
+ return t.indexOf("+") !== 0 && t.indexOf("[") !== -1 || typeof t == "object" && !("srsCode" in t);
775
+ }
776
+ var Ca = ["3857", "900913", "3785", "102113"];
777
+ function Ra(t) {
778
+ var i = V(t, "authority");
779
+ if (i) {
780
+ var a = V(i, "epsg");
781
+ return a && Ca.indexOf(a) > -1;
782
+ }
783
+ }
784
+ function Oa(t) {
785
+ var i = V(t, "extension");
786
+ if (i)
787
+ return V(i, "proj4");
788
+ }
789
+ function Ta(t) {
790
+ return t[0] === "+";
791
+ }
792
+ function pa(t) {
793
+ if (Aa(t)) {
794
+ if (Na(t))
795
+ return T[t];
796
+ if (Ia(t)) {
797
+ var i = Dt(t);
798
+ if (Ra(i))
799
+ return T["EPSG:3857"];
800
+ var a = Oa(i);
801
+ return a ? Yt(a) : i;
802
+ }
803
+ if (Ta(t))
804
+ return Yt(t);
805
+ } else return "projName" in t ? t : Dt(t);
806
+ }
807
+ function Si(t, i) {
808
+ t = t || {};
809
+ var a, s;
810
+ if (!i)
811
+ return t;
812
+ for (s in i)
813
+ a = i[s], a !== void 0 && (t[s] = a);
814
+ return t;
815
+ }
816
+ function H(t, i, a) {
817
+ var s = t * i;
818
+ return a / Math.sqrt(1 - s * s);
819
+ }
820
+ function At(t) {
821
+ return t < 0 ? -1 : 1;
822
+ }
823
+ function y(t, i) {
824
+ return i || Math.abs(t) <= R ? t : t - At(t) * Pt;
825
+ }
826
+ function W(t, i, a) {
827
+ var s = t * a, e = 0.5 * t;
828
+ return s = Math.pow((1 - s) / (1 + s), e), Math.tan(0.5 * (v - i)) / s;
829
+ }
830
+ function Gt(t, i) {
831
+ for (var a = 0.5 * t, s, e, r = v - 2 * Math.atan(i), n = 0; n <= 15; n++)
832
+ if (s = t * Math.sin(r), e = v - 2 * Math.atan(i * Math.pow((1 - s) / (1 + s), a)) - r, r += e, Math.abs(e) <= 1e-10)
833
+ return r;
834
+ return -9999;
835
+ }
836
+ function La() {
837
+ var t = this.b / this.a;
838
+ this.es = 1 - t * t, "x0" in this || (this.x0 = 0), "y0" in this || (this.y0 = 0), this.e = Math.sqrt(this.es), this.lat_ts ? this.sphere ? this.k0 = Math.cos(this.lat_ts) : this.k0 = H(this.e, Math.sin(this.lat_ts), Math.cos(this.lat_ts)) : this.k0 || (this.k ? this.k0 = this.k : this.k0 = 1);
839
+ }
840
+ function qa(t) {
841
+ var i = t.x, a = t.y;
842
+ if (a * $ > 90 && a * $ < -90 && i * $ > 180 && i * $ < -180)
843
+ return null;
844
+ var s, e;
845
+ if (Math.abs(Math.abs(a) - v) <= m)
846
+ return null;
847
+ if (this.sphere)
848
+ s = this.x0 + this.a * this.k0 * y(i - this.long0, this.over), e = this.y0 + this.a * this.k0 * Math.log(Math.tan(b + 0.5 * a));
849
+ else {
850
+ var r = Math.sin(a), n = W(this.e, a, r);
851
+ s = this.x0 + this.a * this.k0 * y(i - this.long0, this.over), e = this.y0 - this.a * this.k0 * Math.log(n);
852
+ }
853
+ return t.x = s, t.y = e, t;
854
+ }
855
+ function Ua(t) {
856
+ var i = t.x - this.x0, a = t.y - this.y0, s, e;
857
+ if (this.sphere)
858
+ e = v - 2 * Math.atan(Math.exp(-a / (this.a * this.k0)));
859
+ else {
860
+ var r = Math.exp(-a / (this.a * this.k0));
861
+ if (e = Gt(this.e, r), e === -9999)
862
+ return null;
863
+ }
864
+ return s = y(this.long0 + i / (this.a * this.k0), this.over), t.x = s, t.y = e, t;
865
+ }
866
+ var ka = ["Mercator", "Popular Visualisation Pseudo Mercator", "Mercator_1SP", "Mercator_Auxiliary_Sphere", "Mercator_Variant_A", "merc"];
867
+ const $a = {
868
+ init: La,
869
+ forward: qa,
870
+ inverse: Ua,
871
+ names: ka
872
+ };
873
+ function Fa() {
874
+ }
875
+ function wi(t) {
876
+ return t;
877
+ }
878
+ var ji = ["longlat", "identity"];
879
+ const Da = {
880
+ init: Fa,
881
+ forward: wi,
882
+ inverse: wi,
883
+ names: ji
884
+ };
885
+ var Ba = [$a, Da], tt = {}, nt = [];
886
+ function zi(t, i) {
887
+ var a = nt.length;
888
+ return t.names ? (nt[a] = t, t.names.forEach(function(s) {
889
+ tt[s.toLowerCase()] = a;
890
+ }), this) : (console.log(i), !0);
891
+ }
892
+ function Wi(t) {
893
+ return t.replace(/[-\(\)\s]+/g, " ").trim().replace(/ /g, "_");
894
+ }
895
+ function ja(t) {
896
+ if (!t)
897
+ return !1;
898
+ var i = t.toLowerCase();
899
+ if (typeof tt[i] < "u" && nt[tt[i]] || (i = Wi(i), i in tt && nt[tt[i]]))
900
+ return nt[tt[i]];
901
+ }
902
+ function za() {
903
+ Ba.forEach(zi);
904
+ }
905
+ const Wa = {
906
+ start: za,
907
+ add: zi,
908
+ get: ja
909
+ };
910
+ var Hi = {
911
+ MERIT: {
912
+ a: 6378137,
913
+ rf: 298.257,
914
+ ellipseName: "MERIT 1983"
915
+ },
916
+ SGS85: {
917
+ a: 6378136,
918
+ rf: 298.257,
919
+ ellipseName: "Soviet Geodetic System 85"
920
+ },
921
+ GRS80: {
922
+ a: 6378137,
923
+ rf: 298.257222101,
924
+ ellipseName: "GRS 1980(IUGG, 1980)"
925
+ },
926
+ IAU76: {
927
+ a: 6378140,
928
+ rf: 298.257,
929
+ ellipseName: "IAU 1976"
930
+ },
931
+ airy: {
932
+ a: 6377563396e-3,
933
+ b: 635625691e-2,
934
+ ellipseName: "Airy 1830"
935
+ },
936
+ APL4: {
937
+ a: 6378137,
938
+ rf: 298.25,
939
+ ellipseName: "Appl. Physics. 1965"
940
+ },
941
+ NWL9D: {
942
+ a: 6378145,
943
+ rf: 298.25,
944
+ ellipseName: "Naval Weapons Lab., 1965"
945
+ },
946
+ mod_airy: {
947
+ a: 6377340189e-3,
948
+ b: 6356034446e-3,
949
+ ellipseName: "Modified Airy"
950
+ },
951
+ andrae: {
952
+ a: 637710443e-2,
953
+ rf: 300,
954
+ ellipseName: "Andrae 1876 (Den., Iclnd.)"
955
+ },
956
+ aust_SA: {
957
+ a: 6378160,
958
+ rf: 298.25,
959
+ ellipseName: "Australian Natl & S. Amer. 1969"
960
+ },
961
+ GRS67: {
962
+ a: 6378160,
963
+ rf: 298.247167427,
964
+ ellipseName: "GRS 67(IUGG 1967)"
965
+ },
966
+ bessel: {
967
+ a: 6377397155e-3,
968
+ rf: 299.1528128,
969
+ ellipseName: "Bessel 1841"
970
+ },
971
+ bess_nam: {
972
+ a: 6377483865e-3,
973
+ rf: 299.1528128,
974
+ ellipseName: "Bessel 1841 (Namibia)"
975
+ },
976
+ clrk66: {
977
+ a: 63782064e-1,
978
+ b: 63565838e-1,
979
+ ellipseName: "Clarke 1866"
980
+ },
981
+ clrk80: {
982
+ a: 6378249145e-3,
983
+ rf: 293.4663,
984
+ ellipseName: "Clarke 1880 mod."
985
+ },
986
+ clrk80ign: {
987
+ a: 63782492e-1,
988
+ b: 6356515,
989
+ rf: 293.4660213,
990
+ ellipseName: "Clarke 1880 (IGN)"
991
+ },
992
+ clrk58: {
993
+ a: 6378293645208759e-9,
994
+ rf: 294.2606763692654,
995
+ ellipseName: "Clarke 1858"
996
+ },
997
+ CPM: {
998
+ a: 63757387e-1,
999
+ rf: 334.29,
1000
+ ellipseName: "Comm. des Poids et Mesures 1799"
1001
+ },
1002
+ delmbr: {
1003
+ a: 6376428,
1004
+ rf: 311.5,
1005
+ ellipseName: "Delambre 1810 (Belgium)"
1006
+ },
1007
+ engelis: {
1008
+ a: 637813605e-2,
1009
+ rf: 298.2566,
1010
+ ellipseName: "Engelis 1985"
1011
+ },
1012
+ evrst30: {
1013
+ a: 6377276345e-3,
1014
+ rf: 300.8017,
1015
+ ellipseName: "Everest 1830"
1016
+ },
1017
+ evrst48: {
1018
+ a: 6377304063e-3,
1019
+ rf: 300.8017,
1020
+ ellipseName: "Everest 1948"
1021
+ },
1022
+ evrst56: {
1023
+ a: 6377301243e-3,
1024
+ rf: 300.8017,
1025
+ ellipseName: "Everest 1956"
1026
+ },
1027
+ evrst69: {
1028
+ a: 6377295664e-3,
1029
+ rf: 300.8017,
1030
+ ellipseName: "Everest 1969"
1031
+ },
1032
+ evrstSS: {
1033
+ a: 6377298556e-3,
1034
+ rf: 300.8017,
1035
+ ellipseName: "Everest (Sabah & Sarawak)"
1036
+ },
1037
+ fschr60: {
1038
+ a: 6378166,
1039
+ rf: 298.3,
1040
+ ellipseName: "Fischer (Mercury Datum) 1960"
1041
+ },
1042
+ fschr60m: {
1043
+ a: 6378155,
1044
+ rf: 298.3,
1045
+ ellipseName: "Fischer 1960"
1046
+ },
1047
+ fschr68: {
1048
+ a: 6378150,
1049
+ rf: 298.3,
1050
+ ellipseName: "Fischer 1968"
1051
+ },
1052
+ helmert: {
1053
+ a: 6378200,
1054
+ rf: 298.3,
1055
+ ellipseName: "Helmert 1906"
1056
+ },
1057
+ hough: {
1058
+ a: 6378270,
1059
+ rf: 297,
1060
+ ellipseName: "Hough"
1061
+ },
1062
+ intl: {
1063
+ a: 6378388,
1064
+ rf: 297,
1065
+ ellipseName: "International 1909 (Hayford)"
1066
+ },
1067
+ kaula: {
1068
+ a: 6378163,
1069
+ rf: 298.24,
1070
+ ellipseName: "Kaula 1961"
1071
+ },
1072
+ lerch: {
1073
+ a: 6378139,
1074
+ rf: 298.257,
1075
+ ellipseName: "Lerch 1979"
1076
+ },
1077
+ mprts: {
1078
+ a: 6397300,
1079
+ rf: 191,
1080
+ ellipseName: "Maupertius 1738"
1081
+ },
1082
+ new_intl: {
1083
+ a: 63781575e-1,
1084
+ b: 63567722e-1,
1085
+ ellipseName: "New International 1967"
1086
+ },
1087
+ plessis: {
1088
+ a: 6376523,
1089
+ rf: 6355863,
1090
+ ellipseName: "Plessis 1817 (France)"
1091
+ },
1092
+ krass: {
1093
+ a: 6378245,
1094
+ rf: 298.3,
1095
+ ellipseName: "Krassovsky, 1942"
1096
+ },
1097
+ SEasia: {
1098
+ a: 6378155,
1099
+ b: 63567733205e-4,
1100
+ ellipseName: "Southeast Asia"
1101
+ },
1102
+ walbeck: {
1103
+ a: 6376896,
1104
+ b: 63558348467e-4,
1105
+ ellipseName: "Walbeck"
1106
+ },
1107
+ WGS60: {
1108
+ a: 6378165,
1109
+ rf: 298.3,
1110
+ ellipseName: "WGS 60"
1111
+ },
1112
+ WGS66: {
1113
+ a: 6378145,
1114
+ rf: 298.25,
1115
+ ellipseName: "WGS 66"
1116
+ },
1117
+ WGS7: {
1118
+ a: 6378135,
1119
+ rf: 298.26,
1120
+ ellipseName: "WGS 72"
1121
+ },
1122
+ WGS84: {
1123
+ a: 6378137,
1124
+ rf: 298.257223563,
1125
+ ellipseName: "WGS 84"
1126
+ },
1127
+ sphere: {
1128
+ a: 6370997,
1129
+ b: 6370997,
1130
+ ellipseName: "Normal Sphere (r=6370997)"
1131
+ }
1132
+ };
1133
+ const Ha = Hi.WGS84;
1134
+ function Qa(t, i, a, s) {
1135
+ var e = t * t, r = i * i, n = (e - r) / e, h = 0;
1136
+ s ? (t *= 1 - n * (fa + n * (ca + n * _a)), e = t * t, n = 0) : h = Math.sqrt(n);
1137
+ var o = (e - r) / r;
1138
+ return {
1139
+ es: n,
1140
+ e: h,
1141
+ ep2: o
1142
+ };
1143
+ }
1144
+ function Xa(t, i, a, s, e) {
1145
+ if (!t) {
1146
+ var r = V(Hi, s);
1147
+ r || (r = Ha), t = r.a, i = r.b, a = r.rf;
1148
+ }
1149
+ return a && !i && (i = (1 - 1 / a) * t), (a === 0 || Math.abs(t - i) < m) && (e = !0, i = t), {
1150
+ a: t,
1151
+ b: i,
1152
+ rf: a,
1153
+ sphere: e
1154
+ };
1155
+ }
1156
+ var Lt = {
1157
+ wgs84: {
1158
+ towgs84: "0,0,0",
1159
+ ellipse: "WGS84",
1160
+ datumName: "WGS84"
1161
+ },
1162
+ ch1903: {
1163
+ towgs84: "674.374,15.056,405.346",
1164
+ ellipse: "bessel",
1165
+ datumName: "swiss"
1166
+ },
1167
+ ggrs87: {
1168
+ towgs84: "-199.87,74.79,246.62",
1169
+ ellipse: "GRS80",
1170
+ datumName: "Greek_Geodetic_Reference_System_1987"
1171
+ },
1172
+ nad83: {
1173
+ towgs84: "0,0,0",
1174
+ ellipse: "GRS80",
1175
+ datumName: "North_American_Datum_1983"
1176
+ },
1177
+ nad27: {
1178
+ nadgrids: "@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",
1179
+ ellipse: "clrk66",
1180
+ datumName: "North_American_Datum_1927"
1181
+ },
1182
+ potsdam: {
1183
+ towgs84: "598.1,73.7,418.2,0.202,0.045,-2.455,6.7",
1184
+ ellipse: "bessel",
1185
+ datumName: "Potsdam Rauenberg 1950 DHDN"
1186
+ },
1187
+ carthage: {
1188
+ towgs84: "-263.0,6.0,431.0",
1189
+ ellipse: "clark80",
1190
+ datumName: "Carthage 1934 Tunisia"
1191
+ },
1192
+ hermannskogel: {
1193
+ towgs84: "577.326,90.129,463.919,5.137,1.474,5.297,2.4232",
1194
+ ellipse: "bessel",
1195
+ datumName: "Hermannskogel"
1196
+ },
1197
+ mgi: {
1198
+ towgs84: "577.326,90.129,463.919,5.137,1.474,5.297,2.4232",
1199
+ ellipse: "bessel",
1200
+ datumName: "Militar-Geographische Institut"
1201
+ },
1202
+ osni52: {
1203
+ towgs84: "482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",
1204
+ ellipse: "airy",
1205
+ datumName: "Irish National"
1206
+ },
1207
+ ire65: {
1208
+ towgs84: "482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",
1209
+ ellipse: "mod_airy",
1210
+ datumName: "Ireland 1965"
1211
+ },
1212
+ rassadiran: {
1213
+ towgs84: "-133.63,-157.5,-158.62",
1214
+ ellipse: "intl",
1215
+ datumName: "Rassadiran"
1216
+ },
1217
+ nzgd49: {
1218
+ towgs84: "59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",
1219
+ ellipse: "intl",
1220
+ datumName: "New Zealand Geodetic Datum 1949"
1221
+ },
1222
+ osgb36: {
1223
+ towgs84: "446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",
1224
+ ellipse: "airy",
1225
+ datumName: "Ordnance Survey of Great Britain 1936"
1226
+ },
1227
+ s_jtsk: {
1228
+ towgs84: "589,76,480",
1229
+ ellipse: "bessel",
1230
+ datumName: "S-JTSK (Ferro)"
1231
+ },
1232
+ beduaram: {
1233
+ towgs84: "-106,-87,188",
1234
+ ellipse: "clrk80",
1235
+ datumName: "Beduaram"
1236
+ },
1237
+ gunung_segara: {
1238
+ towgs84: "-403,684,41",
1239
+ ellipse: "bessel",
1240
+ datumName: "Gunung Segara Jakarta"
1241
+ },
1242
+ rnb72: {
1243
+ towgs84: "106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",
1244
+ ellipse: "intl",
1245
+ datumName: "Reseau National Belge 1972"
1246
+ },
1247
+ EPSG_5451: {
1248
+ towgs84: "6.41,-49.05,-11.28,1.5657,0.5242,6.9718,-5.7649"
1249
+ },
1250
+ IGNF_LURESG: {
1251
+ towgs84: "-192.986,13.673,-39.309,-0.4099,-2.9332,2.6881,0.43"
1252
+ },
1253
+ EPSG_4614: {
1254
+ towgs84: "-119.4248,-303.65872,-11.00061,1.164298,0.174458,1.096259,3.657065"
1255
+ },
1256
+ EPSG_4615: {
1257
+ towgs84: "-494.088,-312.129,279.877,-1.423,-1.013,1.59,-0.748"
1258
+ },
1259
+ ESRI_37241: {
1260
+ towgs84: "-76.822,257.457,-12.817,2.136,-0.033,-2.392,-0.031"
1261
+ },
1262
+ ESRI_37249: {
1263
+ towgs84: "-440.296,58.548,296.265,1.128,10.202,4.559,-0.438"
1264
+ },
1265
+ ESRI_37245: {
1266
+ towgs84: "-511.151,-181.269,139.609,1.05,2.703,1.798,3.071"
1267
+ },
1268
+ EPSG_4178: {
1269
+ towgs84: "24.9,-126.4,-93.2,-0.063,-0.247,-0.041,1.01"
1270
+ },
1271
+ EPSG_4622: {
1272
+ towgs84: "-472.29,-5.63,-304.12,0.4362,-0.8374,0.2563,1.8984"
1273
+ },
1274
+ EPSG_4625: {
1275
+ towgs84: "126.93,547.94,130.41,-2.7867,5.1612,-0.8584,13.8227"
1276
+ },
1277
+ EPSG_5252: {
1278
+ towgs84: "0.023,0.036,-0.068,0.00176,0.00912,-0.01136,0.00439"
1279
+ },
1280
+ EPSG_4314: {
1281
+ towgs84: "597.1,71.4,412.1,0.894,0.068,-1.563,7.58"
1282
+ },
1283
+ EPSG_4282: {
1284
+ towgs84: "-178.3,-316.7,-131.5,5.278,6.077,10.979,19.166"
1285
+ },
1286
+ EPSG_4231: {
1287
+ towgs84: "-83.11,-97.38,-117.22,0.0276,-0.2167,0.2147,0.1218"
1288
+ },
1289
+ EPSG_4274: {
1290
+ towgs84: "-230.994,102.591,25.199,0.633,-0.239,0.9,1.95"
1291
+ },
1292
+ EPSG_4134: {
1293
+ towgs84: "-180.624,-225.516,173.919,-0.81,-1.898,8.336,16.71006"
1294
+ },
1295
+ EPSG_4254: {
1296
+ towgs84: "18.38,192.45,96.82,0.056,-0.142,-0.2,-0.0013"
1297
+ },
1298
+ EPSG_4159: {
1299
+ towgs84: "-194.513,-63.978,-25.759,-3.4027,3.756,-3.352,-0.9175"
1300
+ },
1301
+ EPSG_4687: {
1302
+ towgs84: "0.072,-0.507,-0.245,0.0183,-0.0003,0.007,-0.0093"
1303
+ },
1304
+ EPSG_4227: {
1305
+ towgs84: "-83.58,-397.54,458.78,-17.595,-2.847,4.256,3.225"
1306
+ },
1307
+ EPSG_4746: {
1308
+ towgs84: "599.4,72.4,419.2,-0.062,-0.022,-2.723,6.46"
1309
+ },
1310
+ EPSG_4745: {
1311
+ towgs84: "612.4,77,440.2,-0.054,0.057,-2.797,2.55"
1312
+ },
1313
+ EPSG_6311: {
1314
+ towgs84: "8.846,-4.394,-1.122,-0.00237,-0.146528,0.130428,0.783926"
1315
+ },
1316
+ EPSG_4289: {
1317
+ towgs84: "565.7381,50.4018,465.2904,-1.91514,1.60363,-9.09546,4.07244"
1318
+ },
1319
+ EPSG_4230: {
1320
+ towgs84: "-68.863,-134.888,-111.49,-0.53,-0.14,0.57,-3.4"
1321
+ },
1322
+ EPSG_4154: {
1323
+ towgs84: "-123.02,-158.95,-168.47"
1324
+ },
1325
+ EPSG_4156: {
1326
+ towgs84: "570.8,85.7,462.8,4.998,1.587,5.261,3.56"
1327
+ },
1328
+ EPSG_4299: {
1329
+ towgs84: "482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"
1330
+ },
1331
+ EPSG_4179: {
1332
+ towgs84: "33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84"
1333
+ },
1334
+ EPSG_4313: {
1335
+ towgs84: "-106.8686,52.2978,-103.7239,0.3366,-0.457,1.8422,-1.2747"
1336
+ },
1337
+ EPSG_4194: {
1338
+ towgs84: "163.511,127.533,-159.789"
1339
+ },
1340
+ EPSG_4195: {
1341
+ towgs84: "105,326,-102.5"
1342
+ },
1343
+ EPSG_4196: {
1344
+ towgs84: "-45,417,-3.5"
1345
+ },
1346
+ EPSG_4611: {
1347
+ towgs84: "-162.619,-276.959,-161.764,0.067753,-2.243649,-1.158827,-1.094246"
1348
+ },
1349
+ EPSG_4633: {
1350
+ towgs84: "137.092,131.66,91.475,-1.9436,-11.5993,-4.3321,-7.4824"
1351
+ },
1352
+ EPSG_4641: {
1353
+ towgs84: "-408.809,366.856,-412.987,1.8842,-0.5308,2.1655,-121.0993"
1354
+ },
1355
+ EPSG_4643: {
1356
+ towgs84: "-480.26,-438.32,-643.429,16.3119,20.1721,-4.0349,-111.7002"
1357
+ },
1358
+ EPSG_4300: {
1359
+ towgs84: "482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"
1360
+ },
1361
+ EPSG_4188: {
1362
+ towgs84: "482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"
1363
+ },
1364
+ EPSG_4660: {
1365
+ towgs84: "982.6087,552.753,-540.873,32.39344,-153.25684,-96.2266,16.805"
1366
+ },
1367
+ EPSG_4662: {
1368
+ towgs84: "97.295,-263.247,310.882,-1.5999,0.8386,3.1409,13.3259"
1369
+ },
1370
+ EPSG_3906: {
1371
+ towgs84: "577.88891,165.22205,391.18289,4.9145,-0.94729,-13.05098,7.78664"
1372
+ },
1373
+ EPSG_4307: {
1374
+ towgs84: "-209.3622,-87.8162,404.6198,0.0046,3.4784,0.5805,-1.4547"
1375
+ },
1376
+ EPSG_6892: {
1377
+ towgs84: "-76.269,-16.683,68.562,-6.275,10.536,-4.286,-13.686"
1378
+ },
1379
+ EPSG_4690: {
1380
+ towgs84: "221.597,152.441,176.523,2.403,1.3893,0.884,11.4648"
1381
+ },
1382
+ EPSG_4691: {
1383
+ towgs84: "218.769,150.75,176.75,3.5231,2.0037,1.288,10.9817"
1384
+ },
1385
+ EPSG_4629: {
1386
+ towgs84: "72.51,345.411,79.241,-1.5862,-0.8826,-0.5495,1.3653"
1387
+ },
1388
+ EPSG_4630: {
1389
+ towgs84: "165.804,216.213,180.26,-0.6251,-0.4515,-0.0721,7.4111"
1390
+ },
1391
+ EPSG_4692: {
1392
+ towgs84: "217.109,86.452,23.711,0.0183,-0.0003,0.007,-0.0093"
1393
+ },
1394
+ EPSG_9333: {
1395
+ towgs84: "0,0,0,-8.393,0.749,-10.276,0"
1396
+ },
1397
+ EPSG_9059: {
1398
+ towgs84: "0,0,0"
1399
+ },
1400
+ EPSG_4312: {
1401
+ towgs84: "601.705,84.263,485.227,4.7354,1.3145,5.393,-2.3887"
1402
+ },
1403
+ EPSG_4123: {
1404
+ towgs84: "-96.062,-82.428,-121.753,4.801,0.345,-1.376,1.496"
1405
+ },
1406
+ EPSG_4309: {
1407
+ towgs84: "-124.45,183.74,44.64,-0.4384,0.5446,-0.9706,-2.1365"
1408
+ },
1409
+ ESRI_104106: {
1410
+ towgs84: "-283.088,-70.693,117.445,-1.157,0.059,-0.652,-4.058"
1411
+ },
1412
+ EPSG_4281: {
1413
+ towgs84: "-219.247,-73.802,269.529"
1414
+ },
1415
+ EPSG_4322: {
1416
+ towgs84: "0,0,4.5"
1417
+ },
1418
+ EPSG_4324: {
1419
+ towgs84: "0,0,1.9"
1420
+ },
1421
+ EPSG_4284: {
1422
+ towgs84: "43.822,-108.842,-119.585,1.455,-0.761,0.737,0.549"
1423
+ },
1424
+ EPSG_4277: {
1425
+ towgs84: "446.448,-125.157,542.06,0.15,0.247,0.842,-20.489"
1426
+ },
1427
+ EPSG_4207: {
1428
+ towgs84: "-282.1,-72.2,120,-1.529,0.145,-0.89,-4.46"
1429
+ },
1430
+ EPSG_4688: {
1431
+ towgs84: "347.175,1077.618,2623.677,33.9058,-70.6776,9.4013,186.0647"
1432
+ },
1433
+ EPSG_4689: {
1434
+ towgs84: "410.793,54.542,80.501,-2.5596,-2.3517,-0.6594,17.3218"
1435
+ },
1436
+ EPSG_4720: {
1437
+ towgs84: "0,0,4.5"
1438
+ },
1439
+ EPSG_4273: {
1440
+ towgs84: "278.3,93,474.5,7.889,0.05,-6.61,6.21"
1441
+ },
1442
+ EPSG_4240: {
1443
+ towgs84: "204.64,834.74,293.8"
1444
+ },
1445
+ EPSG_4817: {
1446
+ towgs84: "278.3,93,474.5,7.889,0.05,-6.61,6.21"
1447
+ },
1448
+ ESRI_104131: {
1449
+ towgs84: "426.62,142.62,460.09,4.98,4.49,-12.42,-17.1"
1450
+ },
1451
+ EPSG_4265: {
1452
+ towgs84: "-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68"
1453
+ },
1454
+ EPSG_4263: {
1455
+ towgs84: "-111.92,-87.85,114.5,1.875,0.202,0.219,0.032"
1456
+ },
1457
+ EPSG_4298: {
1458
+ towgs84: "-689.5937,623.84046,-65.93566,-0.02331,1.17094,-0.80054,5.88536"
1459
+ },
1460
+ EPSG_4270: {
1461
+ towgs84: "-253.4392,-148.452,386.5267,0.15605,0.43,-0.1013,-0.0424"
1462
+ },
1463
+ EPSG_4229: {
1464
+ towgs84: "-121.8,98.1,-10.7"
1465
+ },
1466
+ EPSG_4220: {
1467
+ towgs84: "-55.5,-348,-229.2"
1468
+ },
1469
+ EPSG_4214: {
1470
+ towgs84: "12.646,-155.176,-80.863"
1471
+ },
1472
+ EPSG_4232: {
1473
+ towgs84: "-345,3,223"
1474
+ },
1475
+ EPSG_4238: {
1476
+ towgs84: "-1.977,-13.06,-9.993,0.364,0.254,0.689,-1.037"
1477
+ },
1478
+ EPSG_4168: {
1479
+ towgs84: "-170,33,326"
1480
+ },
1481
+ EPSG_4131: {
1482
+ towgs84: "199,931,318.9"
1483
+ },
1484
+ EPSG_4152: {
1485
+ towgs84: "-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"
1486
+ },
1487
+ EPSG_5228: {
1488
+ towgs84: "572.213,85.334,461.94,4.9732,1.529,5.2484,3.5378"
1489
+ },
1490
+ EPSG_8351: {
1491
+ towgs84: "485.021,169.465,483.839,7.786342,4.397554,4.102655,0"
1492
+ },
1493
+ EPSG_4683: {
1494
+ towgs84: "-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06"
1495
+ },
1496
+ EPSG_4133: {
1497
+ towgs84: "0,0,0"
1498
+ },
1499
+ EPSG_7373: {
1500
+ towgs84: "0.819,-0.5762,-1.6446,-0.00378,-0.03317,0.00318,0.0693"
1501
+ },
1502
+ EPSG_9075: {
1503
+ towgs84: "-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"
1504
+ },
1505
+ EPSG_9072: {
1506
+ towgs84: "-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"
1507
+ },
1508
+ EPSG_9294: {
1509
+ towgs84: "1.16835,-1.42001,-2.24431,-0.00822,-0.05508,0.01818,0.23388"
1510
+ },
1511
+ EPSG_4212: {
1512
+ towgs84: "-267.434,173.496,181.814,-13.4704,8.7154,7.3926,14.7492"
1513
+ },
1514
+ EPSG_4191: {
1515
+ towgs84: "-44.183,-0.58,-38.489,2.3867,2.7072,-3.5196,-8.2703"
1516
+ },
1517
+ EPSG_4237: {
1518
+ towgs84: "52.684,-71.194,-13.975,-0.312,-0.1063,-0.3729,1.0191"
1519
+ },
1520
+ EPSG_4740: {
1521
+ towgs84: "-1.08,-0.27,-0.9"
1522
+ },
1523
+ EPSG_4124: {
1524
+ towgs84: "419.3836,99.3335,591.3451,0.850389,1.817277,-7.862238,-0.99496"
1525
+ },
1526
+ EPSG_5681: {
1527
+ towgs84: "584.9636,107.7175,413.8067,1.1155,0.2824,-3.1384,7.9922"
1528
+ },
1529
+ EPSG_4141: {
1530
+ towgs84: "23.772,17.49,17.859,-0.3132,-1.85274,1.67299,-5.4262"
1531
+ },
1532
+ EPSG_4204: {
1533
+ towgs84: "-85.645,-273.077,-79.708,2.289,-1.421,2.532,3.194"
1534
+ },
1535
+ EPSG_4319: {
1536
+ towgs84: "226.702,-193.337,-35.371,-2.229,-4.391,9.238,0.9798"
1537
+ },
1538
+ EPSG_4200: {
1539
+ towgs84: "24.82,-131.21,-82.66"
1540
+ },
1541
+ EPSG_4130: {
1542
+ towgs84: "0,0,0"
1543
+ },
1544
+ EPSG_4127: {
1545
+ towgs84: "-82.875,-57.097,-156.768,-2.158,1.524,-0.982,-0.359"
1546
+ },
1547
+ EPSG_4149: {
1548
+ towgs84: "674.374,15.056,405.346"
1549
+ },
1550
+ EPSG_4617: {
1551
+ towgs84: "-0.991,1.9072,0.5129,1.25033e-7,4.6785e-8,5.6529e-8,0"
1552
+ },
1553
+ EPSG_4663: {
1554
+ towgs84: "-210.502,-66.902,-48.476,2.094,-15.067,-5.817,0.485"
1555
+ },
1556
+ EPSG_4664: {
1557
+ towgs84: "-211.939,137.626,58.3,-0.089,0.251,0.079,0.384"
1558
+ },
1559
+ EPSG_4665: {
1560
+ towgs84: "-105.854,165.589,-38.312,-0.003,-0.026,0.024,-0.048"
1561
+ },
1562
+ EPSG_4666: {
1563
+ towgs84: "631.392,-66.551,481.442,1.09,-4.445,-4.487,-4.43"
1564
+ },
1565
+ EPSG_4756: {
1566
+ towgs84: "-192.873,-39.382,-111.202,-0.00205,-0.0005,0.00335,0.0188"
1567
+ },
1568
+ EPSG_4723: {
1569
+ towgs84: "-179.483,-69.379,-27.584,-7.862,8.163,6.042,-13.925"
1570
+ },
1571
+ EPSG_4726: {
1572
+ towgs84: "8.853,-52.644,180.304,-0.393,-2.323,2.96,-24.081"
1573
+ },
1574
+ EPSG_4267: {
1575
+ towgs84: "-8.0,160.0,176.0"
1576
+ },
1577
+ EPSG_5365: {
1578
+ towgs84: "-0.16959,0.35312,0.51846,0.03385,-0.16325,0.03446,0.03693"
1579
+ },
1580
+ EPSG_4218: {
1581
+ towgs84: "304.5,306.5,-318.1"
1582
+ },
1583
+ EPSG_4242: {
1584
+ towgs84: "-33.722,153.789,94.959,-8.581,-4.478,4.54,8.95"
1585
+ },
1586
+ EPSG_4216: {
1587
+ towgs84: "-292.295,248.758,429.447,4.9971,2.99,6.6906,1.0289"
1588
+ },
1589
+ ESRI_104105: {
1590
+ towgs84: "631.392,-66.551,481.442,1.09,-4.445,-4.487,-4.43"
1591
+ },
1592
+ ESRI_104129: {
1593
+ towgs84: "0,0,0"
1594
+ },
1595
+ EPSG_4673: {
1596
+ towgs84: "174.05,-25.49,112.57"
1597
+ },
1598
+ EPSG_4202: {
1599
+ towgs84: "-124,-60,154"
1600
+ },
1601
+ EPSG_4203: {
1602
+ towgs84: "-117.763,-51.51,139.061,0.292,0.443,0.277,-0.191"
1603
+ },
1604
+ EPSG_3819: {
1605
+ towgs84: "595.48,121.69,515.35,4.115,-2.9383,0.853,-3.408"
1606
+ },
1607
+ EPSG_8694: {
1608
+ towgs84: "-93.799,-132.737,-219.073,-1.844,0.648,-6.37,-0.169"
1609
+ },
1610
+ EPSG_4145: {
1611
+ towgs84: "275.57,676.78,229.6"
1612
+ },
1613
+ EPSG_4283: {
1614
+ towgs84: "61.55,-10.87,-40.19,39.4924,32.7221,32.8979,-9.994"
1615
+ },
1616
+ EPSG_4317: {
1617
+ towgs84: "2.3287,-147.0425,-92.0802,-0.3092483,0.32482185,0.49729934,5.68906266"
1618
+ },
1619
+ EPSG_4272: {
1620
+ towgs84: "59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993"
1621
+ },
1622
+ EPSG_4248: {
1623
+ towgs84: "-307.7,265.3,-363.5"
1624
+ },
1625
+ EPSG_5561: {
1626
+ towgs84: "24,-121,-76"
1627
+ },
1628
+ EPSG_5233: {
1629
+ towgs84: "-0.293,766.95,87.713,0.195704,1.695068,3.473016,-0.039338"
1630
+ },
1631
+ ESRI_104130: {
1632
+ towgs84: "-86,-98,-119"
1633
+ },
1634
+ ESRI_104102: {
1635
+ towgs84: "682,-203,480"
1636
+ },
1637
+ ESRI_37207: {
1638
+ towgs84: "7,-10,-26"
1639
+ },
1640
+ EPSG_4675: {
1641
+ towgs84: "59.935,118.4,-10.871"
1642
+ },
1643
+ ESRI_104109: {
1644
+ towgs84: "-89.121,-348.182,260.871"
1645
+ },
1646
+ ESRI_104112: {
1647
+ towgs84: "-185.583,-230.096,281.361"
1648
+ },
1649
+ ESRI_104113: {
1650
+ towgs84: "25.1,-275.6,222.6"
1651
+ },
1652
+ IGNF_WGS72G: {
1653
+ towgs84: "0,12,6"
1654
+ },
1655
+ IGNF_NTFG: {
1656
+ towgs84: "-168,-60,320"
1657
+ },
1658
+ IGNF_EFATE57G: {
1659
+ towgs84: "-127,-769,472"
1660
+ },
1661
+ IGNF_PGP50G: {
1662
+ towgs84: "324.8,153.6,172.1"
1663
+ },
1664
+ IGNF_REUN47G: {
1665
+ towgs84: "94,-948,-1262"
1666
+ },
1667
+ IGNF_CSG67G: {
1668
+ towgs84: "-186,230,110"
1669
+ },
1670
+ IGNF_GUAD48G: {
1671
+ towgs84: "-467,-16,-300"
1672
+ },
1673
+ IGNF_TAHI51G: {
1674
+ towgs84: "162,117,154"
1675
+ },
1676
+ IGNF_TAHAAG: {
1677
+ towgs84: "65,342,77"
1678
+ },
1679
+ IGNF_NUKU72G: {
1680
+ towgs84: "84,274,65"
1681
+ },
1682
+ IGNF_PETRELS72G: {
1683
+ towgs84: "365,194,166"
1684
+ },
1685
+ IGNF_WALL78G: {
1686
+ towgs84: "253,-133,-127"
1687
+ },
1688
+ IGNF_MAYO50G: {
1689
+ towgs84: "-382,-59,-262"
1690
+ },
1691
+ IGNF_TANNAG: {
1692
+ towgs84: "-139,-967,436"
1693
+ },
1694
+ IGNF_IGN72G: {
1695
+ towgs84: "-13,-348,292"
1696
+ },
1697
+ IGNF_ATIGG: {
1698
+ towgs84: "1118,23,66"
1699
+ },
1700
+ IGNF_FANGA84G: {
1701
+ towgs84: "150.57,158.33,118.32"
1702
+ },
1703
+ IGNF_RUSAT84G: {
1704
+ towgs84: "202.13,174.6,-15.74"
1705
+ },
1706
+ IGNF_KAUE70G: {
1707
+ towgs84: "126.74,300.1,-75.49"
1708
+ },
1709
+ IGNF_MOP90G: {
1710
+ towgs84: "-10.8,-1.8,12.77"
1711
+ },
1712
+ IGNF_MHPF67G: {
1713
+ towgs84: "338.08,212.58,-296.17"
1714
+ },
1715
+ IGNF_TAHI79G: {
1716
+ towgs84: "160.61,116.05,153.69"
1717
+ },
1718
+ IGNF_ANAA92G: {
1719
+ towgs84: "1.5,3.84,4.81"
1720
+ },
1721
+ IGNF_MARQUI72G: {
1722
+ towgs84: "330.91,-13.92,58.56"
1723
+ },
1724
+ IGNF_APAT86G: {
1725
+ towgs84: "143.6,197.82,74.05"
1726
+ },
1727
+ IGNF_TUBU69G: {
1728
+ towgs84: "237.17,171.61,-77.84"
1729
+ },
1730
+ IGNF_STPM50G: {
1731
+ towgs84: "11.363,424.148,373.13"
1732
+ },
1733
+ EPSG_4150: {
1734
+ towgs84: "674.374,15.056,405.346"
1735
+ },
1736
+ EPSG_4754: {
1737
+ towgs84: "-208.4058,-109.8777,-2.5764"
1738
+ },
1739
+ ESRI_104101: {
1740
+ towgs84: "374,150,588"
1741
+ },
1742
+ EPSG_4693: {
1743
+ towgs84: "0,-0.15,0.68"
1744
+ },
1745
+ EPSG_6207: {
1746
+ towgs84: "293.17,726.18,245.36"
1747
+ },
1748
+ EPSG_4153: {
1749
+ towgs84: "-133.63,-157.5,-158.62"
1750
+ },
1751
+ EPSG_4132: {
1752
+ towgs84: "-241.54,-163.64,396.06"
1753
+ },
1754
+ EPSG_4221: {
1755
+ towgs84: "-154.5,150.7,100.4"
1756
+ },
1757
+ EPSG_4266: {
1758
+ towgs84: "-80.7,-132.5,41.1"
1759
+ },
1760
+ EPSG_4193: {
1761
+ towgs84: "-70.9,-151.8,-41.4"
1762
+ },
1763
+ EPSG_5340: {
1764
+ towgs84: "-0.41,0.46,-0.35"
1765
+ },
1766
+ EPSG_4246: {
1767
+ towgs84: "-294.7,-200.1,525.5"
1768
+ },
1769
+ EPSG_4318: {
1770
+ towgs84: "-3.2,-5.7,2.8"
1771
+ },
1772
+ EPSG_4121: {
1773
+ towgs84: "-199.87,74.79,246.62"
1774
+ },
1775
+ EPSG_4223: {
1776
+ towgs84: "-260.1,5.5,432.2"
1777
+ },
1778
+ EPSG_4158: {
1779
+ towgs84: "-0.465,372.095,171.736"
1780
+ },
1781
+ EPSG_4285: {
1782
+ towgs84: "-128.16,-282.42,21.93"
1783
+ },
1784
+ EPSG_4613: {
1785
+ towgs84: "-404.78,685.68,45.47"
1786
+ },
1787
+ EPSG_4607: {
1788
+ towgs84: "195.671,332.517,274.607"
1789
+ },
1790
+ EPSG_4475: {
1791
+ towgs84: "-381.788,-57.501,-256.673"
1792
+ },
1793
+ EPSG_4208: {
1794
+ towgs84: "-157.84,308.54,-146.6"
1795
+ },
1796
+ EPSG_4743: {
1797
+ towgs84: "70.995,-335.916,262.898"
1798
+ },
1799
+ EPSG_4710: {
1800
+ towgs84: "-323.65,551.39,-491.22"
1801
+ },
1802
+ EPSG_7881: {
1803
+ towgs84: "-0.077,0.079,0.086"
1804
+ },
1805
+ EPSG_4682: {
1806
+ towgs84: "283.729,735.942,261.143"
1807
+ },
1808
+ EPSG_4739: {
1809
+ towgs84: "-156,-271,-189"
1810
+ },
1811
+ EPSG_4679: {
1812
+ towgs84: "-80.01,253.26,291.19"
1813
+ },
1814
+ EPSG_4750: {
1815
+ towgs84: "-56.263,16.136,-22.856"
1816
+ },
1817
+ EPSG_4644: {
1818
+ towgs84: "-10.18,-350.43,291.37"
1819
+ },
1820
+ EPSG_4695: {
1821
+ towgs84: "-103.746,-9.614,-255.95"
1822
+ },
1823
+ EPSG_4292: {
1824
+ towgs84: "-355,21,72"
1825
+ },
1826
+ EPSG_4302: {
1827
+ towgs84: "-61.702,284.488,472.052"
1828
+ },
1829
+ EPSG_4143: {
1830
+ towgs84: "-124.76,53,466.79"
1831
+ },
1832
+ EPSG_4606: {
1833
+ towgs84: "-153,153,307"
1834
+ },
1835
+ EPSG_4699: {
1836
+ towgs84: "-770.1,158.4,-498.2"
1837
+ },
1838
+ EPSG_4247: {
1839
+ towgs84: "-273.5,110.6,-357.9"
1840
+ },
1841
+ EPSG_4160: {
1842
+ towgs84: "8.88,184.86,106.69"
1843
+ },
1844
+ EPSG_4161: {
1845
+ towgs84: "-233.43,6.65,173.64"
1846
+ },
1847
+ EPSG_9251: {
1848
+ towgs84: "-9.5,122.9,138.2"
1849
+ },
1850
+ EPSG_9253: {
1851
+ towgs84: "-78.1,101.6,133.3"
1852
+ },
1853
+ EPSG_4297: {
1854
+ towgs84: "-198.383,-240.517,-107.909"
1855
+ },
1856
+ EPSG_4269: {
1857
+ towgs84: "0,0,0"
1858
+ },
1859
+ EPSG_4301: {
1860
+ towgs84: "-147,506,687"
1861
+ },
1862
+ EPSG_4618: {
1863
+ towgs84: "-59,-11,-52"
1864
+ },
1865
+ EPSG_4612: {
1866
+ towgs84: "0,0,0"
1867
+ },
1868
+ EPSG_4678: {
1869
+ towgs84: "44.585,-131.212,-39.544"
1870
+ },
1871
+ EPSG_4250: {
1872
+ towgs84: "-130,29,364"
1873
+ },
1874
+ EPSG_4144: {
1875
+ towgs84: "214,804,268"
1876
+ },
1877
+ EPSG_4147: {
1878
+ towgs84: "-17.51,-108.32,-62.39"
1879
+ },
1880
+ EPSG_4259: {
1881
+ towgs84: "-254.1,-5.36,-100.29"
1882
+ },
1883
+ EPSG_4164: {
1884
+ towgs84: "-76,-138,67"
1885
+ },
1886
+ EPSG_4211: {
1887
+ towgs84: "-378.873,676.002,-46.255"
1888
+ },
1889
+ EPSG_4182: {
1890
+ towgs84: "-422.651,-172.995,84.02"
1891
+ },
1892
+ EPSG_4224: {
1893
+ towgs84: "-143.87,243.37,-33.52"
1894
+ },
1895
+ EPSG_4225: {
1896
+ towgs84: "-205.57,168.77,-4.12"
1897
+ },
1898
+ EPSG_5527: {
1899
+ towgs84: "-67.35,3.88,-38.22"
1900
+ },
1901
+ EPSG_4752: {
1902
+ towgs84: "98,390,-22"
1903
+ },
1904
+ EPSG_4310: {
1905
+ towgs84: "-30,190,89"
1906
+ },
1907
+ EPSG_9248: {
1908
+ towgs84: "-192.26,65.72,132.08"
1909
+ },
1910
+ EPSG_4680: {
1911
+ towgs84: "124.5,-63.5,-281"
1912
+ },
1913
+ EPSG_4701: {
1914
+ towgs84: "-79.9,-158,-168.9"
1915
+ },
1916
+ EPSG_4706: {
1917
+ towgs84: "-146.21,112.63,4.05"
1918
+ },
1919
+ EPSG_4805: {
1920
+ towgs84: "682,-203,480"
1921
+ },
1922
+ EPSG_4201: {
1923
+ towgs84: "-165,-11,206"
1924
+ },
1925
+ EPSG_4210: {
1926
+ towgs84: "-157,-2,-299"
1927
+ },
1928
+ EPSG_4183: {
1929
+ towgs84: "-104,167,-38"
1930
+ },
1931
+ EPSG_4139: {
1932
+ towgs84: "11,72,-101"
1933
+ },
1934
+ EPSG_4668: {
1935
+ towgs84: "-86,-98,-119"
1936
+ },
1937
+ EPSG_4717: {
1938
+ towgs84: "-2,151,181"
1939
+ },
1940
+ EPSG_4732: {
1941
+ towgs84: "102,52,-38"
1942
+ },
1943
+ EPSG_4280: {
1944
+ towgs84: "-377,681,-50"
1945
+ },
1946
+ EPSG_4209: {
1947
+ towgs84: "-138,-105,-289"
1948
+ },
1949
+ EPSG_4261: {
1950
+ towgs84: "31,146,47"
1951
+ },
1952
+ EPSG_4658: {
1953
+ towgs84: "-73,46,-86"
1954
+ },
1955
+ EPSG_4721: {
1956
+ towgs84: "265.025,384.929,-194.046"
1957
+ },
1958
+ EPSG_4222: {
1959
+ towgs84: "-136,-108,-292"
1960
+ },
1961
+ EPSG_4601: {
1962
+ towgs84: "-255,-15,71"
1963
+ },
1964
+ EPSG_4602: {
1965
+ towgs84: "725,685,536"
1966
+ },
1967
+ EPSG_4603: {
1968
+ towgs84: "72,213.7,93"
1969
+ },
1970
+ EPSG_4605: {
1971
+ towgs84: "9,183,236"
1972
+ },
1973
+ EPSG_4621: {
1974
+ towgs84: "137,248,-430"
1975
+ },
1976
+ EPSG_4657: {
1977
+ towgs84: "-28,199,5"
1978
+ },
1979
+ EPSG_4316: {
1980
+ towgs84: "103.25,-100.4,-307.19"
1981
+ },
1982
+ EPSG_4642: {
1983
+ towgs84: "-13,-348,292"
1984
+ },
1985
+ EPSG_4698: {
1986
+ towgs84: "145,-187,103"
1987
+ },
1988
+ EPSG_4192: {
1989
+ towgs84: "-206.1,-174.7,-87.7"
1990
+ },
1991
+ EPSG_4311: {
1992
+ towgs84: "-265,120,-358"
1993
+ },
1994
+ EPSG_4135: {
1995
+ towgs84: "58,-283,-182"
1996
+ },
1997
+ ESRI_104138: {
1998
+ towgs84: "198,-226,-347"
1999
+ },
2000
+ EPSG_4245: {
2001
+ towgs84: "-11,851,5"
2002
+ },
2003
+ EPSG_4142: {
2004
+ towgs84: "-125,53,467"
2005
+ },
2006
+ EPSG_4213: {
2007
+ towgs84: "-106,-87,188"
2008
+ },
2009
+ EPSG_4253: {
2010
+ towgs84: "-133,-77,-51"
2011
+ },
2012
+ EPSG_4129: {
2013
+ towgs84: "-132,-110,-335"
2014
+ },
2015
+ EPSG_4713: {
2016
+ towgs84: "-77,-128,142"
2017
+ },
2018
+ EPSG_4239: {
2019
+ towgs84: "217,823,299"
2020
+ },
2021
+ EPSG_4146: {
2022
+ towgs84: "295,736,257"
2023
+ },
2024
+ EPSG_4155: {
2025
+ towgs84: "-83,37,124"
2026
+ },
2027
+ EPSG_4165: {
2028
+ towgs84: "-173,253,27"
2029
+ },
2030
+ EPSG_4672: {
2031
+ towgs84: "175,-38,113"
2032
+ },
2033
+ EPSG_4236: {
2034
+ towgs84: "-637,-549,-203"
2035
+ },
2036
+ EPSG_4251: {
2037
+ towgs84: "-90,40,88"
2038
+ },
2039
+ EPSG_4271: {
2040
+ towgs84: "-2,374,172"
2041
+ },
2042
+ EPSG_4175: {
2043
+ towgs84: "-88,4,101"
2044
+ },
2045
+ EPSG_4716: {
2046
+ towgs84: "298,-304,-375"
2047
+ },
2048
+ EPSG_4315: {
2049
+ towgs84: "-23,259,-9"
2050
+ },
2051
+ EPSG_4744: {
2052
+ towgs84: "-242.2,-144.9,370.3"
2053
+ },
2054
+ EPSG_4244: {
2055
+ towgs84: "-97,787,86"
2056
+ },
2057
+ EPSG_4293: {
2058
+ towgs84: "616,97,-251"
2059
+ },
2060
+ EPSG_4714: {
2061
+ towgs84: "-127,-769,472"
2062
+ },
2063
+ EPSG_4736: {
2064
+ towgs84: "260,12,-147"
2065
+ },
2066
+ EPSG_6883: {
2067
+ towgs84: "-235,-110,393"
2068
+ },
2069
+ EPSG_6894: {
2070
+ towgs84: "-63,176,185"
2071
+ },
2072
+ EPSG_4205: {
2073
+ towgs84: "-43,-163,45"
2074
+ },
2075
+ EPSG_4256: {
2076
+ towgs84: "41,-220,-134"
2077
+ },
2078
+ EPSG_4262: {
2079
+ towgs84: "639,405,60"
2080
+ },
2081
+ EPSG_4604: {
2082
+ towgs84: "174,359,365"
2083
+ },
2084
+ EPSG_4169: {
2085
+ towgs84: "-115,118,426"
2086
+ },
2087
+ EPSG_4620: {
2088
+ towgs84: "-106,-129,165"
2089
+ },
2090
+ EPSG_4184: {
2091
+ towgs84: "-203,141,53"
2092
+ },
2093
+ EPSG_4616: {
2094
+ towgs84: "-289,-124,60"
2095
+ },
2096
+ EPSG_9403: {
2097
+ towgs84: "-307,-92,127"
2098
+ },
2099
+ EPSG_4684: {
2100
+ towgs84: "-133,-321,50"
2101
+ },
2102
+ EPSG_4708: {
2103
+ towgs84: "-491,-22,435"
2104
+ },
2105
+ EPSG_4707: {
2106
+ towgs84: "114,-116,-333"
2107
+ },
2108
+ EPSG_4709: {
2109
+ towgs84: "145,75,-272"
2110
+ },
2111
+ EPSG_4712: {
2112
+ towgs84: "-205,107,53"
2113
+ },
2114
+ EPSG_4711: {
2115
+ towgs84: "124,-234,-25"
2116
+ },
2117
+ EPSG_4718: {
2118
+ towgs84: "230,-199,-752"
2119
+ },
2120
+ EPSG_4719: {
2121
+ towgs84: "211,147,111"
2122
+ },
2123
+ EPSG_4724: {
2124
+ towgs84: "208,-435,-229"
2125
+ },
2126
+ EPSG_4725: {
2127
+ towgs84: "189,-79,-202"
2128
+ },
2129
+ EPSG_4735: {
2130
+ towgs84: "647,1777,-1124"
2131
+ },
2132
+ EPSG_4722: {
2133
+ towgs84: "-794,119,-298"
2134
+ },
2135
+ EPSG_4728: {
2136
+ towgs84: "-307,-92,127"
2137
+ },
2138
+ EPSG_4734: {
2139
+ towgs84: "-632,438,-609"
2140
+ },
2141
+ EPSG_4727: {
2142
+ towgs84: "912,-58,1227"
2143
+ },
2144
+ EPSG_4729: {
2145
+ towgs84: "185,165,42"
2146
+ },
2147
+ EPSG_4730: {
2148
+ towgs84: "170,42,84"
2149
+ },
2150
+ EPSG_4733: {
2151
+ towgs84: "276,-57,149"
2152
+ },
2153
+ ESRI_37218: {
2154
+ towgs84: "230,-199,-752"
2155
+ },
2156
+ ESRI_37240: {
2157
+ towgs84: "-7,215,225"
2158
+ },
2159
+ ESRI_37221: {
2160
+ towgs84: "252,-209,-751"
2161
+ },
2162
+ ESRI_4305: {
2163
+ towgs84: "-123,-206,219"
2164
+ },
2165
+ ESRI_104139: {
2166
+ towgs84: "-73,-247,227"
2167
+ },
2168
+ EPSG_4748: {
2169
+ towgs84: "51,391,-36"
2170
+ },
2171
+ EPSG_4219: {
2172
+ towgs84: "-384,664,-48"
2173
+ },
2174
+ EPSG_4255: {
2175
+ towgs84: "-333,-222,114"
2176
+ },
2177
+ EPSG_4257: {
2178
+ towgs84: "-587.8,519.75,145.76"
2179
+ },
2180
+ EPSG_4646: {
2181
+ towgs84: "-963,510,-359"
2182
+ },
2183
+ EPSG_6881: {
2184
+ towgs84: "-24,-203,268"
2185
+ },
2186
+ EPSG_6882: {
2187
+ towgs84: "-183,-15,273"
2188
+ },
2189
+ EPSG_4715: {
2190
+ towgs84: "-104,-129,239"
2191
+ },
2192
+ IGNF_RGF93GDD: {
2193
+ towgs84: "0,0,0"
2194
+ },
2195
+ IGNF_RGM04GDD: {
2196
+ towgs84: "0,0,0"
2197
+ },
2198
+ IGNF_RGSPM06GDD: {
2199
+ towgs84: "0,0,0"
2200
+ },
2201
+ IGNF_RGTAAF07GDD: {
2202
+ towgs84: "0,0,0"
2203
+ },
2204
+ IGNF_RGFG95GDD: {
2205
+ towgs84: "0,0,0"
2206
+ },
2207
+ IGNF_RGNCG: {
2208
+ towgs84: "0,0,0"
2209
+ },
2210
+ IGNF_RGPFGDD: {
2211
+ towgs84: "0,0,0"
2212
+ },
2213
+ IGNF_ETRS89G: {
2214
+ towgs84: "0,0,0"
2215
+ },
2216
+ IGNF_RGR92GDD: {
2217
+ towgs84: "0,0,0"
2218
+ },
2219
+ EPSG_4173: {
2220
+ towgs84: "0,0,0"
2221
+ },
2222
+ EPSG_4180: {
2223
+ towgs84: "0,0,0"
2224
+ },
2225
+ EPSG_4619: {
2226
+ towgs84: "0,0,0"
2227
+ },
2228
+ EPSG_4667: {
2229
+ towgs84: "0,0,0"
2230
+ },
2231
+ EPSG_4075: {
2232
+ towgs84: "0,0,0"
2233
+ },
2234
+ EPSG_6706: {
2235
+ towgs84: "0,0,0"
2236
+ },
2237
+ EPSG_7798: {
2238
+ towgs84: "0,0,0"
2239
+ },
2240
+ EPSG_4661: {
2241
+ towgs84: "0,0,0"
2242
+ },
2243
+ EPSG_4669: {
2244
+ towgs84: "0,0,0"
2245
+ },
2246
+ EPSG_8685: {
2247
+ towgs84: "0,0,0"
2248
+ },
2249
+ EPSG_4151: {
2250
+ towgs84: "0,0,0"
2251
+ },
2252
+ EPSG_9702: {
2253
+ towgs84: "0,0,0"
2254
+ },
2255
+ EPSG_4758: {
2256
+ towgs84: "0,0,0"
2257
+ },
2258
+ EPSG_4761: {
2259
+ towgs84: "0,0,0"
2260
+ },
2261
+ EPSG_4765: {
2262
+ towgs84: "0,0,0"
2263
+ },
2264
+ EPSG_8997: {
2265
+ towgs84: "0,0,0"
2266
+ },
2267
+ EPSG_4023: {
2268
+ towgs84: "0,0,0"
2269
+ },
2270
+ EPSG_4670: {
2271
+ towgs84: "0,0,0"
2272
+ },
2273
+ EPSG_4694: {
2274
+ towgs84: "0,0,0"
2275
+ },
2276
+ EPSG_4148: {
2277
+ towgs84: "0,0,0"
2278
+ },
2279
+ EPSG_4163: {
2280
+ towgs84: "0,0,0"
2281
+ },
2282
+ EPSG_4167: {
2283
+ towgs84: "0,0,0"
2284
+ },
2285
+ EPSG_4189: {
2286
+ towgs84: "0,0,0"
2287
+ },
2288
+ EPSG_4190: {
2289
+ towgs84: "0,0,0"
2290
+ },
2291
+ EPSG_4176: {
2292
+ towgs84: "0,0,0"
2293
+ },
2294
+ EPSG_4659: {
2295
+ towgs84: "0,0,0"
2296
+ },
2297
+ EPSG_3824: {
2298
+ towgs84: "0,0,0"
2299
+ },
2300
+ EPSG_3889: {
2301
+ towgs84: "0,0,0"
2302
+ },
2303
+ EPSG_4046: {
2304
+ towgs84: "0,0,0"
2305
+ },
2306
+ EPSG_4081: {
2307
+ towgs84: "0,0,0"
2308
+ },
2309
+ EPSG_4558: {
2310
+ towgs84: "0,0,0"
2311
+ },
2312
+ EPSG_4483: {
2313
+ towgs84: "0,0,0"
2314
+ },
2315
+ EPSG_5013: {
2316
+ towgs84: "0,0,0"
2317
+ },
2318
+ EPSG_5264: {
2319
+ towgs84: "0,0,0"
2320
+ },
2321
+ EPSG_5324: {
2322
+ towgs84: "0,0,0"
2323
+ },
2324
+ EPSG_5354: {
2325
+ towgs84: "0,0,0"
2326
+ },
2327
+ EPSG_5371: {
2328
+ towgs84: "0,0,0"
2329
+ },
2330
+ EPSG_5373: {
2331
+ towgs84: "0,0,0"
2332
+ },
2333
+ EPSG_5381: {
2334
+ towgs84: "0,0,0"
2335
+ },
2336
+ EPSG_5393: {
2337
+ towgs84: "0,0,0"
2338
+ },
2339
+ EPSG_5489: {
2340
+ towgs84: "0,0,0"
2341
+ },
2342
+ EPSG_5593: {
2343
+ towgs84: "0,0,0"
2344
+ },
2345
+ EPSG_6135: {
2346
+ towgs84: "0,0,0"
2347
+ },
2348
+ EPSG_6365: {
2349
+ towgs84: "0,0,0"
2350
+ },
2351
+ EPSG_5246: {
2352
+ towgs84: "0,0,0"
2353
+ },
2354
+ EPSG_7886: {
2355
+ towgs84: "0,0,0"
2356
+ },
2357
+ EPSG_8431: {
2358
+ towgs84: "0,0,0"
2359
+ },
2360
+ EPSG_8427: {
2361
+ towgs84: "0,0,0"
2362
+ },
2363
+ EPSG_8699: {
2364
+ towgs84: "0,0,0"
2365
+ },
2366
+ EPSG_8818: {
2367
+ towgs84: "0,0,0"
2368
+ },
2369
+ EPSG_4757: {
2370
+ towgs84: "0,0,0"
2371
+ },
2372
+ EPSG_9140: {
2373
+ towgs84: "0,0,0"
2374
+ },
2375
+ EPSG_8086: {
2376
+ towgs84: "0,0,0"
2377
+ },
2378
+ EPSG_4686: {
2379
+ towgs84: "0,0,0"
2380
+ },
2381
+ EPSG_4737: {
2382
+ towgs84: "0,0,0"
2383
+ },
2384
+ EPSG_4702: {
2385
+ towgs84: "0,0,0"
2386
+ },
2387
+ EPSG_4747: {
2388
+ towgs84: "0,0,0"
2389
+ },
2390
+ EPSG_4749: {
2391
+ towgs84: "0,0,0"
2392
+ },
2393
+ EPSG_4674: {
2394
+ towgs84: "0,0,0"
2395
+ },
2396
+ EPSG_4755: {
2397
+ towgs84: "0,0,0"
2398
+ },
2399
+ EPSG_4759: {
2400
+ towgs84: "0,0,0"
2401
+ },
2402
+ EPSG_4762: {
2403
+ towgs84: "0,0,0"
2404
+ },
2405
+ EPSG_4763: {
2406
+ towgs84: "0,0,0"
2407
+ },
2408
+ EPSG_4764: {
2409
+ towgs84: "0,0,0"
2410
+ },
2411
+ EPSG_4166: {
2412
+ towgs84: "0,0,0"
2413
+ },
2414
+ EPSG_4170: {
2415
+ towgs84: "0,0,0"
2416
+ },
2417
+ EPSG_5546: {
2418
+ towgs84: "0,0,0"
2419
+ },
2420
+ EPSG_7844: {
2421
+ towgs84: "0,0,0"
2422
+ },
2423
+ EPSG_4818: {
2424
+ towgs84: "589,76,480"
2425
+ }
2426
+ };
2427
+ for (var Ka in Lt) {
2428
+ var Kt = Lt[Ka];
2429
+ Kt.datumName && (Lt[Kt.datumName] = Kt);
2430
+ }
2431
+ function Ja(t, i, a, s, e, r, n) {
2432
+ var h = {};
2433
+ return t === void 0 || t === "none" ? h.datum_type = Zt : h.datum_type = oa, i && (h.datum_params = i.map(parseFloat), (h.datum_params[0] !== 0 || h.datum_params[1] !== 0 || h.datum_params[2] !== 0) && (h.datum_type = it), h.datum_params.length > 3 && (h.datum_params[3] !== 0 || h.datum_params[4] !== 0 || h.datum_params[5] !== 0 || h.datum_params[6] !== 0) && (h.datum_type = at, h.datum_params[3] *= mt, h.datum_params[4] *= mt, h.datum_params[5] *= mt, h.datum_params[6] = h.datum_params[6] / 1e6 + 1)), n && (h.datum_type = ft, h.grids = n), h.a = a, h.b = s, h.es = e, h.ep2 = r, h;
2434
+ }
2435
+ var hi = {};
2436
+ function Va(t, i, a) {
2437
+ return i instanceof ArrayBuffer ? Za(t, i, a) : { ready: Ya(t, i) };
2438
+ }
2439
+ function Za(t, i, a) {
2440
+ var s = !0;
2441
+ a !== void 0 && a.includeErrorFields === !1 && (s = !1);
2442
+ var e = new DataView(i), r = as(e), n = ss(e, r), h = es(e, n, r, s), o = { header: n, subgrids: h };
2443
+ return hi[t] = o, o;
2444
+ }
2445
+ async function Ya(t, i) {
2446
+ for (var a = [], s = await i.getImageCount(), e = s - 1; e >= 0; e--) {
2447
+ var r = await i.getImage(e), n = await r.readRasters(), h = n, o = [r.getWidth(), r.getHeight()], l = r.getBoundingBox().map(Pi), _ = [r.fileDirectory.ModelPixelScale[0], r.fileDirectory.ModelPixelScale[1]].map(Pi), c = l[0] + (o[0] - 1) * _[0], f = l[3] - (o[1] - 1) * _[1], u = h[0], M = h[1], g = [];
2448
+ for (let S = o[1] - 1; S >= 0; S--)
2449
+ for (let w = o[0] - 1; w >= 0; w--) {
2450
+ var d = S * o[0] + w;
2451
+ g.push([-K(M[d]), K(u[d])]);
2452
+ }
2453
+ a.push({
2454
+ del: _,
2455
+ lim: o,
2456
+ ll: [-c, f],
2457
+ cvs: g
2458
+ });
2459
+ }
2460
+ var E = {
2461
+ header: {
2462
+ nSubgrids: s
2463
+ },
2464
+ subgrids: a
2465
+ };
2466
+ return hi[t] = E, E;
2467
+ }
2468
+ function ts(t) {
2469
+ if (t === void 0)
2470
+ return null;
2471
+ var i = t.split(",");
2472
+ return i.map(is);
2473
+ }
2474
+ function is(t) {
2475
+ if (t.length === 0)
2476
+ return null;
2477
+ var i = t[0] === "@";
2478
+ return i && (t = t.slice(1)), t === "null" ? { name: "null", mandatory: !i, grid: null, isNull: !0 } : {
2479
+ name: t,
2480
+ mandatory: !i,
2481
+ grid: hi[t] || null,
2482
+ isNull: !1
2483
+ };
2484
+ }
2485
+ function Pi(t) {
2486
+ return t * Math.PI / 180;
2487
+ }
2488
+ function K(t) {
2489
+ return t / 3600 * Math.PI / 180;
2490
+ }
2491
+ function as(t) {
2492
+ var i = t.getInt32(8, !1);
2493
+ return i === 11 ? !1 : (i = t.getInt32(8, !0), i !== 11 && console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"), !0);
2494
+ }
2495
+ function ss(t, i) {
2496
+ return {
2497
+ nFields: t.getInt32(8, i),
2498
+ nSubgridFields: t.getInt32(24, i),
2499
+ nSubgrids: t.getInt32(40, i),
2500
+ shiftType: ti(t, 56, 64).trim(),
2501
+ fromSemiMajorAxis: t.getFloat64(120, i),
2502
+ fromSemiMinorAxis: t.getFloat64(136, i),
2503
+ toSemiMajorAxis: t.getFloat64(152, i),
2504
+ toSemiMinorAxis: t.getFloat64(168, i)
2505
+ };
2506
+ }
2507
+ function ti(t, i, a) {
2508
+ return String.fromCharCode.apply(null, new Uint8Array(t.buffer.slice(i, a)));
2509
+ }
2510
+ function es(t, i, a, s) {
2511
+ for (var e = 176, r = [], n = 0; n < i.nSubgrids; n++) {
2512
+ var h = hs(t, e, a), o = ns(t, e, h, a, s), l = Math.round(
2513
+ 1 + (h.upperLongitude - h.lowerLongitude) / h.longitudeInterval
2514
+ ), _ = Math.round(
2515
+ 1 + (h.upperLatitude - h.lowerLatitude) / h.latitudeInterval
2516
+ );
2517
+ r.push({
2518
+ ll: [K(h.lowerLongitude), K(h.lowerLatitude)],
2519
+ del: [K(h.longitudeInterval), K(h.latitudeInterval)],
2520
+ lim: [l, _],
2521
+ count: h.gridNodeCount,
2522
+ cvs: rs(o)
2523
+ });
2524
+ var c = 16;
2525
+ s === !1 && (c = 8), e += 176 + h.gridNodeCount * c;
2526
+ }
2527
+ return r;
2528
+ }
2529
+ function rs(t) {
2530
+ return t.map(function(i) {
2531
+ return [K(i.longitudeShift), K(i.latitudeShift)];
2532
+ });
2533
+ }
2534
+ function hs(t, i, a) {
2535
+ return {
2536
+ name: ti(t, i + 8, i + 16).trim(),
2537
+ parent: ti(t, i + 24, i + 24 + 8).trim(),
2538
+ lowerLatitude: t.getFloat64(i + 72, a),
2539
+ upperLatitude: t.getFloat64(i + 88, a),
2540
+ lowerLongitude: t.getFloat64(i + 104, a),
2541
+ upperLongitude: t.getFloat64(i + 120, a),
2542
+ latitudeInterval: t.getFloat64(i + 136, a),
2543
+ longitudeInterval: t.getFloat64(i + 152, a),
2544
+ gridNodeCount: t.getInt32(i + 168, a)
2545
+ };
2546
+ }
2547
+ function ns(t, i, a, s, e) {
2548
+ var r = i + 176, n = 16;
2549
+ e === !1 && (n = 8);
2550
+ for (var h = [], o = 0; o < a.gridNodeCount; o++) {
2551
+ var l = {
2552
+ latitudeShift: t.getFloat32(r + o * n, s),
2553
+ longitudeShift: t.getFloat32(r + o * n + 4, s)
2554
+ };
2555
+ e !== !1 && (l.latitudeAccuracy = t.getFloat32(r + o * n + 8, s), l.longitudeAccuracy = t.getFloat32(r + o * n + 12, s)), h.push(l);
2556
+ }
2557
+ return h;
2558
+ }
2559
+ function j(t, i) {
2560
+ if (!(this instanceof j))
2561
+ return new j(t);
2562
+ this.forward = null, this.inverse = null, this.init = null, this.name, this.names = null, this.title, i = i || function(l) {
2563
+ if (l)
2564
+ throw l;
2565
+ };
2566
+ var a = pa(t);
2567
+ if (typeof a != "object") {
2568
+ i("Could not parse to valid json: " + t);
2569
+ return;
2570
+ }
2571
+ var s = j.projections.get(a.projName);
2572
+ if (!s) {
2573
+ i("Could not get projection name from: " + t);
2574
+ return;
2575
+ }
2576
+ if (a.datumCode && a.datumCode !== "none") {
2577
+ var e = V(Lt, a.datumCode);
2578
+ e && (a.datum_params = a.datum_params || (e.towgs84 ? e.towgs84.split(",") : null), a.ellps = e.ellipse, a.datumName = e.datumName ? e.datumName : a.datumCode);
2579
+ }
2580
+ a.k0 = a.k0 || 1, a.axis = a.axis || "enu", a.ellps = a.ellps || "wgs84", a.lat1 = a.lat1 || a.lat0;
2581
+ var r = Xa(a.a, a.b, a.rf, a.ellps, a.sphere), n = Qa(r.a, r.b, r.rf, a.R_A), h = ts(a.nadgrids), o = a.datum || Ja(
2582
+ a.datumCode,
2583
+ a.datum_params,
2584
+ r.a,
2585
+ r.b,
2586
+ n.es,
2587
+ n.ep2,
2588
+ h
2589
+ );
2590
+ Si(this, a), Si(this, s), this.a = r.a, this.b = r.b, this.rf = r.rf, this.sphere = r.sphere, this.es = n.es, this.e = n.e, this.ep2 = n.ep2, this.datum = o, "init" in this && typeof this.init == "function" && this.init(), i(null, this);
2591
+ }
2592
+ j.projections = Wa;
2593
+ j.projections.start();
2594
+ function os(t, i) {
2595
+ return t.datum_type !== i.datum_type || t.a !== i.a || Math.abs(t.es - i.es) > 5e-11 ? !1 : t.datum_type === it ? t.datum_params[0] === i.datum_params[0] && t.datum_params[1] === i.datum_params[1] && t.datum_params[2] === i.datum_params[2] : t.datum_type === at ? t.datum_params[0] === i.datum_params[0] && t.datum_params[1] === i.datum_params[1] && t.datum_params[2] === i.datum_params[2] && t.datum_params[3] === i.datum_params[3] && t.datum_params[4] === i.datum_params[4] && t.datum_params[5] === i.datum_params[5] && t.datum_params[6] === i.datum_params[6] : !0;
2596
+ }
2597
+ function Qi(t, i, a) {
2598
+ var s = t.x, e = t.y, r = t.z ? t.z : 0, n, h, o, l;
2599
+ if (e < -v && e > -1.001 * v)
2600
+ e = -v;
2601
+ else if (e > v && e < 1.001 * v)
2602
+ e = v;
2603
+ else {
2604
+ if (e < -v)
2605
+ return { x: -1 / 0, y: -1 / 0, z: t.z };
2606
+ if (e > v)
2607
+ return { x: 1 / 0, y: 1 / 0, z: t.z };
2608
+ }
2609
+ return s > Math.PI && (s -= 2 * Math.PI), h = Math.sin(e), l = Math.cos(e), o = h * h, n = a / Math.sqrt(1 - i * o), {
2610
+ x: (n + r) * l * Math.cos(s),
2611
+ y: (n + r) * l * Math.sin(s),
2612
+ z: (n * (1 - i) + r) * h
2613
+ };
2614
+ }
2615
+ function Xi(t, i, a, s) {
2616
+ var e = 1e-12, r = e * e, n = 30, h, o, l, _, c, f, u, M, g, d, E, S, w, x = t.x, P = t.y, G = t.z ? t.z : 0, N, p, O;
2617
+ if (h = Math.sqrt(x * x + P * P), o = Math.sqrt(x * x + P * P + G * G), h / a < e) {
2618
+ if (N = 0, o / a < e)
2619
+ return p = v, O = -s, {
2620
+ x: t.x,
2621
+ y: t.y,
2622
+ z: t.z
2623
+ };
2624
+ } else
2625
+ N = Math.atan2(P, x);
2626
+ l = G / o, _ = h / o, c = 1 / Math.sqrt(1 - i * (2 - i) * _ * _), M = _ * (1 - i) * c, g = l * c, w = 0;
2627
+ do
2628
+ w++, u = a / Math.sqrt(1 - i * g * g), O = h * M + G * g - u * (1 - i * g * g), f = i * u / (u + O), c = 1 / Math.sqrt(1 - f * (2 - f) * _ * _), d = _ * (1 - f) * c, E = l * c, S = E * M - d * g, M = d, g = E;
2629
+ while (S * S > r && w < n);
2630
+ return p = Math.atan(E / Math.abs(d)), {
2631
+ x: N,
2632
+ y: p,
2633
+ z: O
2634
+ };
2635
+ }
2636
+ function ls(t, i, a) {
2637
+ if (i === it)
2638
+ return {
2639
+ x: t.x + a[0],
2640
+ y: t.y + a[1],
2641
+ z: t.z + a[2]
2642
+ };
2643
+ if (i === at) {
2644
+ var s = a[0], e = a[1], r = a[2], n = a[3], h = a[4], o = a[5], l = a[6];
2645
+ return {
2646
+ x: l * (t.x - o * t.y + h * t.z) + s,
2647
+ y: l * (o * t.x + t.y - n * t.z) + e,
2648
+ z: l * (-h * t.x + n * t.y + t.z) + r
2649
+ };
2650
+ }
2651
+ }
2652
+ function fs(t, i, a) {
2653
+ if (i === it)
2654
+ return {
2655
+ x: t.x - a[0],
2656
+ y: t.y - a[1],
2657
+ z: t.z - a[2]
2658
+ };
2659
+ if (i === at) {
2660
+ var s = a[0], e = a[1], r = a[2], n = a[3], h = a[4], o = a[5], l = a[6], _ = (t.x - s) / l, c = (t.y - e) / l, f = (t.z - r) / l;
2661
+ return {
2662
+ x: _ + o * c - h * f,
2663
+ y: -o * _ + c + n * f,
2664
+ z: h * _ - n * c + f
2665
+ };
2666
+ }
2667
+ }
2668
+ function Ot(t) {
2669
+ return t === it || t === at;
2670
+ }
2671
+ function cs(t, i, a) {
2672
+ if (os(t, i) || t.datum_type === Zt || i.datum_type === Zt)
2673
+ return a;
2674
+ var s = t.a, e = t.es;
2675
+ if (t.datum_type === ft) {
2676
+ var r = xi(t, !1, a);
2677
+ if (r !== 0)
2678
+ return;
2679
+ s = vi, e = gi;
2680
+ }
2681
+ var n = i.a, h = i.b, o = i.es;
2682
+ if (i.datum_type === ft && (n = vi, h = la, o = gi), e === o && s === n && !Ot(t.datum_type) && !Ot(i.datum_type))
2683
+ return a;
2684
+ if (a = Qi(a, e, s), Ot(t.datum_type) && (a = ls(a, t.datum_type, t.datum_params)), Ot(i.datum_type) && (a = fs(a, i.datum_type, i.datum_params)), a = Xi(a, o, n, h), i.datum_type === ft) {
2685
+ var l = xi(i, !0, a);
2686
+ if (l !== 0)
2687
+ return;
2688
+ }
2689
+ return a;
2690
+ }
2691
+ function xi(t, i, a) {
2692
+ if (t.grids === null || t.grids.length === 0)
2693
+ return console.log("Grid shift grids not found"), -1;
2694
+ var s = { x: -a.x, y: a.y }, e = { x: Number.NaN, y: Number.NaN }, r = [];
2695
+ t:
2696
+ for (var n = 0; n < t.grids.length; n++) {
2697
+ var h = t.grids[n];
2698
+ if (r.push(h.name), h.isNull) {
2699
+ e = s;
2700
+ break;
2701
+ }
2702
+ if (h.grid === null) {
2703
+ if (h.mandatory)
2704
+ return console.log("Unable to find mandatory grid '" + h.name + "'"), -1;
2705
+ continue;
2706
+ }
2707
+ for (var o = h.grid.subgrids, l = 0, _ = o.length; l < _; l++) {
2708
+ var c = o[l], f = (Math.abs(c.del[1]) + Math.abs(c.del[0])) / 1e4, u = c.ll[0] - f, M = c.ll[1] - f, g = c.ll[0] + (c.lim[0] - 1) * c.del[0] + f, d = c.ll[1] + (c.lim[1] - 1) * c.del[1] + f;
2709
+ if (!(M > s.y || u > s.x || d < s.y || g < s.x) && (e = _s(s, i, c), !isNaN(e.x)))
2710
+ break t;
2711
+ }
2712
+ }
2713
+ return isNaN(e.x) ? (console.log("Failed to find a grid shift table for location '" + -s.x * $ + " " + s.y * $ + " tried: '" + r + "'"), -1) : (a.x = -e.x, a.y = e.y, 0);
2714
+ }
2715
+ function _s(t, i, a) {
2716
+ var s = { x: Number.NaN, y: Number.NaN };
2717
+ if (isNaN(t.x))
2718
+ return s;
2719
+ var e = { x: t.x, y: t.y };
2720
+ e.x -= a.ll[0], e.y -= a.ll[1], e.x = y(e.x - Math.PI) + Math.PI;
2721
+ var r = Gi(e, a);
2722
+ if (i) {
2723
+ if (isNaN(r.x))
2724
+ return s;
2725
+ r.x = e.x - r.x, r.y = e.y - r.y;
2726
+ var n = 9, h = 1e-12, o, l;
2727
+ do {
2728
+ if (l = Gi(r, a), isNaN(l.x)) {
2729
+ console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation.");
2730
+ break;
2731
+ }
2732
+ o = { x: e.x - (l.x + r.x), y: e.y - (l.y + r.y) }, r.x += o.x, r.y += o.y;
2733
+ } while (n-- && Math.abs(o.x) > h && Math.abs(o.y) > h);
2734
+ if (n < 0)
2735
+ return console.log("Inverse grid shift iterator failed to converge."), s;
2736
+ s.x = y(r.x + a.ll[0]), s.y = r.y + a.ll[1];
2737
+ } else
2738
+ isNaN(r.x) || (s.x = t.x + r.x, s.y = t.y + r.y);
2739
+ return s;
2740
+ }
2741
+ function Gi(t, i) {
2742
+ var a = { x: t.x / i.del[0], y: t.y / i.del[1] }, s = { x: Math.floor(a.x), y: Math.floor(a.y) }, e = { x: a.x - 1 * s.x, y: a.y - 1 * s.y }, r = { x: Number.NaN, y: Number.NaN }, n;
2743
+ if (s.x < 0 || s.x >= i.lim[0] || s.y < 0 || s.y >= i.lim[1])
2744
+ return r;
2745
+ n = s.y * i.lim[0] + s.x;
2746
+ var h = { x: i.cvs[n][0], y: i.cvs[n][1] };
2747
+ n++;
2748
+ var o = { x: i.cvs[n][0], y: i.cvs[n][1] };
2749
+ n += i.lim[0];
2750
+ var l = { x: i.cvs[n][0], y: i.cvs[n][1] };
2751
+ n--;
2752
+ var _ = { x: i.cvs[n][0], y: i.cvs[n][1] }, c = e.x * e.y, f = e.x * (1 - e.y), u = (1 - e.x) * (1 - e.y), M = (1 - e.x) * e.y;
2753
+ return r.x = u * h.x + f * o.x + M * _.x + c * l.x, r.y = u * h.y + f * o.y + M * _.y + c * l.y, r;
2754
+ }
2755
+ function bi(t, i, a) {
2756
+ var s = a.x, e = a.y, r = a.z || 0, n, h, o, l = {};
2757
+ for (o = 0; o < 3; o++)
2758
+ if (!(i && o === 2 && a.z === void 0))
2759
+ switch (o === 0 ? (n = s, "ew".indexOf(t.axis[o]) !== -1 ? h = "x" : h = "y") : o === 1 ? (n = e, "ns".indexOf(t.axis[o]) !== -1 ? h = "y" : h = "x") : (n = r, h = "z"), t.axis[o]) {
2760
+ case "e":
2761
+ l[h] = n;
2762
+ break;
2763
+ case "w":
2764
+ l[h] = -n;
2765
+ break;
2766
+ case "n":
2767
+ l[h] = n;
2768
+ break;
2769
+ case "s":
2770
+ l[h] = -n;
2771
+ break;
2772
+ case "u":
2773
+ a[h] !== void 0 && (l.z = n);
2774
+ break;
2775
+ case "d":
2776
+ a[h] !== void 0 && (l.z = -n);
2777
+ break;
2778
+ default:
2779
+ return null;
2780
+ }
2781
+ return l;
2782
+ }
2783
+ function Ki(t) {
2784
+ var i = {
2785
+ x: t[0],
2786
+ y: t[1]
2787
+ };
2788
+ return t.length > 2 && (i.z = t[2]), t.length > 3 && (i.m = t[3]), i;
2789
+ }
2790
+ function us(t) {
2791
+ Ai(t.x), Ai(t.y);
2792
+ }
2793
+ function Ai(t) {
2794
+ if (typeof Number.isFinite == "function") {
2795
+ if (Number.isFinite(t))
2796
+ return;
2797
+ throw new TypeError("coordinates must be finite numbers");
2798
+ }
2799
+ if (typeof t != "number" || t !== t || !isFinite(t))
2800
+ throw new TypeError("coordinates must be finite numbers");
2801
+ }
2802
+ function Ms(t, i) {
2803
+ return (t.datum.datum_type === it || t.datum.datum_type === at || t.datum.datum_type === ft) && i.datumCode !== "WGS84" || (i.datum.datum_type === it || i.datum.datum_type === at || i.datum.datum_type === ft) && t.datumCode !== "WGS84";
2804
+ }
2805
+ function Bt(t, i, a, s) {
2806
+ var e;
2807
+ Array.isArray(a) ? a = Ki(a) : a = {
2808
+ x: a.x,
2809
+ y: a.y,
2810
+ z: a.z,
2811
+ m: a.m
2812
+ };
2813
+ var r = a.z !== void 0;
2814
+ if (us(a), t.datum && i.datum && Ms(t, i) && (e = new j("WGS84"), a = Bt(t, e, a, s), t = e), s && t.axis !== "enu" && (a = bi(t, !1, a)), t.projName === "longlat")
2815
+ a = {
2816
+ x: a.x * C,
2817
+ y: a.y * C,
2818
+ z: a.z || 0
2819
+ };
2820
+ else if (t.to_meter && (a = {
2821
+ x: a.x * t.to_meter,
2822
+ y: a.y * t.to_meter,
2823
+ z: a.z || 0
2824
+ }), a = t.inverse(a), !a)
2825
+ return;
2826
+ if (t.from_greenwich && (a.x += t.from_greenwich), a = cs(t.datum, i.datum, a), !!a)
2827
+ return a = /** @type {import('./core').InterfaceCoordinates} */
2828
+ a, i.from_greenwich && (a = {
2829
+ x: a.x - i.from_greenwich,
2830
+ y: a.y,
2831
+ z: a.z || 0
2832
+ }), i.projName === "longlat" ? a = {
2833
+ x: a.x * $,
2834
+ y: a.y * $,
2835
+ z: a.z || 0
2836
+ } : (a = i.forward(a), i.to_meter && (a = {
2837
+ x: a.x / i.to_meter,
2838
+ y: a.y / i.to_meter,
2839
+ z: a.z || 0
2840
+ })), s && i.axis !== "enu" ? bi(i, !0, a) : (a && !r && delete a.z, a);
2841
+ }
2842
+ var Ni = j("WGS84");
2843
+ function Jt(t, i, a, s) {
2844
+ var e, r, n;
2845
+ return Array.isArray(a) ? (e = Bt(t, i, a, s) || { x: NaN, y: NaN }, a.length > 2 ? typeof t.name < "u" && t.name === "geocent" || typeof i.name < "u" && i.name === "geocent" ? typeof e.z == "number" ? (
2846
+ /** @type {T} */
2847
+ [e.x, e.y, e.z].concat(a.slice(3))
2848
+ ) : (
2849
+ /** @type {T} */
2850
+ [e.x, e.y, a[2]].concat(a.slice(3))
2851
+ ) : (
2852
+ /** @type {T} */
2853
+ [e.x, e.y].concat(a.slice(2))
2854
+ ) : (
2855
+ /** @type {T} */
2856
+ [e.x, e.y]
2857
+ )) : (r = Bt(t, i, a, s), n = Object.keys(a), n.length === 2 || n.forEach(function(h) {
2858
+ if (typeof t.name < "u" && t.name === "geocent" || typeof i.name < "u" && i.name === "geocent") {
2859
+ if (h === "x" || h === "y" || h === "z")
2860
+ return;
2861
+ } else if (h === "x" || h === "y")
2862
+ return;
2863
+ r[h] = a[h];
2864
+ }), /** @type {T} */
2865
+ r);
2866
+ }
2867
+ function Tt(t) {
2868
+ return t instanceof j ? t : typeof t == "object" && "oProj" in t ? t.oProj : j(
2869
+ /** @type {string | PROJJSONDefinition} */
2870
+ t
2871
+ );
2872
+ }
2873
+ function vs(t, i, a) {
2874
+ var s, e, r = !1, n;
2875
+ return typeof i > "u" ? (e = Tt(t), s = Ni, r = !0) : (typeof /** @type {?} */
2876
+ i.x < "u" || Array.isArray(i)) && (a = /** @type {T} */
2877
+ /** @type {?} */
2878
+ i, e = Tt(t), s = Ni, r = !0), s || (s = Tt(t)), e || (e = Tt(
2879
+ /** @type {string | PROJJSONDefinition | proj } */
2880
+ i
2881
+ )), a ? Jt(s, e, a) : (n = {
2882
+ /**
2883
+ * @template {TemplateCoordinates} T
2884
+ * @param {T} coords
2885
+ * @param {boolean=} enforceAxis
2886
+ * @returns {T}
2887
+ */
2888
+ forward: function(h, o) {
2889
+ return Jt(s, e, h, o);
2890
+ },
2891
+ /**
2892
+ * @template {TemplateCoordinates} T
2893
+ * @param {T} coords
2894
+ * @param {boolean=} enforceAxis
2895
+ * @returns {T}
2896
+ */
2897
+ inverse: function(h, o) {
2898
+ return Jt(e, s, h, o);
2899
+ }
2900
+ }, r && (n.oProj = e), n);
2901
+ }
2902
+ var Ii = 6, Ji = "AJSAJS", Vi = "AFAFAF", ot = 65, U = 73, B = 79, vt = 86, gt = 90;
2903
+ const gs = {
2904
+ forward: Zi,
2905
+ inverse: ds,
2906
+ toPoint: Yi
2907
+ };
2908
+ function Zi(t, i) {
2909
+ return i = i || 5, Es(ms({
2910
+ lat: t[1],
2911
+ lon: t[0]
2912
+ }), i);
2913
+ }
2914
+ function ds(t) {
2915
+ var i = ni(ia(t.toUpperCase()));
2916
+ return i.lat && i.lon ? [i.lon, i.lat, i.lon, i.lat] : [i.left, i.bottom, i.right, i.top];
2917
+ }
2918
+ function Yi(t) {
2919
+ var i = ni(ia(t.toUpperCase()));
2920
+ return i.lat && i.lon ? [i.lon, i.lat] : [(i.left + i.right) / 2, (i.top + i.bottom) / 2];
2921
+ }
2922
+ function Vt(t) {
2923
+ return t * (Math.PI / 180);
2924
+ }
2925
+ function Ci(t) {
2926
+ return 180 * (t / Math.PI);
2927
+ }
2928
+ function ms(t) {
2929
+ var i = t.lat, a = t.lon, s = 6378137, e = 669438e-8, r = 0.9996, n, h, o, l, _, c, f, u = Vt(i), M = Vt(a), g, d;
2930
+ d = Math.floor((a + 180) / 6) + 1, a === 180 && (d = 60), i >= 56 && i < 64 && a >= 3 && a < 12 && (d = 32), i >= 72 && i < 84 && (a >= 0 && a < 9 ? d = 31 : a >= 9 && a < 21 ? d = 33 : a >= 21 && a < 33 ? d = 35 : a >= 33 && a < 42 && (d = 37)), n = (d - 1) * 6 - 180 + 3, g = Vt(n), h = e / (1 - e), o = s / Math.sqrt(1 - e * Math.sin(u) * Math.sin(u)), l = Math.tan(u) * Math.tan(u), _ = h * Math.cos(u) * Math.cos(u), c = Math.cos(u) * (M - g), f = s * ((1 - e / 4 - 3 * e * e / 64 - 5 * e * e * e / 256) * u - (3 * e / 8 + 3 * e * e / 32 + 45 * e * e * e / 1024) * Math.sin(2 * u) + (15 * e * e / 256 + 45 * e * e * e / 1024) * Math.sin(4 * u) - 35 * e * e * e / 3072 * Math.sin(6 * u));
2931
+ var E = r * o * (c + (1 - l + _) * c * c * c / 6 + (5 - 18 * l + l * l + 72 * _ - 58 * h) * c * c * c * c * c / 120) + 5e5, S = r * (f + o * Math.tan(u) * (c * c / 2 + (5 - l + 9 * _ + 4 * _ * _) * c * c * c * c / 24 + (61 - 58 * l + l * l + 600 * _ - 330 * h) * c * c * c * c * c * c / 720));
2932
+ return i < 0 && (S += 1e7), {
2933
+ northing: Math.round(S),
2934
+ easting: Math.round(E),
2935
+ zoneNumber: d,
2936
+ zoneLetter: ys(i)
2937
+ };
2938
+ }
2939
+ function ni(t) {
2940
+ var i = t.northing, a = t.easting, s = t.zoneLetter, e = t.zoneNumber;
2941
+ if (e < 0 || e > 60)
2942
+ return null;
2943
+ var r = 0.9996, n = 6378137, h = 669438e-8, o, l = (1 - Math.sqrt(1 - h)) / (1 + Math.sqrt(1 - h)), _, c, f, u, M, g, d, E, S, w = a - 5e5, x = i;
2944
+ s < "N" && (x -= 1e7), d = (e - 1) * 6 - 180 + 3, o = h / (1 - h), g = x / r, E = g / (n * (1 - h / 4 - 3 * h * h / 64 - 5 * h * h * h / 256)), S = E + (3 * l / 2 - 27 * l * l * l / 32) * Math.sin(2 * E) + (21 * l * l / 16 - 55 * l * l * l * l / 32) * Math.sin(4 * E) + 151 * l * l * l / 96 * Math.sin(6 * E), _ = n / Math.sqrt(1 - h * Math.sin(S) * Math.sin(S)), c = Math.tan(S) * Math.tan(S), f = o * Math.cos(S) * Math.cos(S), u = n * (1 - h) / Math.pow(1 - h * Math.sin(S) * Math.sin(S), 1.5), M = w / (_ * r);
2945
+ var P = S - _ * Math.tan(S) / u * (M * M / 2 - (5 + 3 * c + 10 * f - 4 * f * f - 9 * o) * M * M * M * M / 24 + (61 + 90 * c + 298 * f + 45 * c * c - 252 * o - 3 * f * f) * M * M * M * M * M * M / 720);
2946
+ P = Ci(P);
2947
+ var G = (M - (1 + 2 * c + f) * M * M * M / 6 + (5 - 2 * f + 28 * c - 3 * f * f + 8 * o + 24 * c * c) * M * M * M * M * M / 120) / Math.cos(S);
2948
+ G = d + Ci(G);
2949
+ var N;
2950
+ if (t.accuracy) {
2951
+ var p = ni({
2952
+ northing: t.northing + t.accuracy,
2953
+ easting: t.easting + t.accuracy,
2954
+ zoneLetter: t.zoneLetter,
2955
+ zoneNumber: t.zoneNumber
2956
+ });
2957
+ N = {
2958
+ top: p.lat,
2959
+ right: p.lon,
2960
+ bottom: P,
2961
+ left: G
2962
+ };
2963
+ } else
2964
+ N = {
2965
+ lat: P,
2966
+ lon: G
2967
+ };
2968
+ return N;
2969
+ }
2970
+ function ys(t) {
2971
+ var i = "Z";
2972
+ return 84 >= t && t >= 72 ? i = "X" : 72 > t && t >= 64 ? i = "W" : 64 > t && t >= 56 ? i = "V" : 56 > t && t >= 48 ? i = "U" : 48 > t && t >= 40 ? i = "T" : 40 > t && t >= 32 ? i = "S" : 32 > t && t >= 24 ? i = "R" : 24 > t && t >= 16 ? i = "Q" : 16 > t && t >= 8 ? i = "P" : 8 > t && t >= 0 ? i = "N" : 0 > t && t >= -8 ? i = "M" : -8 > t && t >= -16 ? i = "L" : -16 > t && t >= -24 ? i = "K" : -24 > t && t >= -32 ? i = "J" : -32 > t && t >= -40 ? i = "H" : -40 > t && t >= -48 ? i = "G" : -48 > t && t >= -56 ? i = "F" : -56 > t && t >= -64 ? i = "E" : -64 > t && t >= -72 ? i = "D" : -72 > t && t >= -80 && (i = "C"), i;
2973
+ }
2974
+ function Es(t, i) {
2975
+ var a = "00000" + t.easting, s = "00000" + t.northing;
2976
+ return t.zoneNumber + t.zoneLetter + Ss(t.easting, t.northing, t.zoneNumber) + a.substr(a.length - 5, i) + s.substr(s.length - 5, i);
2977
+ }
2978
+ function Ss(t, i, a) {
2979
+ var s = ta(a), e = Math.floor(t / 1e5), r = Math.floor(i / 1e5) % 20;
2980
+ return ws(e, r, s);
2981
+ }
2982
+ function ta(t) {
2983
+ var i = t % Ii;
2984
+ return i === 0 && (i = Ii), i;
2985
+ }
2986
+ function ws(t, i, a) {
2987
+ var s = a - 1, e = Ji.charCodeAt(s), r = Vi.charCodeAt(s), n = e + t - 1, h = r + i, o = !1;
2988
+ n > gt && (n = n - gt + ot - 1, o = !0), (n === U || e < U && n > U || (n > U || e < U) && o) && n++, (n === B || e < B && n > B || (n > B || e < B) && o) && (n++, n === U && n++), n > gt && (n = n - gt + ot - 1), h > vt ? (h = h - vt + ot - 1, o = !0) : o = !1, (h === U || r < U && h > U || (h > U || r < U) && o) && h++, (h === B || r < B && h > B || (h > B || r < B) && o) && (h++, h === U && h++), h > vt && (h = h - vt + ot - 1);
2989
+ var l = String.fromCharCode(n) + String.fromCharCode(h);
2990
+ return l;
2991
+ }
2992
+ function ia(t) {
2993
+ if (t && t.length === 0)
2994
+ throw "MGRSPoint coverting from nothing";
2995
+ for (var i = t.length, a = null, s = "", e, r = 0; !/[A-Z]/.test(e = t.charAt(r)); ) {
2996
+ if (r >= 2)
2997
+ throw "MGRSPoint bad conversion from: " + t;
2998
+ s += e, r++;
2999
+ }
3000
+ var n = parseInt(s, 10);
3001
+ if (r === 0 || r + 3 > i)
3002
+ throw "MGRSPoint bad conversion from: " + t;
3003
+ var h = t.charAt(r++);
3004
+ if (h <= "A" || h === "B" || h === "Y" || h >= "Z" || h === "I" || h === "O")
3005
+ throw "MGRSPoint zone letter " + h + " not handled: " + t;
3006
+ a = t.substring(r, r += 2);
3007
+ for (var o = ta(n), l = Ps(a.charAt(0), o), _ = xs(a.charAt(1), o); _ < Gs(h); )
3008
+ _ += 2e6;
3009
+ var c = i - r;
3010
+ if (c % 2 !== 0)
3011
+ throw `MGRSPoint has to have an even number
3012
+ of digits after the zone letter and two 100km letters - front
3013
+ half for easting meters, second half for
3014
+ northing meters` + t;
3015
+ var f = c / 2, u = 0, M = 0, g, d, E, S, w;
3016
+ return f > 0 && (g = 1e5 / Math.pow(10, f), d = t.substring(r, r + f), u = parseFloat(d) * g, E = t.substring(r + f), M = parseFloat(E) * g), S = u + l, w = M + _, {
3017
+ easting: S,
3018
+ northing: w,
3019
+ zoneLetter: h,
3020
+ zoneNumber: n,
3021
+ accuracy: g
3022
+ };
3023
+ }
3024
+ function Ps(t, i) {
3025
+ for (var a = Ji.charCodeAt(i - 1), s = 1e5, e = !1; a !== t.charCodeAt(0); ) {
3026
+ if (a++, a === U && a++, a === B && a++, a > gt) {
3027
+ if (e)
3028
+ throw "Bad character: " + t;
3029
+ a = ot, e = !0;
3030
+ }
3031
+ s += 1e5;
3032
+ }
3033
+ return s;
3034
+ }
3035
+ function xs(t, i) {
3036
+ if (t > "V")
3037
+ throw "MGRSPoint given invalid Northing " + t;
3038
+ for (var a = Vi.charCodeAt(i - 1), s = 0, e = !1; a !== t.charCodeAt(0); ) {
3039
+ if (a++, a === U && a++, a === B && a++, a > vt) {
3040
+ if (e)
3041
+ throw "Bad character: " + t;
3042
+ a = ot, e = !0;
3043
+ }
3044
+ s += 1e5;
3045
+ }
3046
+ return s;
3047
+ }
3048
+ function Gs(t) {
3049
+ var i;
3050
+ switch (t) {
3051
+ case "C":
3052
+ i = 11e5;
3053
+ break;
3054
+ case "D":
3055
+ i = 2e6;
3056
+ break;
3057
+ case "E":
3058
+ i = 28e5;
3059
+ break;
3060
+ case "F":
3061
+ i = 37e5;
3062
+ break;
3063
+ case "G":
3064
+ i = 46e5;
3065
+ break;
3066
+ case "H":
3067
+ i = 55e5;
3068
+ break;
3069
+ case "J":
3070
+ i = 64e5;
3071
+ break;
3072
+ case "K":
3073
+ i = 73e5;
3074
+ break;
3075
+ case "L":
3076
+ i = 82e5;
3077
+ break;
3078
+ case "M":
3079
+ i = 91e5;
3080
+ break;
3081
+ case "N":
3082
+ i = 0;
3083
+ break;
3084
+ case "P":
3085
+ i = 8e5;
3086
+ break;
3087
+ case "Q":
3088
+ i = 17e5;
3089
+ break;
3090
+ case "R":
3091
+ i = 26e5;
3092
+ break;
3093
+ case "S":
3094
+ i = 35e5;
3095
+ break;
3096
+ case "T":
3097
+ i = 44e5;
3098
+ break;
3099
+ case "U":
3100
+ i = 53e5;
3101
+ break;
3102
+ case "V":
3103
+ i = 62e5;
3104
+ break;
3105
+ case "W":
3106
+ i = 7e6;
3107
+ break;
3108
+ case "X":
3109
+ i = 79e5;
3110
+ break;
3111
+ default:
3112
+ i = -1;
3113
+ }
3114
+ if (i >= 0)
3115
+ return i;
3116
+ throw "Invalid zone letter: " + t;
3117
+ }
3118
+ function _t(t, i, a) {
3119
+ if (!(this instanceof _t))
3120
+ return new _t(t, i, a);
3121
+ if (Array.isArray(t))
3122
+ this.x = t[0], this.y = t[1], this.z = t[2] || 0;
3123
+ else if (typeof t == "object")
3124
+ this.x = t.x, this.y = t.y, this.z = t.z || 0;
3125
+ else if (typeof t == "string" && typeof i > "u") {
3126
+ var s = t.split(",");
3127
+ this.x = parseFloat(s[0]), this.y = parseFloat(s[1]), this.z = parseFloat(s[2]) || 0;
3128
+ } else
3129
+ this.x = t, this.y = i, this.z = a || 0;
3130
+ console.warn("proj4.Point will be removed in version 3, use proj4.toPoint");
3131
+ }
3132
+ _t.fromMGRS = function(t) {
3133
+ return new _t(Yi(t));
3134
+ };
3135
+ _t.prototype.toMGRS = function(t) {
3136
+ return Zi([this.x, this.y], t);
3137
+ };
3138
+ var bs = 1, As = 0.25, Ri = 0.046875, Oi = 0.01953125, Ti = 0.01068115234375, Ns = 0.75, Is = 0.46875, Cs = 0.013020833333333334, Rs = 0.007120768229166667, Os = 0.3645833333333333, Ts = 0.005696614583333333, ps = 0.3076171875;
3139
+ function oi(t) {
3140
+ var i = [];
3141
+ i[0] = bs - t * (As + t * (Ri + t * (Oi + t * Ti))), i[1] = t * (Ns - t * (Ri + t * (Oi + t * Ti)));
3142
+ var a = t * t;
3143
+ return i[2] = a * (Is - t * (Cs + t * Rs)), a *= t, i[3] = a * (Os - t * Ts), i[4] = a * t * ps, i;
3144
+ }
3145
+ function ut(t, i, a, s) {
3146
+ return a *= i, i *= i, s[0] * t - a * (s[1] + i * (s[2] + i * (s[3] + i * s[4])));
3147
+ }
3148
+ var Ls = 20;
3149
+ function li(t, i, a) {
3150
+ for (var s = 1 / (1 - i), e = t, r = Ls; r; --r) {
3151
+ var n = Math.sin(e), h = 1 - i * n * n;
3152
+ if (h = (ut(e, n, Math.cos(e), a) - t) * (h * Math.sqrt(h)) * s, e -= h, Math.abs(h) < m)
3153
+ return e;
3154
+ }
3155
+ return e;
3156
+ }
3157
+ function qs() {
3158
+ this.x0 = this.x0 !== void 0 ? this.x0 : 0, this.y0 = this.y0 !== void 0 ? this.y0 : 0, this.long0 = this.long0 !== void 0 ? this.long0 : 0, this.lat0 = this.lat0 !== void 0 ? this.lat0 : 0, this.es && (this.en = oi(this.es), this.ml0 = ut(this.lat0, Math.sin(this.lat0), Math.cos(this.lat0), this.en));
3159
+ }
3160
+ function Us(t) {
3161
+ var i = t.x, a = t.y, s = y(i - this.long0, this.over), e, r, n, h = Math.sin(a), o = Math.cos(a);
3162
+ if (this.es) {
3163
+ var _ = o * s, c = Math.pow(_, 2), f = this.ep2 * Math.pow(o, 2), u = Math.pow(f, 2), M = Math.abs(o) > m ? Math.tan(a) : 0, g = Math.pow(M, 2), d = Math.pow(g, 2);
3164
+ e = 1 - this.es * Math.pow(h, 2), _ = _ / Math.sqrt(e);
3165
+ var E = ut(a, h, o, this.en);
3166
+ r = this.a * (this.k0 * _ * (1 + c / 6 * (1 - g + f + c / 20 * (5 - 18 * g + d + 14 * f - 58 * g * f + c / 42 * (61 + 179 * d - d * g - 479 * g))))) + this.x0, n = this.a * (this.k0 * (E - this.ml0 + h * s * _ / 2 * (1 + c / 12 * (5 - g + 9 * f + 4 * u + c / 30 * (61 + d - 58 * g + 270 * f - 330 * g * f + c / 56 * (1385 + 543 * d - d * g - 3111 * g)))))) + this.y0;
3167
+ } else {
3168
+ var l = o * Math.sin(s);
3169
+ if (Math.abs(Math.abs(l) - 1) < m)
3170
+ return 93;
3171
+ if (r = 0.5 * this.a * this.k0 * Math.log((1 + l) / (1 - l)) + this.x0, n = o * Math.cos(s) / Math.sqrt(1 - Math.pow(l, 2)), l = Math.abs(n), l >= 1) {
3172
+ if (l - 1 > m)
3173
+ return 93;
3174
+ n = 0;
3175
+ } else
3176
+ n = Math.acos(n);
3177
+ a < 0 && (n = -n), n = this.a * this.k0 * (n - this.lat0) + this.y0;
3178
+ }
3179
+ return t.x = r, t.y = n, t;
3180
+ }
3181
+ function ks(t) {
3182
+ var i, a, s, e, r = (t.x - this.x0) * (1 / this.a), n = (t.y - this.y0) * (1 / this.a);
3183
+ if (this.es)
3184
+ if (i = this.ml0 + n / this.k0, a = li(i, this.es, this.en), Math.abs(a) < v) {
3185
+ var c = Math.sin(a), f = Math.cos(a), u = Math.abs(f) > m ? Math.tan(a) : 0, M = this.ep2 * Math.pow(f, 2), g = Math.pow(M, 2), d = Math.pow(u, 2), E = Math.pow(d, 2);
3186
+ i = 1 - this.es * Math.pow(c, 2);
3187
+ var S = r * Math.sqrt(i) / this.k0, w = Math.pow(S, 2);
3188
+ i = i * u, s = a - i * w / (1 - this.es) * 0.5 * (1 - w / 12 * (5 + 3 * d - 9 * M * d + M - 4 * g - w / 30 * (61 + 90 * d - 252 * M * d + 45 * E + 46 * M - w / 56 * (1385 + 3633 * d + 4095 * E + 1574 * E * d)))), e = y(this.long0 + S * (1 - w / 6 * (1 + 2 * d + M - w / 20 * (5 + 28 * d + 24 * E + 8 * M * d + 6 * M - w / 42 * (61 + 662 * d + 1320 * E + 720 * E * d)))) / f, this.over);
3189
+ } else
3190
+ s = v * At(n), e = 0;
3191
+ else {
3192
+ var h = Math.exp(r / this.k0), o = 0.5 * (h - 1 / h), l = this.lat0 + n / this.k0, _ = Math.cos(l);
3193
+ i = Math.sqrt((1 - Math.pow(_, 2)) / (1 + Math.pow(o, 2))), s = Math.asin(i), n < 0 && (s = -s), o === 0 && _ === 0 ? e = 0 : e = y(Math.atan2(o, _) + this.long0, this.over);
3194
+ }
3195
+ return t.x = e, t.y = s, t;
3196
+ }
3197
+ var $s = ["Fast_Transverse_Mercator", "Fast Transverse Mercator"];
3198
+ const qt = {
3199
+ init: qs,
3200
+ forward: Us,
3201
+ inverse: ks,
3202
+ names: $s
3203
+ };
3204
+ function aa(t) {
3205
+ var i = Math.exp(t);
3206
+ return i = (i - 1 / i) / 2, i;
3207
+ }
3208
+ function k(t, i) {
3209
+ t = Math.abs(t), i = Math.abs(i);
3210
+ var a = Math.max(t, i), s = Math.min(t, i) / (a || 1);
3211
+ return a * Math.sqrt(1 + Math.pow(s, 2));
3212
+ }
3213
+ function Fs(t) {
3214
+ var i = 1 + t, a = i - 1;
3215
+ return a === 0 ? t : t * Math.log(i) / a;
3216
+ }
3217
+ function Ds(t) {
3218
+ var i = Math.abs(t);
3219
+ return i = Fs(i * (1 + i / (k(1, i) + 1))), t < 0 ? -i : i;
3220
+ }
3221
+ function fi(t, i) {
3222
+ for (var a = 2 * Math.cos(2 * i), s = t.length - 1, e = t[s], r = 0, n; --s >= 0; )
3223
+ n = -r + a * e + t[s], r = e, e = n;
3224
+ return i + n * Math.sin(2 * i);
3225
+ }
3226
+ function Bs(t, i) {
3227
+ for (var a = 2 * Math.cos(i), s = t.length - 1, e = t[s], r = 0, n; --s >= 0; )
3228
+ n = -r + a * e + t[s], r = e, e = n;
3229
+ return Math.sin(i) * n;
3230
+ }
3231
+ function js(t) {
3232
+ var i = Math.exp(t);
3233
+ return i = (i + 1 / i) / 2, i;
3234
+ }
3235
+ function sa(t, i, a) {
3236
+ for (var s = Math.sin(i), e = Math.cos(i), r = aa(a), n = js(a), h = 2 * e * n, o = -2 * s * r, l = t.length - 1, _ = t[l], c = 0, f = 0, u = 0, M, g; --l >= 0; )
3237
+ M = f, g = c, f = _, c = u, _ = -M + h * f - o * c + t[l], u = -g + o * f + h * c;
3238
+ return h = s * n, o = e * r, [h * _ - o * u, h * u + o * _];
3239
+ }
3240
+ function zs() {
3241
+ if (!this.approx && (isNaN(this.es) || this.es <= 0))
3242
+ throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');
3243
+ this.approx && (qt.init.apply(this), this.forward = qt.forward, this.inverse = qt.inverse), this.x0 = this.x0 !== void 0 ? this.x0 : 0, this.y0 = this.y0 !== void 0 ? this.y0 : 0, this.long0 = this.long0 !== void 0 ? this.long0 : 0, this.lat0 = this.lat0 !== void 0 ? this.lat0 : 0, this.cgb = [], this.cbg = [], this.utg = [], this.gtu = [];
3244
+ var t = this.es / (1 + Math.sqrt(1 - this.es)), i = t / (2 - t), a = i;
3245
+ this.cgb[0] = i * (2 + i * (-2 / 3 + i * (-2 + i * (116 / 45 + i * (26 / 45 + i * (-2854 / 675)))))), this.cbg[0] = i * (-2 + i * (2 / 3 + i * (4 / 3 + i * (-82 / 45 + i * (32 / 45 + i * (4642 / 4725)))))), a = a * i, this.cgb[1] = a * (7 / 3 + i * (-8 / 5 + i * (-227 / 45 + i * (2704 / 315 + i * (2323 / 945))))), this.cbg[1] = a * (5 / 3 + i * (-16 / 15 + i * (-13 / 9 + i * (904 / 315 + i * (-1522 / 945))))), a = a * i, this.cgb[2] = a * (56 / 15 + i * (-136 / 35 + i * (-1262 / 105 + i * (73814 / 2835)))), this.cbg[2] = a * (-26 / 15 + i * (34 / 21 + i * (8 / 5 + i * (-12686 / 2835)))), a = a * i, this.cgb[3] = a * (4279 / 630 + i * (-332 / 35 + i * (-399572 / 14175))), this.cbg[3] = a * (1237 / 630 + i * (-12 / 5 + i * (-24832 / 14175))), a = a * i, this.cgb[4] = a * (4174 / 315 + i * (-144838 / 6237)), this.cbg[4] = a * (-734 / 315 + i * (109598 / 31185)), a = a * i, this.cgb[5] = a * (601676 / 22275), this.cbg[5] = a * (444337 / 155925), a = Math.pow(i, 2), this.Qn = this.k0 / (1 + i) * (1 + a * (1 / 4 + a * (1 / 64 + a / 256))), this.utg[0] = i * (-0.5 + i * (2 / 3 + i * (-37 / 96 + i * (1 / 360 + i * (81 / 512 + i * (-96199 / 604800)))))), this.gtu[0] = i * (0.5 + i * (-2 / 3 + i * (5 / 16 + i * (41 / 180 + i * (-127 / 288 + i * (7891 / 37800)))))), this.utg[1] = a * (-1 / 48 + i * (-1 / 15 + i * (437 / 1440 + i * (-46 / 105 + i * (1118711 / 3870720))))), this.gtu[1] = a * (13 / 48 + i * (-3 / 5 + i * (557 / 1440 + i * (281 / 630 + i * (-1983433 / 1935360))))), a = a * i, this.utg[2] = a * (-17 / 480 + i * (37 / 840 + i * (209 / 4480 + i * (-5569 / 90720)))), this.gtu[2] = a * (61 / 240 + i * (-103 / 140 + i * (15061 / 26880 + i * (167603 / 181440)))), a = a * i, this.utg[3] = a * (-4397 / 161280 + i * (11 / 504 + i * (830251 / 7257600))), this.gtu[3] = a * (49561 / 161280 + i * (-179 / 168 + i * (6601661 / 7257600))), a = a * i, this.utg[4] = a * (-4583 / 161280 + i * (108847 / 3991680)), this.gtu[4] = a * (34729 / 80640 + i * (-3418889 / 1995840)), a = a * i, this.utg[5] = a * (-20648693 / 638668800), this.gtu[5] = a * (212378941 / 319334400);
3246
+ var s = fi(this.cbg, this.lat0);
3247
+ this.Zb = -this.Qn * (s + Bs(this.gtu, 2 * s));
3248
+ }
3249
+ function Ws(t) {
3250
+ var i = y(t.x - this.long0, this.over), a = t.y;
3251
+ a = fi(this.cbg, a);
3252
+ var s = Math.sin(a), e = Math.cos(a), r = Math.sin(i), n = Math.cos(i);
3253
+ a = Math.atan2(s, n * e), i = Math.atan2(r * e, k(s, e * n)), i = Ds(Math.tan(i));
3254
+ var h = sa(this.gtu, 2 * a, 2 * i);
3255
+ a = a + h[0], i = i + h[1];
3256
+ var o, l;
3257
+ return Math.abs(i) <= 2.623395162778 ? (o = this.a * (this.Qn * i) + this.x0, l = this.a * (this.Qn * a + this.Zb) + this.y0) : (o = 1 / 0, l = 1 / 0), t.x = o, t.y = l, t;
3258
+ }
3259
+ function Hs(t) {
3260
+ var i = (t.x - this.x0) * (1 / this.a), a = (t.y - this.y0) * (1 / this.a);
3261
+ a = (a - this.Zb) / this.Qn, i = i / this.Qn;
3262
+ var s, e;
3263
+ if (Math.abs(i) <= 2.623395162778) {
3264
+ var r = sa(this.utg, 2 * a, 2 * i);
3265
+ a = a + r[0], i = i + r[1], i = Math.atan(aa(i));
3266
+ var n = Math.sin(a), h = Math.cos(a), o = Math.sin(i), l = Math.cos(i);
3267
+ a = Math.atan2(n * l, k(o, l * h)), i = Math.atan2(o, l * h), s = y(i + this.long0, this.over), e = fi(this.cgb, a);
3268
+ } else
3269
+ s = 1 / 0, e = 1 / 0;
3270
+ return t.x = s, t.y = e, t;
3271
+ }
3272
+ var Qs = ["Extended_Transverse_Mercator", "Extended Transverse Mercator", "etmerc", "Transverse_Mercator", "Transverse Mercator", "Gauss Kruger", "Gauss_Kruger", "tmerc"];
3273
+ const Ut = {
3274
+ init: zs,
3275
+ forward: Ws,
3276
+ inverse: Hs,
3277
+ names: Qs
3278
+ };
3279
+ function Xs(t, i) {
3280
+ if (t === void 0) {
3281
+ if (t = Math.floor((y(i) + Math.PI) * 30 / Math.PI) + 1, t < 0)
3282
+ return 0;
3283
+ if (t > 60)
3284
+ return 60;
3285
+ }
3286
+ return t;
3287
+ }
3288
+ var Ks = "etmerc";
3289
+ function Js() {
3290
+ var t = Xs(this.zone, this.long0);
3291
+ if (t === void 0)
3292
+ throw new Error("unknown utm zone");
3293
+ this.lat0 = 0, this.long0 = (6 * Math.abs(t) - 183) * C, this.x0 = 5e5, this.y0 = this.utmSouth ? 1e7 : 0, this.k0 = 0.9996, Ut.init.apply(this), this.forward = Ut.forward, this.inverse = Ut.inverse;
3294
+ }
3295
+ var Vs = ["Universal Transverse Mercator System", "utm"];
3296
+ const Zs = {
3297
+ init: Js,
3298
+ names: Vs,
3299
+ dependsOn: Ks
3300
+ };
3301
+ function ci(t, i) {
3302
+ return Math.pow((1 - t) / (1 + t), i);
3303
+ }
3304
+ var Ys = 20;
3305
+ function te() {
3306
+ var t = Math.sin(this.lat0), i = Math.cos(this.lat0);
3307
+ i *= i, this.rc = Math.sqrt(1 - this.es) / (1 - this.es * t * t), this.C = Math.sqrt(1 + this.es * i * i / (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 + b) / (Math.pow(Math.tan(0.5 * this.lat0 + b), this.C) * ci(this.e * t, this.ratexp));
3308
+ }
3309
+ function ie(t) {
3310
+ var i = t.x, a = t.y;
3311
+ return t.y = 2 * Math.atan(this.K * Math.pow(Math.tan(0.5 * a + b), this.C) * ci(this.e * Math.sin(a), this.ratexp)) - v, t.x = this.C * i, t;
3312
+ }
3313
+ function ae(t) {
3314
+ for (var i = 1e-14, a = t.x / this.C, s = t.y, e = Math.pow(Math.tan(0.5 * s + b) / this.K, 1 / this.C), r = Ys; r > 0 && (s = 2 * Math.atan(e * ci(this.e * Math.sin(t.y), -0.5 * this.e)) - v, !(Math.abs(s - t.y) < i)); --r)
3315
+ t.y = s;
3316
+ return r ? (t.x = a, t.y = s, t) : null;
3317
+ }
3318
+ const _i = {
3319
+ init: te,
3320
+ forward: ie,
3321
+ inverse: ae
3322
+ };
3323
+ function se() {
3324
+ _i.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"));
3325
+ }
3326
+ function ee(t) {
3327
+ var i, a, s, e;
3328
+ return t.x = y(t.x - this.long0, this.over), _i.forward.apply(this, [t]), i = Math.sin(t.y), a = Math.cos(t.y), s = Math.cos(t.x), e = this.k0 * this.R2 / (1 + this.sinc0 * i + this.cosc0 * a * s), t.x = e * a * Math.sin(t.x), t.y = e * (this.cosc0 * i - this.sinc0 * a * s), t.x = this.a * t.x + this.x0, t.y = this.a * t.y + this.y0, t;
3329
+ }
3330
+ function re(t) {
3331
+ var i, a, s, e, r;
3332
+ if (t.x = (t.x - this.x0) / this.a, t.y = (t.y - this.y0) / this.a, t.x /= this.k0, t.y /= this.k0, r = k(t.x, t.y)) {
3333
+ var n = 2 * Math.atan2(r, this.R2);
3334
+ i = Math.sin(n), a = Math.cos(n), e = Math.asin(a * this.sinc0 + t.y * i * this.cosc0 / r), s = Math.atan2(t.x * i, r * this.cosc0 * a - t.y * this.sinc0 * i);
3335
+ } else
3336
+ e = this.phic0, s = 0;
3337
+ return t.x = s, t.y = e, _i.inverse.apply(this, [t]), t.x = y(t.x + this.long0, this.over), t;
3338
+ }
3339
+ var he = ["Stereographic_North_Pole", "Oblique_Stereographic", "sterea", "Oblique Stereographic Alternative", "Double_Stereographic"];
3340
+ const ne = {
3341
+ init: se,
3342
+ forward: ee,
3343
+ inverse: re,
3344
+ names: he
3345
+ };
3346
+ function ui(t, i, a) {
3347
+ return i *= a, Math.tan(0.5 * (v + t)) * Math.pow((1 - i) / (1 + i), 0.5 * a);
3348
+ }
3349
+ function oe() {
3350
+ 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) <= m && (this.k0 = 0.5 * (1 + At(this.lat0) * Math.sin(this.lat_ts))) : (Math.abs(this.coslat0) <= m && (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) <= m && Math.abs(Math.cos(this.lat_ts)) > m && (this.k0 = 0.5 * this.cons * H(this.e, Math.sin(this.lat_ts), Math.cos(this.lat_ts)) / W(this.e, this.con * this.lat_ts, this.con * Math.sin(this.lat_ts))), this.ms1 = H(this.e, this.sinlat0, this.coslat0), this.X0 = 2 * Math.atan(ui(this.lat0, this.sinlat0, this.e)) - v, this.cosX0 = Math.cos(this.X0), this.sinX0 = Math.sin(this.X0));
3351
+ }
3352
+ function le(t) {
3353
+ var i = t.x, a = t.y, s = Math.sin(a), e = Math.cos(a), r, n, h, o, l, _, c = y(i - this.long0, this.over);
3354
+ return Math.abs(Math.abs(i - this.long0) - Math.PI) <= m && Math.abs(a + this.lat0) <= m ? (t.x = NaN, t.y = NaN, t) : this.sphere ? (r = 2 * this.k0 / (1 + this.sinlat0 * s + this.coslat0 * e * Math.cos(c)), t.x = this.a * r * e * Math.sin(c) + this.x0, t.y = this.a * r * (this.coslat0 * s - this.sinlat0 * e * Math.cos(c)) + this.y0, t) : (n = 2 * Math.atan(ui(a, s, this.e)) - v, o = Math.cos(n), h = Math.sin(n), Math.abs(this.coslat0) <= m ? (l = W(this.e, a * this.con, this.con * s), _ = 2 * this.a * this.k0 * l / this.cons, t.x = this.x0 + _ * Math.sin(i - this.long0), t.y = this.y0 - this.con * _ * Math.cos(i - this.long0), t) : (Math.abs(this.sinlat0) < m ? (r = 2 * this.a * this.k0 / (1 + o * Math.cos(c)), t.y = r * h) : (r = 2 * this.a * this.k0 * this.ms1 / (this.cosX0 * (1 + this.sinX0 * h + this.cosX0 * o * Math.cos(c))), t.y = r * (this.cosX0 * h - this.sinX0 * o * Math.cos(c)) + this.y0), t.x = r * o * Math.sin(c) + this.x0, t));
3355
+ }
3356
+ function fe(t) {
3357
+ t.x -= this.x0, t.y -= this.y0;
3358
+ var i, a, s, e, r, n = Math.sqrt(t.x * t.x + t.y * t.y);
3359
+ if (this.sphere) {
3360
+ var h = 2 * Math.atan(n / (2 * this.a * this.k0));
3361
+ return i = this.long0, a = this.lat0, n <= m ? (t.x = i, t.y = a, t) : (a = Math.asin(Math.cos(h) * this.sinlat0 + t.y * Math.sin(h) * this.coslat0 / n), Math.abs(this.coslat0) < m ? this.lat0 > 0 ? i = y(this.long0 + Math.atan2(t.x, -1 * t.y), this.over) : i = y(this.long0 + Math.atan2(t.x, t.y), this.over) : i = y(this.long0 + Math.atan2(t.x * Math.sin(h), n * this.coslat0 * Math.cos(h) - t.y * this.sinlat0 * Math.sin(h)), this.over), t.x = i, t.y = a, t);
3362
+ } else if (Math.abs(this.coslat0) <= m) {
3363
+ if (n <= m)
3364
+ return a = this.lat0, i = this.long0, t.x = i, t.y = a, t;
3365
+ t.x *= this.con, t.y *= this.con, s = n * this.cons / (2 * this.a * this.k0), a = this.con * Gt(this.e, s), i = this.con * y(this.con * this.long0 + Math.atan2(t.x, -1 * t.y), this.over);
3366
+ } else
3367
+ e = 2 * Math.atan(n * this.cosX0 / (2 * this.a * this.k0 * this.ms1)), i = this.long0, n <= m ? r = this.X0 : (r = Math.asin(Math.cos(e) * this.sinX0 + t.y * Math.sin(e) * this.cosX0 / n), i = y(this.long0 + Math.atan2(t.x * Math.sin(e), n * this.cosX0 * Math.cos(e) - t.y * this.sinX0 * Math.sin(e)), this.over)), a = -1 * Gt(this.e, Math.tan(0.5 * (v + r)));
3368
+ return t.x = i, t.y = a, t;
3369
+ }
3370
+ var ce = ["stere", "Stereographic_South_Pole", "Polar_Stereographic_variant_A", "Polar_Stereographic_variant_B", "Polar_Stereographic"];
3371
+ const _e = {
3372
+ init: oe,
3373
+ forward: le,
3374
+ inverse: fe,
3375
+ names: ce,
3376
+ ssfn_: ui
3377
+ };
3378
+ function ue() {
3379
+ var t = this.lat0;
3380
+ this.lambda0 = this.long0;
3381
+ var i = Math.sin(t), a = this.a, s = this.rf, e = 1 / s, r = 2 * e - Math.pow(e, 2), n = this.e = Math.sqrt(r);
3382
+ this.R = this.k0 * a * Math.sqrt(1 - r) / (1 - r * Math.pow(i, 2)), this.alpha = Math.sqrt(1 + r / (1 - r) * Math.pow(Math.cos(t), 4)), this.b0 = Math.asin(i / this.alpha);
3383
+ var h = Math.log(Math.tan(Math.PI / 4 + this.b0 / 2)), o = Math.log(Math.tan(Math.PI / 4 + t / 2)), l = Math.log((1 + n * i) / (1 - n * i));
3384
+ this.K = h - this.alpha * o + this.alpha * n / 2 * l;
3385
+ }
3386
+ function Me(t) {
3387
+ var i = Math.log(Math.tan(Math.PI / 4 - t.y / 2)), a = this.e / 2 * Math.log((1 + this.e * Math.sin(t.y)) / (1 - this.e * Math.sin(t.y))), s = -this.alpha * (i + a) + this.K, e = 2 * (Math.atan(Math.exp(s)) - Math.PI / 4), r = this.alpha * (t.x - this.lambda0), n = Math.atan(Math.sin(r) / (Math.sin(this.b0) * Math.tan(e) + Math.cos(this.b0) * Math.cos(r))), h = Math.asin(Math.cos(this.b0) * Math.sin(e) - Math.sin(this.b0) * Math.cos(e) * Math.cos(r));
3388
+ return t.y = this.R / 2 * Math.log((1 + Math.sin(h)) / (1 - Math.sin(h))) + this.y0, t.x = this.R * n + this.x0, t;
3389
+ }
3390
+ function ve(t) {
3391
+ for (var i = t.x - this.x0, a = t.y - this.y0, s = i / this.R, e = 2 * (Math.atan(Math.exp(a / this.R)) - Math.PI / 4), r = Math.asin(Math.cos(this.b0) * Math.sin(e) + Math.sin(this.b0) * Math.cos(e) * Math.cos(s)), n = Math.atan(Math.sin(s) / (Math.cos(this.b0) * Math.cos(s) - Math.sin(this.b0) * Math.tan(e))), h = this.lambda0 + n / this.alpha, o = 0, l = r, _ = -1e3, c = 0; Math.abs(l - _) > 1e-7; ) {
3392
+ if (++c > 20)
3393
+ return;
3394
+ o = 1 / this.alpha * (Math.log(Math.tan(Math.PI / 4 + r / 2)) - this.K) + this.e * Math.log(Math.tan(Math.PI / 4 + Math.asin(this.e * Math.sin(l)) / 2)), _ = l, l = 2 * Math.atan(Math.exp(o)) - Math.PI / 2;
3395
+ }
3396
+ return t.x = h, t.y = l, t;
3397
+ }
3398
+ var ge = ["somerc"];
3399
+ const de = {
3400
+ init: ue,
3401
+ forward: Me,
3402
+ inverse: ve,
3403
+ names: ge
3404
+ };
3405
+ var rt = 1e-7;
3406
+ function me(t) {
3407
+ var i = ["Hotine_Oblique_Mercator", "Hotine_Oblique_Mercator_variant_A", "Hotine_Oblique_Mercator_Azimuth_Natural_Origin"], a = typeof t.projName == "object" ? Object.keys(t.projName)[0] : t.projName;
3408
+ return "no_uoff" in t || "no_off" in t || i.indexOf(a) !== -1 || i.indexOf(Wi(a)) !== -1;
3409
+ }
3410
+ function ye() {
3411
+ var t, i, a, s, e, r, n, h, o, l, _ = 0, c, f = 0, u = 0, M = 0, g = 0, d = 0, E = 0;
3412
+ this.no_off = me(this), this.no_rot = "no_rot" in this;
3413
+ var S = !1;
3414
+ "alpha" in this && (S = !0);
3415
+ var w = !1;
3416
+ if ("rectified_grid_angle" in this && (w = !0), S && (E = this.alpha), w && (_ = this.rectified_grid_angle), S || w)
3417
+ f = this.longc;
3418
+ else if (u = this.long1, g = this.lat1, M = this.long2, d = this.lat2, Math.abs(g - d) <= rt || (t = Math.abs(g)) <= rt || Math.abs(t - v) <= rt || Math.abs(Math.abs(this.lat0) - v) <= rt || Math.abs(Math.abs(d) - v) <= rt)
3419
+ throw new Error();
3420
+ var x = 1 - this.es;
3421
+ i = Math.sqrt(x), Math.abs(this.lat0) > m ? (h = Math.sin(this.lat0), a = Math.cos(this.lat0), t = 1 - this.es * h * h, this.B = a * a, this.B = Math.sqrt(1 + this.es * this.B * this.B / x), this.A = this.B * this.k0 * i / t, s = this.B * i / (a * Math.sqrt(t)), e = s * s - 1, e <= 0 ? e = 0 : (e = Math.sqrt(e), this.lat0 < 0 && (e = -e)), this.E = e += s, this.E *= Math.pow(W(this.e, this.lat0, h), this.B)) : (this.B = 1 / i, this.A = this.k0, this.E = s = e = 1), S || w ? (S ? (c = Math.asin(Math.sin(E) / s), w || (_ = E)) : (c = _, E = Math.asin(s * Math.sin(c))), this.lam0 = f - Math.asin(0.5 * (e - 1 / e) * Math.tan(c)) / this.B) : (r = Math.pow(W(this.e, g, Math.sin(g)), this.B), n = Math.pow(W(this.e, d, Math.sin(d)), this.B), e = this.E / r, o = (n - r) / (n + r), l = this.E * this.E, l = (l - n * r) / (l + n * r), t = u - M, t < -Math.PI ? M -= Pt : t > Math.PI && (M += Pt), this.lam0 = y(0.5 * (u + M) - Math.atan(l * Math.tan(0.5 * this.B * (u - M)) / o) / this.B, this.over), c = Math.atan(2 * Math.sin(this.B * y(u - this.lam0, this.over)) / (e - 1 / e)), _ = E = Math.asin(s * Math.sin(c))), this.singam = Math.sin(c), this.cosgam = Math.cos(c), this.sinrot = Math.sin(_), this.cosrot = Math.cos(_), 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(E))), this.lat0 < 0 && (this.u_0 = -this.u_0)), e = 0.5 * c, this.v_pole_n = this.ArB * Math.log(Math.tan(b - e)), this.v_pole_s = this.ArB * Math.log(Math.tan(b + e));
3422
+ }
3423
+ function Ee(t) {
3424
+ var i = {}, a, s, e, r, n, h, o, l;
3425
+ if (t.x = t.x - this.lam0, Math.abs(Math.abs(t.y) - v) > m) {
3426
+ if (n = this.E / Math.pow(W(this.e, t.y, Math.sin(t.y)), this.B), h = 1 / n, a = 0.5 * (n - h), s = 0.5 * (n + h), r = Math.sin(this.B * t.x), e = (a * this.singam - r * this.cosgam) / s, Math.abs(Math.abs(e) - 1) < m)
3427
+ throw new Error();
3428
+ l = 0.5 * this.ArB * Math.log((1 - e) / (1 + e)), h = Math.cos(this.B * t.x), Math.abs(h) < rt ? o = this.A * t.x : o = this.ArB * Math.atan2(a * this.cosgam + r * this.singam, h);
3429
+ } else
3430
+ l = t.y > 0 ? this.v_pole_n : this.v_pole_s, o = this.ArB * t.y;
3431
+ return this.no_rot ? (i.x = o, i.y = l) : (o -= this.u_0, i.x = l * this.cosrot + o * this.sinrot, i.y = o * this.cosrot - l * this.sinrot), i.x = this.a * i.x + this.x0, i.y = this.a * i.y + this.y0, i;
3432
+ }
3433
+ function Se(t) {
3434
+ var i, a, s, e, r, n, h, o = {};
3435
+ if (t.x = (t.x - this.x0) * (1 / this.a), t.y = (t.y - this.y0) * (1 / this.a), this.no_rot ? (a = t.y, i = t.x) : (a = t.x * this.cosrot - t.y * this.sinrot, i = t.y * this.cosrot + t.x * this.sinrot + this.u_0), s = Math.exp(-this.BrA * a), e = 0.5 * (s - 1 / s), r = 0.5 * (s + 1 / s), n = Math.sin(this.BrA * i), h = (n * this.cosgam + e * this.singam) / r, Math.abs(Math.abs(h) - 1) < m)
3436
+ o.x = 0, o.y = h < 0 ? -v : v;
3437
+ else {
3438
+ if (o.y = this.E / Math.sqrt((1 + h) / (1 - h)), o.y = Gt(this.e, Math.pow(o.y, 1 / this.B)), o.y === 1 / 0)
3439
+ throw new Error();
3440
+ o.x = -this.rB * Math.atan2(e * this.cosgam - n * this.singam, Math.cos(this.BrA * i));
3441
+ }
3442
+ return o.x += this.lam0, o;
3443
+ }
3444
+ var we = ["Hotine_Oblique_Mercator", "Hotine Oblique Mercator", "Hotine_Oblique_Mercator_variant_A", "Hotine_Oblique_Mercator_Variant_B", "Hotine_Oblique_Mercator_Azimuth_Natural_Origin", "Hotine_Oblique_Mercator_Two_Point_Natural_Origin", "Hotine_Oblique_Mercator_Azimuth_Center", "Oblique_Mercator", "omerc"];
3445
+ const Pe = {
3446
+ init: ye,
3447
+ forward: Ee,
3448
+ inverse: Se,
3449
+ names: we
3450
+ };
3451
+ function xe() {
3452
+ if (this.lat2 || (this.lat2 = this.lat1), this.k0 || (this.k0 = 1), this.x0 = this.x0 || 0, this.y0 = this.y0 || 0, !(Math.abs(this.lat1 + this.lat2) < m)) {
3453
+ var t = this.b / this.a;
3454
+ this.e = Math.sqrt(1 - t * t);
3455
+ var i = Math.sin(this.lat1), a = Math.cos(this.lat1), s = H(this.e, i, a), e = W(this.e, this.lat1, i), r = Math.sin(this.lat2), n = Math.cos(this.lat2), h = H(this.e, r, n), o = W(this.e, this.lat2, r), l = Math.abs(Math.abs(this.lat0) - v) < m ? 0 : W(this.e, this.lat0, Math.sin(this.lat0));
3456
+ Math.abs(this.lat1 - this.lat2) > m ? this.ns = Math.log(s / h) / Math.log(e / o) : this.ns = i, isNaN(this.ns) && (this.ns = i), this.f0 = s / (this.ns * Math.pow(e, this.ns)), this.rh = this.a * this.f0 * Math.pow(l, this.ns), this.title || (this.title = "Lambert Conformal Conic");
3457
+ }
3458
+ }
3459
+ function Ge(t) {
3460
+ var i = t.x, a = t.y;
3461
+ Math.abs(2 * Math.abs(a) - Math.PI) <= m && (a = At(a) * (v - 2 * m));
3462
+ var s = Math.abs(Math.abs(a) - v), e, r;
3463
+ if (s > m)
3464
+ e = W(this.e, a, Math.sin(a)), r = this.a * this.f0 * Math.pow(e, this.ns);
3465
+ else {
3466
+ if (s = a * this.ns, s <= 0)
3467
+ return null;
3468
+ r = 0;
3469
+ }
3470
+ var n = this.ns * y(i - this.long0, this.over);
3471
+ return t.x = this.k0 * (r * Math.sin(n)) + this.x0, t.y = this.k0 * (this.rh - r * Math.cos(n)) + this.y0, t;
3472
+ }
3473
+ function be(t) {
3474
+ var i, a, s, e, r, n = (t.x - this.x0) / this.k0, h = this.rh - (t.y - this.y0) / this.k0;
3475
+ this.ns > 0 ? (i = Math.sqrt(n * n + h * h), a = 1) : (i = -Math.sqrt(n * n + h * h), a = -1);
3476
+ var o = 0;
3477
+ if (i !== 0 && (o = Math.atan2(a * n, a * h)), i !== 0 || this.ns > 0) {
3478
+ if (a = 1 / this.ns, s = Math.pow(i / (this.a * this.f0), a), e = Gt(this.e, s), e === -9999)
3479
+ return null;
3480
+ } else
3481
+ e = -v;
3482
+ return r = y(o / this.ns + this.long0, this.over), t.x = r, t.y = e, t;
3483
+ }
3484
+ var Ae = [
3485
+ "Lambert Tangential Conformal Conic Projection",
3486
+ "Lambert_Conformal_Conic",
3487
+ "Lambert_Conformal_Conic_1SP",
3488
+ "Lambert_Conformal_Conic_2SP",
3489
+ "lcc",
3490
+ "Lambert Conic Conformal (1SP)",
3491
+ "Lambert Conic Conformal (2SP)"
3492
+ ];
3493
+ const Ne = {
3494
+ init: xe,
3495
+ forward: Ge,
3496
+ inverse: be,
3497
+ names: Ae
3498
+ };
3499
+ function Ie() {
3500
+ this.a = 6377397155e-3, this.es = 0.006674372230614, this.e = Math.sqrt(this.es), this.lat0 || (this.lat0 = 0.863937979737193), this.long0 || (this.long0 = 0.7417649320975901 - 0.308341501185665), this.k0 || (this.k0 = 0.9999), this.s45 = 0.785398163397448, this.s90 = 2 * this.s45, this.fi0 = this.lat0, this.e2 = this.es, this.e = Math.sqrt(this.e2), this.alfa = Math.sqrt(1 + this.e2 * Math.pow(Math.cos(this.fi0), 4) / (1 - this.e2)), this.uq = 1.04216856380474, this.u0 = Math.asin(Math.sin(this.fi0) / this.alfa), this.g = Math.pow((1 + this.e * Math.sin(this.fi0)) / (1 - this.e * Math.sin(this.fi0)), this.alfa * this.e / 2), this.k = Math.tan(this.u0 / 2 + this.s45) / Math.pow(Math.tan(this.fi0 / 2 + this.s45), this.alfa) * this.g, this.k1 = this.k0, this.n0 = this.a * Math.sqrt(1 - this.e2) / (1 - this.e2 * Math.pow(Math.sin(this.fi0), 2)), this.s0 = 1.37008346281555, this.n = Math.sin(this.s0), this.ro0 = this.k1 * this.n0 / Math.tan(this.s0), this.ad = this.s90 - this.uq;
3501
+ }
3502
+ function Ce(t) {
3503
+ var i, a, s, e, r, n, h, o = t.x, l = t.y, _ = y(o - this.long0, this.over);
3504
+ return i = Math.pow((1 + this.e * Math.sin(l)) / (1 - this.e * Math.sin(l)), this.alfa * this.e / 2), a = 2 * (Math.atan(this.k * Math.pow(Math.tan(l / 2 + this.s45), this.alfa) / i) - this.s45), s = -_ * this.alfa, e = Math.asin(Math.cos(this.ad) * Math.sin(a) + Math.sin(this.ad) * Math.cos(a) * Math.cos(s)), r = Math.asin(Math.cos(a) * Math.sin(s) / Math.cos(e)), n = this.n * r, h = this.ro0 * Math.pow(Math.tan(this.s0 / 2 + this.s45), this.n) / Math.pow(Math.tan(e / 2 + this.s45), this.n), t.y = h * Math.cos(n) / 1, t.x = h * Math.sin(n) / 1, this.czech || (t.y *= -1, t.x *= -1), t;
3505
+ }
3506
+ function Re(t) {
3507
+ var i, a, s, e, r, n, h, o, l = t.x;
3508
+ t.x = t.y, t.y = l, this.czech || (t.y *= -1, t.x *= -1), n = Math.sqrt(t.x * t.x + t.y * t.y), r = Math.atan2(t.y, t.x), e = r / Math.sin(this.s0), s = 2 * (Math.atan(Math.pow(this.ro0 / n, 1 / this.n) * Math.tan(this.s0 / 2 + this.s45)) - this.s45), i = Math.asin(Math.cos(this.ad) * Math.sin(s) - Math.sin(this.ad) * Math.cos(s) * Math.cos(e)), a = Math.asin(Math.cos(s) * Math.sin(e) / Math.cos(i)), t.x = this.long0 - a / this.alfa, h = i, o = 0;
3509
+ var _ = 0;
3510
+ do
3511
+ t.y = 2 * (Math.atan(Math.pow(this.k, -1 / this.alfa) * Math.pow(Math.tan(i / 2 + this.s45), 1 / this.alfa) * Math.pow((1 + this.e * Math.sin(h)) / (1 - this.e * Math.sin(h)), this.e / 2)) - this.s45), Math.abs(h - t.y) < 1e-10 && (o = 1), h = t.y, _ += 1;
3512
+ while (o === 0 && _ < 15);
3513
+ return _ >= 15 ? null : t;
3514
+ }
3515
+ var Oe = ["Krovak", "krovak"];
3516
+ const Te = {
3517
+ init: Ie,
3518
+ forward: Ce,
3519
+ inverse: Re,
3520
+ names: Oe
3521
+ };
3522
+ function q(t, i, a, s, e) {
3523
+ return t * e - i * Math.sin(2 * e) + a * Math.sin(4 * e) - s * Math.sin(6 * e);
3524
+ }
3525
+ function Nt(t) {
3526
+ return 1 - 0.25 * t * (1 + t / 16 * (3 + 1.25 * t));
3527
+ }
3528
+ function It(t) {
3529
+ return 0.375 * t * (1 + 0.25 * t * (1 + 0.46875 * t));
3530
+ }
3531
+ function Ct(t) {
3532
+ return 0.05859375 * t * t * (1 + 0.75 * t);
3533
+ }
3534
+ function Rt(t) {
3535
+ return t * t * t * (35 / 3072);
3536
+ }
3537
+ function Mi(t, i, a) {
3538
+ var s = i * a;
3539
+ return t / Math.sqrt(1 - s * s);
3540
+ }
3541
+ function Y(t) {
3542
+ return Math.abs(t) < v ? t : t - At(t) * Math.PI;
3543
+ }
3544
+ function jt(t, i, a, s, e) {
3545
+ var r, n;
3546
+ r = t / i;
3547
+ for (var h = 0; h < 15; h++)
3548
+ if (n = (t - (i * r - a * Math.sin(2 * r) + s * Math.sin(4 * r) - e * Math.sin(6 * r))) / (i - 2 * a * Math.cos(2 * r) + 4 * s * Math.cos(4 * r) - 6 * e * Math.cos(6 * r)), r += n, Math.abs(n) <= 1e-10)
3549
+ return r;
3550
+ return NaN;
3551
+ }
3552
+ function pe() {
3553
+ this.sphere || (this.e0 = Nt(this.es), this.e1 = It(this.es), this.e2 = Ct(this.es), this.e3 = Rt(this.es), this.ml0 = this.a * q(this.e0, this.e1, this.e2, this.e3, this.lat0));
3554
+ }
3555
+ function Le(t) {
3556
+ var i, a, s = t.x, e = t.y;
3557
+ if (s = y(s - this.long0, this.over), this.sphere)
3558
+ i = this.a * Math.asin(Math.cos(e) * Math.sin(s)), a = this.a * (Math.atan2(Math.tan(e), Math.cos(s)) - this.lat0);
3559
+ else {
3560
+ var r = Math.sin(e), n = Math.cos(e), h = Mi(this.a, this.e, r), o = Math.tan(e) * Math.tan(e), l = s * Math.cos(e), _ = l * l, c = this.es * n * n / (1 - this.es), f = this.a * q(this.e0, this.e1, this.e2, this.e3, e);
3561
+ i = h * l * (1 - _ * o * (1 / 6 - (8 - o + 8 * c) * _ / 120)), a = f - this.ml0 + h * r / n * _ * (0.5 + (5 - o + 6 * c) * _ / 24);
3562
+ }
3563
+ return t.x = i + this.x0, t.y = a + this.y0, t;
3564
+ }
3565
+ function qe(t) {
3566
+ t.x -= this.x0, t.y -= this.y0;
3567
+ var i = t.x / this.a, a = t.y / this.a, s, e;
3568
+ if (this.sphere) {
3569
+ var r = a + this.lat0;
3570
+ s = Math.asin(Math.sin(r) * Math.cos(i)), e = Math.atan2(Math.tan(i), Math.cos(r));
3571
+ } else {
3572
+ var n = this.ml0 / this.a + a, h = jt(n, this.e0, this.e1, this.e2, this.e3);
3573
+ if (Math.abs(Math.abs(h) - v) <= m)
3574
+ return t.x = this.long0, t.y = v, a < 0 && (t.y *= -1), t;
3575
+ var o = Mi(this.a, this.e, Math.sin(h)), l = o * o * o / this.a / this.a * (1 - this.es), _ = Math.pow(Math.tan(h), 2), c = i * this.a / o, f = c * c;
3576
+ s = h - o * Math.tan(h) / l * c * c * (0.5 - (1 + 3 * _) * c * c / 24), e = c * (1 - f * (_ / 3 + (1 + 3 * _) * _ * f / 15)) / Math.cos(h);
3577
+ }
3578
+ return t.x = y(e + this.long0, this.over), t.y = Y(s), t;
3579
+ }
3580
+ var Ue = ["Cassini", "Cassini_Soldner", "cass"];
3581
+ const ke = {
3582
+ init: pe,
3583
+ forward: Le,
3584
+ inverse: qe,
3585
+ names: Ue
3586
+ };
3587
+ function J(t, i) {
3588
+ var a;
3589
+ return t > 1e-7 ? (a = t * i, (1 - t * t) * (i / (1 - a * a) - 0.5 / t * Math.log((1 - a) / (1 + a)))) : 2 * i;
3590
+ }
3591
+ var ii = 1, ai = 2, si = 3, kt = 4;
3592
+ function $e() {
3593
+ var t = Math.abs(this.lat0);
3594
+ if (Math.abs(t - v) < m ? this.mode = this.lat0 < 0 ? ii : ai : Math.abs(t) < m ? this.mode = si : this.mode = kt, this.es > 0) {
3595
+ var i;
3596
+ switch (this.qp = J(this.e, 1), this.mmf = 0.5 / (1 - this.es), this.apa = Xe(this.es), this.mode) {
3597
+ case ai:
3598
+ this.dd = 1;
3599
+ break;
3600
+ case ii:
3601
+ this.dd = 1;
3602
+ break;
3603
+ case si:
3604
+ this.rq = Math.sqrt(0.5 * this.qp), this.dd = 1 / this.rq, this.xmf = 1, this.ymf = 0.5 * this.qp;
3605
+ break;
3606
+ case kt:
3607
+ this.rq = Math.sqrt(0.5 * this.qp), i = Math.sin(this.lat0), this.sinb1 = J(this.e, i) / this.qp, this.cosb1 = Math.sqrt(1 - this.sinb1 * this.sinb1), this.dd = Math.cos(this.lat0) / (Math.sqrt(1 - this.es * i * i) * this.rq * this.cosb1), this.ymf = (this.xmf = this.rq) / this.dd, this.xmf *= this.dd;
3608
+ break;
3609
+ }
3610
+ } else
3611
+ this.mode === kt && (this.sinph0 = Math.sin(this.lat0), this.cosph0 = Math.cos(this.lat0));
3612
+ }
3613
+ function Fe(t) {
3614
+ var i, a, s, e, r, n, h, o, l, _, c = t.x, f = t.y;
3615
+ if (c = y(c - this.long0, this.over), this.sphere) {
3616
+ if (r = Math.sin(f), _ = Math.cos(f), s = Math.cos(c), this.mode === this.OBLIQ || this.mode === this.EQUIT) {
3617
+ if (a = this.mode === this.EQUIT ? 1 + _ * s : 1 + this.sinph0 * r + this.cosph0 * _ * s, a <= m)
3618
+ return null;
3619
+ a = Math.sqrt(2 / a), i = a * _ * Math.sin(c), a *= this.mode === this.EQUIT ? r : this.cosph0 * r - this.sinph0 * _ * s;
3620
+ } else if (this.mode === this.N_POLE || this.mode === this.S_POLE) {
3621
+ if (this.mode === this.N_POLE && (s = -s), Math.abs(f + this.lat0) < m)
3622
+ return null;
3623
+ a = b - f * 0.5, a = 2 * (this.mode === this.S_POLE ? Math.cos(a) : Math.sin(a)), i = a * Math.sin(c), a *= s;
3624
+ }
3625
+ } else {
3626
+ switch (h = 0, o = 0, l = 0, s = Math.cos(c), e = Math.sin(c), r = Math.sin(f), n = J(this.e, r), (this.mode === this.OBLIQ || this.mode === this.EQUIT) && (h = n / this.qp, o = Math.sqrt(1 - h * h)), this.mode) {
3627
+ case this.OBLIQ:
3628
+ l = 1 + this.sinb1 * h + this.cosb1 * o * s;
3629
+ break;
3630
+ case this.EQUIT:
3631
+ l = 1 + o * s;
3632
+ break;
3633
+ case this.N_POLE:
3634
+ l = v + f, n = this.qp - n;
3635
+ break;
3636
+ case this.S_POLE:
3637
+ l = f - v, n = this.qp + n;
3638
+ break;
3639
+ }
3640
+ if (Math.abs(l) < m)
3641
+ return null;
3642
+ switch (this.mode) {
3643
+ case this.OBLIQ:
3644
+ case this.EQUIT:
3645
+ l = Math.sqrt(2 / l), this.mode === this.OBLIQ ? a = this.ymf * l * (this.cosb1 * h - this.sinb1 * o * s) : a = (l = Math.sqrt(2 / (1 + o * s))) * h * this.ymf, i = this.xmf * l * o * e;
3646
+ break;
3647
+ case this.N_POLE:
3648
+ case this.S_POLE:
3649
+ n >= 0 ? (i = (l = Math.sqrt(n)) * e, a = s * (this.mode === this.S_POLE ? l : -l)) : i = a = 0;
3650
+ break;
3651
+ }
3652
+ }
3653
+ return t.x = this.a * i + this.x0, t.y = this.a * a + this.y0, t;
3654
+ }
3655
+ function De(t) {
3656
+ t.x -= this.x0, t.y -= this.y0;
3657
+ var i = t.x / this.a, a = t.y / this.a, s, e, r, n, h, o, l;
3658
+ if (this.sphere) {
3659
+ var _ = 0, c, f = 0;
3660
+ if (c = Math.sqrt(i * i + a * a), e = c * 0.5, e > 1)
3661
+ return null;
3662
+ switch (e = 2 * Math.asin(e), (this.mode === this.OBLIQ || this.mode === this.EQUIT) && (f = Math.sin(e), _ = Math.cos(e)), this.mode) {
3663
+ case this.EQUIT:
3664
+ e = Math.abs(c) <= m ? 0 : Math.asin(a * f / c), i *= f, a = _ * c;
3665
+ break;
3666
+ case this.OBLIQ:
3667
+ e = Math.abs(c) <= m ? this.lat0 : Math.asin(_ * this.sinph0 + a * f * this.cosph0 / c), i *= f * this.cosph0, a = (_ - Math.sin(e) * this.sinph0) * c;
3668
+ break;
3669
+ case this.N_POLE:
3670
+ a = -a, e = v - e;
3671
+ break;
3672
+ case this.S_POLE:
3673
+ e -= v;
3674
+ break;
3675
+ }
3676
+ s = a === 0 && (this.mode === this.EQUIT || this.mode === this.OBLIQ) ? 0 : Math.atan2(i, a);
3677
+ } else {
3678
+ if (l = 0, this.mode === this.OBLIQ || this.mode === this.EQUIT) {
3679
+ if (i /= this.dd, a *= this.dd, o = Math.sqrt(i * i + a * a), o < m)
3680
+ return t.x = this.long0, t.y = this.lat0, t;
3681
+ n = 2 * Math.asin(0.5 * o / this.rq), r = Math.cos(n), i *= n = Math.sin(n), this.mode === this.OBLIQ ? (l = r * this.sinb1 + a * n * this.cosb1 / o, h = this.qp * l, a = o * this.cosb1 * r - a * this.sinb1 * n) : (l = a * n / o, h = this.qp * l, a = o * r);
3682
+ } else if (this.mode === this.N_POLE || this.mode === this.S_POLE) {
3683
+ if (this.mode === this.N_POLE && (a = -a), h = i * i + a * a, !h)
3684
+ return t.x = this.long0, t.y = this.lat0, t;
3685
+ l = 1 - h / this.qp, this.mode === this.S_POLE && (l = -l);
3686
+ }
3687
+ s = Math.atan2(i, a), e = Ke(Math.asin(l), this.apa);
3688
+ }
3689
+ return t.x = y(this.long0 + s, this.over), t.y = e, t;
3690
+ }
3691
+ var Be = 0.3333333333333333, je = 0.17222222222222222, ze = 0.10257936507936508, We = 0.06388888888888888, He = 0.0664021164021164, Qe = 0.016415012942191543;
3692
+ function Xe(t) {
3693
+ var i, a = [];
3694
+ return a[0] = t * Be, i = t * t, a[0] += i * je, a[1] = i * We, i *= t, a[0] += i * ze, a[1] += i * He, a[2] = i * Qe, a;
3695
+ }
3696
+ function Ke(t, i) {
3697
+ var a = t + t;
3698
+ return t + i[0] * Math.sin(a) + i[1] * Math.sin(a + a) + i[2] * Math.sin(a + a + a);
3699
+ }
3700
+ var Je = ["Lambert Azimuthal Equal Area", "Lambert_Azimuthal_Equal_Area", "laea"];
3701
+ const Ve = {
3702
+ init: $e,
3703
+ forward: Fe,
3704
+ inverse: De,
3705
+ names: Je,
3706
+ S_POLE: ii,
3707
+ N_POLE: ai,
3708
+ EQUIT: si,
3709
+ OBLIQ: kt
3710
+ };
3711
+ function Z(t) {
3712
+ return Math.abs(t) > 1 && (t = t > 1 ? 1 : -1), Math.asin(t);
3713
+ }
3714
+ function Ze() {
3715
+ Math.abs(this.lat1 + this.lat2) < m || (this.temp = this.b / this.a, this.es = 1 - Math.pow(this.temp, 2), this.e3 = Math.sqrt(this.es), this.sin_po = Math.sin(this.lat1), this.cos_po = Math.cos(this.lat1), this.t1 = this.sin_po, this.con = this.sin_po, this.ms1 = H(this.e3, this.sin_po, this.cos_po), this.qs1 = J(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 = H(this.e3, this.sin_po, this.cos_po), this.qs2 = J(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 = J(this.e3, this.sin_po), Math.abs(this.lat1 - this.lat2) > m ? this.ns0 = (this.ms1 * this.ms1 - this.ms2 * this.ms2) / (this.qs2 - this.qs1) : this.ns0 = this.con, this.c = this.ms1 * this.ms1 + this.ns0 * this.qs1, this.rh = this.a * Math.sqrt(this.c - this.ns0 * this.qs0) / this.ns0);
3716
+ }
3717
+ function Ye(t) {
3718
+ var i = t.x, a = t.y;
3719
+ this.sin_phi = Math.sin(a), this.cos_phi = Math.cos(a);
3720
+ var s = J(this.e3, this.sin_phi), e = this.a * Math.sqrt(this.c - this.ns0 * s) / this.ns0, r = this.ns0 * y(i - this.long0, this.over), n = e * Math.sin(r) + this.x0, h = this.rh - e * Math.cos(r) + this.y0;
3721
+ return t.x = n, t.y = h, t;
3722
+ }
3723
+ function tr(t) {
3724
+ var i, a, s, e, r, n;
3725
+ return t.x -= this.x0, t.y = this.rh - t.y + this.y0, this.ns0 >= 0 ? (i = Math.sqrt(t.x * t.x + t.y * t.y), s = 1) : (i = -Math.sqrt(t.x * t.x + t.y * t.y), s = -1), e = 0, i !== 0 && (e = Math.atan2(s * t.x, s * t.y)), s = i * this.ns0 / this.a, this.sphere ? n = Math.asin((this.c - s * s) / (2 * this.ns0)) : (a = (this.c - s * s) / this.ns0, n = this.phi1z(this.e3, a)), r = y(e / this.ns0 + this.long0, this.over), t.x = r, t.y = n, t;
3726
+ }
3727
+ function ir(t, i) {
3728
+ var a, s, e, r, n, h = Z(0.5 * i);
3729
+ if (t < m)
3730
+ return h;
3731
+ for (var o = t * t, l = 1; l <= 25; l++)
3732
+ if (a = Math.sin(h), s = Math.cos(h), e = t * a, r = 1 - e * e, n = 0.5 * r * r / s * (i / (1 - o) - a / r + 0.5 / t * Math.log((1 - e) / (1 + e))), h = h + n, Math.abs(n) <= 1e-7)
3733
+ return h;
3734
+ return null;
3735
+ }
3736
+ var ar = ["Albers_Conic_Equal_Area", "Albers_Equal_Area", "Albers", "aea"];
3737
+ const sr = {
3738
+ init: Ze,
3739
+ forward: Ye,
3740
+ inverse: tr,
3741
+ names: ar,
3742
+ phi1z: ir
3743
+ };
3744
+ function er() {
3745
+ this.sin_p14 = Math.sin(this.lat0), this.cos_p14 = Math.cos(this.lat0), this.infinity_dist = 1e3 * this.a, this.rc = 1;
3746
+ }
3747
+ function rr(t) {
3748
+ var i, a, s, e, r, n, h, o, l = t.x, _ = t.y;
3749
+ return s = y(l - this.long0, this.over), i = Math.sin(_), a = Math.cos(_), e = Math.cos(s), n = this.sin_p14 * i + this.cos_p14 * a * e, r = 1, n > 0 || Math.abs(n) <= m ? (h = this.x0 + this.a * r * a * Math.sin(s) / n, o = this.y0 + this.a * r * (this.cos_p14 * i - this.sin_p14 * a * e) / n) : (h = this.x0 + this.infinity_dist * a * Math.sin(s), o = this.y0 + this.infinity_dist * (this.cos_p14 * i - this.sin_p14 * a * e)), t.x = h, t.y = o, t;
3750
+ }
3751
+ function hr(t) {
3752
+ var i, a, s, e, r, n;
3753
+ return t.x = (t.x - this.x0) / this.a, t.y = (t.y - this.y0) / this.a, t.x /= this.k0, t.y /= this.k0, (i = Math.sqrt(t.x * t.x + t.y * t.y)) ? (e = Math.atan2(i, this.rc), a = Math.sin(e), s = Math.cos(e), n = Z(s * this.sin_p14 + t.y * a * this.cos_p14 / i), r = Math.atan2(t.x * a, i * this.cos_p14 * s - t.y * this.sin_p14 * a), r = y(this.long0 + r, this.over)) : (n = this.phic0, r = 0), t.x = r, t.y = n, t;
3754
+ }
3755
+ var nr = ["gnom"];
3756
+ const or = {
3757
+ init: er,
3758
+ forward: rr,
3759
+ inverse: hr,
3760
+ names: nr
3761
+ };
3762
+ function lr(t, i) {
3763
+ var a = 1 - (1 - t * t) / (2 * t) * Math.log((1 - t) / (1 + t));
3764
+ if (Math.abs(Math.abs(i) - a) < 1e-6)
3765
+ return i < 0 ? -1 * v : v;
3766
+ for (var s = Math.asin(0.5 * i), e, r, n, h, o = 0; o < 30; o++)
3767
+ if (r = Math.sin(s), n = Math.cos(s), h = t * r, e = Math.pow(1 - h * h, 2) / (2 * n) * (i / (1 - t * t) - r / (1 - h * h) + 0.5 / t * Math.log((1 - h) / (1 + h))), s += e, Math.abs(e) <= 1e-10)
3768
+ return s;
3769
+ return NaN;
3770
+ }
3771
+ function fr() {
3772
+ this.sphere || (this.k0 = H(this.e, Math.sin(this.lat_ts), Math.cos(this.lat_ts)));
3773
+ }
3774
+ function cr(t) {
3775
+ var i = t.x, a = t.y, s, e, r = y(i - this.long0, this.over);
3776
+ if (this.sphere)
3777
+ s = this.x0 + this.a * r * Math.cos(this.lat_ts), e = this.y0 + this.a * Math.sin(a) / Math.cos(this.lat_ts);
3778
+ else {
3779
+ var n = J(this.e, Math.sin(a));
3780
+ s = this.x0 + this.a * this.k0 * r, e = this.y0 + this.a * n * 0.5 / this.k0;
3781
+ }
3782
+ return t.x = s, t.y = e, t;
3783
+ }
3784
+ function _r(t) {
3785
+ t.x -= this.x0, t.y -= this.y0;
3786
+ var i, a;
3787
+ return this.sphere ? (i = y(this.long0 + t.x / this.a / Math.cos(this.lat_ts), this.over), a = Math.asin(t.y / this.a * Math.cos(this.lat_ts))) : (a = lr(this.e, 2 * t.y * this.k0 / this.a), i = y(this.long0 + t.x / (this.a * this.k0), this.over)), t.x = i, t.y = a, t;
3788
+ }
3789
+ var ur = ["cea"];
3790
+ const Mr = {
3791
+ init: fr,
3792
+ forward: cr,
3793
+ inverse: _r,
3794
+ names: ur
3795
+ };
3796
+ function vr() {
3797
+ this.x0 = this.x0 || 0, this.y0 = this.y0 || 0, this.lat0 = this.lat0 || 0, this.long0 = this.long0 || 0, this.lat_ts = this.lat_ts || 0, this.title = this.title || "Equidistant Cylindrical (Plate Carre)", this.rc = Math.cos(this.lat_ts);
3798
+ }
3799
+ function gr(t) {
3800
+ var i = t.x, a = t.y, s = y(i - this.long0, this.over), e = Y(a - this.lat0);
3801
+ return t.x = this.x0 + this.a * s * this.rc, t.y = this.y0 + this.a * e, t;
3802
+ }
3803
+ function dr(t) {
3804
+ var i = t.x, a = t.y;
3805
+ return t.x = y(this.long0 + (i - this.x0) / (this.a * this.rc), this.over), t.y = Y(this.lat0 + (a - this.y0) / this.a), t;
3806
+ }
3807
+ var mr = ["Equirectangular", "Equidistant_Cylindrical", "Equidistant_Cylindrical_Spherical", "eqc"];
3808
+ const yr = {
3809
+ init: vr,
3810
+ forward: gr,
3811
+ inverse: dr,
3812
+ names: mr
3813
+ };
3814
+ var pi = 20;
3815
+ function Er() {
3816
+ this.temp = this.b / this.a, this.es = 1 - Math.pow(this.temp, 2), this.e = Math.sqrt(this.es), this.e0 = Nt(this.es), this.e1 = It(this.es), this.e2 = Ct(this.es), this.e3 = Rt(this.es), this.ml0 = this.a * q(this.e0, this.e1, this.e2, this.e3, this.lat0);
3817
+ }
3818
+ function Sr(t) {
3819
+ var i = t.x, a = t.y, s, e, r, n = y(i - this.long0, this.over);
3820
+ if (r = n * Math.sin(a), this.sphere)
3821
+ Math.abs(a) <= m ? (s = this.a * n, e = -1 * this.a * this.lat0) : (s = this.a * Math.sin(r) / Math.tan(a), e = this.a * (Y(a - this.lat0) + (1 - Math.cos(r)) / Math.tan(a)));
3822
+ else if (Math.abs(a) <= m)
3823
+ s = this.a * n, e = -1 * this.ml0;
3824
+ else {
3825
+ var h = Mi(this.a, this.e, Math.sin(a)) / Math.tan(a);
3826
+ s = h * Math.sin(r), e = this.a * q(this.e0, this.e1, this.e2, this.e3, a) - this.ml0 + h * (1 - Math.cos(r));
3827
+ }
3828
+ return t.x = s + this.x0, t.y = e + this.y0, t;
3829
+ }
3830
+ function wr(t) {
3831
+ var i, a, s, e, r, n, h, o, l;
3832
+ if (s = t.x - this.x0, e = t.y - this.y0, this.sphere)
3833
+ if (Math.abs(e + this.a * this.lat0) <= m)
3834
+ i = y(s / this.a + this.long0, this.over), a = 0;
3835
+ else {
3836
+ n = this.lat0 + e / this.a, h = s * s / this.a / this.a + n * n, o = n;
3837
+ var _;
3838
+ for (r = pi; r; --r)
3839
+ if (_ = Math.tan(o), l = -1 * (n * (o * _ + 1) - o - 0.5 * (o * o + h) * _) / ((o - n) / _ - 1), o += l, Math.abs(l) <= m) {
3840
+ a = o;
3841
+ break;
3842
+ }
3843
+ i = y(this.long0 + Math.asin(s * Math.tan(o) / this.a) / Math.sin(a), this.over);
3844
+ }
3845
+ else if (Math.abs(e + this.ml0) <= m)
3846
+ a = 0, i = y(this.long0 + s / this.a, this.over);
3847
+ else {
3848
+ n = (this.ml0 + e) / this.a, h = s * s / this.a / this.a + n * n, o = n;
3849
+ var c, f, u, M, g;
3850
+ for (r = pi; r; --r)
3851
+ if (g = this.e * Math.sin(o), c = Math.sqrt(1 - g * g) * Math.tan(o), f = this.a * q(this.e0, this.e1, this.e2, this.e3, o), u = this.e0 - 2 * this.e1 * Math.cos(2 * o) + 4 * this.e2 * Math.cos(4 * o) - 6 * this.e3 * Math.cos(6 * o), M = f / this.a, l = (n * (c * M + 1) - M - 0.5 * c * (M * M + h)) / (this.es * Math.sin(2 * o) * (M * M + h - 2 * n * M) / (4 * c) + (n - M) * (c * u - 2 / Math.sin(2 * o)) - u), o -= l, Math.abs(l) <= m) {
3852
+ a = o;
3853
+ break;
3854
+ }
3855
+ c = Math.sqrt(1 - this.es * Math.pow(Math.sin(a), 2)) * Math.tan(a), i = y(this.long0 + Math.asin(s * c / this.a) / Math.sin(a), this.over);
3856
+ }
3857
+ return t.x = i, t.y = a, t;
3858
+ }
3859
+ var Pr = ["Polyconic", "American_Polyconic", "poly"];
3860
+ const xr = {
3861
+ init: Er,
3862
+ forward: Sr,
3863
+ inverse: wr,
3864
+ names: Pr
3865
+ };
3866
+ function Gr() {
3867
+ this.A = [], this.A[1] = 0.6399175073, this.A[2] = -0.1358797613, this.A[3] = 0.063294409, this.A[4] = -0.02526853, this.A[5] = 0.0117879, this.A[6] = -55161e-7, this.A[7] = 26906e-7, this.A[8] = -1333e-6, this.A[9] = 67e-5, this.A[10] = -34e-5, this.B_re = [], this.B_im = [], this.B_re[1] = 0.7557853228, this.B_im[1] = 0, this.B_re[2] = 0.249204646, this.B_im[2] = 3371507e-9, this.B_re[3] = -1541739e-9, this.B_im[3] = 0.04105856, this.B_re[4] = -0.10162907, this.B_im[4] = 0.01727609, this.B_re[5] = -0.26623489, this.B_im[5] = -0.36249218, this.B_re[6] = -0.6870983, this.B_im[6] = -1.1651967, this.C_re = [], this.C_im = [], this.C_re[1] = 1.3231270439, this.C_im[1] = 0, this.C_re[2] = -0.577245789, this.C_im[2] = -7809598e-9, this.C_re[3] = 0.508307513, this.C_im[3] = -0.112208952, this.C_re[4] = -0.15094762, this.C_im[4] = 0.18200602, this.C_re[5] = 1.01418179, this.C_im[5] = 1.64497696, this.C_re[6] = 1.9660549, this.C_im[6] = 2.5127645, this.D = [], this.D[1] = 1.5627014243, this.D[2] = 0.5185406398, this.D[3] = -0.03333098, this.D[4] = -0.1052906, this.D[5] = -0.0368594, this.D[6] = 7317e-6, this.D[7] = 0.0122, this.D[8] = 394e-5, this.D[9] = -13e-4;
3868
+ }
3869
+ function br(t) {
3870
+ var i, a = t.x, s = t.y, e = s - this.lat0, r = a - this.long0, n = e / mt * 1e-5, h = r, o = 1, l = 0;
3871
+ for (i = 1; i <= 10; i++)
3872
+ o = o * n, l = l + this.A[i] * o;
3873
+ var _ = l, c = h, f = 1, u = 0, M, g, d = 0, E = 0;
3874
+ for (i = 1; i <= 6; i++)
3875
+ M = f * _ - u * c, g = u * _ + f * c, f = M, u = g, d = d + this.B_re[i] * f - this.B_im[i] * u, E = E + this.B_im[i] * f + this.B_re[i] * u;
3876
+ return t.x = E * this.a + this.x0, t.y = d * this.a + this.y0, t;
3877
+ }
3878
+ function Ar(t) {
3879
+ var i, a = t.x, s = t.y, e = a - this.x0, r = s - this.y0, n = r / this.a, h = e / this.a, o = 1, l = 0, _, c, f = 0, u = 0;
3880
+ for (i = 1; i <= 6; i++)
3881
+ _ = o * n - l * h, c = l * n + o * h, o = _, l = c, f = f + this.C_re[i] * o - this.C_im[i] * l, u = u + this.C_im[i] * o + this.C_re[i] * l;
3882
+ for (var M = 0; M < this.iterations; M++) {
3883
+ var g = f, d = u, E, S, w = n, x = h;
3884
+ for (i = 2; i <= 6; i++)
3885
+ E = g * f - d * u, S = d * f + g * u, g = E, d = S, w = w + (i - 1) * (this.B_re[i] * g - this.B_im[i] * d), x = x + (i - 1) * (this.B_im[i] * g + this.B_re[i] * d);
3886
+ g = 1, d = 0;
3887
+ var P = this.B_re[1], G = this.B_im[1];
3888
+ for (i = 2; i <= 6; i++)
3889
+ E = g * f - d * u, S = d * f + g * u, g = E, d = S, P = P + i * (this.B_re[i] * g - this.B_im[i] * d), G = G + i * (this.B_im[i] * g + this.B_re[i] * d);
3890
+ var N = P * P + G * G;
3891
+ f = (w * P + x * G) / N, u = (x * P - w * G) / N;
3892
+ }
3893
+ var p = f, O = u, X = 1, D = 0;
3894
+ for (i = 1; i <= 9; i++)
3895
+ X = X * p, D = D + this.D[i] * X;
3896
+ var st = this.lat0 + D * mt * 1e5, et = this.long0 + O;
3897
+ return t.x = et, t.y = st, t;
3898
+ }
3899
+ var Nr = ["New_Zealand_Map_Grid", "nzmg"];
3900
+ const Ir = {
3901
+ init: Gr,
3902
+ forward: br,
3903
+ inverse: Ar,
3904
+ names: Nr
3905
+ };
3906
+ function Cr() {
3907
+ }
3908
+ function Rr(t) {
3909
+ var i = t.x, a = t.y, s = y(i - this.long0, this.over), e = this.x0 + this.a * s, r = this.y0 + this.a * Math.log(Math.tan(Math.PI / 4 + a / 2.5)) * 1.25;
3910
+ return t.x = e, t.y = r, t;
3911
+ }
3912
+ function Or(t) {
3913
+ t.x -= this.x0, t.y -= this.y0;
3914
+ var i = y(this.long0 + t.x / this.a, this.over), a = 2.5 * (Math.atan(Math.exp(0.8 * t.y / this.a)) - Math.PI / 4);
3915
+ return t.x = i, t.y = a, t;
3916
+ }
3917
+ var Tr = ["Miller_Cylindrical", "mill"];
3918
+ const pr = {
3919
+ init: Cr,
3920
+ forward: Rr,
3921
+ inverse: Or,
3922
+ names: Tr
3923
+ };
3924
+ var Lr = 20;
3925
+ function qr() {
3926
+ this.sphere ? (this.n = 1, this.m = 0, this.es = 0, this.C_y = Math.sqrt((this.m + 1) / this.n), this.C_x = this.C_y / (this.m + 1)) : this.en = oi(this.es);
3927
+ }
3928
+ function Ur(t) {
3929
+ var i, a, s = t.x, e = t.y;
3930
+ if (s = y(s - this.long0, this.over), this.sphere) {
3931
+ if (!this.m)
3932
+ e = this.n !== 1 ? Math.asin(this.n * Math.sin(e)) : e;
3933
+ else
3934
+ for (var r = this.n * Math.sin(e), n = Lr; n; --n) {
3935
+ var h = (this.m * e + Math.sin(e) - r) / (this.m + Math.cos(e));
3936
+ if (e -= h, Math.abs(h) < m)
3937
+ break;
3938
+ }
3939
+ i = this.a * this.C_x * s * (this.m + Math.cos(e)), a = this.a * this.C_y * e;
3940
+ } else {
3941
+ var o = Math.sin(e), l = Math.cos(e);
3942
+ a = this.a * ut(e, o, l, this.en), i = this.a * s * l / Math.sqrt(1 - this.es * o * o);
3943
+ }
3944
+ return t.x = i, t.y = a, t;
3945
+ }
3946
+ function kr(t) {
3947
+ var i, a, s, e;
3948
+ return t.x -= this.x0, s = t.x / this.a, t.y -= this.y0, i = t.y / this.a, this.sphere ? (i /= this.C_y, s = s / (this.C_x * (this.m + Math.cos(i))), this.m ? i = Z((this.m * i + Math.sin(i)) / this.n) : this.n !== 1 && (i = Z(Math.sin(i) / this.n)), s = y(s + this.long0, this.over), i = Y(i)) : (i = li(t.y / this.a, this.es, this.en), e = Math.abs(i), e < v ? (e = Math.sin(i), a = this.long0 + t.x * Math.sqrt(1 - this.es * e * e) / (this.a * Math.cos(i)), s = y(a, this.over)) : e - m < v && (s = this.long0)), t.x = s, t.y = i, t;
3949
+ }
3950
+ var $r = ["Sinusoidal", "sinu"];
3951
+ const Fr = {
3952
+ init: qr,
3953
+ forward: Ur,
3954
+ inverse: kr,
3955
+ names: $r
3956
+ };
3957
+ function Dr() {
3958
+ this.x0 = this.x0 !== void 0 ? this.x0 : 0, this.y0 = this.y0 !== void 0 ? this.y0 : 0, this.long0 = this.long0 !== void 0 ? this.long0 : 0;
3959
+ }
3960
+ function Br(t) {
3961
+ for (var i = t.x, a = t.y, s = y(i - this.long0, this.over), e = a, r = Math.PI * Math.sin(a); ; ) {
3962
+ var n = -(e + Math.sin(e) - r) / (1 + Math.cos(e));
3963
+ if (e += n, Math.abs(n) < m)
3964
+ break;
3965
+ }
3966
+ e /= 2, Math.PI / 2 - Math.abs(a) < m && (s = 0);
3967
+ var h = 0.900316316158 * this.a * s * Math.cos(e) + this.x0, o = 1.4142135623731 * this.a * Math.sin(e) + this.y0;
3968
+ return t.x = h, t.y = o, t;
3969
+ }
3970
+ function jr(t) {
3971
+ var i, a;
3972
+ t.x -= this.x0, t.y -= this.y0, a = t.y / (1.4142135623731 * this.a), Math.abs(a) > 0.999999999999 && (a = 0.999999999999), i = Math.asin(a);
3973
+ var s = y(this.long0 + t.x / (0.900316316158 * this.a * Math.cos(i)), this.over);
3974
+ s < -Math.PI && (s = -Math.PI), s > Math.PI && (s = Math.PI), a = (2 * i + Math.sin(2 * i)) / Math.PI, Math.abs(a) > 1 && (a = 1);
3975
+ var e = Math.asin(a);
3976
+ return t.x = s, t.y = e, t;
3977
+ }
3978
+ var zr = ["Mollweide", "moll"];
3979
+ const Wr = {
3980
+ init: Dr,
3981
+ forward: Br,
3982
+ inverse: jr,
3983
+ names: zr
3984
+ };
3985
+ function Hr() {
3986
+ Math.abs(this.lat1 + this.lat2) < m || (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 = Nt(this.es), this.e1 = It(this.es), this.e2 = Ct(this.es), this.e3 = Rt(this.es), this.sin_phi = Math.sin(this.lat1), this.cos_phi = Math.cos(this.lat1), this.ms1 = H(this.e, this.sin_phi, this.cos_phi), this.ml1 = q(this.e0, this.e1, this.e2, this.e3, this.lat1), Math.abs(this.lat1 - this.lat2) < m ? this.ns = this.sin_phi : (this.sin_phi = Math.sin(this.lat2), this.cos_phi = Math.cos(this.lat2), this.ms2 = H(this.e, this.sin_phi, this.cos_phi), this.ml2 = q(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 = q(this.e0, this.e1, this.e2, this.e3, this.lat0), this.rh = this.a * (this.g - this.ml0));
3987
+ }
3988
+ function Qr(t) {
3989
+ var i = t.x, a = t.y, s;
3990
+ if (this.sphere)
3991
+ s = this.a * (this.g - a);
3992
+ else {
3993
+ var e = q(this.e0, this.e1, this.e2, this.e3, a);
3994
+ s = this.a * (this.g - e);
3995
+ }
3996
+ var r = this.ns * y(i - this.long0, this.over), n = this.x0 + s * Math.sin(r), h = this.y0 + this.rh - s * Math.cos(r);
3997
+ return t.x = n, t.y = h, t;
3998
+ }
3999
+ function Xr(t) {
4000
+ t.x -= this.x0, t.y = this.rh - t.y + this.y0;
4001
+ var i, a, s, e;
4002
+ this.ns >= 0 ? (a = Math.sqrt(t.x * t.x + t.y * t.y), i = 1) : (a = -Math.sqrt(t.x * t.x + t.y * t.y), i = -1);
4003
+ var r = 0;
4004
+ if (a !== 0 && (r = Math.atan2(i * t.x, i * t.y)), this.sphere)
4005
+ return e = y(this.long0 + r / this.ns, this.over), s = Y(this.g - a / this.a), t.x = e, t.y = s, t;
4006
+ var n = this.g - a / this.a;
4007
+ return s = jt(n, this.e0, this.e1, this.e2, this.e3), e = y(this.long0 + r / this.ns, this.over), t.x = e, t.y = s, t;
4008
+ }
4009
+ var Kr = ["Equidistant_Conic", "eqdc"];
4010
+ const Jr = {
4011
+ init: Hr,
4012
+ forward: Qr,
4013
+ inverse: Xr,
4014
+ names: Kr
4015
+ };
4016
+ function Vr() {
4017
+ this.R = this.a;
4018
+ }
4019
+ function Zr(t) {
4020
+ var i = t.x, a = t.y, s = y(i - this.long0, this.over), e, r;
4021
+ Math.abs(a) <= m && (e = this.x0 + this.R * s, r = this.y0);
4022
+ var n = Z(2 * Math.abs(a / Math.PI));
4023
+ (Math.abs(s) <= m || Math.abs(Math.abs(a) - v) <= m) && (e = this.x0, a >= 0 ? r = this.y0 + Math.PI * this.R * Math.tan(0.5 * n) : r = this.y0 + Math.PI * this.R * -Math.tan(0.5 * n));
4024
+ var h = 0.5 * Math.abs(Math.PI / s - s / Math.PI), o = h * h, l = Math.sin(n), _ = Math.cos(n), c = _ / (l + _ - 1), f = c * c, u = c * (2 / l - 1), M = u * u, g = Math.PI * this.R * (h * (c - M) + Math.sqrt(o * (c - M) * (c - M) - (M + o) * (f - M))) / (M + o);
4025
+ s < 0 && (g = -g), e = this.x0 + g;
4026
+ var d = o + c;
4027
+ return g = Math.PI * this.R * (u * d - h * Math.sqrt((M + o) * (o + 1) - d * d)) / (M + o), a >= 0 ? r = this.y0 + g : r = this.y0 - g, t.x = e, t.y = r, t;
4028
+ }
4029
+ function Yr(t) {
4030
+ var i, a, s, e, r, n, h, o, l, _, c, f, u;
4031
+ return t.x -= this.x0, t.y -= this.y0, c = Math.PI * this.R, s = t.x / c, e = t.y / c, r = s * s + e * e, n = -Math.abs(e) * (1 + r), h = n - 2 * e * e + s * s, o = -2 * n + 1 + 2 * e * e + r * r, u = e * e / o + (2 * h * h * h / o / o / o - 9 * n * h / o / o) / 27, l = (n - h * h / 3 / o) / o, _ = 2 * Math.sqrt(-l / 3), c = 3 * u / l / _, Math.abs(c) > 1 && (c >= 0 ? c = 1 : c = -1), f = Math.acos(c) / 3, t.y >= 0 ? a = (-_ * Math.cos(f + Math.PI / 3) - h / 3 / o) * Math.PI : a = -(-_ * Math.cos(f + Math.PI / 3) - h / 3 / o) * Math.PI, Math.abs(s) < m ? i = this.long0 : i = y(this.long0 + Math.PI * (r - 1 + Math.sqrt(1 + 2 * (s * s - e * e) + r * r)) / 2 / s, this.over), t.x = i, t.y = a, t;
4032
+ }
4033
+ var th = ["Van_der_Grinten_I", "VanDerGrinten", "Van_der_Grinten", "vandg"];
4034
+ const ih = {
4035
+ init: Vr,
4036
+ forward: Zr,
4037
+ inverse: Yr,
4038
+ names: th
4039
+ };
4040
+ function ah(t, i, a, s, e, r) {
4041
+ const n = s - i, h = Math.atan((1 - r) * Math.tan(t)), o = Math.atan((1 - r) * Math.tan(a)), l = Math.sin(h), _ = Math.cos(h), c = Math.sin(o), f = Math.cos(o);
4042
+ let u = n, M, g = 100, d, E, S, w, x, P, G, N, p, O, X, D, st, et;
4043
+ do {
4044
+ if (d = Math.sin(u), E = Math.cos(u), S = Math.sqrt(
4045
+ f * d * (f * d) + (_ * c - l * f * E) * (_ * c - l * f * E)
4046
+ ), S === 0)
4047
+ return { azi1: 0, s12: 0 };
4048
+ w = l * c + _ * f * E, x = Math.atan2(S, w), P = _ * f * d / S, G = 1 - P * P, N = G !== 0 ? w - 2 * l * c / G : 0, p = r / 16 * G * (4 + r * (4 - 3 * G)), M = u, u = n + (1 - p) * r * P * (x + p * S * (N + p * w * (-1 + 2 * N * N)));
4049
+ } while (Math.abs(u - M) > 1e-12 && --g > 0);
4050
+ return g === 0 ? { azi1: NaN, s12: NaN } : (O = G * (e * e - e * (1 - r) * (e * (1 - r))) / (e * (1 - r) * (e * (1 - r))), X = 1 + O / 16384 * (4096 + O * (-768 + O * (320 - 175 * O))), D = O / 1024 * (256 + O * (-128 + O * (74 - 47 * O))), st = D * S * (N + D / 4 * (w * (-1 + 2 * N * N) - D / 6 * N * (-3 + 4 * S * S) * (-3 + 4 * N * N))), et = e * (1 - r) * X * (x - st), { azi1: Math.atan2(f * d, _ * c - l * f * E), s12: et });
4051
+ }
4052
+ function sh(t, i, a, s, e, r) {
4053
+ const n = Math.atan((1 - r) * Math.tan(t)), h = Math.sin(n), o = Math.cos(n), l = Math.sin(a), _ = Math.cos(a), c = Math.atan2(h, o * _), f = o * l, u = 1 - f * f, M = u * (e * e - e * (1 - r) * (e * (1 - r))) / (e * (1 - r) * (e * (1 - r))), g = 1 + M / 16384 * (4096 + M * (-768 + M * (320 - 175 * M))), d = M / 1024 * (256 + M * (-128 + M * (74 - 47 * M)));
4054
+ let E = s / (e * (1 - r) * g), S, w = 100, x, P, G, N;
4055
+ do
4056
+ x = Math.cos(2 * c + E), P = Math.sin(E), G = Math.cos(E), N = d * P * (x + d / 4 * (G * (-1 + 2 * x * x) - d / 6 * x * (-3 + 4 * P * P) * (-3 + 4 * x * x))), S = E, E = s / (e * (1 - r) * g) + N;
4057
+ while (Math.abs(E - S) > 1e-12 && --w > 0);
4058
+ if (w === 0)
4059
+ return { lat2: NaN, lon2: NaN };
4060
+ const p = h * P - o * G * _, O = Math.atan2(
4061
+ h * G + o * P * _,
4062
+ (1 - r) * Math.sqrt(f * f + p * p)
4063
+ ), X = Math.atan2(
4064
+ P * l,
4065
+ o * G - h * P * _
4066
+ ), D = r / 16 * u * (4 + r * (4 - 3 * u)), st = X - (1 - D) * r * f * (E + D * P * (x + D * G * (-1 + 2 * x * x))), et = i + st;
4067
+ return { lat2: O, lon2: et };
4068
+ }
4069
+ function eh() {
4070
+ this.sin_p12 = Math.sin(this.lat0), this.cos_p12 = Math.cos(this.lat0), this.f = this.es / (1 + Math.sqrt(1 - this.es));
4071
+ }
4072
+ function rh(t) {
4073
+ var i = t.x, a = t.y, s = Math.sin(t.y), e = Math.cos(t.y), r = y(i - this.long0, this.over), n, h, o, l, _, c, f, u, M, g, d;
4074
+ return this.sphere ? Math.abs(this.sin_p12 - 1) <= m ? (t.x = this.x0 + this.a * (v - a) * Math.sin(r), t.y = this.y0 - this.a * (v - a) * Math.cos(r), t) : Math.abs(this.sin_p12 + 1) <= m ? (t.x = this.x0 + this.a * (v + a) * Math.sin(r), t.y = this.y0 + this.a * (v + a) * Math.cos(r), t) : (M = this.sin_p12 * s + this.cos_p12 * e * Math.cos(r), f = Math.acos(M), u = f ? f / Math.sin(f) : 1, t.x = this.x0 + this.a * u * e * Math.sin(r), t.y = this.y0 + this.a * u * (this.cos_p12 * s - this.sin_p12 * e * Math.cos(r)), t) : (n = Nt(this.es), h = It(this.es), o = Ct(this.es), l = Rt(this.es), Math.abs(this.sin_p12 - 1) <= m ? (_ = this.a * q(n, h, o, l, v), c = this.a * q(n, h, o, l, a), t.x = this.x0 + (_ - c) * Math.sin(r), t.y = this.y0 - (_ - c) * Math.cos(r), t) : Math.abs(this.sin_p12 + 1) <= m ? (_ = this.a * q(n, h, o, l, v), c = this.a * q(n, h, o, l, a), t.x = this.x0 + (_ + c) * Math.sin(r), t.y = this.y0 + (_ + c) * Math.cos(r), t) : Math.abs(i) < m && Math.abs(a - this.lat0) < m ? (t.x = t.y = 0, t) : (g = ah(this.lat0, this.long0, a, i, this.a, this.f), d = g.azi1, t.x = g.s12 * Math.sin(d), t.y = g.s12 * Math.cos(d), t));
4075
+ }
4076
+ function hh(t) {
4077
+ t.x -= this.x0, t.y -= this.y0;
4078
+ var i, a, s, e, r, n, h, o, l, _, c, f, u, M, g, d;
4079
+ return this.sphere ? (i = Math.sqrt(t.x * t.x + t.y * t.y), i > 2 * v * this.a ? void 0 : (a = i / this.a, s = Math.sin(a), e = Math.cos(a), r = this.long0, Math.abs(i) <= m ? n = this.lat0 : (n = Z(e * this.sin_p12 + t.y * s * this.cos_p12 / i), h = Math.abs(this.lat0) - v, Math.abs(h) <= m ? this.lat0 >= 0 ? r = y(this.long0 + Math.atan2(t.x, -t.y), this.over) : r = y(this.long0 - Math.atan2(-t.x, t.y), this.over) : r = y(this.long0 + Math.atan2(t.x * s, i * this.cos_p12 * e - t.y * this.sin_p12 * s), this.over)), t.x = r, t.y = n, t)) : (o = Nt(this.es), l = It(this.es), _ = Ct(this.es), c = Rt(this.es), Math.abs(this.sin_p12 - 1) <= m ? (f = this.a * q(o, l, _, c, v), i = Math.sqrt(t.x * t.x + t.y * t.y), u = f - i, n = jt(u / this.a, o, l, _, c), r = y(this.long0 + Math.atan2(t.x, -1 * t.y), this.over), t.x = r, t.y = n, t) : Math.abs(this.sin_p12 + 1) <= m ? (f = this.a * q(o, l, _, c, v), i = Math.sqrt(t.x * t.x + t.y * t.y), u = i - f, n = jt(u / this.a, o, l, _, c), r = y(this.long0 + Math.atan2(t.x, t.y), this.over), t.x = r, t.y = n, t) : (M = Math.atan2(t.x, t.y), g = Math.sqrt(t.x * t.x + t.y * t.y), d = sh(this.lat0, this.long0, M, g, this.a, this.f), t.x = d.lon2, t.y = d.lat2, t));
4080
+ }
4081
+ var nh = ["Azimuthal_Equidistant", "aeqd"];
4082
+ const oh = {
4083
+ init: eh,
4084
+ forward: rh,
4085
+ inverse: hh,
4086
+ names: nh
4087
+ };
4088
+ function lh() {
4089
+ this.sin_p14 = Math.sin(this.lat0), this.cos_p14 = Math.cos(this.lat0);
4090
+ }
4091
+ function fh(t) {
4092
+ var i, a, s, e, r, n, h, o, l = t.x, _ = t.y;
4093
+ return s = y(l - this.long0, this.over), i = Math.sin(_), a = Math.cos(_), e = Math.cos(s), n = this.sin_p14 * i + this.cos_p14 * a * e, r = 1, (n > 0 || Math.abs(n) <= m) && (h = this.a * r * a * Math.sin(s), o = this.y0 + this.a * r * (this.cos_p14 * i - this.sin_p14 * a * e)), t.x = h, t.y = o, t;
4094
+ }
4095
+ function ch(t) {
4096
+ var i, a, s, e, r, n, h;
4097
+ return t.x -= this.x0, t.y -= this.y0, i = Math.sqrt(t.x * t.x + t.y * t.y), a = Z(i / this.a), s = Math.sin(a), e = Math.cos(a), n = this.long0, Math.abs(i) <= m ? (h = this.lat0, t.x = n, t.y = h, t) : (h = Z(e * this.sin_p14 + t.y * s * this.cos_p14 / i), r = Math.abs(this.lat0) - v, Math.abs(r) <= m ? (this.lat0 >= 0 ? n = y(this.long0 + Math.atan2(t.x, -t.y), this.over) : n = y(this.long0 - Math.atan2(-t.x, t.y), this.over), t.x = n, t.y = h, t) : (n = y(this.long0 + Math.atan2(t.x * s, i * this.cos_p14 * e - t.y * this.sin_p14 * s), this.over), t.x = n, t.y = h, t));
4098
+ }
4099
+ var _h = ["ortho"];
4100
+ const uh = {
4101
+ init: lh,
4102
+ forward: fh,
4103
+ inverse: ch,
4104
+ names: _h
4105
+ };
4106
+ var I = {
4107
+ FRONT: 1,
4108
+ RIGHT: 2,
4109
+ BACK: 3,
4110
+ LEFT: 4,
4111
+ TOP: 5,
4112
+ BOTTOM: 6
4113
+ }, A = {
4114
+ AREA_0: 1,
4115
+ AREA_1: 2,
4116
+ AREA_2: 3,
4117
+ AREA_3: 4
4118
+ };
4119
+ function Mh() {
4120
+ this.x0 = this.x0 || 0, this.y0 = this.y0 || 0, this.lat0 = this.lat0 || 0, this.long0 = this.long0 || 0, this.lat_ts = this.lat_ts || 0, this.title = this.title || "Quadrilateralized Spherical Cube", this.lat0 >= v - b / 2 ? this.face = I.TOP : this.lat0 <= -(v - b / 2) ? this.face = I.BOTTOM : Math.abs(this.long0) <= b ? this.face = I.FRONT : Math.abs(this.long0) <= v + b ? this.face = this.long0 > 0 ? I.RIGHT : I.LEFT : this.face = I.BACK, this.es !== 0 && (this.one_minus_f = 1 - (this.a - this.b) / this.a, this.one_minus_f_squared = this.one_minus_f * this.one_minus_f);
4121
+ }
4122
+ function vh(t) {
4123
+ var i = { x: 0, y: 0 }, a, s, e, r, n, h, o = { value: 0 };
4124
+ if (t.x -= this.long0, this.es !== 0 ? a = Math.atan(this.one_minus_f_squared * Math.tan(t.y)) : a = t.y, s = t.x, this.face === I.TOP)
4125
+ r = v - a, s >= b && s <= v + b ? (o.value = A.AREA_0, e = s - v) : s > v + b || s <= -(v + b) ? (o.value = A.AREA_1, e = s > 0 ? s - R : s + R) : s > -(v + b) && s <= -b ? (o.value = A.AREA_2, e = s + v) : (o.value = A.AREA_3, e = s);
4126
+ else if (this.face === I.BOTTOM)
4127
+ r = v + a, s >= b && s <= v + b ? (o.value = A.AREA_0, e = -s + v) : s < b && s >= -b ? (o.value = A.AREA_1, e = -s) : s < -b && s >= -(v + b) ? (o.value = A.AREA_2, e = -s - v) : (o.value = A.AREA_3, e = s > 0 ? -s + R : -s - R);
4128
+ else {
4129
+ var l, _, c, f, u, M, g;
4130
+ this.face === I.RIGHT ? s = ct(s, +v) : this.face === I.BACK ? s = ct(s, +R) : this.face === I.LEFT && (s = ct(s, -v)), f = Math.sin(a), u = Math.cos(a), M = Math.sin(s), g = Math.cos(s), l = u * g, _ = u * M, c = f, this.face === I.FRONT ? (r = Math.acos(l), e = pt(r, c, _, o)) : this.face === I.RIGHT ? (r = Math.acos(_), e = pt(r, c, -l, o)) : this.face === I.BACK ? (r = Math.acos(-l), e = pt(r, c, -_, o)) : this.face === I.LEFT ? (r = Math.acos(-_), e = pt(r, c, l, o)) : (r = e = 0, o.value = A.AREA_0);
4131
+ }
4132
+ return h = Math.atan(12 / R * (e + Math.acos(Math.sin(e) * Math.cos(b)) - v)), n = Math.sqrt((1 - Math.cos(r)) / (Math.cos(h) * Math.cos(h)) / (1 - Math.cos(Math.atan(1 / Math.cos(e))))), o.value === A.AREA_1 ? h += v : o.value === A.AREA_2 ? h += R : o.value === A.AREA_3 && (h += 1.5 * R), i.x = n * Math.cos(h), i.y = n * Math.sin(h), i.x = i.x * this.a + this.x0, i.y = i.y * this.a + this.y0, t.x = i.x, t.y = i.y, t;
4133
+ }
4134
+ function gh(t) {
4135
+ var i = { lam: 0, phi: 0 }, a, s, e, r, n, h, o, l, _, c = { value: 0 };
4136
+ if (t.x = (t.x - this.x0) / this.a, t.y = (t.y - this.y0) / this.a, s = Math.atan(Math.sqrt(t.x * t.x + t.y * t.y)), a = Math.atan2(t.y, t.x), t.x >= 0 && t.x >= Math.abs(t.y) ? c.value = A.AREA_0 : t.y >= 0 && t.y >= Math.abs(t.x) ? (c.value = A.AREA_1, a -= v) : t.x < 0 && -t.x >= Math.abs(t.y) ? (c.value = A.AREA_2, a = a < 0 ? a + R : a - R) : (c.value = A.AREA_3, a += v), _ = R / 12 * Math.tan(a), n = Math.sin(_) / (Math.cos(_) - 1 / Math.sqrt(2)), h = Math.atan(n), e = Math.cos(a), r = Math.tan(s), o = 1 - e * e * r * r * (1 - Math.cos(Math.atan(1 / Math.cos(h)))), o < -1 ? o = -1 : o > 1 && (o = 1), this.face === I.TOP)
4137
+ l = Math.acos(o), i.phi = v - l, c.value === A.AREA_0 ? i.lam = h + v : c.value === A.AREA_1 ? i.lam = h < 0 ? h + R : h - R : c.value === A.AREA_2 ? i.lam = h - v : i.lam = h;
4138
+ else if (this.face === I.BOTTOM)
4139
+ l = Math.acos(o), i.phi = l - v, c.value === A.AREA_0 ? i.lam = -h + v : c.value === A.AREA_1 ? i.lam = -h : c.value === A.AREA_2 ? i.lam = -h - v : i.lam = h < 0 ? -h - R : -h + R;
4140
+ else {
4141
+ var f, u, M;
4142
+ f = o, _ = f * f, _ >= 1 ? M = 0 : M = Math.sqrt(1 - _) * Math.sin(h), _ += M * M, _ >= 1 ? u = 0 : u = Math.sqrt(1 - _), c.value === A.AREA_1 ? (_ = u, u = -M, M = _) : c.value === A.AREA_2 ? (u = -u, M = -M) : c.value === A.AREA_3 && (_ = u, u = M, M = -_), this.face === I.RIGHT ? (_ = f, f = -u, u = _) : this.face === I.BACK ? (f = -f, u = -u) : this.face === I.LEFT && (_ = f, f = u, u = -_), i.phi = Math.acos(-M) - v, i.lam = Math.atan2(u, f), this.face === I.RIGHT ? i.lam = ct(i.lam, -v) : this.face === I.BACK ? i.lam = ct(i.lam, -R) : this.face === I.LEFT && (i.lam = ct(i.lam, +v));
4143
+ }
4144
+ if (this.es !== 0) {
4145
+ var g, d, E;
4146
+ g = i.phi < 0 ? 1 : 0, d = Math.tan(i.phi), E = this.b / Math.sqrt(d * d + this.one_minus_f_squared), i.phi = Math.atan(Math.sqrt(this.a * this.a - E * E) / (this.one_minus_f * E)), g && (i.phi = -i.phi);
4147
+ }
4148
+ return i.lam += this.long0, t.x = i.lam, t.y = i.phi, t;
4149
+ }
4150
+ function pt(t, i, a, s) {
4151
+ var e;
4152
+ return t < m ? (s.value = A.AREA_0, e = 0) : (e = Math.atan2(i, a), Math.abs(e) <= b ? s.value = A.AREA_0 : e > b && e <= v + b ? (s.value = A.AREA_1, e -= v) : e > v + b || e <= -(v + b) ? (s.value = A.AREA_2, e = e >= 0 ? e - R : e + R) : (s.value = A.AREA_3, e += v)), e;
4153
+ }
4154
+ function ct(t, i) {
4155
+ var a = t + i;
4156
+ return a < -R ? a += Pt : a > +R && (a -= Pt), a;
4157
+ }
4158
+ var dh = ["Quadrilateralized Spherical Cube", "Quadrilateralized_Spherical_Cube", "qsc"];
4159
+ const mh = {
4160
+ init: Mh,
4161
+ forward: vh,
4162
+ inverse: gh,
4163
+ names: dh
4164
+ };
4165
+ var ei = [
4166
+ [1, 22199e-21, -715515e-10, 31103e-10],
4167
+ [0.9986, -482243e-9, -24897e-9, -13309e-10],
4168
+ [0.9954, -83103e-8, -448605e-10, -986701e-12],
4169
+ [0.99, -135364e-8, -59661e-9, 36777e-10],
4170
+ [0.9822, -167442e-8, -449547e-11, -572411e-11],
4171
+ [0.973, -214868e-8, -903571e-10, 18736e-12],
4172
+ [0.96, -305085e-8, -900761e-10, 164917e-11],
4173
+ [0.9427, -382792e-8, -653386e-10, -26154e-10],
4174
+ [0.9216, -467746e-8, -10457e-8, 481243e-11],
4175
+ [0.8962, -536223e-8, -323831e-10, -543432e-11],
4176
+ [0.8679, -609363e-8, -113898e-9, 332484e-11],
4177
+ [0.835, -698325e-8, -640253e-10, 934959e-12],
4178
+ [0.7986, -755338e-8, -500009e-10, 935324e-12],
4179
+ [0.7597, -798324e-8, -35971e-9, -227626e-11],
4180
+ [0.7186, -851367e-8, -701149e-10, -86303e-10],
4181
+ [0.6732, -986209e-8, -199569e-9, 191974e-10],
4182
+ [0.6213, -0.010418, 883923e-10, 624051e-11],
4183
+ [0.5722, -906601e-8, 182e-6, 624051e-11],
4184
+ [0.5322, -677797e-8, 275608e-9, 624051e-11]
4185
+ ], dt = [
4186
+ [-520417e-23, 0.0124, 121431e-23, -845284e-16],
4187
+ [0.062, 0.0124, -126793e-14, 422642e-15],
4188
+ [0.124, 0.0124, 507171e-14, -160604e-14],
4189
+ [0.186, 0.0123999, -190189e-13, 600152e-14],
4190
+ [0.248, 0.0124002, 710039e-13, -224e-10],
4191
+ [0.31, 0.0123992, -264997e-12, 835986e-13],
4192
+ [0.372, 0.0124029, 988983e-12, -311994e-12],
4193
+ [0.434, 0.0123893, -369093e-11, -435621e-12],
4194
+ [0.4958, 0.0123198, -102252e-10, -345523e-12],
4195
+ [0.5571, 0.0121916, -154081e-10, -582288e-12],
4196
+ [0.6176, 0.0119938, -241424e-10, -525327e-12],
4197
+ [0.6769, 0.011713, -320223e-10, -516405e-12],
4198
+ [0.7346, 0.0113541, -397684e-10, -609052e-12],
4199
+ [0.7903, 0.0109107, -489042e-10, -104739e-11],
4200
+ [0.8435, 0.0103431, -64615e-9, -140374e-14],
4201
+ [0.8936, 969686e-8, -64636e-9, -8547e-9],
4202
+ [0.9394, 840947e-8, -192841e-9, -42106e-10],
4203
+ [0.9761, 616527e-8, -256e-6, -42106e-10],
4204
+ [1, 328947e-8, -319159e-9, -42106e-10]
4205
+ ], ea = 0.8487, ra = 1.3523, ha = $ / 5, yh = 1 / ha, lt = 18, zt = function(t, i) {
4206
+ return t[0] + i * (t[1] + i * (t[2] + i * t[3]));
4207
+ }, Eh = function(t, i) {
4208
+ return t[1] + i * (2 * t[2] + i * 3 * t[3]);
4209
+ };
4210
+ function Sh(t, i, a, s) {
4211
+ for (var e = i; s; --s) {
4212
+ var r = t(e);
4213
+ if (e -= r, Math.abs(r) < a)
4214
+ break;
4215
+ }
4216
+ return e;
4217
+ }
4218
+ function wh() {
4219
+ this.x0 = this.x0 || 0, this.y0 = this.y0 || 0, this.long0 = this.long0 || 0, this.es = 0, this.title = this.title || "Robinson";
4220
+ }
4221
+ function Ph(t) {
4222
+ var i = y(t.x - this.long0, this.over), a = Math.abs(t.y), s = Math.floor(a * ha);
4223
+ s < 0 ? s = 0 : s >= lt && (s = lt - 1), a = $ * (a - yh * s);
4224
+ var e = {
4225
+ x: zt(ei[s], a) * i,
4226
+ y: zt(dt[s], a)
4227
+ };
4228
+ return t.y < 0 && (e.y = -e.y), e.x = e.x * this.a * ea + this.x0, e.y = e.y * this.a * ra + this.y0, e;
4229
+ }
4230
+ function xh(t) {
4231
+ var i = {
4232
+ x: (t.x - this.x0) / (this.a * ea),
4233
+ y: Math.abs(t.y - this.y0) / (this.a * ra)
4234
+ };
4235
+ if (i.y >= 1)
4236
+ i.x /= ei[lt][0], i.y = t.y < 0 ? -v : v;
4237
+ else {
4238
+ var a = Math.floor(i.y * lt);
4239
+ for (a < 0 ? a = 0 : a >= lt && (a = lt - 1); ; )
4240
+ if (dt[a][0] > i.y)
4241
+ --a;
4242
+ else if (dt[a + 1][0] <= i.y)
4243
+ ++a;
4244
+ else
4245
+ break;
4246
+ var s = dt[a], e = 5 * (i.y - s[0]) / (dt[a + 1][0] - s[0]);
4247
+ e = Sh(function(r) {
4248
+ return (zt(s, r) - i.y) / Eh(s, r);
4249
+ }, e, m, 100), i.x /= zt(ei[a], e), i.y = (5 * a + e) * C, t.y < 0 && (i.y = -i.y);
4250
+ }
4251
+ return i.x = y(i.x + this.long0, this.over), i;
4252
+ }
4253
+ var Gh = ["Robinson", "robin"];
4254
+ const bh = {
4255
+ init: wh,
4256
+ forward: Ph,
4257
+ inverse: xh,
4258
+ names: Gh
4259
+ };
4260
+ function Ah() {
4261
+ this.name = "geocent";
4262
+ }
4263
+ function Nh(t) {
4264
+ var i = Qi(t, this.es, this.a);
4265
+ return i;
4266
+ }
4267
+ function Ih(t) {
4268
+ var i = Xi(t, this.es, this.a, this.b);
4269
+ return i;
4270
+ }
4271
+ var Ch = ["Geocentric", "geocentric", "geocent", "Geocent"];
4272
+ const Rh = {
4273
+ init: Ah,
4274
+ forward: Nh,
4275
+ inverse: Ih,
4276
+ names: Ch
4277
+ };
4278
+ var L = {
4279
+ N_POLE: 0,
4280
+ S_POLE: 1,
4281
+ EQUIT: 2,
4282
+ OBLIQ: 3
4283
+ }, Mt = {
4284
+ h: { def: 1e5, num: !0 },
4285
+ // default is Karman line, no default in PROJ.7
4286
+ azi: { def: 0, num: !0, degrees: !0 },
4287
+ // default is North
4288
+ tilt: { def: 0, num: !0, degrees: !0 },
4289
+ // default is Nadir
4290
+ long0: { def: 0, num: !0 },
4291
+ // default is Greenwich, conversion to rad is automatic
4292
+ lat0: { def: 0, num: !0 }
4293
+ // default is Equator, conversion to rad is automatic
4294
+ };
4295
+ function Oh() {
4296
+ if (Object.keys(Mt).forEach(function(a) {
4297
+ if (typeof this[a] > "u")
4298
+ this[a] = Mt[a].def;
4299
+ else {
4300
+ if (Mt[a].num && isNaN(this[a]))
4301
+ throw new Error("Invalid parameter value, must be numeric " + a + " = " + this[a]);
4302
+ Mt[a].num && (this[a] = parseFloat(this[a]));
4303
+ }
4304
+ Mt[a].degrees && (this[a] = this[a] * C);
4305
+ }.bind(this)), Math.abs(Math.abs(this.lat0) - v) < m ? this.mode = this.lat0 < 0 ? L.S_POLE : L.N_POLE : Math.abs(this.lat0) < m ? this.mode = L.EQUIT : (this.mode = L.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)
4306
+ throw new Error("Invalid height");
4307
+ 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;
4308
+ var t = this.tilt, i = this.azi;
4309
+ this.cg = Math.cos(i), this.sg = Math.sin(i), this.cw = Math.cos(t), this.sw = Math.sin(t);
4310
+ }
4311
+ function Th(t) {
4312
+ t.x -= this.long0;
4313
+ var i = Math.sin(t.y), a = Math.cos(t.y), s = Math.cos(t.x), e, r;
4314
+ switch (this.mode) {
4315
+ case L.OBLIQ:
4316
+ r = this.sinph0 * i + this.cosph0 * a * s;
4317
+ break;
4318
+ case L.EQUIT:
4319
+ r = a * s;
4320
+ break;
4321
+ case L.S_POLE:
4322
+ r = -i;
4323
+ break;
4324
+ case L.N_POLE:
4325
+ r = i;
4326
+ break;
4327
+ }
4328
+ switch (r = this.pn1 / (this.p - r), e = r * a * Math.sin(t.x), this.mode) {
4329
+ case L.OBLIQ:
4330
+ r *= this.cosph0 * i - this.sinph0 * a * s;
4331
+ break;
4332
+ case L.EQUIT:
4333
+ r *= i;
4334
+ break;
4335
+ case L.N_POLE:
4336
+ r *= -(a * s);
4337
+ break;
4338
+ case L.S_POLE:
4339
+ r *= a * s;
4340
+ break;
4341
+ }
4342
+ var n, h;
4343
+ return n = r * this.cg + e * this.sg, h = 1 / (n * this.sw * this.h1 + this.cw), e = (e * this.cg - r * this.sg) * this.cw * h, r = n * h, t.x = e * this.a, t.y = r * this.a, t;
4344
+ }
4345
+ function ph(t) {
4346
+ t.x /= this.a, t.y /= this.a;
4347
+ var i = { x: t.x, y: t.y }, a, s, e;
4348
+ e = 1 / (this.pn1 - t.y * this.sw), a = this.pn1 * t.x * e, s = this.pn1 * t.y * this.cw * e, t.x = a * this.cg + s * this.sg, t.y = s * this.cg - a * this.sg;
4349
+ var r = k(t.x, t.y);
4350
+ if (Math.abs(r) < m)
4351
+ i.x = 0, i.y = t.y;
4352
+ else {
4353
+ var n, h;
4354
+ switch (h = 1 - r * r * this.pfact, h = (this.p - Math.sqrt(h)) / (this.pn1 / r + r / this.pn1), n = Math.sqrt(1 - h * h), this.mode) {
4355
+ case L.OBLIQ:
4356
+ i.y = Math.asin(n * this.sinph0 + t.y * h * this.cosph0 / r), t.y = (n - this.sinph0 * Math.sin(i.y)) * r, t.x *= h * this.cosph0;
4357
+ break;
4358
+ case L.EQUIT:
4359
+ i.y = Math.asin(t.y * h / r), t.y = n * r, t.x *= h;
4360
+ break;
4361
+ case L.N_POLE:
4362
+ i.y = Math.asin(n), t.y = -t.y;
4363
+ break;
4364
+ case L.S_POLE:
4365
+ i.y = -Math.asin(n);
4366
+ break;
4367
+ }
4368
+ i.x = Math.atan2(t.x, t.y);
4369
+ }
4370
+ return t.x = i.x + this.long0, t.y = i.y, t;
4371
+ }
4372
+ var Lh = ["Tilted_Perspective", "tpers"];
4373
+ const qh = {
4374
+ init: Oh,
4375
+ forward: Th,
4376
+ inverse: ph,
4377
+ names: Lh
4378
+ };
4379
+ function Uh() {
4380
+ if (this.flip_axis = this.sweep === "x" ? 1 : 0, this.h = Number(this.h), this.radius_g_1 = this.h / this.a, this.radius_g_1 <= 0 || this.radius_g_1 > 1e10)
4381
+ throw new Error();
4382
+ if (this.radius_g = 1 + this.radius_g_1, this.C = this.radius_g * this.radius_g - 1, this.es !== 0) {
4383
+ var t = 1 - this.es, i = 1 / t;
4384
+ this.radius_p = Math.sqrt(t), this.radius_p2 = t, this.radius_p_inv2 = i, this.shape = "ellipse";
4385
+ } else
4386
+ this.radius_p = 1, this.radius_p2 = 1, this.radius_p_inv2 = 1, this.shape = "sphere";
4387
+ this.title || (this.title = "Geostationary Satellite View");
4388
+ }
4389
+ function kh(t) {
4390
+ var i = t.x, a = t.y, s, e, r, n;
4391
+ if (i = i - this.long0, this.shape === "ellipse") {
4392
+ a = Math.atan(this.radius_p2 * Math.tan(a));
4393
+ var h = this.radius_p / k(this.radius_p * Math.cos(a), Math.sin(a));
4394
+ if (e = h * Math.cos(i) * Math.cos(a), r = h * Math.sin(i) * Math.cos(a), n = h * Math.sin(a), (this.radius_g - e) * e - r * r - n * n * this.radius_p_inv2 < 0)
4395
+ return t.x = Number.NaN, t.y = Number.NaN, t;
4396
+ s = this.radius_g - e, this.flip_axis ? (t.x = this.radius_g_1 * Math.atan(r / k(n, s)), t.y = this.radius_g_1 * Math.atan(n / s)) : (t.x = this.radius_g_1 * Math.atan(r / s), t.y = this.radius_g_1 * Math.atan(n / k(r, s)));
4397
+ } else this.shape === "sphere" && (s = Math.cos(a), e = Math.cos(i) * s, r = Math.sin(i) * s, n = Math.sin(a), s = this.radius_g - e, this.flip_axis ? (t.x = this.radius_g_1 * Math.atan(r / k(n, s)), t.y = this.radius_g_1 * Math.atan(n / s)) : (t.x = this.radius_g_1 * Math.atan(r / s), t.y = this.radius_g_1 * Math.atan(n / k(r, s))));
4398
+ return t.x = t.x * this.a, t.y = t.y * this.a, t;
4399
+ }
4400
+ function $h(t) {
4401
+ var i = -1, a = 0, s = 0, e, r, n, h;
4402
+ if (t.x = t.x / this.a, t.y = t.y / this.a, this.shape === "ellipse") {
4403
+ this.flip_axis ? (s = Math.tan(t.y / this.radius_g_1), a = Math.tan(t.x / this.radius_g_1) * k(1, s)) : (a = Math.tan(t.x / this.radius_g_1), s = Math.tan(t.y / this.radius_g_1) * k(1, a));
4404
+ var o = s / this.radius_p;
4405
+ if (e = a * a + o * o + i * i, r = 2 * this.radius_g * i, n = r * r - 4 * e * this.C, n < 0)
4406
+ return t.x = Number.NaN, t.y = Number.NaN, t;
4407
+ h = (-r - Math.sqrt(n)) / (2 * e), i = this.radius_g + h * i, a *= h, s *= h, t.x = Math.atan2(a, i), t.y = Math.atan(s * Math.cos(t.x) / i), t.y = Math.atan(this.radius_p_inv2 * Math.tan(t.y));
4408
+ } else if (this.shape === "sphere") {
4409
+ if (this.flip_axis ? (s = Math.tan(t.y / this.radius_g_1), a = Math.tan(t.x / this.radius_g_1) * Math.sqrt(1 + s * s)) : (a = Math.tan(t.x / this.radius_g_1), s = Math.tan(t.y / this.radius_g_1) * Math.sqrt(1 + a * a)), e = a * a + s * s + i * i, r = 2 * this.radius_g * i, n = r * r - 4 * e * this.C, n < 0)
4410
+ return t.x = Number.NaN, t.y = Number.NaN, t;
4411
+ h = (-r - Math.sqrt(n)) / (2 * e), i = this.radius_g + h * i, a *= h, s *= h, t.x = Math.atan2(a, i), t.y = Math.atan(s * Math.cos(t.x) / i);
4412
+ }
4413
+ return t.x = t.x + this.long0, t;
4414
+ }
4415
+ var Fh = ["Geostationary Satellite View", "Geostationary_Satellite", "geos"];
4416
+ const Dh = {
4417
+ init: Uh,
4418
+ forward: kh,
4419
+ inverse: $h,
4420
+ names: Fh
4421
+ };
4422
+ var yt = 1.340264, Et = -0.081106, St = 893e-6, wt = 3796e-6, Wt = Math.sqrt(3) / 2;
4423
+ function Bh() {
4424
+ this.es = 0, this.long0 = this.long0 !== void 0 ? this.long0 : 0, this.x0 = this.x0 !== void 0 ? this.x0 : 0, this.y0 = this.y0 !== void 0 ? this.y0 : 0;
4425
+ }
4426
+ function jh(t) {
4427
+ var i = y(t.x - this.long0, this.over), a = t.y, s = Math.asin(Wt * Math.sin(a)), e = s * s, r = e * e * e;
4428
+ return t.x = i * Math.cos(s) / (Wt * (yt + 3 * Et * e + r * (7 * St + 9 * wt * e))), t.y = s * (yt + Et * e + r * (St + wt * e)), t.x = this.a * t.x + this.x0, t.y = this.a * t.y + this.y0, t;
4429
+ }
4430
+ function zh(t) {
4431
+ t.x = (t.x - this.x0) / this.a, t.y = (t.y - this.y0) / this.a;
4432
+ var i = 1e-9, a = 12, s = t.y, e, r, n, h, o, l;
4433
+ for (l = 0; l < a && (e = s * s, r = e * e * e, n = s * (yt + Et * e + r * (St + wt * e)) - t.y, h = yt + 3 * Et * e + r * (7 * St + 9 * wt * e), s -= o = n / h, !(Math.abs(o) < i)); ++l)
4434
+ ;
4435
+ return e = s * s, r = e * e * e, t.x = Wt * t.x * (yt + 3 * Et * e + r * (7 * St + 9 * wt * e)) / Math.cos(s), t.y = Math.asin(Math.sin(s) / Wt), t.x = y(t.x + this.long0, this.over), t;
4436
+ }
4437
+ var Wh = ["eqearth", "Equal Earth", "Equal_Earth"];
4438
+ const Hh = {
4439
+ init: Bh,
4440
+ forward: jh,
4441
+ inverse: zh,
4442
+ names: Wh
4443
+ };
4444
+ var bt = 1e-10;
4445
+ function Qh() {
4446
+ var t;
4447
+ if (this.phi1 = this.lat1, Math.abs(this.phi1) < bt)
4448
+ throw new Error();
4449
+ this.es ? (this.en = oi(this.es), this.m1 = ut(
4450
+ this.phi1,
4451
+ this.am1 = Math.sin(this.phi1),
4452
+ t = Math.cos(this.phi1),
4453
+ this.en
4454
+ ), this.am1 = t / (Math.sqrt(1 - this.es * this.am1 * this.am1) * this.am1), this.inverse = Kh, this.forward = Xh) : (Math.abs(this.phi1) + bt >= v ? this.cphi1 = 0 : this.cphi1 = 1 / Math.tan(this.phi1), this.inverse = Vh, this.forward = Jh);
4455
+ }
4456
+ function Xh(t) {
4457
+ var i = y(t.x - (this.long0 || 0), this.over), a = t.y, s, e, r;
4458
+ return s = this.am1 + this.m1 - ut(a, e = Math.sin(a), r = Math.cos(a), this.en), e = r * i / (s * Math.sqrt(1 - this.es * e * e)), t.x = s * Math.sin(e), t.y = this.am1 - s * Math.cos(e), t.x = this.a * t.x + (this.x0 || 0), t.y = this.a * t.y + (this.y0 || 0), t;
4459
+ }
4460
+ function Kh(t) {
4461
+ t.x = (t.x - (this.x0 || 0)) / this.a, t.y = (t.y - (this.y0 || 0)) / this.a;
4462
+ var i, a, s, e;
4463
+ if (a = k(t.x, t.y = this.am1 - t.y), e = li(this.am1 + this.m1 - a, this.es, this.en), (i = Math.abs(e)) < v)
4464
+ i = Math.sin(e), s = a * Math.atan2(t.x, t.y) * Math.sqrt(1 - this.es * i * i) / Math.cos(e);
4465
+ else if (Math.abs(i - v) <= bt)
4466
+ s = 0;
4467
+ else
4468
+ throw new Error();
4469
+ return t.x = y(s + (this.long0 || 0), this.over), t.y = Y(e), t;
4470
+ }
4471
+ function Jh(t) {
4472
+ var i = y(t.x - (this.long0 || 0), this.over), a = t.y, s, e;
4473
+ return e = this.cphi1 + this.phi1 - a, Math.abs(e) > bt ? (t.x = e * Math.sin(s = i * Math.cos(a) / e), t.y = this.cphi1 - e * Math.cos(s)) : t.x = t.y = 0, t.x = this.a * t.x + (this.x0 || 0), t.y = this.a * t.y + (this.y0 || 0), t;
4474
+ }
4475
+ function Vh(t) {
4476
+ t.x = (t.x - (this.x0 || 0)) / this.a, t.y = (t.y - (this.y0 || 0)) / this.a;
4477
+ var i, a, s = k(t.x, t.y = this.cphi1 - t.y);
4478
+ if (a = this.cphi1 + this.phi1 - s, Math.abs(a) > v)
4479
+ throw new Error();
4480
+ return Math.abs(Math.abs(a) - v) <= bt ? i = 0 : i = s * Math.atan2(t.x, t.y) / Math.cos(a), t.x = y(i + (this.long0 || 0), this.over), t.y = Y(a), t;
4481
+ }
4482
+ var Zh = ["bonne", "Bonne (Werner lat_1=90)"];
4483
+ const Yh = {
4484
+ init: Qh,
4485
+ names: Zh
4486
+ }, Li = {
4487
+ OBLIQUE: {
4488
+ forward: rn,
4489
+ inverse: nn
4490
+ },
4491
+ TRANSVERSE: {
4492
+ forward: hn,
4493
+ inverse: on
4494
+ }
4495
+ }, Ht = {
4496
+ ROTATE: {
4497
+ o_alpha: "oAlpha",
4498
+ o_lon_c: "oLongC",
4499
+ o_lat_c: "oLatC"
4500
+ },
4501
+ NEW_POLE: {
4502
+ o_lat_p: "oLatP",
4503
+ o_lon_p: "oLongP"
4504
+ },
4505
+ NEW_EQUATOR: {
4506
+ o_lon_1: "oLong1",
4507
+ o_lat_1: "oLat1",
4508
+ o_lon_2: "oLong2",
4509
+ o_lat_2: "oLat2"
4510
+ }
4511
+ };
4512
+ function tn() {
4513
+ if (this.x0 = this.x0 || 0, this.y0 = this.y0 || 0, this.long0 = this.long0 || 0, this.title = this.title || "General Oblique Transformation", this.isIdentity = ji.includes(this.o_proj), !this.o_proj)
4514
+ throw new Error("Missing parameter: o_proj");
4515
+ if (this.o_proj === "ob_tran")
4516
+ throw new Error("Invalid value for o_proj: " + this.o_proj);
4517
+ const t = this.projStr.replace("+proj=ob_tran", "").replace("+o_proj=", "+proj=").trim(), i = j(t);
4518
+ if (!i)
4519
+ throw new Error("Invalid parameter: o_proj. Unknown projection " + this.o_proj);
4520
+ i.long0 = 0, this.obliqueProjection = i;
4521
+ let a;
4522
+ const s = Object.keys(Ht), e = (h) => {
4523
+ if (typeof this[h] > "u")
4524
+ return;
4525
+ const o = parseFloat(this[h]) * C;
4526
+ if (isNaN(o))
4527
+ throw new Error("Invalid value for " + h + ": " + this[h]);
4528
+ return o;
4529
+ };
4530
+ for (let h = 0; h < s.length; h++) {
4531
+ const o = s[h], l = Ht[o], _ = Object.entries(l);
4532
+ if (_.some(
4533
+ ([f]) => typeof this[f] < "u"
4534
+ )) {
4535
+ a = l;
4536
+ for (let f = 0; f < _.length; f++) {
4537
+ const [u, M] = _[f], g = e(u);
4538
+ if (typeof g > "u")
4539
+ throw new Error("Missing parameter: " + u + ".");
4540
+ this[M] = g;
4541
+ }
4542
+ break;
4543
+ }
4544
+ }
4545
+ if (!a)
4546
+ throw new Error("No valid parameters provided for ob_tran projection.");
4547
+ const { lamp: r, phip: n } = en(this, a);
4548
+ this.lamp = r, Math.abs(n) > m ? (this.cphip = Math.cos(n), this.sphip = Math.sin(n), this.projectionType = Li.OBLIQUE) : this.projectionType = Li.TRANSVERSE;
4549
+ }
4550
+ function an(t) {
4551
+ return this.projectionType.forward(this, t);
4552
+ }
4553
+ function sn(t) {
4554
+ return this.projectionType.inverse(this, t);
4555
+ }
4556
+ function en(t, i) {
4557
+ let a, s;
4558
+ if (i === Ht.ROTATE) {
4559
+ let e = t.oLongC, r = t.oLatC, n = t.oAlpha;
4560
+ if (Math.abs(Math.abs(r) - v) <= m)
4561
+ throw new Error("Invalid value for o_lat_c: " + t.o_lat_c + " should be < 90°");
4562
+ s = e + Math.atan2(-1 * Math.cos(n), -1 * Math.sin(n) * Math.sin(r)), a = Math.asin(Math.cos(r) * Math.sin(n));
4563
+ } else if (i === Ht.NEW_POLE)
4564
+ s = t.oLongP, a = t.oLatP;
4565
+ else {
4566
+ let e = t.oLong1, r = t.oLat1, n = t.oLong2, h = t.oLat2, o = Math.abs(r);
4567
+ if (Math.abs(r) > v - m)
4568
+ throw new Error("Invalid value for o_lat_1: " + t.o_lat_1 + " should be < 90°");
4569
+ if (Math.abs(h) > v - m)
4570
+ throw new Error("Invalid value for o_lat_2: " + t.o_lat_2 + " should be < 90°");
4571
+ if (Math.abs(r - h) < m)
4572
+ throw new Error("Invalid value for o_lat_1 and o_lat_2: o_lat_1 should be different from o_lat_2");
4573
+ if (o < m)
4574
+ throw new Error("Invalid value for o_lat_1: o_lat_1 should be different from zero");
4575
+ s = Math.atan2(
4576
+ Math.cos(r) * Math.sin(h) * Math.cos(e) - Math.sin(r) * Math.cos(h) * Math.cos(n),
4577
+ Math.sin(r) * Math.cos(h) * Math.sin(n) - Math.cos(r) * Math.sin(h) * Math.sin(e)
4578
+ ), a = Math.atan(-1 * Math.cos(s - e) / Math.tan(r));
4579
+ }
4580
+ return { lamp: s, phip: a };
4581
+ }
4582
+ function rn(t, i) {
4583
+ let { x: a, y: s } = i;
4584
+ a += t.long0;
4585
+ const e = Math.cos(a), r = Math.sin(s), n = Math.cos(s);
4586
+ i.x = y(
4587
+ Math.atan2(
4588
+ n * Math.sin(a),
4589
+ t.sphip * n * e + t.cphip * r
4590
+ ) + t.lamp
4591
+ ), i.y = Math.asin(
4592
+ t.sphip * r - t.cphip * n * e
4593
+ );
4594
+ const h = t.obliqueProjection.forward(i);
4595
+ return t.isIdentity && (h.x *= $, h.y *= $), h;
4596
+ }
4597
+ function hn(t, i) {
4598
+ let { x: a, y: s } = i;
4599
+ a += t.long0;
4600
+ const e = Math.cos(s), r = Math.cos(a);
4601
+ i.x = y(
4602
+ Math.atan2(
4603
+ e * Math.sin(a),
4604
+ Math.sin(s)
4605
+ ) + t.lamp
4606
+ ), i.y = Math.asin(-1 * e * r);
4607
+ const n = t.obliqueProjection.forward(i);
4608
+ return t.isIdentity && (n.x *= $, n.y *= $), n;
4609
+ }
4610
+ function nn(t, i) {
4611
+ t.isIdentity && (i.x *= C, i.y *= C);
4612
+ const a = t.obliqueProjection.inverse(i);
4613
+ let { x: s, y: e } = a;
4614
+ if (s < Number.MAX_VALUE) {
4615
+ s -= t.lamp;
4616
+ const r = Math.cos(s), n = Math.sin(e), h = Math.cos(e);
4617
+ i.x = Math.atan2(
4618
+ h * Math.sin(s),
4619
+ t.sphip * h * r - t.cphip * n
4620
+ ), i.y = Math.asin(
4621
+ t.sphip * n + t.cphip * h * r
4622
+ );
4623
+ }
4624
+ return i.x = y(i.x + t.long0), i;
4625
+ }
4626
+ function on(t, i) {
4627
+ t.isIdentity && (i.x *= C, i.y *= C);
4628
+ const a = t.obliqueProjection.inverse(i);
4629
+ let { x: s, y: e } = a;
4630
+ if (s < Number.MAX_VALUE) {
4631
+ const r = Math.cos(e);
4632
+ s -= t.lamp, i.x = Math.atan2(
4633
+ r * Math.sin(s),
4634
+ -1 * Math.sin(e)
4635
+ ), i.y = Math.asin(
4636
+ r * Math.cos(s)
4637
+ );
4638
+ }
4639
+ return i.x = y(i.x + t.long0), i;
4640
+ }
4641
+ var ln = ["General Oblique Transformation", "General_Oblique_Transformation", "ob_tran"];
4642
+ const fn = {
4643
+ init: tn,
4644
+ forward: an,
4645
+ inverse: sn,
4646
+ names: ln
4647
+ };
4648
+ function cn(t) {
4649
+ t.Proj.projections.add(qt), t.Proj.projections.add(Ut), t.Proj.projections.add(Zs), t.Proj.projections.add(ne), t.Proj.projections.add(_e), t.Proj.projections.add(de), t.Proj.projections.add(Pe), t.Proj.projections.add(Ne), t.Proj.projections.add(Te), t.Proj.projections.add(ke), t.Proj.projections.add(Ve), t.Proj.projections.add(sr), t.Proj.projections.add(or), t.Proj.projections.add(Mr), t.Proj.projections.add(yr), t.Proj.projections.add(xr), t.Proj.projections.add(Ir), t.Proj.projections.add(pr), t.Proj.projections.add(Fr), t.Proj.projections.add(Wr), t.Proj.projections.add(Jr), t.Proj.projections.add(ih), t.Proj.projections.add(oh), t.Proj.projections.add(uh), t.Proj.projections.add(mh), t.Proj.projections.add(bh), t.Proj.projections.add(Rh), t.Proj.projections.add(qh), t.Proj.projections.add(Dh), t.Proj.projections.add(Hh), t.Proj.projections.add(Yh), t.Proj.projections.add(fn);
4650
+ }
4651
+ const _n = Object.assign(vs, {
4652
+ defaultDatum: "WGS84",
4653
+ Proj: j,
4654
+ WGS84: new j("WGS84"),
4655
+ Point: _t,
4656
+ toPoint: Ki,
4657
+ defs: T,
4658
+ nadgrid: Va,
4659
+ transform: Bt,
4660
+ mgrs: gs,
4661
+ version: "__VERSION__"
4662
+ });
4663
+ cn(_n);
4664
+ export {
4665
+ _n as default
4666
+ };
4667
+ //# sourceMappingURL=index-CA8I5Z2-.js.map