@nika-js/onlymap 0.7.6 → 0.8.1

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