@basemaps/landing 6.30.0 → 6.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -20814,8 +20814,12 @@ init_preact_shim();
20814
20814
  init_preact_shim();
20815
20815
  var PJD_3PARAM = 1;
20816
20816
  var PJD_7PARAM = 2;
20817
+ var PJD_GRIDSHIFT = 3;
20817
20818
  var PJD_WGS84 = 4;
20818
20819
  var PJD_NODATUM = 5;
20820
+ var SRS_WGS84_SEMIMAJOR = 6378137;
20821
+ var SRS_WGS84_SEMIMINOR = 6356752314e-3;
20822
+ var SRS_WGS84_ESQUARED = 0.0066943799901413165;
20819
20823
  var SEC_TO_RAD = 484813681109536e-20;
20820
20824
  var HALF_PI = Math.PI / 2;
20821
20825
  var SIXTH = 0.16666666666666666;
@@ -20916,6 +20920,9 @@ function projString_default(defData) {
20916
20920
  alpha: function(v2) {
20917
20921
  self2.alpha = parseFloat(v2) * D2R;
20918
20922
  },
20923
+ gamma: function(v2) {
20924
+ self2.rectified_grid_angle = parseFloat(v2);
20925
+ },
20919
20926
  lonc: function(v2) {
20920
20927
  self2.longc = v2 * D2R;
20921
20928
  },
@@ -20980,6 +20987,9 @@ function projString_default(defData) {
20980
20987
  if (v2.length === 3 && legalAxis.indexOf(v2.substr(0, 1)) !== -1 && legalAxis.indexOf(v2.substr(1, 1)) !== -1 && legalAxis.indexOf(v2.substr(2, 1)) !== -1) {
20981
20988
  self2.axis = v2;
20982
20989
  }
20990
+ },
20991
+ approx: function() {
20992
+ self2.approx = true;
20983
20993
  }
20984
20994
  };
20985
20995
  for (paramName in paramObj) {
@@ -21015,7 +21025,7 @@ var AFTERQUOTE = 5;
21015
21025
  var ENDED = -1;
21016
21026
  var whitespace = /\s/;
21017
21027
  var latin = /[A-Za-z]/;
21018
- var keyword = /[A-Za-z84]/;
21028
+ var keyword = /[A-Za-z84_]/;
21019
21029
  var endThings = /[,\]]/;
21020
21030
  var digets = /[\d\.E\-\+]/;
