@basemaps/server 7.13.0 → 7.14.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/bin/basemaps-server.cjs +186 -75
- package/package.json +6 -6
package/bin/basemaps-server.cjs
CHANGED
|
@@ -274,6 +274,7 @@ __export(tslib_es6_exports, {
|
|
|
274
274
|
__propKey: () => __propKey,
|
|
275
275
|
__read: () => __read,
|
|
276
276
|
__rest: () => __rest,
|
|
277
|
+
__rewriteRelativeImportExtension: () => __rewriteRelativeImportExtension,
|
|
277
278
|
__runInitializers: () => __runInitializers,
|
|
278
279
|
__setFunctionName: () => __setFunctionName,
|
|
279
280
|
__spread: () => __spread,
|
|
@@ -413,8 +414,8 @@ function __generator(thisArg, body) {
|
|
|
413
414
|
if (t[0] & 1)
|
|
414
415
|
throw t[1];
|
|
415
416
|
return t[1];
|
|
416
|
-
}, trys: [], ops: [] }, f, y, t, g;
|
|
417
|
-
return g =
|
|
417
|
+
}, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
418
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
418
419
|
return this;
|
|
419
420
|
}), g;
|
|
420
421
|
function verb(n) {
|
|
@@ -555,16 +556,24 @@ function __asyncGenerator(thisArg, _arguments, generator) {
|
|
|
555
556
|
if (!Symbol.asyncIterator)
|
|
556
557
|
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
557
558
|
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
558
|
-
return i =
|
|
559
|
+
return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function() {
|
|
559
560
|
return this;
|
|
560
561
|
}, i;
|
|
561
|
-
function
|
|
562
|
-
|
|
562
|
+
function awaitReturn(f) {
|
|
563
|
+
return function(v) {
|
|
564
|
+
return Promise.resolve(v).then(f, reject);
|
|
565
|
+
};
|
|
566
|
+
}
|
|
567
|
+
function verb(n, f) {
|
|
568
|
+
if (g[n]) {
|
|
563
569
|
i[n] = function(v) {
|
|
564
570
|
return new Promise(function(a, b) {
|
|
565
571
|
q.push([n, v, a, b]) > 1 || resume(n, v);
|
|
566
572
|
});
|
|
567
573
|
};
|
|
574
|
+
if (f)
|
|
575
|
+
i[n] = f(i[n]);
|
|
576
|
+
}
|
|
568
577
|
}
|
|
569
578
|
function resume(n, v) {
|
|
570
579
|
try {
|
|
@@ -633,9 +642,9 @@ function __importStar(mod) {
|
|
|
633
642
|
return mod;
|
|
634
643
|
var result = {};
|
|
635
644
|
if (mod != null) {
|
|
636
|
-
for (var k
|
|
637
|
-
if (k !== "default"
|
|
638
|
-
__createBinding(result, mod, k);
|
|
645
|
+
for (var k = ownKeys(mod), i = 0; i < k.length; i++)
|
|
646
|
+
if (k[i] !== "default")
|
|
647
|
+
__createBinding(result, mod, k[i]);
|
|
639
648
|
}
|
|
640
649
|
__setModuleDefault(result, mod);
|
|
641
650
|
return result;
|
|
@@ -668,7 +677,7 @@ function __addDisposableResource(env, value, async) {
|
|
|
668
677
|
if (value !== null && value !== void 0) {
|
|
669
678
|
if (typeof value !== "object" && typeof value !== "function")
|
|
670
679
|
throw new TypeError("Object expected.");
|
|
671
|
-
var dispose;
|
|
680
|
+
var dispose, inner;
|
|
672
681
|
if (async) {
|
|
673
682
|
if (!Symbol.asyncDispose)
|
|
674
683
|
throw new TypeError("Symbol.asyncDispose is not defined.");
|
|
@@ -678,9 +687,19 @@ function __addDisposableResource(env, value, async) {
|
|
|
678
687
|
if (!Symbol.dispose)
|
|
679
688
|
throw new TypeError("Symbol.dispose is not defined.");
|
|
680
689
|
dispose = value[Symbol.dispose];
|
|
690
|
+
if (async)
|
|
691
|
+
inner = dispose;
|
|
681
692
|
}
|
|
682
693
|
if (typeof dispose !== "function")
|
|
683
694
|
throw new TypeError("Object not disposable.");
|
|
695
|
+
if (inner)
|
|
696
|
+
dispose = function() {
|
|
697
|
+
try {
|
|
698
|
+
inner.call(this);
|
|
699
|
+
} catch (e) {
|
|
700
|
+
return Promise.reject(e);
|
|
701
|
+
}
|
|
702
|
+
};
|
|
684
703
|
env.stack.push({ value, dispose, async });
|
|
685
704
|
} else if (async) {
|
|
686
705
|
env.stack.push({ async: true });
|
|
@@ -692,26 +711,41 @@ function __disposeResources(env) {
|
|
|
692
711
|
env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
|
|
693
712
|
env.hasError = true;
|
|
694
713
|
}
|
|
714
|
+
var r, s = 0;
|
|
695
715
|
function next() {
|
|
696
|
-
while (env.stack.
|
|
697
|
-
var rec = env.stack.pop();
|
|
716
|
+
while (r = env.stack.pop()) {
|
|
698
717
|
try {
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
718
|
+
if (!r.async && s === 1)
|
|
719
|
+
return s = 0, env.stack.push(r), Promise.resolve().then(next);
|
|
720
|
+
if (r.dispose) {
|
|
721
|
+
var result = r.dispose.call(r.value);
|
|
722
|
+
if (r.async)
|
|
723
|
+
return s |= 2, Promise.resolve(result).then(next, function(e) {
|
|
724
|
+
fail(e);
|
|
725
|
+
return next();
|
|
726
|
+
});
|
|
727
|
+
} else
|
|
728
|
+
s |= 1;
|
|
705
729
|
} catch (e) {
|
|
706
730
|
fail(e);
|
|
707
731
|
}
|
|
708
732
|
}
|
|
733
|
+
if (s === 1)
|
|
734
|
+
return env.hasError ? Promise.reject(env.error) : Promise.resolve();
|
|
709
735
|
if (env.hasError)
|
|
710
736
|
throw env.error;
|
|
711
737
|
}
|
|
712
738
|
return next();
|
|
713
739
|
}
|
|
714
|
-
|
|
740
|
+
function __rewriteRelativeImportExtension(path3, preserveJsx) {
|
|
741
|
+
if (typeof path3 === "string" && /^\.\.?\//.test(path3)) {
|
|
742
|
+
return path3.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) {
|
|
743
|
+
return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : d + ext + "." + cm.toLowerCase() + "js";
|
|
744
|
+
});
|
|
745
|
+
}
|
|
746
|
+
return path3;
|
|
747
|
+
}
|
|
748
|
+
var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default;
|
|
715
749
|
var init_tslib_es6 = __esm({
|
|
716
750
|
"../../node_modules/tslib/tslib.es6.mjs"() {
|
|
717
751
|
extendStatics = function(d, b) {
|
|
@@ -756,6 +790,16 @@ var init_tslib_es6 = __esm({
|
|
|
756
790
|
} : function(o, v) {
|
|
757
791
|
o["default"] = v;
|
|
758
792
|
};
|
|
793
|
+
ownKeys = function(o) {
|
|
794
|
+
ownKeys = Object.getOwnPropertyNames || function(o2) {
|
|
795
|
+
var ar = [];
|
|
796
|
+
for (var k in o2)
|
|
797
|
+
if (Object.prototype.hasOwnProperty.call(o2, k))
|
|
798
|
+
ar[ar.length] = k;
|
|
799
|
+
return ar;
|
|
800
|
+
};
|
|
801
|
+
return ownKeys(o);
|
|
802
|
+
};
|
|
759
803
|
_SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
|
|
760
804
|
var e = new Error(message);
|
|
761
805
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
@@ -766,6 +810,10 @@ var init_tslib_es6 = __esm({
|
|
|
766
810
|
__rest,
|
|
767
811
|
__decorate,
|
|
768
812
|
__param,
|
|
813
|
+
__esDecorate,
|
|
814
|
+
__runInitializers,
|
|
815
|
+
__propKey,
|
|
816
|
+
__setFunctionName,
|
|
769
817
|
__metadata,
|
|
770
818
|
__awaiter,
|
|
771
819
|
__generator,
|
|
@@ -787,7 +835,8 @@ var init_tslib_es6 = __esm({
|
|
|
787
835
|
__classPrivateFieldSet,
|
|
788
836
|
__classPrivateFieldIn,
|
|
789
837
|
__addDisposableResource,
|
|
790
|
-
__disposeResources
|
|
838
|
+
__disposeResources,
|
|
839
|
+
__rewriteRelativeImportExtension
|
|
791
840
|
};
|
|
792
841
|
}
|
|
793
842
|
});
|
|
@@ -1859,7 +1908,7 @@ var require_Endpoint = __commonJS({
|
|
|
1859
1908
|
// ../../node_modules/obliterator/iterator.js
|
|
1860
1909
|
var require_iterator = __commonJS({
|
|
1861
1910
|
"../../node_modules/obliterator/iterator.js"(exports, module2) {
|
|
1862
|
-
function
|
|
1911
|
+
function Iterator2(next) {
|
|
1863
1912
|
Object.defineProperty(this, "_next", {
|
|
1864
1913
|
writable: false,
|
|
1865
1914
|
enumerable: false,
|
|
@@ -1867,7 +1916,7 @@ var require_iterator = __commonJS({
|
|
|
1867
1916
|
});
|
|
1868
1917
|
this.done = false;
|
|
1869
1918
|
}
|
|
1870
|
-
|
|
1919
|
+
Iterator2.prototype.next = function() {
|
|
1871
1920
|
if (this.done)
|
|
1872
1921
|
return { done: true };
|
|
1873
1922
|
var step = this._next();
|
|
@@ -1876,28 +1925,28 @@ var require_iterator = __commonJS({
|
|
|
1876
1925
|
return step;
|
|
1877
1926
|
};
|
|
1878
1927
|
if (typeof Symbol !== "undefined")
|
|
1879
|
-
|
|
1928
|
+
Iterator2.prototype[Symbol.iterator] = function() {
|
|
1880
1929
|
return this;
|
|
1881
1930
|
};
|
|
1882
|
-
|
|
1931
|
+
Iterator2.of = function() {
|
|
1883
1932
|
var args = arguments, l = args.length, i = 0;
|
|
1884
|
-
return new
|
|
1933
|
+
return new Iterator2(function() {
|
|
1885
1934
|
if (i >= l)
|
|
1886
1935
|
return { done: true };
|
|
1887
1936
|
return { done: false, value: args[i++] };
|
|
1888
1937
|
});
|
|
1889
1938
|
};
|
|
1890
|
-
|
|
1891
|
-
var iterator = new
|
|
1939
|
+
Iterator2.empty = function() {
|
|
1940
|
+
var iterator = new Iterator2(null);
|
|
1892
1941
|
iterator.done = true;
|
|
1893
1942
|
return iterator;
|
|
1894
1943
|
};
|
|
1895
|
-
|
|
1896
|
-
if (value instanceof
|
|
1944
|
+
Iterator2.is = function(value) {
|
|
1945
|
+
if (value instanceof Iterator2)
|
|
1897
1946
|
return true;
|
|
1898
1947
|
return typeof value === "object" && value !== null && typeof value.next === "function";
|
|
1899
1948
|
};
|
|
1900
|
-
module2.exports =
|
|
1949
|
+
module2.exports = Iterator2;
|
|
1901
1950
|
}
|
|
1902
1951
|
});
|
|
1903
1952
|
|
|
@@ -2124,7 +2173,7 @@ var require_iterables = __commonJS({
|
|
|
2124
2173
|
// ../../node_modules/mnemonist/lru-cache.js
|
|
2125
2174
|
var require_lru_cache = __commonJS({
|
|
2126
2175
|
"../../node_modules/mnemonist/lru-cache.js"(exports, module2) {
|
|
2127
|
-
var
|
|
2176
|
+
var Iterator2 = require_iterator();
|
|
2128
2177
|
var forEach = require_foreach();
|
|
2129
2178
|
var typed = require_typed_arrays();
|
|
2130
2179
|
var iterables = require_iterables();
|
|
@@ -2250,7 +2299,7 @@ var require_lru_cache = __commonJS({
|
|
|
2250
2299
|
LRUCache.prototype.keys = function() {
|
|
2251
2300
|
var i = 0, l = this.size;
|
|
2252
2301
|
var pointer = this.head, keys = this.K, forward = this.forward;
|
|
2253
|
-
return new
|
|
2302
|
+
return new Iterator2(function() {
|
|
2254
2303
|
if (i >= l)
|
|
2255
2304
|
return { done: true };
|
|
2256
2305
|
var key = keys[pointer];
|
|
@@ -2266,7 +2315,7 @@ var require_lru_cache = __commonJS({
|
|
|
2266
2315
|
LRUCache.prototype.values = function() {
|
|
2267
2316
|
var i = 0, l = this.size;
|
|
2268
2317
|
var pointer = this.head, values = this.V, forward = this.forward;
|
|
2269
|
-
return new
|
|
2318
|
+
return new Iterator2(function() {
|
|
2270
2319
|
if (i >= l)
|
|
2271
2320
|
return { done: true };
|
|
2272
2321
|
var value = values[pointer];
|
|
@@ -2282,7 +2331,7 @@ var require_lru_cache = __commonJS({
|
|
|
2282
2331
|
LRUCache.prototype.entries = function() {
|
|
2283
2332
|
var i = 0, l = this.size;
|
|
2284
2333
|
var pointer = this.head, keys = this.K, values = this.V, forward = this.forward;
|
|
2285
|
-
return new
|
|
2334
|
+
return new Iterator2(function() {
|
|
2286
2335
|
if (i >= l)
|
|
2287
2336
|
return { done: true };
|
|
2288
2337
|
var key = keys[pointer], value = values[pointer];
|
|
@@ -124629,7 +124678,16 @@ var Env = {
|
|
|
124629
124678
|
Analytics: {
|
|
124630
124679
|
CloudFrontId: "ANALYTICS_CLOUD_FRONT_ID",
|
|
124631
124680
|
CloudFrontSourceBucket: "ANALYTICS_CLOUD_FRONT_SOURCE_BUCKET",
|
|
124632
|
-
|
|
124681
|
+
/** Where to store the analytic cache data */
|
|
124682
|
+
CacheBucket: "ANALYTICS_CACHE_BUCKET",
|
|
124683
|
+
/** Max number of records to process in the analytics process */
|
|
124684
|
+
MaxRecords: "ANALYTICS_MAX_RECORDS",
|
|
124685
|
+
/** Elastic server Id */
|
|
124686
|
+
ElasticId: "ELASTIC_ID",
|
|
124687
|
+
/** ElasticSearch's API key */
|
|
124688
|
+
ElasticApiKey: "ELASTIC_API_KEY",
|
|
124689
|
+
/** Index to use for storing analytic data */
|
|
124690
|
+
ElasticIndexName: "ELASTIC_INDEX_NAME"
|
|
124633
124691
|
},
|
|
124634
124692
|
/** Load a environment var defaulting to defaultOutput if it does not exist */
|
|
124635
124693
|
get(envName) {
|
|
@@ -135043,9 +135101,9 @@ var ulid3 = __toESM(require_index_umd(), 1);
|
|
|
135043
135101
|
var CliInfo = {
|
|
135044
135102
|
// Detect unlinked packages looks for this string since its a package name, slightly work around it
|
|
135045
135103
|
package: "@basemaps/cli",
|
|
135046
|
-
version: "v7.
|
|
135047
|
-
hash: "
|
|
135048
|
-
buildId: "
|
|
135104
|
+
version: "v7.13.0-9-g72f2a811",
|
|
135105
|
+
hash: "72f2a811d4851c6f50758617c9e65179d2b27bc8",
|
|
135106
|
+
buildId: "12978670711-1"
|
|
135049
135107
|
};
|
|
135050
135108
|
var CliId = ulid3.ulid();
|
|
135051
135109
|
|
|
@@ -135753,9 +135811,9 @@ var Router = class {
|
|
|
135753
135811
|
};
|
|
135754
135812
|
|
|
135755
135813
|
// ../../node_modules/@linzjs/lambda/build/src/function.js
|
|
135756
|
-
var version2 = "v7.
|
|
135757
|
-
var hash = "
|
|
135758
|
-
var buildId = "
|
|
135814
|
+
var version2 = "v7.13.0-9-g72f2a811";
|
|
135815
|
+
var hash = "72f2a811d4851c6f50758617c9e65179d2b27bc8";
|
|
135816
|
+
var buildId = "12978670711-1";
|
|
135759
135817
|
var versionInfo = { version: version2, hash, buildId };
|
|
135760
135818
|
async function runFunction(req, fn) {
|
|
135761
135819
|
if (!req.timer.timers.has("lambda"))
|
|
@@ -138117,22 +138175,39 @@ var LercDecompressor = {
|
|
|
138117
138175
|
async bytes(source, tile) {
|
|
138118
138176
|
await import_lerc.default.load();
|
|
138119
138177
|
const bytes = import_lerc.default.decode(tile);
|
|
138120
|
-
if (bytes.pixelType !== "F32") {
|
|
138121
|
-
throw new Error(`Lerc: Invalid output pixelType:${bytes.pixelType} from:${source.source.url.href}`);
|
|
138122
|
-
}
|
|
138123
138178
|
if (bytes.depthCount !== 1) {
|
|
138124
138179
|
throw new Error(`Lerc: Invalid output depthCount:${bytes.depthCount} from:${source.source.url.href}`);
|
|
138125
138180
|
}
|
|
138126
138181
|
if (bytes.pixels.length !== 1) {
|
|
138127
138182
|
throw new Error(`Lerc: Invalid output bandCount:${bytes.pixels.length} from:${source.source.url.href}`);
|
|
138128
138183
|
}
|
|
138129
|
-
|
|
138130
|
-
|
|
138131
|
-
|
|
138132
|
-
|
|
138133
|
-
|
|
138134
|
-
|
|
138135
|
-
|
|
138184
|
+
switch (bytes.pixelType) {
|
|
138185
|
+
case "F32":
|
|
138186
|
+
return {
|
|
138187
|
+
pixels: bytes.pixels[0],
|
|
138188
|
+
width: bytes.width,
|
|
138189
|
+
height: bytes.height,
|
|
138190
|
+
channels: 1,
|
|
138191
|
+
depth: "float32"
|
|
138192
|
+
};
|
|
138193
|
+
case "U32":
|
|
138194
|
+
return {
|
|
138195
|
+
pixels: bytes.pixels[0],
|
|
138196
|
+
width: bytes.width,
|
|
138197
|
+
height: bytes.height,
|
|
138198
|
+
channels: 1,
|
|
138199
|
+
depth: "uint32"
|
|
138200
|
+
};
|
|
138201
|
+
case "U8":
|
|
138202
|
+
return {
|
|
138203
|
+
pixels: bytes.pixels[0],
|
|
138204
|
+
width: bytes.width,
|
|
138205
|
+
height: bytes.height,
|
|
138206
|
+
channels: 1,
|
|
138207
|
+
depth: "uint8"
|
|
138208
|
+
};
|
|
138209
|
+
}
|
|
138210
|
+
throw new Error(`Lerc: Invalid output pixelType:${bytes.pixelType} from:${source.source.url.href}`);
|
|
138136
138211
|
}
|
|
138137
138212
|
};
|
|
138138
138213
|
var Decompressors = {
|
|
@@ -138150,8 +138225,6 @@ function cropResize(tiff, data, comp, mode) {
|
|
|
138150
138225
|
}
|
|
138151
138226
|
if (data.channels !== 1)
|
|
138152
138227
|
throw new Error("Unable to crop-resize more than one channel got:" + data.channels);
|
|
138153
|
-
if (data.depth !== "float32")
|
|
138154
|
-
throw new Error("Unable to crop-resize other than float32 got:" + data.depth);
|
|
138155
138228
|
const source = { x: 0, y: 0, width: data.width, height: data.height };
|
|
138156
138229
|
const target = { width: 0, height: 0, scale: 1 };
|
|
138157
138230
|
if (comp.extract) {
|
|
@@ -138197,7 +138270,8 @@ function resizeNearest(data, comp, source, target) {
|
|
|
138197
138270
|
const maxWidth = Math.min(comp.source.width, data.width) - 1;
|
|
138198
138271
|
const maxHeight = Math.min(comp.source.height, data.height) - 1;
|
|
138199
138272
|
const invScale = 1 / target.scale;
|
|
138200
|
-
const
|
|
138273
|
+
const ret = getOutputBuffer(data, target);
|
|
138274
|
+
const outputBuffer = ret.pixels;
|
|
138201
138275
|
for (let y = 0; y < target.height; y++) {
|
|
138202
138276
|
let sourceY = Math.round((y + 0.5) * invScale + source.y);
|
|
138203
138277
|
if (sourceY > maxHeight)
|
|
@@ -138209,13 +138283,43 @@ function resizeNearest(data, comp, source, target) {
|
|
|
138209
138283
|
outputBuffer[y * target.width + x] = data.pixels[sourceY * data.width + sourceX];
|
|
138210
138284
|
}
|
|
138211
138285
|
}
|
|
138212
|
-
return
|
|
138286
|
+
return ret;
|
|
138287
|
+
}
|
|
138288
|
+
function getOutputBuffer(source, target) {
|
|
138289
|
+
switch (source.depth) {
|
|
138290
|
+
case "uint8":
|
|
138291
|
+
return {
|
|
138292
|
+
pixels: new Uint8Array(target.width * target.height),
|
|
138293
|
+
width: target.width,
|
|
138294
|
+
height: target.height,
|
|
138295
|
+
depth: source.depth,
|
|
138296
|
+
channels: 1
|
|
138297
|
+
};
|
|
138298
|
+
case "float32":
|
|
138299
|
+
return {
|
|
138300
|
+
pixels: new Float32Array(target.width * target.height),
|
|
138301
|
+
width: target.width,
|
|
138302
|
+
height: target.height,
|
|
138303
|
+
depth: source.depth,
|
|
138304
|
+
channels: 1
|
|
138305
|
+
};
|
|
138306
|
+
case "uint32":
|
|
138307
|
+
return {
|
|
138308
|
+
pixels: new Uint32Array(target.width * target.height),
|
|
138309
|
+
width: target.width,
|
|
138310
|
+
height: target.height,
|
|
138311
|
+
depth: source.depth,
|
|
138312
|
+
channels: 1
|
|
138313
|
+
};
|
|
138314
|
+
}
|
|
138213
138315
|
}
|
|
138214
138316
|
function resizeBilinear(data, comp, source, target, noData) {
|
|
138215
138317
|
const invScale = 1 / target.scale;
|
|
138216
138318
|
const maxWidth = Math.min(comp.source.width, data.width) - 2;
|
|
138217
138319
|
const maxHeight = Math.min(comp.source.height, data.height) - 2;
|
|
138218
|
-
const
|
|
138320
|
+
const ret = getOutputBuffer(data, target);
|
|
138321
|
+
const outputBuffer = ret.pixels;
|
|
138322
|
+
const needsRounding = !data.depth.startsWith("float");
|
|
138219
138323
|
for (let y = 0; y < target.height; y++) {
|
|
138220
138324
|
const sourceY = Math.min((y + 0.5) * invScale + source.y, maxHeight);
|
|
138221
138325
|
const minY = Math.floor(sourceY);
|
|
@@ -138252,24 +138356,24 @@ function resizeBilinear(data, comp, source, target, noData) {
|
|
|
138252
138356
|
const weightC = (1 - xDiff) * yDiff;
|
|
138253
138357
|
const weightD = xDiff * yDiff;
|
|
138254
138358
|
const pixel = minXMinY * weightA + maxXMinY * weightB + minXMaxY * weightC + maxXMaxY * weightD;
|
|
138255
|
-
outputBuffer[outPx] = pixel;
|
|
138359
|
+
outputBuffer[outPx] = needsRounding ? Math.round(pixel) : pixel;
|
|
138256
138360
|
}
|
|
138257
138361
|
}
|
|
138258
|
-
return
|
|
138362
|
+
return ret;
|
|
138259
138363
|
}
|
|
138260
138364
|
|
|
138261
138365
|
// ../tiler-sharp/build/pipeline/pipeline.color.ramp.js
|
|
138262
138366
|
var ColorRamp = class {
|
|
138263
|
-
constructor(
|
|
138367
|
+
constructor(ramp) {
|
|
138264
138368
|
Object.defineProperty(this, "ramps", {
|
|
138265
138369
|
enumerable: true,
|
|
138266
138370
|
configurable: true,
|
|
138267
138371
|
writable: true,
|
|
138268
138372
|
value: []
|
|
138269
138373
|
});
|
|
138270
|
-
const ramps =
|
|
138271
|
-
for (const
|
|
138272
|
-
const parts =
|
|
138374
|
+
const ramps = ramp.trim().split("\n");
|
|
138375
|
+
for (const ramp2 of ramps) {
|
|
138376
|
+
const parts = ramp2.trim().split(" ");
|
|
138273
138377
|
const numbers = parts.map(Number);
|
|
138274
138378
|
this.ramps.push({ v: numbers[0], color: numbers.slice(1) });
|
|
138275
138379
|
}
|
|
@@ -138279,27 +138383,33 @@ var ColorRamp = class {
|
|
|
138279
138383
|
if (num <= first.v)
|
|
138280
138384
|
return first.color;
|
|
138281
138385
|
for (let i = 0; i < this.ramps.length - 1; i++) {
|
|
138282
|
-
const
|
|
138283
|
-
if (num <
|
|
138386
|
+
const ramp = this.ramps[i];
|
|
138387
|
+
if (num < ramp.v)
|
|
138284
138388
|
continue;
|
|
138285
|
-
if (
|
|
138286
|
-
return
|
|
138389
|
+
if (ramp.v === num)
|
|
138390
|
+
return ramp.color;
|
|
138287
138391
|
const rampNext = this.ramps[i + 1];
|
|
138288
138392
|
if (num >= rampNext.v)
|
|
138289
138393
|
continue;
|
|
138290
|
-
const range = rampNext.v -
|
|
138291
|
-
const offset = num -
|
|
138394
|
+
const range = rampNext.v - ramp.v;
|
|
138395
|
+
const offset = num - ramp.v;
|
|
138292
138396
|
const scale = offset / range;
|
|
138293
|
-
const r = Math.round((rampNext.color[0] -
|
|
138294
|
-
const g = Math.round((rampNext.color[1] -
|
|
138295
|
-
const b = Math.round((rampNext.color[2] -
|
|
138296
|
-
const a = Math.round((rampNext.color[3] -
|
|
138397
|
+
const r = Math.round((rampNext.color[0] - ramp.color[0]) * scale + ramp.color[0]);
|
|
138398
|
+
const g = Math.round((rampNext.color[1] - ramp.color[1]) * scale + ramp.color[1]);
|
|
138399
|
+
const b = Math.round((rampNext.color[2] - ramp.color[2]) * scale + ramp.color[2]);
|
|
138400
|
+
const a = Math.round((rampNext.color[3] - ramp.color[3]) * scale + ramp.color[3]);
|
|
138297
138401
|
return [r, g, b, a];
|
|
138298
138402
|
}
|
|
138299
138403
|
return this.ramps[this.ramps.length - 1].color;
|
|
138300
138404
|
}
|
|
138301
138405
|
};
|
|
138302
|
-
var
|
|
138406
|
+
var Ramps = {
|
|
138407
|
+
float32: new ColorRamp(DefaultColorRamp),
|
|
138408
|
+
uint8: new ColorRamp(`0 0 0 0 255
|
|
138409
|
+
255 255 255 255 255`),
|
|
138410
|
+
uint32: new ColorRamp(`0 0 0 0 255
|
|
138411
|
+
${2 ** 32 - 1} 255 255 255 255`)
|
|
138412
|
+
};
|
|
138303
138413
|
var PipelineColorRamp = {
|
|
138304
138414
|
type: "color-ramp",
|
|
138305
138415
|
process(comp, data) {
|
|
@@ -138311,6 +138421,7 @@ var PipelineColorRamp = {
|
|
|
138311
138421
|
width: data.width,
|
|
138312
138422
|
height: data.height
|
|
138313
138423
|
};
|
|
138424
|
+
const ramp = Ramps[data.depth];
|
|
138314
138425
|
const size = data.width * data.height;
|
|
138315
138426
|
const noData = comp.asset.images[0].noData;
|
|
138316
138427
|
for (let i = 0; i < size; i++) {
|
|
@@ -140046,17 +140157,17 @@ function versionGet() {
|
|
|
140046
140157
|
* last git version tag
|
|
140047
140158
|
* @example "v6.42.1"
|
|
140048
140159
|
*/
|
|
140049
|
-
version: "v7.
|
|
140160
|
+
version: "v7.13.0-9-g72f2a811",
|
|
140050
140161
|
/**
|
|
140051
140162
|
* Full git commit hash
|
|
140052
140163
|
* @example "e4231b1ee62c276c8657c56677ced02681dfe5d6"
|
|
140053
140164
|
*/
|
|
140054
|
-
hash: "
|
|
140165
|
+
hash: "72f2a811d4851c6f50758617c9e65179d2b27bc8",
|
|
140055
140166
|
/**
|
|
140056
140167
|
* The exact build that this release was run from
|
|
140057
140168
|
* @example "1658821493-3"
|
|
140058
140169
|
*/
|
|
140059
|
-
buildId: "
|
|
140170
|
+
buildId: "12978670711-1"
|
|
140060
140171
|
});
|
|
140061
140172
|
return Promise.resolve(response);
|
|
140062
140173
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@basemaps/server",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.14.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/linz/basemaps.git",
|
|
@@ -52,17 +52,17 @@
|
|
|
52
52
|
"sharp": "^0.33.0"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@basemaps/config": "^7.
|
|
56
|
-
"@basemaps/config-loader": "^7.
|
|
55
|
+
"@basemaps/config": "^7.14.0",
|
|
56
|
+
"@basemaps/config-loader": "^7.14.0",
|
|
57
57
|
"@basemaps/geo": "^7.12.0",
|
|
58
|
-
"@basemaps/lambda-tiler": "^7.
|
|
58
|
+
"@basemaps/lambda-tiler": "^7.14.0",
|
|
59
59
|
"@basemaps/landing": "^6.39.0",
|
|
60
|
-
"@basemaps/shared": "^7.
|
|
60
|
+
"@basemaps/shared": "^7.14.0",
|
|
61
61
|
"@fastify/formbody": "^7.0.1",
|
|
62
62
|
"@fastify/static": "^6.5.0",
|
|
63
63
|
"cmd-ts": "^0.12.1",
|
|
64
64
|
"fastify": "^4.9.2",
|
|
65
65
|
"pretty-json-log": "^1.0.0"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "72f2a811d4851c6f50758617c9e65179d2b27bc8"
|
|
68
68
|
}
|