@basemaps/lambda-tiler 7.13.0 → 7.15.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.
package/dist/index.js CHANGED
@@ -269,6 +269,7 @@ __export(tslib_es6_exports, {
269
269
  __propKey: () => __propKey,
270
270
  __read: () => __read,
271
271
  __rest: () => __rest,
272
+ __rewriteRelativeImportExtension: () => __rewriteRelativeImportExtension,
272
273
  __runInitializers: () => __runInitializers,
273
274
  __setFunctionName: () => __setFunctionName,
274
275
  __spread: () => __spread,
@@ -408,8 +409,8 @@ function __generator(thisArg, body) {
408
409
  if (t[0] & 1)
409
410
  throw t[1];
410
411
  return t[1];
411
- }, trys: [], ops: [] }, f, y, t, g;
412
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
412
+ }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
413
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
413
414
  return this;
414
415
  }), g;
415
416
  function verb(n) {
@@ -550,16 +551,24 @@ function __asyncGenerator(thisArg, _arguments, generator) {
550
551
  if (!Symbol.asyncIterator)
551
552
  throw new TypeError("Symbol.asyncIterator is not defined.");
552
553
  var g = generator.apply(thisArg, _arguments || []), i, q = [];
553
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() {
554
+ return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function() {
554
555
  return this;
555
556
  }, i;
556
- function verb(n) {
557
- if (g[n])
557
+ function awaitReturn(f) {
558
+ return function(v) {
559
+ return Promise.resolve(v).then(f, reject);
560
+ };
561
+ }
562
+ function verb(n, f) {
563
+ if (g[n]) {
558
564
  i[n] = function(v) {
559
565
  return new Promise(function(a, b) {
560
566
  q.push([n, v, a, b]) > 1 || resume(n, v);
561
567
  });
562
568
  };
569
+ if (f)
570
+ i[n] = f(i[n]);
571
+ }
563
572
  }
564
573
  function resume(n, v) {
565
574
  try {
@@ -628,9 +637,9 @@ function __importStar(mod) {
628
637
  return mod;
629
638
  var result = {};
630
639
  if (mod != null) {
631
- for (var k in mod)
632
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
633
- __createBinding(result, mod, k);
640
+ for (var k = ownKeys(mod), i = 0; i < k.length; i++)
641
+ if (k[i] !== "default")
642
+ __createBinding(result, mod, k[i]);
634
643
  }
635
644
  __setModuleDefault(result, mod);
636
645
  return result;
@@ -663,7 +672,7 @@ function __addDisposableResource(env, value, async) {
663
672
  if (value !== null && value !== void 0) {
664
673
  if (typeof value !== "object" && typeof value !== "function")
665
674
  throw new TypeError("Object expected.");
666
- var dispose;
675
+ var dispose, inner;
667
676
  if (async) {
668
677
  if (!Symbol.asyncDispose)
669
678
  throw new TypeError("Symbol.asyncDispose is not defined.");
@@ -673,9 +682,19 @@ function __addDisposableResource(env, value, async) {
673
682
  if (!Symbol.dispose)
674
683
  throw new TypeError("Symbol.dispose is not defined.");
675
684
  dispose = value[Symbol.dispose];
685
+ if (async)
686
+ inner = dispose;
676
687
  }
677
688
  if (typeof dispose !== "function")
678
689
  throw new TypeError("Object not disposable.");
690
+ if (inner)
691
+ dispose = function() {
692
+ try {
693
+ inner.call(this);
694
+ } catch (e) {
695
+ return Promise.reject(e);
696
+ }
697
+ };
679
698
  env.stack.push({ value, dispose, async });
680
699
  } else if (async) {
681
700
  env.stack.push({ async: true });
@@ -687,26 +706,41 @@ function __disposeResources(env) {
687
706
  env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
688
707
  env.hasError = true;
689
708
  }
709
+ var r, s = 0;
690
710
  function next() {
691
- while (env.stack.length) {
692
- var rec = env.stack.pop();
711
+ while (r = env.stack.pop()) {
693
712
  try {
694
- var result = rec.dispose && rec.dispose.call(rec.value);
695
- if (rec.async)
696
- return Promise.resolve(result).then(next, function(e) {
697
- fail(e);
698
- return next();
699
- });
713
+ if (!r.async && s === 1)
714
+ return s = 0, env.stack.push(r), Promise.resolve().then(next);
715
+ if (r.dispose) {
716
+ var result = r.dispose.call(r.value);
717
+ if (r.async)
718
+ return s |= 2, Promise.resolve(result).then(next, function(e) {
719
+ fail(e);
720
+ return next();
721
+ });
722
+ } else
723
+ s |= 1;
700
724
  } catch (e) {
701
725
  fail(e);
702
726
  }
703
727
  }
728
+ if (s === 1)
729
+ return env.hasError ? Promise.reject(env.error) : Promise.resolve();
704
730
  if (env.hasError)
705
731
  throw env.error;
706
732
  }
707
733
  return next();
708
734
  }
709
- var extendStatics, __assign, __createBinding, __setModuleDefault, _SuppressedError, tslib_es6_default;
735
+ function __rewriteRelativeImportExtension(path2, preserveJsx) {
736
+ if (typeof path2 === "string" && /^\.\.?\//.test(path2)) {
737
+ return path2.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) {
738
+ return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : d + ext + "." + cm.toLowerCase() + "js";
739
+ });
740
+ }
741
+ return path2;
742
+ }
743
+ var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default;
710
744
  var init_tslib_es6 = __esm({
711
745
  "../../node_modules/tslib/tslib.es6.mjs"() {
712
746
  extendStatics = function(d, b) {
@@ -751,6 +785,16 @@ var init_tslib_es6 = __esm({
751
785
  } : function(o, v) {
752
786
  o["default"] = v;
753
787
  };
788
+ ownKeys = function(o) {
789
+ ownKeys = Object.getOwnPropertyNames || function(o2) {
790
+ var ar = [];
791
+ for (var k in o2)
792
+ if (Object.prototype.hasOwnProperty.call(o2, k))
793
+ ar[ar.length] = k;
794
+ return ar;
795
+ };
796
+ return ownKeys(o);
797
+ };
754
798
  _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
755
799
  var e = new Error(message);
756
800
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
@@ -761,6 +805,10 @@ var init_tslib_es6 = __esm({
761
805
  __rest,
762
806
  __decorate,
763
807
  __param,
808
+ __esDecorate,
809
+ __runInitializers,
810
+ __propKey,
811
+ __setFunctionName,
764
812
  __metadata,
765
813
  __awaiter,
766
814
  __generator,
@@ -782,7 +830,8 @@ var init_tslib_es6 = __esm({
782
830
  __classPrivateFieldSet,
783
831
  __classPrivateFieldIn,
784
832
  __addDisposableResource,
785
- __disposeResources
833
+ __disposeResources,
834
+ __rewriteRelativeImportExtension
786
835
  };
787
836
  }
788
837
  });
@@ -1854,7 +1903,7 @@ var require_Endpoint = __commonJS({
1854
1903
  // ../../node_modules/obliterator/iterator.js
1855
1904
  var require_iterator = __commonJS({
1856
1905
  "../../node_modules/obliterator/iterator.js"(exports, module2) {
1857
- function Iterator(next) {
1906
+ function Iterator2(next) {
1858
1907
  Object.defineProperty(this, "_next", {
1859
1908
  writable: false,
1860
1909
  enumerable: false,
@@ -1862,7 +1911,7 @@ var require_iterator = __commonJS({
1862
1911
  });
1863
1912
  this.done = false;
1864
1913
  }
1865
- Iterator.prototype.next = function() {
1914
+ Iterator2.prototype.next = function() {
1866
1915
  if (this.done)
1867
1916
  return { done: true };
1868
1917
  var step = this._next();
@@ -1871,28 +1920,28 @@ var require_iterator = __commonJS({
1871
1920
  return step;
1872
1921
  };
1873
1922
  if (typeof Symbol !== "undefined")
1874
- Iterator.prototype[Symbol.iterator] = function() {
1923
+ Iterator2.prototype[Symbol.iterator] = function() {
1875
1924
  return this;
1876
1925
  };
1877
- Iterator.of = function() {
1926
+ Iterator2.of = function() {
1878
1927
  var args = arguments, l = args.length, i = 0;
1879
- return new Iterator(function() {
1928
+ return new Iterator2(function() {
1880
1929
  if (i >= l)
1881
1930
  return { done: true };
1882
1931
  return { done: false, value: args[i++] };
1883
1932
  });
1884
1933
  };
1885
- Iterator.empty = function() {
1886
- var iterator = new Iterator(null);
1934
+ Iterator2.empty = function() {
1935
+ var iterator = new Iterator2(null);
1887
1936
  iterator.done = true;
1888
1937
  return iterator;
1889
1938
  };
1890
- Iterator.is = function(value) {
1891
- if (value instanceof Iterator)
1939
+ Iterator2.is = function(value) {
1940
+ if (value instanceof Iterator2)
1892
1941
  return true;
1893
1942
  return typeof value === "object" && value !== null && typeof value.next === "function";
1894
1943
  };
1895
- module2.exports = Iterator;
1944
+ module2.exports = Iterator2;
1896
1945
  }
1897
1946
  });
1898
1947
 
@@ -2119,7 +2168,7 @@ var require_iterables = __commonJS({
2119
2168
  // ../../node_modules/mnemonist/lru-cache.js
2120
2169
  var require_lru_cache = __commonJS({
2121
2170
  "../../node_modules/mnemonist/lru-cache.js"(exports, module2) {
2122
- var Iterator = require_iterator();
2171
+ var Iterator2 = require_iterator();
2123
2172
  var forEach = require_foreach();
2124
2173
  var typed = require_typed_arrays();
2125
2174
  var iterables = require_iterables();
@@ -2245,7 +2294,7 @@ var require_lru_cache = __commonJS({
2245
2294
  LRUCache.prototype.keys = function() {
2246
2295
  var i = 0, l = this.size;
2247
2296
  var pointer = this.head, keys = this.K, forward = this.forward;
2248
- return new Iterator(function() {
2297
+ return new Iterator2(function() {
2249
2298
  if (i >= l)
2250
2299
  return { done: true };
2251
2300
  var key = keys[pointer];
@@ -2261,7 +2310,7 @@ var require_lru_cache = __commonJS({
2261
2310
  LRUCache.prototype.values = function() {
2262
2311
  var i = 0, l = this.size;
2263
2312
  var pointer = this.head, values = this.V, forward = this.forward;
2264
- return new Iterator(function() {
2313
+ return new Iterator2(function() {
2265
2314
  if (i >= l)
2266
2315
  return { done: true };
2267
2316
  var value = values[pointer];
@@ -2277,7 +2326,7 @@ var require_lru_cache = __commonJS({
2277
2326
  LRUCache.prototype.entries = function() {
2278
2327
  var i = 0, l = this.size;
2279
2328
  var pointer = this.head, keys = this.K, values = this.V, forward = this.forward;
2280
- return new Iterator(function() {
2329
+ return new Iterator2(function() {
2281
2330
  if (i >= l)
2282
2331
  return { done: true };
2283
2332
  var key = keys[pointer], value = values[pointer];
@@ -71136,7 +71185,16 @@ var Env = {
71136
71185
  Analytics: {
71137
71186
  CloudFrontId: "ANALYTICS_CLOUD_FRONT_ID",
71138
71187
  CloudFrontSourceBucket: "ANALYTICS_CLOUD_FRONT_SOURCE_BUCKET",
71139
- CacheBucket: "ANALYTICS_CACHE_BUCKET"
71188
+ /** Where to store the analytic cache data */
71189
+ CacheBucket: "ANALYTICS_CACHE_BUCKET",
71190
+ /** Max number of records to process in the analytics process */
71191
+ MaxRecords: "ANALYTICS_MAX_RECORDS",
71192
+ /** Elastic server Id */
71193
+ ElasticId: "ELASTIC_ID",
71194
+ /** ElasticSearch's API key */
71195
+ ElasticApiKey: "ELASTIC_API_KEY",
71196
+ /** Index to use for storing analytic data */
71197
+ ElasticIndexName: "ELASTIC_INDEX_NAME"
71140
71198
  },
71141
71199
  /** Load a environment var defaulting to defaultOutput if it does not exist */
71142
71200
  get(envName) {
@@ -77319,9 +77377,16 @@ credentials.onFileSystemFound = (acc, fs4, path2) => {
77319
77377
  applyS3MiddleWare(fs4);
77320
77378
  fsa.register(acc.prefix, fs4);
77321
77379
  };
77380
+ function splitConfig(x) {
77381
+ if (x.startsWith("["))
77382
+ return JSON.parse(x);
77383
+ return x.split(",");
77384
+ }
77322
77385
  var credentialPath = Env.get(Env.AwsRoleConfigPath);
77323
- if (credentialPath)
77324
- credentials.registerConfig(fsa.toUrl(credentialPath), s3Fs);
77386
+ if (credentialPath) {
77387
+ for (const loc of splitConfig(credentialPath))
77388
+ credentials.registerConfig(fsa.toUrl(loc), s3Fs);
77389
+ }
77325
77390
  s3Fs.credentials = credentials;
77326
77391
  fsa.register("https://", new FsHttp());
77327
77392
  fsa.register("s3://", s3Fs);
@@ -78359,16 +78424,11 @@ var CHAR_2 = "2".charCodeAt(0);
78359
78424
  var CHAR_3 = "3".charCodeAt(0);
78360
78425
 
78361
78426
  // ../geo/build/xy.order.js
78362
- var XyOrder;
78363
- (function(XyOrder2) {
78364
- XyOrder2[XyOrder2["Xy"] = 0] = "Xy";
78365
- XyOrder2[XyOrder2["Yx"] = 1] = "Yx";
78366
- })(XyOrder || (XyOrder = {}));
78367
78427
  function getXyOrder(epsg) {
78368
- if (epsg === Epsg.Nztm2000) {
78369
- return XyOrder.Yx;
78370
- }
78371
- return XyOrder.Xy;
78428
+ const code = typeof epsg === "number" ? epsg : epsg.code;
78429
+ if (code === EpsgCode.Nztm2000 || code === EpsgCode.Citm2000)
78430
+ return "yx";
78431
+ return "xy";
78372
78432
  }
78373
78433
 
78374
78434
  // ../geo/build/tile.matrix.set.js
@@ -78448,7 +78508,7 @@ var TileMatrixSet = class {
78448
78508
  if (projection == null)
78449
78509
  throw new Error(`Unable to find supported projection ${def.supportedCRS}`);
78450
78510
  this.projection = projection;
78451
- if (getXyOrder(this.projection) === XyOrder.Yx) {
78511
+ if (getXyOrder(this.projection) === "yx") {
78452
78512
  this.indexX = 1;
78453
78513
  this.indexY = 0;
78454
78514
  }
@@ -78648,6 +78708,204 @@ var TileMatrixSet = class {
78648
78708
  }
78649
78709
  };
78650
78710
 
78711
+ // ../geo/build/tms/citm2000.js
78712
+ var Citm2000Tmst = {
78713
+ type: "TileMatrixSetType",
78714
+ title: "Debug tile matrix for EPSG:3793",
78715
+ abstract: "",
78716
+ identifier: "CITM2000Quad",
78717
+ supportedCRS: "https://www.opengis.net/def/crs/EPSG/0/3793",
78718
+ boundingBox: {
78719
+ type: "BoundingBoxType",
78720
+ crs: "https://www.opengis.net/def/crs/EPSG/0/3793",
78721
+ lowerCorner: [5051234111622438e-9, 3.4301543757978342e6],
78722
+ upperCorner: [5207777145550478e-9, 3.5866974097258747e6]
78723
+ },
78724
+ tileMatrix: [
78725
+ {
78726
+ type: "TileMatrixType",
78727
+ identifier: "0",
78728
+ scaleDenominator: 218391509386217e-8,
78729
+ topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
78730
+ tileWidth: 256,
78731
+ tileHeight: 256,
78732
+ matrixWidth: 1,
78733
+ matrixHeight: 1
78734
+ },
78735
+ {
78736
+ type: "TileMatrixType",
78737
+ identifier: "1",
78738
+ scaleDenominator: 109195754693108e-8,
78739
+ topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
78740
+ tileWidth: 256,
78741
+ tileHeight: 256,
78742
+ matrixWidth: 2,
78743
+ matrixHeight: 2
78744
+ },
78745
+ {
78746
+ type: "TileMatrixType",
78747
+ identifier: "2",
78748
+ scaleDenominator: 545978.773465544,
78749
+ topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
78750
+ tileWidth: 256,
78751
+ tileHeight: 256,
78752
+ matrixWidth: 4,
78753
+ matrixHeight: 4
78754
+ },
78755
+ {
78756
+ type: "TileMatrixType",
78757
+ identifier: "3",
78758
+ scaleDenominator: 272989.386732772,
78759
+ topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
78760
+ tileWidth: 256,
78761
+ tileHeight: 256,
78762
+ matrixWidth: 8,
78763
+ matrixHeight: 8
78764
+ },
78765
+ {
78766
+ type: "TileMatrixType",
78767
+ identifier: "4",
78768
+ scaleDenominator: 136494.693366386,
78769
+ topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
78770
+ tileWidth: 256,
78771
+ tileHeight: 256,
78772
+ matrixWidth: 16,
78773
+ matrixHeight: 16
78774
+ },
78775
+ {
78776
+ type: "TileMatrixType",
78777
+ identifier: "5",
78778
+ scaleDenominator: 68247.346683193,
78779
+ topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
78780
+ tileWidth: 256,
78781
+ tileHeight: 256,
78782
+ matrixWidth: 32,
78783
+ matrixHeight: 32
78784
+ },
78785
+ {
78786
+ type: "TileMatrixType",
78787
+ identifier: "6",
78788
+ scaleDenominator: 34123.6733415964,
78789
+ topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
78790
+ tileWidth: 256,
78791
+ tileHeight: 256,
78792
+ matrixWidth: 64,
78793
+ matrixHeight: 64
78794
+ },
78795
+ {
78796
+ type: "TileMatrixType",
78797
+ identifier: "7",
78798
+ scaleDenominator: 17061.8366707982,
78799
+ topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
78800
+ tileWidth: 256,
78801
+ tileHeight: 256,
78802
+ matrixWidth: 128,
78803
+ matrixHeight: 128
78804
+ },
78805
+ {
78806
+ type: "TileMatrixType",
78807
+ identifier: "8",
78808
+ scaleDenominator: 8530.91833539913,
78809
+ topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
78810
+ tileWidth: 256,
78811
+ tileHeight: 256,
78812
+ matrixWidth: 256,
78813
+ matrixHeight: 256
78814
+ },
78815
+ {
78816
+ type: "TileMatrixType",
78817
+ identifier: "9",
78818
+ scaleDenominator: 4265.45916769956,
78819
+ topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
78820
+ tileWidth: 256,
78821
+ tileHeight: 256,
78822
+ matrixWidth: 512,
78823
+ matrixHeight: 512
78824
+ },
78825
+ {
78826
+ type: "TileMatrixType",
78827
+ identifier: "10",
78828
+ scaleDenominator: 2132.72958384978,
78829
+ topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
78830
+ tileWidth: 256,
78831
+ tileHeight: 256,
78832
+ matrixWidth: 1024,
78833
+ matrixHeight: 1024
78834
+ },
78835
+ {
78836
+ type: "TileMatrixType",
78837
+ identifier: "11",
78838
+ scaleDenominator: 1066.36479192489,
78839
+ topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
78840
+ tileWidth: 256,
78841
+ tileHeight: 256,
78842
+ matrixWidth: 2048,
78843
+ matrixHeight: 2048
78844
+ },
78845
+ {
78846
+ type: "TileMatrixType",
78847
+ identifier: "12",
78848
+ scaleDenominator: 533.182395962445,
78849
+ topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
78850
+ tileWidth: 256,
78851
+ tileHeight: 256,
78852
+ matrixWidth: 4096,
78853
+ matrixHeight: 4096
78854
+ },
78855
+ {
78856
+ type: "TileMatrixType",
78857
+ identifier: "13",
78858
+ scaleDenominator: 266.591197981222,
78859
+ topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
78860
+ tileWidth: 256,
78861
+ tileHeight: 256,
78862
+ matrixWidth: 8192,
78863
+ matrixHeight: 8192
78864
+ },
78865
+ {
78866
+ type: "TileMatrixType",
78867
+ identifier: "14",
78868
+ scaleDenominator: 133.295598990611,
78869
+ topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
78870
+ tileWidth: 256,
78871
+ tileHeight: 256,
78872
+ matrixWidth: 16384,
78873
+ matrixHeight: 16384
78874
+ },
78875
+ {
78876
+ type: "TileMatrixType",
78877
+ identifier: "15",
78878
+ scaleDenominator: 66.6477994953056,
78879
+ topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
78880
+ tileWidth: 256,
78881
+ tileHeight: 256,
78882
+ matrixWidth: 32768,
78883
+ matrixHeight: 32768
78884
+ },
78885
+ {
78886
+ type: "TileMatrixType",
78887
+ identifier: "16",
78888
+ scaleDenominator: 33.3238997476528,
78889
+ topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
78890
+ tileWidth: 256,
78891
+ tileHeight: 256,
78892
+ matrixWidth: 65536,
78893
+ matrixHeight: 65536
78894
+ }
78895
+ ],
78896
+ $generated: {
78897
+ package: "@basemaps/cli",
78898
+ version: "v7.14.0-4-g2766010d",
78899
+ hash: "2766010d8d2bb8b673f6bcbef2fe2636f2e0f4ea",
78900
+ createdAt: "2025-02-10T20:34:46.643Z"
78901
+ },
78902
+ $options: {
78903
+ sourceTileMatrix: "WebMercatorQuad",
78904
+ zoomOffset: 8
78905
+ }
78906
+ };
78907
+ var Citm2000Tms = new TileMatrixSet(Citm2000Tmst);
78908
+
78651
78909
  // ../geo/build/tms/google.js
78652
78910
  var GoogleTmst = {
78653
78911
  type: "TileMatrixSetType",
@@ -78924,11 +79182,12 @@ var Nztm2000QuadTms = new TileMatrixSet(Nztm20002.Nztm2000Quad);
78924
79182
  // ../geo/build/tms/index.js
78925
79183
  var TileMatrixSets = {
78926
79184
  /** All TileMatrixSets that are currently supported */
78927
- All: [GoogleTms, Nztm2000Tms, Nztm2000QuadTms],
79185
+ All: [GoogleTms, Nztm2000Tms, Nztm2000QuadTms, Citm2000Tms],
78928
79186
  /** Default mapping of EPSG code to Tile matrix set */
78929
79187
  Defaults: /* @__PURE__ */ new Map([
78930
79188
  [Epsg.Google.code, GoogleTms],
78931
- [Epsg.Nztm2000.code, Nztm2000Tms]
79189
+ [Epsg.Nztm2000.code, Nztm2000Tms],
79190
+ [Epsg.Citm2000.code, Citm2000Tms]
78932
79191
  ]),
78933
79192
  /**
78934
79193
  * Get a tile matrix set by EPSG Code
@@ -82210,9 +82469,9 @@ var Router = class {
82210
82469
  };
82211
82470
 
82212
82471
  // ../../node_modules/@linzjs/lambda/build/src/function.js
82213
- var version2 = "v7.12.0-12-g9c1d78fe";
82214
- var hash = "9c1d78fe9e4cccb6309b761f17dc249681ce1769";
82215
- var buildId = "12624609360-1";
82472
+ var version2 = "v7.14.0-9-ga2fa0faa";
82473
+ var hash = "a2fa0faa57e5591a50900fd469dbb9637b7d9c8e";
82474
+ var buildId = "13911363896-1";
82216
82475
  var versionInfo = { version: version2, hash, buildId };
82217
82476
  async function runFunction(req, fn) {
82218
82477
  if (!req.timer.timers.has("lambda"))
@@ -84521,22 +84780,39 @@ var LercDecompressor = {
84521
84780
  async bytes(source, tile) {
84522
84781
  await import_lerc.default.load();
84523
84782
  const bytes = import_lerc.default.decode(tile);
84524
- if (bytes.pixelType !== "F32") {
84525
- throw new Error(`Lerc: Invalid output pixelType:${bytes.pixelType} from:${source.source.url.href}`);
84526
- }
84527
84783
  if (bytes.depthCount !== 1) {
84528
84784
  throw new Error(`Lerc: Invalid output depthCount:${bytes.depthCount} from:${source.source.url.href}`);
84529
84785
  }
84530
84786
  if (bytes.pixels.length !== 1) {
84531
84787
  throw new Error(`Lerc: Invalid output bandCount:${bytes.pixels.length} from:${source.source.url.href}`);
84532
84788
  }
84533
- return {
84534
- pixels: bytes.pixels[0],
84535
- width: bytes.width,
84536
- height: bytes.height,
84537
- channels: 1,
84538
- depth: "float32"
84539
- };
84789
+ switch (bytes.pixelType) {
84790
+ case "F32":
84791
+ return {
84792
+ pixels: bytes.pixels[0],
84793
+ width: bytes.width,
84794
+ height: bytes.height,
84795
+ channels: 1,
84796
+ depth: "float32"
84797
+ };
84798
+ case "U32":
84799
+ return {
84800
+ pixels: bytes.pixels[0],
84801
+ width: bytes.width,
84802
+ height: bytes.height,
84803
+ channels: 1,
84804
+ depth: "uint32"
84805
+ };
84806
+ case "U8":
84807
+ return {
84808
+ pixels: bytes.pixels[0],
84809
+ width: bytes.width,
84810
+ height: bytes.height,
84811
+ channels: 1,
84812
+ depth: "uint8"
84813
+ };
84814
+ }
84815
+ throw new Error(`Lerc: Invalid output pixelType:${bytes.pixelType} from:${source.source.url.href}`);
84540
84816
  }
84541
84817
  };
84542
84818
  var Decompressors = {
@@ -84554,8 +84830,6 @@ function cropResize(tiff, data, comp, mode) {
84554
84830
  }
84555
84831
  if (data.channels !== 1)
84556
84832
  throw new Error("Unable to crop-resize more than one channel got:" + data.channels);
84557
- if (data.depth !== "float32")
84558
- throw new Error("Unable to crop-resize other than float32 got:" + data.depth);
84559
84833
  const source = { x: 0, y: 0, width: data.width, height: data.height };
84560
84834
  const target = { width: 0, height: 0, scale: 1 };
84561
84835
  if (comp.extract) {
@@ -84601,7 +84875,8 @@ function resizeNearest(data, comp, source, target) {
84601
84875
  const maxWidth = Math.min(comp.source.width, data.width) - 1;
84602
84876
  const maxHeight = Math.min(comp.source.height, data.height) - 1;
84603
84877
  const invScale = 1 / target.scale;
84604
- const outputBuffer = new Float32Array(target.width * target.height);
84878
+ const ret = getOutputBuffer(data, target);
84879
+ const outputBuffer = ret.pixels;
84605
84880
  for (let y = 0; y < target.height; y++) {
84606
84881
  let sourceY = Math.round((y + 0.5) * invScale + source.y);
84607
84882
  if (sourceY > maxHeight)
@@ -84613,13 +84888,43 @@ function resizeNearest(data, comp, source, target) {
84613
84888
  outputBuffer[y * target.width + x] = data.pixels[sourceY * data.width + sourceX];
84614
84889
  }
84615
84890
  }
84616
- return { pixels: outputBuffer, width: target.width, height: target.height, depth: "float32", channels: 1 };
84891
+ return ret;
84892
+ }
84893
+ function getOutputBuffer(source, target) {
84894
+ switch (source.depth) {
84895
+ case "uint8":
84896
+ return {
84897
+ pixels: new Uint8Array(target.width * target.height),
84898
+ width: target.width,
84899
+ height: target.height,
84900
+ depth: source.depth,
84901
+ channels: 1
84902
+ };
84903
+ case "float32":
84904
+ return {
84905
+ pixels: new Float32Array(target.width * target.height),
84906
+ width: target.width,
84907
+ height: target.height,
84908
+ depth: source.depth,
84909
+ channels: 1
84910
+ };
84911
+ case "uint32":
84912
+ return {
84913
+ pixels: new Uint32Array(target.width * target.height),
84914
+ width: target.width,
84915
+ height: target.height,
84916
+ depth: source.depth,
84917
+ channels: 1
84918
+ };
84919
+ }
84617
84920
  }
84618
84921
  function resizeBilinear(data, comp, source, target, noData) {
84619
84922
  const invScale = 1 / target.scale;
84620
84923
  const maxWidth = Math.min(comp.source.width, data.width) - 2;
84621
84924
  const maxHeight = Math.min(comp.source.height, data.height) - 2;
84622
- const outputBuffer = new Float32Array(target.width * target.height);
84925
+ const ret = getOutputBuffer(data, target);
84926
+ const outputBuffer = ret.pixels;
84927
+ const needsRounding = !data.depth.startsWith("float");
84623
84928
  for (let y = 0; y < target.height; y++) {
84624
84929
  const sourceY = Math.min((y + 0.5) * invScale + source.y, maxHeight);
84625
84930
  const minY = Math.floor(sourceY);
@@ -84656,24 +84961,24 @@ function resizeBilinear(data, comp, source, target, noData) {
84656
84961
  const weightC = (1 - xDiff) * yDiff;
84657
84962
  const weightD = xDiff * yDiff;
84658
84963
  const pixel = minXMinY * weightA + maxXMinY * weightB + minXMaxY * weightC + maxXMaxY * weightD;
84659
- outputBuffer[outPx] = pixel;
84964
+ outputBuffer[outPx] = needsRounding ? Math.round(pixel) : pixel;
84660
84965
  }
84661
84966
  }
84662
- return { pixels: outputBuffer, width: target.width, height: target.height, depth: "float32", channels: 1 };
84967
+ return ret;
84663
84968
  }
84664
84969
 
84665
84970
  // ../tiler-sharp/build/pipeline/pipeline.color.ramp.js
84666
84971
  var ColorRamp = class {
84667
- constructor(ramp2) {
84972
+ constructor(ramp) {
84668
84973
  Object.defineProperty(this, "ramps", {
84669
84974
  enumerable: true,
84670
84975
  configurable: true,
84671
84976
  writable: true,
84672
84977
  value: []
84673
84978
  });
84674
- const ramps = ramp2.trim().split("\n");
84675
- for (const ramp3 of ramps) {
84676
- const parts = ramp3.trim().split(" ");
84979
+ const ramps = ramp.trim().split("\n");
84980
+ for (const ramp2 of ramps) {
84981
+ const parts = ramp2.trim().split(" ");
84677
84982
  const numbers = parts.map(Number);
84678
84983
  this.ramps.push({ v: numbers[0], color: numbers.slice(1) });
84679
84984
  }
@@ -84683,27 +84988,33 @@ var ColorRamp = class {
84683
84988
  if (num <= first.v)
84684
84989
  return first.color;
84685
84990
  for (let i = 0; i < this.ramps.length - 1; i++) {
84686
- const ramp2 = this.ramps[i];
84687
- if (num < ramp2.v)
84991
+ const ramp = this.ramps[i];
84992
+ if (num < ramp.v)
84688
84993
  continue;
84689
- if (ramp2.v === num)
84690
- return ramp2.color;
84994
+ if (ramp.v === num)
84995
+ return ramp.color;
84691
84996
  const rampNext = this.ramps[i + 1];
84692
84997
  if (num >= rampNext.v)
84693
84998
  continue;
84694
- const range = rampNext.v - ramp2.v;
84695
- const offset = num - ramp2.v;
84999
+ const range = rampNext.v - ramp.v;
85000
+ const offset = num - ramp.v;
84696
85001
  const scale = offset / range;
84697
- const r = Math.round((rampNext.color[0] - ramp2.color[0]) * scale + ramp2.color[0]);
84698
- const g = Math.round((rampNext.color[1] - ramp2.color[1]) * scale + ramp2.color[1]);
84699
- const b = Math.round((rampNext.color[2] - ramp2.color[2]) * scale + ramp2.color[2]);
84700
- const a = Math.round((rampNext.color[3] - ramp2.color[3]) * scale + ramp2.color[3]);
85002
+ const r = Math.round((rampNext.color[0] - ramp.color[0]) * scale + ramp.color[0]);
85003
+ const g = Math.round((rampNext.color[1] - ramp.color[1]) * scale + ramp.color[1]);
85004
+ const b = Math.round((rampNext.color[2] - ramp.color[2]) * scale + ramp.color[2]);
85005
+ const a = Math.round((rampNext.color[3] - ramp.color[3]) * scale + ramp.color[3]);
84701
85006
  return [r, g, b, a];
84702
85007
  }
84703
85008
  return this.ramps[this.ramps.length - 1].color;
84704
85009
  }
84705
85010
  };
84706
- var ramp = new ColorRamp(DefaultColorRamp);
85011
+ var Ramps = {
85012
+ float32: new ColorRamp(DefaultColorRamp),
85013
+ uint8: new ColorRamp(`0 0 0 0 255
85014
+ 255 255 255 255 255`),
85015
+ uint32: new ColorRamp(`0 0 0 0 255
85016
+ ${2 ** 32 - 1} 255 255 255 255`)
85017
+ };
84707
85018
  var PipelineColorRamp = {
84708
85019
  type: "color-ramp",
84709
85020
  process(comp, data) {
@@ -84715,6 +85026,7 @@ var PipelineColorRamp = {
84715
85026
  width: data.width,
84716
85027
  height: data.height
84717
85028
  };
85029
+ const ramp = Ramps[data.depth];
84718
85030
  const size = data.width * data.height;
84719
85031
  const noData = comp.asset.images[0].noData;
84720
85032
  for (let i = 0; i < size; i++) {
@@ -86410,17 +86722,17 @@ function versionGet() {
86410
86722
  * last git version tag
86411
86723
  * @example "v6.42.1"
86412
86724
  */
86413
- version: "v7.12.0-12-g9c1d78fe",
86725
+ version: "v7.14.0-9-ga2fa0faa",
86414
86726
  /**
86415
86727
  * Full git commit hash
86416
86728
  * @example "e4231b1ee62c276c8657c56677ced02681dfe5d6"
86417
86729
  */
86418
- hash: "9c1d78fe9e4cccb6309b761f17dc249681ce1769",
86730
+ hash: "a2fa0faa57e5591a50900fd469dbb9637b7d9c8e",
86419
86731
  /**
86420
86732
  * The exact build that this release was run from
86421
86733
  * @example "1658821493-3"
86422
86734
  */
86423
- buildId: "12624609360-1"
86735
+ buildId: "13911363896-1"
86424
86736
  });
86425
86737
  return Promise.resolve(response);
86426
86738
  }