21021
21031
  function Parser(text) {
@@ -21314,15 +21324,14 @@ function cleanWKT(wkt) {
21314
21324
  if (wkt.AXIS) {
21315
21325
  var axisOrder = "";
21316
21326
  for (var i2 = 0, ii = wkt.AXIS.length; i2 < ii; ++i2) {
21317
- var axis = wkt.AXIS[i2];
21318
- var descriptor = axis[0].toLowerCase();
21319
- if (descriptor.indexOf("north") !== -1) {
21327
+ var axis = [wkt.AXIS[i2][0].toLowerCase(), wkt.AXIS[i2][1].toLowerCase()];
21328
+ if (axis[0].indexOf("north") !== -1 || (axis[0] === "y" || axis[0] === "lat") && axis[1] === "north") {
21320
21329
  axisOrder += "n";
21321
- } else if (descriptor.indexOf("south") !== -1) {
21330
+ } else if (axis[0].indexOf("south") !== -1 || (axis[0] === "y" || axis[0] === "lat") && axis[1] === "south") {
21322
21331
  axisOrder += "s";
21323
- } else if (descriptor.indexOf("east") !== -1) {
21332
+ } else if (axis[0].indexOf("east") !== -1 || (axis[0] === "x" || axis[0] === "lon") && axis[1] === "east") {
21324
21333
  axisOrder += "e";
21325
- } else if (descriptor.indexOf("west") !== -1) {
21334
+ } else if (axis[0].indexOf("west") !== -1 || (axis[0] === "x" || axis[0] === "lon") && axis[1] === "west") {
21326
21335
  axisOrder += "w";
21327
21336
  }
21328
21337
  }
@@ -21418,12 +21427,22 @@ function cleanWKT(wkt) {
21418
21427
  };
21419
21428
  var list = [
21420
21429
  ["standard_parallel_1", "Standard_Parallel_1"],
21430
+ ["standard_parallel_1", "Latitude of 1st standard parallel"],
21421
21431
  ["standard_parallel_2", "Standard_Parallel_2"],
21432
+ ["standard_parallel_2", "Latitude of 2nd standard parallel"],
21422
21433
  ["false_easting", "False_Easting"],
21434
+ ["false_easting", "False easting"],
21435
+ ["false-easting", "Easting at false origin"],
21423
21436
  ["false_northing", "False_Northing"],
21437
+ ["false_northing", "False northing"],
21438
+ ["false_northing", "Northing at false origin"],
21424
21439
  ["central_meridian", "Central_Meridian"],
21440
+ ["central_meridian", "Longitude of natural origin"],
21441
+ ["central_meridian", "Longitude of false origin"],
21425
21442
  ["latitude_of_origin", "Latitude_Of_Origin"],
21426
21443
  ["latitude_of_origin", "Central_Parallel"],
21444
+ ["latitude_of_origin", "Latitude of natural origin"],
21445
+ ["latitude_of_origin", "Latitude of false origin"],
21427
21446
  ["scale_factor", "Scale_Factor"],
21428
21447
  ["k0", "scale_factor"],
21429
21448
  ["latitude_of_center", "Latitude_Of_Center"],
@@ -22055,7 +22074,7 @@ exports3.nad27 = {
22055
22074
  datumName: "North_American_Datum_1927"
22056
22075
  };
22057
22076
  exports3.potsdam = {
22058
- towgs84: "606.0,23.0,413.0",
22077
+ towgs84: "598.1,73.7,418.2,0.202,0.045,-2.455,6.7",
22059
22078
  ellipse: "bessel",
22060
22079
  datumName: "Potsdam Rauenberg 1950 DHDN"
22061
22080
  };
@@ -22065,7 +22084,7 @@ exports3.carthage = {
22065
22084
  datumName: "Carthage 1934 Tunisia"
22066
22085
  };
22067
22086
  exports3.hermannskogel = {
22068
- towgs84: "653.0,-212.0,449.0",
22087
+ towgs84: "577.326,90.129,463.919,5.137,1.474,5.297,2.4232",
22069
22088
  ellipse: "bessel",
22070
22089
  datumName: "Hermannskogel"
22071
22090
  };
@@ -22117,7 +22136,7 @@ exports3.rnb72 = {
22117
22136
 
22118
22137
  // ../../node_modules/proj4/lib/datum.js
22119
22138
  init_preact_shim();
22120
- function datum(datumCode, datum_params, a2, b2, es, ep2) {
22139
+ function datum(datumCode, datum_params, a2, b2, es, ep2, nadgrids) {
22121
22140
  var out = {};
22122
22141
  if (datumCode === void 0 || datumCode === "none") {
22123
22142
  out.datum_type = PJD_NODATUM;
@@ -22139,6 +22158,10 @@ function datum(datumCode, datum_params, a2, b2, es, ep2) {
22139
22158
  }
22140
22159
  }
22141
22160
  }
22161
+ if (nadgrids) {
22162
+ out.datum_type = PJD_GRIDSHIFT;
22163
+ out.grids = nadgrids;
22164
+ }
22142
22165
  out.a = a2;
22143
22166
  out.b = b2;
22144
22167
  out.es = es;
@@ -22147,6 +22170,127 @@ function datum(datumCode, datum_params, a2, b2, es, ep2) {
22147
22170
  }
22148
22171
  var datum_default = datum;
22149
22172
 
22173
+ // ../../node_modules/proj4/lib/nadgrid.js
22174
+ init_preact_shim();
22175
+ var loadedNadgrids = {};
22176
+ function nadgrid(key, data) {
22177
+ var view = new DataView(data);
22178
+ var isLittleEndian = detectLittleEndian(view);
22179
+ var header = readHeader(view, isLittleEndian);
22180
+ if (header.nSubgrids > 1) {
22181
+ console.log("Only single NTv2 subgrids are currently supported, subsequent sub grids are ignored");
22182
+ }
22183
+ var subgrids = readSubgrids(view, header, isLittleEndian);
22184
+ var nadgrid2 = { header, subgrids };
22185
+ loadedNadgrids[key] = nadgrid2;
22186
+ return nadgrid2;
22187
+ }
22188
+ function getNadgrids(nadgrids) {
22189
+ if (nadgrids === void 0) {
22190
+ return null;
22191
+ }
22192
+ var grids = nadgrids.split(",");
22193
+ return grids.map(parseNadgridString);
22194
+ }
22195
+ function parseNadgridString(value) {
22196
+ if (value.length === 0) {
22197
+ return null;
22198
+ }
22199
+ var optional = value[0] === "@";
22200
+ if (optional) {
22201
+ value = value.slice(1);
22202
+ }
22203
+ if (value === "null") {
22204
+ return { name: "null", mandatory: !optional, grid: null, isNull: true };
22205
+ }
22206
+ return {
22207
+ name: value,
22208
+ mandatory: !optional,
22209
+ grid: loadedNadgrids[value] || null,
22210
+ isNull: false
22211
+ };
22212
+ }
22213
+ function secondsToRadians(seconds) {
22214
+ return seconds / 3600 * Math.PI / 180;
22215
+ }
22216
+ function detectLittleEndian(view) {
22217
+ var nFields = view.getInt32(8, false);
22218
+ if (nFields === 11) {
22219
+ return false;
22220
+ }
22221
+ nFields = view.getInt32(8, true);
22222
+ if (nFields !== 11) {
22223
+ console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian");
22224
+ }
22225
+ return true;
22226
+ }
22227
+ function readHeader(view, isLittleEndian) {
22228
+ return {
22229
+ nFields: view.getInt32(8, isLittleEndian),
22230
+ nSubgridFields: view.getInt32(24, isLittleEndian),
22231
+ nSubgrids: view.getInt32(40, isLittleEndian),
22232
+ shiftType: decodeString(view, 56, 56 + 8).trim(),
22233
+ fromSemiMajorAxis: view.getFloat64(120, isLittleEndian),
22234
+ fromSemiMinorAxis: view.getFloat64(136, isLittleEndian),
22235
+ toSemiMajorAxis: view.getFloat64(152, isLittleEndian),
22236
+ toSemiMinorAxis: view.getFloat64(168, isLittleEndian)
22237
+ };
22238
+ }
22239
+ function decodeString(view, start2, end) {
22240
+ return String.fromCharCode.apply(null, new Uint8Array(view.buffer.slice(start2, end)));
22241
+ }
22242
+ function readSubgrids(view, header, isLittleEndian) {
22243
+ var gridOffset = 176;
22244
+ var grids = [];
22245
+ for (var i2 = 0; i2 < header.nSubgrids; i2++) {
22246
+ var subHeader = readGridHeader(view, gridOffset, isLittleEndian);
22247
+ var nodes = readGridNodes(view, gridOffset, subHeader, isLittleEndian);
22248
+ var lngColumnCount = Math.round(1 + (subHeader.upperLongitude - subHeader.lowerLongitude) / subHeader.longitudeInterval);
22249
+ var latColumnCount = Math.round(1 + (subHeader.upperLatitude - subHeader.lowerLatitude) / subHeader.latitudeInterval);
22250
+ grids.push({
22251
+ ll: [secondsToRadians(subHeader.lowerLongitude), secondsToRadians(subHeader.lowerLatitude)],
22252
+ del: [secondsToRadians(subHeader.longitudeInterval), secondsToRadians(subHeader.latitudeInterval)],
22253
+ lim: [lngColumnCount, latColumnCount],
22254
+ count: subHeader.gridNodeCount,
22255
+ cvs: mapNodes(nodes)
22256
+ });
22257
+ }
22258
+ return grids;
22259
+ }
22260
+ function mapNodes(nodes) {
22261
+ return nodes.map(function(r2) {
22262
+ return [secondsToRadians(r2.longitudeShift), secondsToRadians(r2.latitudeShift)];
22263
+ });
22264
+ }
22265
+ function readGridHeader(view, offset, isLittleEndian) {
22266
+ return {
22267
+ name: decodeString(view, offset + 8, offset + 16).trim(),
22268
+ parent: decodeString(view, offset + 24, offset + 24 + 8).trim(),
22269
+ lowerLatitude: view.getFloat64(offset + 72, isLittleEndian),
22270
+ upperLatitude: view.getFloat64(offset + 88, isLittleEndian),
22271
+ lowerLongitude: view.getFloat64(offset + 104, isLittleEndian),
22272
+ upperLongitude: view.getFloat64(offset + 120, isLittleEndian),
22273
+ latitudeInterval: view.getFloat64(offset + 136, isLittleEndian),
22274
+ longitudeInterval: view.getFloat64(offset + 152, isLittleEndian),
22275
+ gridNodeCount: view.getInt32(offset + 168, isLittleEndian)
22276
+ };
22277
+ }
22278
+ function readGridNodes(view, offset, gridHeader, isLittleEndian) {
22279
+ var nodesOffset = offset + 176;
22280
+ var gridRecordLength = 16;
22281
+ var gridShiftRecords = [];
22282
+ for (var i2 = 0; i2 < gridHeader.gridNodeCount; i2++) {
22283
+ var record = {
22284
+ latitudeShift: view.getFloat32(nodesOffset + i2 * gridRecordLength, isLittleEndian),
22285
+ longitudeShift: view.getFloat32(nodesOffset + i2 * gridRecordLength + 4, isLittleEndian),
22286
+ latitudeAccuracy: view.getFloat32(nodesOffset + i2 * gridRecordLength + 8, isLittleEndian),
22287
+ longitudeAccuracy: view.getFloat32(nodesOffset + i2 * gridRecordLength + 12, isLittleEndian)
22288
+ };
22289
+ gridShiftRecords.push(record);
22290
+ }
22291
+ return gridShiftRecords;
22292
+ }
22293
+
22150
22294
  // ../../node_modules/proj4/lib/Proj.js
22151
22295
  function Projection(srsCode, callback) {
22152
22296
  if (!(this instanceof Projection)) {
@@ -22170,7 +22314,7 @@ function Projection(srsCode, callback) {
22170
22314
  if (json.datumCode && json.datumCode !== "none") {
22171
22315
  var datumDef = match(exports3, json.datumCode);
22172
22316
  if (datumDef) {
22173
- json.datum_params = datumDef.towgs84 ? datumDef.towgs84.split(",") : null;
22317
+ json.datum_params = json.datum_params || (datumDef.towgs84 ? datumDef.towgs84.split(",") : null);
22174
22318
  json.ellps = datumDef.ellipse;
22175
22319
  json.datumName = datumDef.datumName ? datumDef.datumName : json.datumCode;
22176
22320
  }
@@ -22178,9 +22322,11 @@ function Projection(srsCode, callback) {
22178
22322
  json.k0 = json.k0 || 1;
22179
22323
  json.axis = json.axis || "enu";
22180
22324
  json.ellps = json.ellps || "wgs84";
22325
+ json.lat1 = json.lat1 || json.lat0;
22181
22326
  var sphere_ = sphere(json.a, json.b, json.rf, json.ellps, json.sphere);
22182
22327
  var ecc = eccentricity(sphere_.a, sphere_.b, sphere_.rf, json.R_A);
22183
- var datumObj = json.datum || datum_default(json.datumCode, json.datum_params, sphere_.a, sphere_.b, ecc.es, ecc.ep2);
22328
+ var nadgrids = getNadgrids(json.nadgrids);
22329
+ var datumObj = json.datum || datum_default(json.datumCode, json.datum_params, sphere_.a, sphere_.b, ecc.es, ecc.ep2, nadgrids);
22184
22330
  extend_default(this, json);
22185
22331
  extend_default(this, ourProj);
22186
22332
  this.a = sphere_.a;
@@ -22372,17 +22518,155 @@ function datum_transform_default(source, dest, point) {
22372
22518
  if (source.datum_type === PJD_NODATUM || dest.datum_type === PJD_NODATUM) {
22373
22519
  return point;
22374
22520
  }
22375
- if (source.es === dest.es && source.a === dest.a && !checkParams(source.datum_type) && !checkParams(dest.datum_type)) {
22521
+ var source_a = source.a;
22522
+ var source_es = source.es;
22523
+ if (source.datum_type === PJD_GRIDSHIFT) {
22524
+ var gridShiftCode = applyGridShift(source, false, point);
22525
+ if (gridShiftCode !== 0) {
22526
+ return void 0;
22527
+ }
22528
+ source_a = SRS_WGS84_SEMIMAJOR;
22529
+ source_es = SRS_WGS84_ESQUARED;
22530
+ }
22531
+ var dest_a = dest.a;
22532
+ var dest_b = dest.b;
22533
+ var dest_es = dest.es;
22534
+ if (dest.datum_type === PJD_GRIDSHIFT) {
22535
+ dest_a = SRS_WGS84_SEMIMAJOR;
22536
+ dest_b = SRS_WGS84_SEMIMINOR;
22537
+ dest_es = SRS_WGS84_ESQUARED;
22538
+ }
22539
+ if (source_es === dest_es && source_a === dest_a && !checkParams(source.datum_type) && !checkParams(dest.datum_type)) {
22376
22540
  return point;
22377
22541
  }
22378
- point = geodeticToGeocentric(point, source.es, source.a);
22542
+ point = geodeticToGeocentric(point, source_es, source_a);
22379
22543
  if (checkParams(source.datum_type)) {
22380
22544
  point = geocentricToWgs84(point, source.datum_type, source.datum_params);
22381
22545
  }
22382
22546
  if (checkParams(dest.datum_type)) {
22383
22547
  point = geocentricFromWgs84(point, dest.datum_type, dest.datum_params);
22384
22548
  }
22385
- return geocentricToGeodetic(point, dest.es, dest.a, dest.b);
22549
+ point = geocentricToGeodetic(point, dest_es, dest_a, dest_b);
22550
+ if (dest.datum_type === PJD_GRIDSHIFT) {
22551
+ var destGridShiftResult = applyGridShift(dest, true, point);
22552
+ if (destGridShiftResult !== 0) {
22553
+ return void 0;
22554
+ }
22555
+ }
22556
+ return point;
22557
+ }
22558
+ function applyGridShift(source, inverse32, point) {
22559
+ if (source.grids === null || source.grids.length === 0) {
22560
+ console.log("Grid shift grids not found");
22561
+ return -1;
22562
+ }
22563
+ var input = { x: -point.x, y: point.y };
22564
+ var output = { x: Number.NaN, y: Number.NaN };
22565
+ var onlyMandatoryGrids = false;
22566
+ var attemptedGrids = [];
22567
+ for (var i2 = 0; i2 < source.grids.length; i2++) {
22568
+ var grid = source.grids[i2];
22569
+ attemptedGrids.push(grid.name);
22570
+ if (grid.isNull) {
22571
+ output = input;
22572
+ break;
22573
+ }
22574
+ onlyMandatoryGrids = grid.mandatory;
22575
+ if (grid.grid === null) {
22576
+ if (grid.mandatory) {
22577
+ console.log("Unable to find mandatory grid '" + grid.name + "'");
22578
+ return -1;
22579
+ }
22580
+ continue;
22581
+ }
22582
+ var subgrid = grid.grid.subgrids[0];
22583
+ var epsilon = (Math.abs(subgrid.del[1]) + Math.abs(subgrid.del[0])) / 1e4;
22584
+ var minX = subgrid.ll[0] - epsilon;
22585
+ var minY = subgrid.ll[1] - epsilon;
22586
+ var maxX = subgrid.ll[0] + (subgrid.lim[0] - 1) * subgrid.del[0] + epsilon;
22587
+ var maxY = subgrid.ll[1] + (subgrid.lim[1] - 1) * subgrid.del[1] + epsilon;
22588
+ if (minY > input.y || minX > input.x || maxY < input.y || maxX < input.x) {
22589
+ continue;
22590
+ }
22591
+ output = applySubgridShift(input, inverse32, subgrid);
22592
+ if (!isNaN(output.x)) {
22593
+ break;
22594
+ }
22595
+ }
22596
+ if (isNaN(output.x)) {
22597
+ console.log("Failed to find a grid shift table for location '" + -input.x * R2D + " " + input.y * R2D + " tried: '" + attemptedGrids + "'");
22598
+ return -1;
22599
+ }
22600
+ point.x = -output.x;
22601
+ point.y = output.y;
22602
+ return 0;
22603
+ }
22604
+ function applySubgridShift(pin, inverse32, ct) {
22605
+ var val = { x: Number.NaN, y: Number.NaN };
22606
+ if (isNaN(pin.x)) {
22607
+ return val;
22608
+ }
22609
+ var tb = { x: pin.x, y: pin.y };
22610
+ tb.x -= ct.ll[0];
22611
+ tb.y -= ct.ll[1];
22612
+ tb.x = adjust_lon_default(tb.x - Math.PI) + Math.PI;
22613
+ var t2 = nadInterpolate(tb, ct);
22614
+ if (inverse32) {
22615
+ if (isNaN(t2.x)) {
22616
+ return val;
22617
+ }
22618
+ t2.x = tb.x - t2.x;
22619
+ t2.y = tb.y - t2.y;
22620
+ var i2 = 9, tol = 1e-12;
22621
+ var dif, del;
22622
+ do {
22623
+ del = nadInterpolate(t2, ct);
22624
+ if (isNaN(del.x)) {
22625
+ console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation.");
22626
+ break;
22627
+ }
22628
+ dif = { x: tb.x - (del.x + t2.x), y: tb.y - (del.y + t2.y) };
22629
+ t2.x += dif.x;
22630
+ t2.y += dif.y;
22631
+ } while (i2-- && Math.abs(dif.x) > tol && Math.abs(dif.y) > tol);
22632
+ if (i2 < 0) {
22633
+ console.log("Inverse grid shift iterator failed to converge.");
22634
+ return val;
22635
+ }
22636
+ val.x = adjust_lon_default(t2.x + ct.ll[0]);
22637
+ val.y = t2.y + ct.ll[1];
22638
+ } else {
22639
+ if (!isNaN(t2.x)) {
22640
+ val.x = pin.x + t2.x;
22641
+ val.y = pin.y + t2.y;
22642
+ }
22643
+ }
22644
+ return val;
22645
+ }
22646
+ function nadInterpolate(pin, ct) {
22647
+ var t2 = { x: pin.x / ct.del[0], y: pin.y / ct.del[1] };
22648
+ var indx = { x: Math.floor(t2.x), y: Math.floor(t2.y) };
22649
+ var frct = { x: t2.x - 1 * indx.x, y: t2.y - 1 * indx.y };
22650
+ var val = { x: Number.NaN, y: Number.NaN };
22651
+ var inx;
22652
+ if (indx.x < 0 || indx.x >= ct.lim[0]) {
22653
+ return val;
22654
+ }
22655
+ if (indx.y < 0 || indx.y >= ct.lim[1]) {
22656
+ return val;
22657
+ }
22658
+ inx = indx.y * ct.lim[0] + indx.x;
22659
+ var f00 = { x: ct.cvs[inx][0], y: ct.cvs[inx][1] };
22660
+ inx++;
22661
+ var f10 = { x: ct.cvs[inx][0], y: ct.cvs[inx][1] };
22662
+ inx += ct.lim[0];
22663
+ var f11 = { x: ct.cvs[inx][0], y: ct.cvs[inx][1] };
22664
+ inx--;
22665
+ var f01 = { x: ct.cvs[inx][0], y: ct.cvs[inx][1] };
22666
+ var m11 = frct.x * frct.y, m10 = frct.x * (1 - frct.y), m00 = (1 - frct.x) * (1 - frct.y), m01 = (1 - frct.x) * frct.y;
22667
+ val.x = m00 * f00.x + m10 * f10.x + m01 * f01.x + m11 * f11.x;
22668
+ val.y = m00 * f00.y + m10 * f10.y + m01 * f01.y + m11 * f11.y;
22669
+ return val;
22386
22670
  }
22387
22671
 
22388
22672
  // ../../node_modules/proj4/lib/adjust_axis.js
@@ -22481,7 +22765,7 @@ function checkCoord(num) {
22481
22765
  function checkNotWGS(source, dest) {
22482
22766
  return (source.datum.datum_type === PJD_3PARAM || source.datum.datum_type === PJD_7PARAM) && dest.datumCode !== "WGS84" || (dest.datum.datum_type === PJD_3PARAM || dest.datum.datum_type === PJD_7PARAM) && source.datumCode !== "WGS84";
22483
22767
  }
22484
- function transform(source, dest, point) {
22768
+ function transform(source, dest, point, enforceAxis) {
22485
22769
  var wgs842;
22486
22770
  if (Array.isArray(point)) {
22487
22771
  point = toPoint_default(point);
@@ -22489,10 +22773,10 @@ function transform(source, dest, point) {
22489
22773
  checkSanity_default(point);
22490
22774
  if (source.datum && dest.datum && checkNotWGS(source, dest)) {
22491
22775
  wgs842 = new Proj_default("WGS84");
22492
- point = transform(source, wgs842, point);
22776
+ point = transform(source, wgs842, point, enforceAxis);
22493
22777
  source = wgs842;
22494
22778
  }
22495
- if (source.axis !== "enu") {
22779
+ if (enforceAxis && source.axis !== "enu") {
22496
22780
  point = adjust_axis_default(source, false, point);
22497
22781
  }
22498
22782
  if (source.projName === "longlat") {
@@ -22518,6 +22802,9 @@ function transform(source, dest, point) {
22518
22802
  point.x += source.from_greenwich;
22519
22803
  }
22520
22804
  point = datum_transform_default(source.datum, dest.datum, point);
22805
+ if (!point) {
22806
+ return;
22807
+ }
22521
22808
  if (dest.from_greenwich) {
22522
22809
  point = {
22523
22810
  x: point.x - dest.from_greenwich,
@@ -22541,7 +22828,7 @@ function transform(source, dest, point) {
22541
22828
  };
22542
22829
  }
22543
22830
  }
22544
- if (dest.axis !== "enu") {
22831
+ if (enforceAxis && dest.axis !== "enu") {
22545
22832
  return adjust_axis_default(dest, true, point);
22546
22833
  }
22547
22834
  return point;
@@ -22549,10 +22836,10 @@ function transform(source, dest, point) {
22549
22836
 
22550
22837
  // ../../node_modules/proj4/lib/core.js
22551
22838
  var wgs84 = Proj_default("WGS84");
22552
- function transformer(from, to, coords) {
22839
+ function transformer(from, to, coords, enforceAxis) {
22553
22840
  var transformedArray, out, keys;
22554
22841
  if (Array.isArray(coords)) {
22555
- transformedArray = transform(from, to, coords) || { x: NaN, y: NaN };
22842
+ transformedArray = transform(from, to, coords, enforceAxis) || { x: NaN, y: NaN };
22556
22843
  if (coords.length > 2) {
22557
22844
  if (typeof from.name !== "undefined" && from.name === "geocent" || typeof to.name !== "undefined" && to.name === "geocent") {
22558
22845
  if (typeof transformedArray.z === "number") {
@@ -22567,7 +22854,7 @@ function transformer(from, to, coords) {
22567
22854
  return [transformedArray.x, transformedArray.y];
22568
22855
  }
22569
22856
  } else {
22570
- out = transform(from, to, coords);
22857
+ out = transform(from, to, coords, enforceAxis);
22571
22858
  keys = Object.keys(coords);
22572
22859
  if (keys.length === 2) {
22573
22860
  return out;
@@ -22615,11 +22902,11 @@ function proj4(fromProj, toProj, coord) {
22615
22902
  return transformer(fromProj, toProj, coord);
22616
22903
  } else {
22617
22904
  obj = {
22618
- forward: function(coords) {
22619
- return transformer(fromProj, toProj, coords);
22905
+ forward: function(coords, enforceAxis) {
22906
+ return transformer(fromProj, toProj, coords, enforceAxis);
22620
22907
  },
22621
- inverse: function(coords) {
22622
- return transformer(toProj, fromProj, coords);
22908
+ inverse: function(coords, enforceAxis) {
22909
+ return transformer(toProj, fromProj, coords, enforceAxis);
22623
22910
  }
22624
22911
  };
22625
22912
  if (single) {
@@ -23263,7 +23550,7 @@ function inverse3(p) {
23263
23550
  p.y = lat;
23264
23551
  return p;
23265
23552
  }
23266
- var names4 = ["Transverse_Mercator", "Transverse Mercator", "tmerc"];
23553
+ var names4 = ["Fast_Transverse_Mercator", "Fast Transverse Mercator"];
23267
23554
  var tmerc_default = {
23268
23555
  init: init3,
23269
23556
  forward: forward3,
@@ -23383,8 +23670,13 @@ function clens_cmplx_default(pp, arg_r, arg_i) {
23383
23670
 
23384
23671
  // ../../node_modules/proj4/lib/projections/etmerc.js
23385
23672
  function init4() {
23386
- if (this.es === void 0 || this.es <= 0) {
23387
- throw new Error("incorrect elliptical usage");
23673
+ if (!this.approx && (isNaN(this.es) || this.es <= 0)) {
23674
+ throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');
23675
+ }
23676
+ if (this.approx) {
23677
+ tmerc_default.init.apply(this);
23678
+ this.forward = tmerc_default.forward;
23679
+ this.inverse = tmerc_default.inverse;
23388
23680
  }
23389
23681
  this.x0 = this.x0 !== void 0 ? this.x0 : 0;
23390
23682
  this.y0 = this.y0 !== void 0 ? this.y0 : 0;
@@ -23490,7 +23782,7 @@ function inverse4(p) {
23490
23782
  p.y = lat;
23491
23783
  return p;
23492
23784
  }
23493
- var names5 = ["Extended_Transverse_Mercator", "Extended Transverse Mercator", "etmerc"];
23785
+ var names5 = ["Extended_Transverse_Mercator", "Extended Transverse Mercator", "etmerc", "Transverse_Mercator", "Transverse Mercator", "tmerc"];
23494
23786
  var etmerc_default = {
23495
23787
  init: init4,
23496
23788
  forward: forward4,
@@ -23853,136 +24145,184 @@ var somerc_default = {
23853
24145
 
23854
24146
  // ../../node_modules/proj4/lib/projections/omerc.js
23855
24147
  init_preact_shim();
24148
+ var TOL = 1e-7;
24149
+ function isTypeA(P2) {
24150
+ var typeAProjections = ["Hotine_Oblique_Mercator", "Hotine_Oblique_Mercator_Azimuth_Natural_Origin"];
24151
+ var projectionName = typeof P2.PROJECTION === "object" ? Object.keys(P2.PROJECTION)[0] : P2.PROJECTION;
24152
+ return "no_uoff" in P2 || "no_off" in P2 || typeAProjections.indexOf(projectionName) !== -1;
24153
+ }
23856
24154
  function init10() {
23857
- this.no_off = this.no_off || false;
23858
- this.no_rot = this.no_rot || false;
23859
- if (isNaN(this.k0)) {
23860
- this.k0 = 1;
24155
+ var con, com, cosph0, D, F, H2, L2, sinph0, p, J, gamma = 0, gamma0, lamc = 0, lam1 = 0, lam2 = 0, phi1 = 0, phi2 = 0, alpha_c = 0, AB;
24156
+ this.no_off = isTypeA(this);
24157
+ this.no_rot = "no_rot" in this;
24158
+ var alp = false;
24159
+ if ("alpha" in this) {
24160
+ alp = true;
23861
24161
  }
23862
- var sinlat = Math.sin(this.lat0);
23863
- var coslat = Math.cos(this.lat0);
23864
- var con = this.e * sinlat;
23865
- this.bl = Math.sqrt(1 + this.es / (1 - this.es) * Math.pow(coslat, 4));
23866
- this.al = this.a * this.bl * this.k0 * Math.sqrt(1 - this.es) / (1 - con * con);
23867
- var t0 = tsfnz_default(this.e, this.lat0, sinlat);
23868
- var dl = this.bl / coslat * Math.sqrt((1 - this.es) / (1 - con * con));
23869
- if (dl * dl < 1) {
23870
- dl = 1;
23871
- }
23872
- var fl;
23873
- var gl;
23874
- if (!isNaN(this.longc)) {
23875
- if (this.lat0 >= 0) {
23876
- fl = dl + Math.sqrt(dl * dl - 1);
24162
+ var gam = false;
24163
+ if ("rectified_grid_angle" in this) {
24164
+ gam = true;
24165
+ }
24166
+ if (alp) {
24167
+ alpha_c = this.alpha;
24168
+ }
24169
+ if (gam) {
24170
+ gamma = this.rectified_grid_angle * D2R;
24171
+ }
24172
+ if (alp || gam) {
24173
+ lamc = this.longc;
24174
+ } else {
24175
+ lam1 = this.long1;
24176
+ phi1 = this.lat1;
24177
+ lam2 = this.long2;
24178
+ phi2 = this.lat2;
24179
+ if (Math.abs(phi1 - phi2) <= TOL || (con = Math.abs(phi1)) <= TOL || Math.abs(con - HALF_PI) <= TOL || Math.abs(Math.abs(this.lat0) - HALF_PI) <= TOL || Math.abs(Math.abs(phi2) - HALF_PI) <= TOL) {
24180
+ throw new Error();
24181
+ }
24182
+ }
24183
+ var one_es = 1 - this.es;
24184
+ com = Math.sqrt(one_es);
24185
+ if (Math.abs(this.lat0) > EPSLN) {
24186
+ sinph0 = Math.sin(this.lat0);
24187
+ cosph0 = Math.cos(this.lat0);
24188
+ con = 1 - this.es * sinph0 * sinph0;
24189
+ this.B = cosph0 * cosph0;
24190
+ this.B = Math.sqrt(1 + this.es * this.B * this.B / one_es);
24191
+ this.A = this.B * this.k0 * com / con;
24192
+ D = this.B * com / (cosph0 * Math.sqrt(con));
24193
+ F = D * D - 1;
24194
+ if (F <= 0) {
24195
+ F = 0;
23877
24196
  } else {
23878
- fl = dl - Math.sqrt(dl * dl - 1);
24197
+ F = Math.sqrt(F);
24198
+ if (this.lat0 < 0) {
24199
+ F = -F;
24200
+ }
23879
24201
  }
23880
- this.el = fl * Math.pow(t0, this.bl);
23881
- gl = 0.5 * (fl - 1 / fl);
23882
- this.gamma0 = Math.asin(Math.sin(this.alpha) / dl);
23883
- this.long0 = this.longc - Math.asin(gl * Math.tan(this.gamma0)) / this.bl;
24202
+ this.E = F += D;
24203
+ this.E *= Math.pow(tsfnz_default(this.e, this.lat0, sinph0), this.B);
23884
24204
  } else {
23885
- var t1 = tsfnz_default(this.e, this.lat1, Math.sin(this.lat1));
23886
- var t2 = tsfnz_default(this.e, this.lat2, Math.sin(this.lat2));
23887
- if (this.lat0 >= 0) {
23888
- this.el = (dl + Math.sqrt(dl * dl - 1)) * Math.pow(t0, this.bl);
24205
+ this.B = 1 / com;
24206
+ this.A = this.k0;
24207
+ this.E = D = F = 1;
24208
+ }
24209
+ if (alp || gam) {
24210
+ if (alp) {
24211
+ gamma0 = Math.asin(Math.sin(alpha_c) / D);
24212
+ if (!gam) {
24213
+ gamma = alpha_c;
24214
+ }
23889
24215
  } else {
23890
- this.el = (dl - Math.sqrt(dl * dl - 1)) * Math.pow(t0, this.bl);
24216
+ gamma0 = gamma;
24217
+ alpha_c = Math.asin(D * Math.sin(gamma0));
23891
24218
  }
23892
- var hl = Math.pow(t1, this.bl);
23893
- var ll = Math.pow(t2, this.bl);
23894
- fl = this.el / hl;
23895
- gl = 0.5 * (fl - 1 / fl);
23896
- var jl = (this.el * this.el - ll * hl) / (this.el * this.el + ll * hl);
23897
- var pl = (ll - hl) / (ll + hl);
23898
- var dlon12 = adjust_lon_default(this.long1 - this.long2);
23899
- this.long0 = 0.5 * (this.long1 + this.long2) - Math.atan(jl * Math.tan(0.5 * this.bl * dlon12) / pl) / this.bl;
23900
- this.long0 = adjust_lon_default(this.long0);
23901
- var dlon10 = adjust_lon_default(this.long1 - this.long0);
23902
- this.gamma0 = Math.atan(Math.sin(this.bl * dlon10) / gl);
23903
- this.alpha = Math.asin(dl * Math.sin(this.gamma0));
23904
- }
24219
+ this.lam0 = lamc - Math.asin(0.5 * (F - 1 / F) * Math.tan(gamma0)) / this.B;
24220
+ } else {
24221
+ H2 = Math.pow(tsfnz_default(this.e, phi1, Math.sin(phi1)), this.B);
24222
+ L2 = Math.pow(tsfnz_default(this.e, phi2, Math.sin(phi2)), this.B);
24223
+ F = this.E / H2;
24224
+ p = (L2 - H2) / (L2 + H2);
24225
+ J = this.E * this.E;
24226
+ J = (J - L2 * H2) / (J + L2 * H2);
24227
+ con = lam1 - lam2;
24228
+ if (con < -Math.pi) {
24229
+ lam2 -= TWO_PI;
24230
+ } else if (con > Math.pi) {
24231
+ lam2 += TWO_PI;
24232
+ }
24233
+ this.lam0 = adjust_lon_default(0.5 * (lam1 + lam2) - Math.atan(J * Math.tan(0.5 * this.B * (lam1 - lam2)) / p) / this.B);
24234
+ gamma0 = Math.atan(2 * Math.sin(this.B * adjust_lon_default(lam1 - this.lam0)) / (F - 1 / F));
24235
+ gamma = alpha_c = Math.asin(D * Math.sin(gamma0));
24236
+ }
24237
+ this.singam = Math.sin(gamma0);
24238
+ this.cosgam = Math.cos(gamma0);
24239
+ this.sinrot = Math.sin(gamma);
24240
+ this.cosrot = Math.cos(gamma);
24241
+ this.rB = 1 / this.B;
24242
+ this.ArB = this.A * this.rB;
24243
+ this.BrA = 1 / this.ArB;
24244
+ AB = this.A * this.B;
23905
24245
  if (this.no_off) {
23906
- this.uc = 0;
24246
+ this.u_0 = 0;
23907
24247
  } else {
23908
- if (this.lat0 >= 0) {
23909
- this.uc = this.al / this.bl * Math.atan2(Math.sqrt(dl * dl - 1), Math.cos(this.alpha));
23910
- } else {
23911
- this.uc = -1 * this.al / this.bl * Math.atan2(Math.sqrt(dl * dl - 1), Math.cos(this.alpha));
24248
+ this.u_0 = Math.abs(this.ArB * Math.atan(Math.sqrt(D * D - 1) / Math.cos(alpha_c)));
24249
+ if (this.lat0 < 0) {
24250
+ this.u_0 = -this.u_0;
23912
24251
  }
23913
24252
  }
24253
+ F = 0.5 * gamma0;
24254
+ this.v_pole_n = this.ArB * Math.log(Math.tan(FORTPI - F));
24255
+ this.v_pole_s = this.ArB * Math.log(Math.tan(FORTPI + F));
23914
24256
  }
23915
24257
  function forward9(p) {
23916
- var lon = p.x;
23917
- var lat = p.y;
23918
- var dlon = adjust_lon_default(lon - this.long0);
23919
- var us, vs;
23920
- var con;
23921
- if (Math.abs(Math.abs(lat) - HALF_PI) <= EPSLN) {
23922
- if (lat > 0) {
23923
- con = -1;
23924
- } else {
23925
- con = 1;
24258
+ var coords = {};
24259
+ var S2, T2, U, V2, W, temp, u2, v2;
24260
+ p.x = p.x - this.lam0;
24261
+ if (Math.abs(Math.abs(p.y) - HALF_PI) > EPSLN) {
24262
+ W = this.E / Math.pow(tsfnz_default(this.e, p.y, Math.sin(p.y)), this.B);
24263
+ temp = 1 / W;
24264
+ S2 = 0.5 * (W - temp);
24265
+ T2 = 0.5 * (W + temp);
24266
+ V2 = Math.sin(this.B * p.x);
24267
+ U = (S2 * this.singam - V2 * this.cosgam) / T2;
24268
+ if (Math.abs(Math.abs(U) - 1) < EPSLN) {
24269
+ throw new Error();
23926
24270
  }
23927
- vs = this.al / this.bl * Math.log(Math.tan(FORTPI + con * this.gamma0 * 0.5));
23928
- us = -1 * con * HALF_PI * this.al / this.bl;
23929
- } else {
23930
- var t2 = tsfnz_default(this.e, lat, Math.sin(lat));
23931
- var ql = this.el / Math.pow(t2, this.bl);
23932
- var sl = 0.5 * (ql - 1 / ql);
23933
- var tl = 0.5 * (ql + 1 / ql);
23934
- var vl = Math.sin(this.bl * dlon);
23935
- var ul = (sl * Math.sin(this.gamma0) - vl * Math.cos(this.gamma0)) / tl;
23936
- if (Math.abs(Math.abs(ul) - 1) <= EPSLN) {
23937
- vs = Number.POSITIVE_INFINITY;
23938
- } else {
23939
- vs = 0.5 * this.al * Math.log((1 - ul) / (1 + ul)) / this.bl;
23940
- }
23941
- if (Math.abs(Math.cos(this.bl * dlon)) <= EPSLN) {
23942
- us = this.al * this.bl * dlon;
24271
+ v2 = 0.5 * this.ArB * Math.log((1 - U) / (1 + U));
24272
+ temp = Math.cos(this.B * p.x);
24273
+ if (Math.abs(temp) < TOL) {
24274
+ u2 = this.A * p.x;
23943
24275
  } else {
23944
- us = this.al * Math.atan2(sl * Math.cos(this.gamma0) + vl * Math.sin(this.gamma0), Math.cos(this.bl * dlon)) / this.bl;
24276
+ u2 = this.ArB * Math.atan2(S2 * this.cosgam + V2 * this.singam, temp);
23945
24277
  }
24278
+ } else {
24279
+ v2 = p.y > 0 ? this.v_pole_n : this.v_pole_s;
24280
+ u2 = this.ArB * p.y;
23946
24281
  }
23947
24282
  if (this.no_rot) {
23948
- p.x = this.x0 + us;
23949
- p.y = this.y0 + vs;
24283
+ coords.x = u2;
24284
+ coords.y = v2;
23950
24285
  } else {
23951
- us -= this.uc;
23952
- p.x = this.x0 + vs * Math.cos(this.alpha) + us * Math.sin(this.alpha);
23953
- p.y = this.y0 + us * Math.cos(this.alpha) - vs * Math.sin(this.alpha);
24286
+ u2 -= this.u_0;
24287
+ coords.x = v2 * this.cosrot + u2 * this.sinrot;
24288
+ coords.y = u2 * this.cosrot - v2 * this.sinrot;
23954
24289
  }
23955
- return p;
24290
+ coords.x = this.a * coords.x + this.x0;
24291
+ coords.y = this.a * coords.y + this.y0;
24292
+ return coords;
23956
24293
  }
23957
24294
  function inverse9(p) {
23958
- var us, vs;
24295
+ var u2, v2, Qp, Sp, Tp, Vp, Up;
24296
+ var coords = {};
24297
+ p.x = (p.x - this.x0) * (1 / this.a);
24298
+ p.y = (p.y - this.y0) * (1 / this.a);
23959
24299
  if (this.no_rot) {
23960
- vs = p.y - this.y0;
23961
- us = p.x - this.x0;
24300
+ v2 = p.y;
24301
+ u2 = p.x;
23962
24302
  } else {
23963
- vs = (p.x - this.x0) * Math.cos(this.alpha) - (p.y - this.y0) * Math.sin(this.alpha);
23964
- us = (p.y - this.y0) * Math.cos(this.alpha) + (p.x - this.x0) * Math.sin(this.alpha);
23965
- us += this.uc;
23966
- }
23967
- var qp = Math.exp(-1 * this.bl * vs / this.al);
23968
- var sp = 0.5 * (qp - 1 / qp);
23969
- var tp = 0.5 * (qp + 1 / qp);
23970
- var vp = Math.sin(this.bl * us / this.al);
23971
- var up = (vp * Math.cos(this.gamma0) + sp * Math.sin(this.gamma0)) / tp;
23972
- var ts = Math.pow(this.el / Math.sqrt((1 + up) / (1 - up)), 1 / this.bl);
23973
- if (Math.abs(up - 1) < EPSLN) {
23974
- p.x = this.long0;
23975
- p.y = HALF_PI;
23976
- } else if (Math.abs(up + 1) < EPSLN) {
23977
- p.x = this.long0;
23978
- p.y = -1 * HALF_PI;
24303
+ v2 = p.x * this.cosrot - p.y * this.sinrot;
24304
+ u2 = p.y * this.cosrot + p.x * this.sinrot + this.u_0;
24305
+ }
24306
+ Qp = Math.exp(-this.BrA * v2);
24307
+ Sp = 0.5 * (Qp - 1 / Qp);
24308
+ Tp = 0.5 * (Qp + 1 / Qp);
24309
+ Vp = Math.sin(this.BrA * u2);
24310
+ Up = (Vp * this.cosgam + Sp * this.singam) / Tp;
24311
+ if (Math.abs(Math.abs(Up) - 1) < EPSLN) {
24312
+ coords.x = 0;
24313
+ coords.y = Up < 0 ? -HALF_PI : HALF_PI;
23979
24314
  } else {
23980
- p.y = phi2z_default(this.e, ts);
23981
- p.x = adjust_lon_default(this.long0 - Math.atan2(sp * Math.cos(this.gamma0) - vp * Math.sin(this.gamma0), Math.cos(this.bl * us / this.al)) / this.bl);
24315
+ coords.y = this.E / Math.sqrt((1 + Up) / (1 - Up));
24316
+ coords.y = phi2z_default(this.e, Math.pow(coords.y, 1 / this.B));
24317
+ if (coords.y === Infinity) {
24318
+ throw new Error();
24319
+ }
24320
+ coords.x = -this.rB * Math.atan2(Sp * this.cosgam - Vp * this.singam, Math.cos(this.BrA * u2));
23982
24321
  }
23983
- return p;
24322
+ coords.x += this.lam0;
24323
+ return coords;
23984
24324
  }
23985
- var names11 = ["Hotine_Oblique_Mercator", "Hotine Oblique Mercator", "Hotine_Oblique_Mercator_Azimuth_Natural_Origin", "Hotine_Oblique_Mercator_Azimuth_Center", "omerc"];
24325
+ var names11 = ["Hotine_Oblique_Mercator", "Hotine Oblique Mercator", "Hotine_Oblique_Mercator_Azimuth_Natural_Origin", "Hotine_Oblique_Mercator_Two_Point_Natural_Origin", "Hotine_Oblique_Mercator_Azimuth_Center", "Oblique_Mercator", "omerc"];
23986
24326
  var omerc_default = {
23987
24327
  init: init10,
23988
24328
  forward: forward9,
@@ -24083,7 +24423,15 @@ function inverse10(p) {
24083
24423
  p.y = lat;
24084
24424
  return p;
24085
24425
  }
24086
- var names12 = ["Lambert Tangential Conformal Conic Projection", "Lambert_Conformal_Conic", "Lambert_Conformal_Conic_2SP", "lcc"];
24426
+ var names12 = [
24427
+ "Lambert Tangential Conformal Conic Projection",
24428
+ "Lambert_Conformal_Conic",
24429
+ "Lambert_Conformal_Conic_1SP",
24430
+ "Lambert_Conformal_Conic_2SP",
24431
+ "lcc",
24432
+ "Lambert Conic Conformal (1SP)",
24433
+ "Lambert Conic Conformal (2SP)"
24434
+ ];
24087
24435
  var lcc_default = {
24088
24436
  init: init11,
24089
24437
  forward: forward10,
@@ -26344,6 +26692,141 @@ var tpers_default = {
26344
26692
  names: names32
26345
26693
  };
26346
26694
 
26695
+ // ../../node_modules/proj4/lib/projections/geos.js
26696
+ init_preact_shim();
26697
+ function init32() {
26698
+ this.flip_axis = this.sweep === "x" ? 1 : 0;
26699
+ this.h = Number(this.h);
26700
+ this.radius_g_1 = this.h / this.a;
26701
+ if (this.radius_g_1 <= 0 || this.radius_g_1 > 1e10) {
26702
+ throw new Error();
26703
+ }
26704
+ this.radius_g = 1 + this.radius_g_1;
26705
+ this.C = this.radius_g * this.radius_g - 1;
26706
+ if (this.es !== 0) {
26707
+ var one_es = 1 - this.es;
26708
+ var rone_es = 1 / one_es;
26709
+ this.radius_p = Math.sqrt(one_es);
26710
+ this.radius_p2 = one_es;
26711
+ this.radius_p_inv2 = rone_es;
26712
+ this.shape = "ellipse";
26713
+ } else {
26714
+ this.radius_p = 1;
26715
+ this.radius_p2 = 1;
26716
+ this.radius_p_inv2 = 1;
26717
+ this.shape = "sphere";
26718
+ }
26719
+ if (!this.title) {
26720
+ this.title = "Geostationary Satellite View";
26721
+ }
26722
+ }
26723
+ function forward31(p) {
26724
+ var lon = p.x;
26725
+ var lat = p.y;
26726
+ var tmp, v_x, v_y, v_z;
26727
+ lon = lon - this.long0;
26728
+ if (this.shape === "ellipse") {
26729
+ lat = Math.atan(this.radius_p2 * Math.tan(lat));
26730
+ var r2 = this.radius_p / hypot_default(this.radius_p * Math.cos(lat), Math.sin(lat));
26731
+ v_x = r2 * Math.cos(lon) * Math.cos(lat);
26732
+ v_y = r2 * Math.sin(lon) * Math.cos(lat);
26733
+ v_z = r2 * Math.sin(lat);
26734
+ if ((this.radius_g - v_x) * v_x - v_y * v_y - v_z * v_z * this.radius_p_inv2 < 0) {
26735
+ p.x = Number.NaN;
26736
+ p.y = Number.NaN;
26737
+ return p;
26738
+ }
26739
+ tmp = this.radius_g - v_x;
26740
+ if (this.flip_axis) {
26741
+ p.x = this.radius_g_1 * Math.atan(v_y / hypot_default(v_z, tmp));
26742
+ p.y = this.radius_g_1 * Math.atan(v_z / tmp);
26743
+ } else {
26744
+ p.x = this.radius_g_1 * Math.atan(v_y / tmp);
26745
+ p.y = this.radius_g_1 * Math.atan(v_z / hypot_default(v_y, tmp));
26746
+ }
26747
+ } else if (this.shape === "sphere") {
26748
+ tmp = Math.cos(lat);
26749
+ v_x = Math.cos(lon) * tmp;
26750
+ v_y = Math.sin(lon) * tmp;
26751
+ v_z = Math.sin(lat);
26752
+ tmp = this.radius_g - v_x;
26753
+ if (this.flip_axis) {
26754
+ p.x = this.radius_g_1 * Math.atan(v_y / hypot_default(v_z, tmp));
26755
+ p.y = this.radius_g_1 * Math.atan(v_z / tmp);
26756
+ } else {
26757
+ p.x = this.radius_g_1 * Math.atan(v_y / tmp);
26758
+ p.y = this.radius_g_1 * Math.atan(v_z / hypot_default(v_y, tmp));
26759
+ }
26760
+ }
26761
+ p.x = p.x * this.a;
26762
+ p.y = p.y * this.a;
26763
+ return p;
26764
+ }
26765
+ function inverse31(p) {
26766
+ var v_x = -1;
26767
+ var v_y = 0;
26768
+ var v_z = 0;
26769
+ var a2, b2, det, k2;
26770
+ p.x = p.x / this.a;
26771
+ p.y = p.y / this.a;
26772
+ if (this.shape === "ellipse") {
26773
+ if (this.flip_axis) {
26774
+ v_z = Math.tan(p.y / this.radius_g_1);
26775
+ v_y = Math.tan(p.x / this.radius_g_1) * hypot_default(1, v_z);
26776
+ } else {
26777
+ v_y = Math.tan(p.x / this.radius_g_1);
26778
+ v_z = Math.tan(p.y / this.radius_g_1) * hypot_default(1, v_y);
26779
+ }
26780
+ var v_zp = v_z / this.radius_p;
26781
+ a2 = v_y * v_y + v_zp * v_zp + v_x * v_x;
26782
+ b2 = 2 * this.radius_g * v_x;
26783
+ det = b2 * b2 - 4 * a2 * this.C;
26784
+ if (det < 0) {
26785
+ p.x = Number.NaN;
26786
+ p.y = Number.NaN;
26787
+ return p;
26788
+ }
26789
+ k2 = (-b2 - Math.sqrt(det)) / (2 * a2);
26790
+ v_x = this.radius_g + k2 * v_x;
26791
+ v_y *= k2;
26792
+ v_z *= k2;
26793
+ p.x = Math.atan2(v_y, v_x);
26794
+ p.y = Math.atan(v_z * Math.cos(p.x) / v_x);
26795
+ p.y = Math.atan(this.radius_p_inv2 * Math.tan(p.y));
26796
+ } else if (this.shape === "sphere") {
26797
+ if (this.flip_axis) {
26798
+ v_z = Math.tan(p.y / this.radius_g_1);
26799
+ v_y = Math.tan(p.x / this.radius_g_1) * Math.sqrt(1 + v_z * v_z);
26800
+ } else {
26801
+ v_y = Math.tan(p.x / this.radius_g_1);
26802
+ v_z = Math.tan(p.y / this.radius_g_1) * Math.sqrt(1 + v_y * v_y);
26803
+ }
26804
+ a2 = v_y * v_y + v_z * v_z + v_x * v_x;
26805
+ b2 = 2 * this.radius_g * v_x;
26806
+ det = b2 * b2 - 4 * a2 * this.C;
26807
+ if (det < 0) {
26808
+ p.x = Number.NaN;
26809
+ p.y = Number.NaN;
26810
+ return p;
26811
+ }
26812
+ k2 = (-b2 - Math.sqrt(det)) / (2 * a2);
26813
+ v_x = this.radius_g + k2 * v_x;
26814
+ v_y *= k2;
26815
+ v_z *= k2;
26816
+ p.x = Math.atan2(v_y, v_x);
26817
+ p.y = Math.atan(v_z * Math.cos(p.x) / v_x);
26818
+ }
26819
+ p.x = p.x + this.long0;
26820
+ return p;
26821
+ }
26822
+ var names33 = ["Geostationary Satellite View", "Geostationary_Satellite", "geos"];
26823
+ var geos_default = {
26824
+ init: init32,
26825
+ forward: forward31,
26826
+ inverse: inverse31,
26827
+ names: names33
26828
+ };
26829
+
26347
26830
  // ../../node_modules/proj4/projs.js
26348
26831
  function projs_default(proj42) {
26349
26832
  proj42.Proj.projections.add(tmerc_default);
@@ -26374,6 +26857,7 @@ function projs_default(proj42) {
26374
26857
  proj42.Proj.projections.add(robin_default);
26375
26858
  proj42.Proj.projections.add(geocent_default);
26376
26859
  proj42.Proj.projections.add(tpers_default);
26860
+ proj42.Proj.projections.add(geos_default);
26377
26861
  }
26378
26862
 
26379
26863
  // ../../node_modules/proj4/lib/index.js
@@ -26383,6 +26867,7 @@ core_default.WGS84 = new core_default.Proj("WGS84");
26383
26867
  core_default.Point = Point_default;
26384
26868
  core_default.toPoint = toPoint_default;
26385
26869
  core_default.defs = defs_default;
26870
+ core_default.nadgrid = nadgrid;
26386
26871
  core_default.transform = transform;
26387
26872
  core_default.mgrs = mgrs_default;
26388
26873
  core_default.version = "__VERSION__";
@@ -27227,7 +27712,7 @@ var Config = {
27227
27712
  return "UA-23232486-4";
27228
27713
  },
27229
27714
  get Version() {
27230
- return "v6.30.0";
27715
+ return "v6.31.0";
27231
27716
  },
27232
27717
  map: new MapConfig()
27233
27718
  };
@@ -27797,7 +28282,8 @@ var MapAttribution = class {
27797
28282
  this.scheduleRender();
27798
28283
  };
27799
28284
  this.isIgnored = (attr) => {
27800
- return attr.collection.title.toLowerCase().startsWith("geographx");
28285
+ const title = attr.collection.title.toLowerCase();
28286
+ return title.startsWith("geographx") || title.includes(" dem ");
27801
28287
  };
27802
28288
  this.renderAttribution = () => {
27803
28289
  this._raf = 0;
@@ -28432,7 +28918,8 @@ var Basemaps = class extends _ {
28432
28918
  if (Config.map.debug["debug.screenshot"] !== true) {
28433
28919
  const nav = new import_maplibre_gl3.default.NavigationControl({ visualizePitch: true });
28434
28920
  this.map.addControl(nav, "top-left");
28435
- this.map.addControl(new import_maplibre_gl3.default.FullscreenControl({ container: this.el }));
28921
+ if (!Config.map.isDebug)
28922
+ this.map.addControl(new import_maplibre_gl3.default.FullscreenControl({ container: this.el }));
28436
28923
  }
28437
28924
  this.map.on("render", this.onRender);
28438
28925
  onMapLoaded(this.map, () => {