@basemaps/server 7.14.0 → 7.16.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 +327 -57
- package/package.json +7 -7
package/bin/basemaps-server.cjs
CHANGED
|
@@ -130900,9 +130900,16 @@ credentials.onFileSystemFound = (acc, fs4, path3) => {
|
|
|
130900
130900
|
applyS3MiddleWare(fs4);
|
|
130901
130901
|
fsa.register(acc.prefix, fs4);
|
|
130902
130902
|
};
|
|
130903
|
+
function splitConfig(x) {
|
|
130904
|
+
if (x.startsWith("["))
|
|
130905
|
+
return JSON.parse(x);
|
|
130906
|
+
return x.split(",");
|
|
130907
|
+
}
|
|
130903
130908
|
var credentialPath = Env.get(Env.AwsRoleConfigPath);
|
|
130904
|
-
if (credentialPath)
|
|
130905
|
-
|
|
130909
|
+
if (credentialPath) {
|
|
130910
|
+
for (const loc of splitConfig(credentialPath))
|
|
130911
|
+
credentials.registerConfig(fsa.toUrl(loc), s3Fs);
|
|
130912
|
+
}
|
|
130906
130913
|
s3Fs.credentials = credentials;
|
|
130907
130914
|
fsa.register("https://", new FsHttp());
|
|
130908
130915
|
fsa.register("s3://", s3Fs);
|
|
@@ -131940,16 +131947,11 @@ var CHAR_2 = "2".charCodeAt(0);
|
|
|
131940
131947
|
var CHAR_3 = "3".charCodeAt(0);
|
|
131941
131948
|
|
|
131942
131949
|
// ../geo/build/xy.order.js
|
|
131943
|
-
var XyOrder;
|
|
131944
|
-
(function(XyOrder2) {
|
|
131945
|
-
XyOrder2[XyOrder2["Xy"] = 0] = "Xy";
|
|
131946
|
-
XyOrder2[XyOrder2["Yx"] = 1] = "Yx";
|
|
131947
|
-
})(XyOrder || (XyOrder = {}));
|
|
131948
131950
|
function getXyOrder(epsg) {
|
|
131949
|
-
|
|
131950
|
-
|
|
131951
|
-
|
|
131952
|
-
return
|
|
131951
|
+
const code = typeof epsg === "number" ? epsg : epsg.code;
|
|
131952
|
+
if (code === EpsgCode.Nztm2000 || code === EpsgCode.Citm2000)
|
|
131953
|
+
return "yx";
|
|
131954
|
+
return "xy";
|
|
131953
131955
|
}
|
|
131954
131956
|
|
|
131955
131957
|
// ../geo/build/tile.matrix.set.js
|
|
@@ -132029,7 +132031,7 @@ var TileMatrixSet = class {
|
|
|
132029
132031
|
if (projection == null)
|
|
132030
132032
|
throw new Error(`Unable to find supported projection ${def.supportedCRS}`);
|
|
132031
132033
|
this.projection = projection;
|
|
132032
|
-
if (getXyOrder(this.projection) ===
|
|
132034
|
+
if (getXyOrder(this.projection) === "yx") {
|
|
132033
132035
|
this.indexX = 1;
|
|
132034
132036
|
this.indexY = 0;
|
|
132035
132037
|
}
|
|
@@ -132229,6 +132231,204 @@ var TileMatrixSet = class {
|
|
|
132229
132231
|
}
|
|
132230
132232
|
};
|
|
132231
132233
|
|
|
132234
|
+
// ../geo/build/tms/citm2000.js
|
|
132235
|
+
var Citm2000Tmst = {
|
|
132236
|
+
type: "TileMatrixSetType",
|
|
132237
|
+
title: "Debug tile matrix for EPSG:3793",
|
|
132238
|
+
abstract: "",
|
|
132239
|
+
identifier: "CITM2000Quad",
|
|
132240
|
+
supportedCRS: "https://www.opengis.net/def/crs/EPSG/0/3793",
|
|
132241
|
+
boundingBox: {
|
|
132242
|
+
type: "BoundingBoxType",
|
|
132243
|
+
crs: "https://www.opengis.net/def/crs/EPSG/0/3793",
|
|
132244
|
+
lowerCorner: [5051234111622438e-9, 3.4301543757978342e6],
|
|
132245
|
+
upperCorner: [5207777145550478e-9, 3.5866974097258747e6]
|
|
132246
|
+
},
|
|
132247
|
+
tileMatrix: [
|
|
132248
|
+
{
|
|
132249
|
+
type: "TileMatrixType",
|
|
132250
|
+
identifier: "0",
|
|
132251
|
+
scaleDenominator: 218391509386217e-8,
|
|
132252
|
+
topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
|
|
132253
|
+
tileWidth: 256,
|
|
132254
|
+
tileHeight: 256,
|
|
132255
|
+
matrixWidth: 1,
|
|
132256
|
+
matrixHeight: 1
|
|
132257
|
+
},
|
|
132258
|
+
{
|
|
132259
|
+
type: "TileMatrixType",
|
|
132260
|
+
identifier: "1",
|
|
132261
|
+
scaleDenominator: 109195754693108e-8,
|
|
132262
|
+
topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
|
|
132263
|
+
tileWidth: 256,
|
|
132264
|
+
tileHeight: 256,
|
|
132265
|
+
matrixWidth: 2,
|
|
132266
|
+
matrixHeight: 2
|
|
132267
|
+
},
|
|
132268
|
+
{
|
|
132269
|
+
type: "TileMatrixType",
|
|
132270
|
+
identifier: "2",
|
|
132271
|
+
scaleDenominator: 545978.773465544,
|
|
132272
|
+
topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
|
|
132273
|
+
tileWidth: 256,
|
|
132274
|
+
tileHeight: 256,
|
|
132275
|
+
matrixWidth: 4,
|
|
132276
|
+
matrixHeight: 4
|
|
132277
|
+
},
|
|
132278
|
+
{
|
|
132279
|
+
type: "TileMatrixType",
|
|
132280
|
+
identifier: "3",
|
|
132281
|
+
scaleDenominator: 272989.386732772,
|
|
132282
|
+
topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
|
|
132283
|
+
tileWidth: 256,
|
|
132284
|
+
tileHeight: 256,
|
|
132285
|
+
matrixWidth: 8,
|
|
132286
|
+
matrixHeight: 8
|
|
132287
|
+
},
|
|
132288
|
+
{
|
|
132289
|
+
type: "TileMatrixType",
|
|
132290
|
+
identifier: "4",
|
|
132291
|
+
scaleDenominator: 136494.693366386,
|
|
132292
|
+
topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
|
|
132293
|
+
tileWidth: 256,
|
|
132294
|
+
tileHeight: 256,
|
|
132295
|
+
matrixWidth: 16,
|
|
132296
|
+
matrixHeight: 16
|
|
132297
|
+
},
|
|
132298
|
+
{
|
|
132299
|
+
type: "TileMatrixType",
|
|
132300
|
+
identifier: "5",
|
|
132301
|
+
scaleDenominator: 68247.346683193,
|
|
132302
|
+
topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
|
|
132303
|
+
tileWidth: 256,
|
|
132304
|
+
tileHeight: 256,
|
|
132305
|
+
matrixWidth: 32,
|
|
132306
|
+
matrixHeight: 32
|
|
132307
|
+
},
|
|
132308
|
+
{
|
|
132309
|
+
type: "TileMatrixType",
|
|
132310
|
+
identifier: "6",
|
|
132311
|
+
scaleDenominator: 34123.6733415964,
|
|
132312
|
+
topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
|
|
132313
|
+
tileWidth: 256,
|
|
132314
|
+
tileHeight: 256,
|
|
132315
|
+
matrixWidth: 64,
|
|
132316
|
+
matrixHeight: 64
|
|
132317
|
+
},
|
|
132318
|
+
{
|
|
132319
|
+
type: "TileMatrixType",
|
|
132320
|
+
identifier: "7",
|
|
132321
|
+
scaleDenominator: 17061.8366707982,
|
|
132322
|
+
topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
|
|
132323
|
+
tileWidth: 256,
|
|
132324
|
+
tileHeight: 256,
|
|
132325
|
+
matrixWidth: 128,
|
|
132326
|
+
matrixHeight: 128
|
|
132327
|
+
},
|
|
132328
|
+
{
|
|
132329
|
+
type: "TileMatrixType",
|
|
132330
|
+
identifier: "8",
|
|
132331
|
+
scaleDenominator: 8530.91833539913,
|
|
132332
|
+
topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
|
|
132333
|
+
tileWidth: 256,
|
|
132334
|
+
tileHeight: 256,
|
|
132335
|
+
matrixWidth: 256,
|
|
132336
|
+
matrixHeight: 256
|
|
132337
|
+
},
|
|
132338
|
+
{
|
|
132339
|
+
type: "TileMatrixType",
|
|
132340
|
+
identifier: "9",
|
|
132341
|
+
scaleDenominator: 4265.45916769956,
|
|
132342
|
+
topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
|
|
132343
|
+
tileWidth: 256,
|
|
132344
|
+
tileHeight: 256,
|
|
132345
|
+
matrixWidth: 512,
|
|
132346
|
+
matrixHeight: 512
|
|
132347
|
+
},
|
|
132348
|
+
{
|
|
132349
|
+
type: "TileMatrixType",
|
|
132350
|
+
identifier: "10",
|
|
132351
|
+
scaleDenominator: 2132.72958384978,
|
|
132352
|
+
topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
|
|
132353
|
+
tileWidth: 256,
|
|
132354
|
+
tileHeight: 256,
|
|
132355
|
+
matrixWidth: 1024,
|
|
132356
|
+
matrixHeight: 1024
|
|
132357
|
+
},
|
|
132358
|
+
{
|
|
132359
|
+
type: "TileMatrixType",
|
|
132360
|
+
identifier: "11",
|
|
132361
|
+
scaleDenominator: 1066.36479192489,
|
|
132362
|
+
topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
|
|
132363
|
+
tileWidth: 256,
|
|
132364
|
+
tileHeight: 256,
|
|
132365
|
+
matrixWidth: 2048,
|
|
132366
|
+
matrixHeight: 2048
|
|
132367
|
+
},
|
|
132368
|
+
{
|
|
132369
|
+
type: "TileMatrixType",
|
|
132370
|
+
identifier: "12",
|
|
132371
|
+
scaleDenominator: 533.182395962445,
|
|
132372
|
+
topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
|
|
132373
|
+
tileWidth: 256,
|
|
132374
|
+
tileHeight: 256,
|
|
132375
|
+
matrixWidth: 4096,
|
|
132376
|
+
matrixHeight: 4096
|
|
132377
|
+
},
|
|
132378
|
+
{
|
|
132379
|
+
type: "TileMatrixType",
|
|
132380
|
+
identifier: "13",
|
|
132381
|
+
scaleDenominator: 266.591197981222,
|
|
132382
|
+
topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
|
|
132383
|
+
tileWidth: 256,
|
|
132384
|
+
tileHeight: 256,
|
|
132385
|
+
matrixWidth: 8192,
|
|
132386
|
+
matrixHeight: 8192
|
|
132387
|
+
},
|
|
132388
|
+
{
|
|
132389
|
+
type: "TileMatrixType",
|
|
132390
|
+
identifier: "14",
|
|
132391
|
+
scaleDenominator: 133.295598990611,
|
|
132392
|
+
topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
|
|
132393
|
+
tileWidth: 256,
|
|
132394
|
+
tileHeight: 256,
|
|
132395
|
+
matrixWidth: 16384,
|
|
132396
|
+
matrixHeight: 16384
|
|
132397
|
+
},
|
|
132398
|
+
{
|
|
132399
|
+
type: "TileMatrixType",
|
|
132400
|
+
identifier: "15",
|
|
132401
|
+
scaleDenominator: 66.6477994953056,
|
|
132402
|
+
topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
|
|
132403
|
+
tileWidth: 256,
|
|
132404
|
+
tileHeight: 256,
|
|
132405
|
+
matrixWidth: 32768,
|
|
132406
|
+
matrixHeight: 32768
|
|
132407
|
+
},
|
|
132408
|
+
{
|
|
132409
|
+
type: "TileMatrixType",
|
|
132410
|
+
identifier: "16",
|
|
132411
|
+
scaleDenominator: 33.3238997476528,
|
|
132412
|
+
topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
|
|
132413
|
+
tileWidth: 256,
|
|
132414
|
+
tileHeight: 256,
|
|
132415
|
+
matrixWidth: 65536,
|
|
132416
|
+
matrixHeight: 65536
|
|
132417
|
+
}
|
|
132418
|
+
],
|
|
132419
|
+
$generated: {
|
|
132420
|
+
package: "@basemaps/cli",
|
|
132421
|
+
version: "v7.14.0-4-g2766010d",
|
|
132422
|
+
hash: "2766010d8d2bb8b673f6bcbef2fe2636f2e0f4ea",
|
|
132423
|
+
createdAt: "2025-02-10T20:34:46.643Z"
|
|
132424
|
+
},
|
|
132425
|
+
$options: {
|
|
132426
|
+
sourceTileMatrix: "WebMercatorQuad",
|
|
132427
|
+
zoomOffset: 8
|
|
132428
|
+
}
|
|
132429
|
+
};
|
|
132430
|
+
var Citm2000Tms = new TileMatrixSet(Citm2000Tmst);
|
|
132431
|
+
|
|
132232
132432
|
// ../geo/build/tms/google.js
|
|
132233
132433
|
var GoogleTmst = {
|
|
132234
132434
|
type: "TileMatrixSetType",
|
|
@@ -132505,11 +132705,12 @@ var Nztm2000QuadTms = new TileMatrixSet(Nztm20002.Nztm2000Quad);
|
|
|
132505
132705
|
// ../geo/build/tms/index.js
|
|
132506
132706
|
var TileMatrixSets = {
|
|
132507
132707
|
/** All TileMatrixSets that are currently supported */
|
|
132508
|
-
All: [GoogleTms, Nztm2000Tms, Nztm2000QuadTms],
|
|
132708
|
+
All: [GoogleTms, Nztm2000Tms, Nztm2000QuadTms, Citm2000Tms],
|
|
132509
132709
|
/** Default mapping of EPSG code to Tile matrix set */
|
|
132510
132710
|
Defaults: /* @__PURE__ */ new Map([
|
|
132511
132711
|
[Epsg.Google.code, GoogleTms],
|
|
132512
|
-
[Epsg.Nztm2000.code, Nztm2000Tms]
|
|
132712
|
+
[Epsg.Nztm2000.code, Nztm2000Tms],
|
|
132713
|
+
[Epsg.Citm2000.code, Citm2000Tms]
|
|
132513
132714
|
]),
|
|
132514
132715
|
/**
|
|
132515
132716
|
* Get a tile matrix set by EPSG Code
|
|
@@ -135101,10 +135302,11 @@ var ulid3 = __toESM(require_index_umd(), 1);
|
|
|
135101
135302
|
var CliInfo = {
|
|
135102
135303
|
// Detect unlinked packages looks for this string since its a package name, slightly work around it
|
|
135103
135304
|
package: "@basemaps/cli",
|
|
135104
|
-
version: "v7.
|
|
135105
|
-
hash: "
|
|
135106
|
-
buildId: "
|
|
135305
|
+
version: "v7.15.1-10-g25fa7659",
|
|
135306
|
+
hash: "25fa7659b84a40205ceacda8b2ca5f48e1dc6f7b",
|
|
135307
|
+
buildId: "14319632927-1"
|
|
135107
135308
|
};
|
|
135309
|
+
var CliDate = (/* @__PURE__ */ new Date()).toISOString();
|
|
135108
135310
|
var CliId = ulid3.ulid();
|
|
135109
135311
|
|
|
135110
135312
|
// src/cli.ts
|
|
@@ -135811,9 +136013,9 @@ var Router = class {
|
|
|
135811
136013
|
};
|
|
135812
136014
|
|
|
135813
136015
|
// ../../node_modules/@linzjs/lambda/build/src/function.js
|
|
135814
|
-
var version2 = "v7.
|
|
135815
|
-
var hash = "
|
|
135816
|
-
var buildId = "
|
|
136016
|
+
var version2 = "v7.15.1-10-g25fa7659";
|
|
136017
|
+
var hash = "25fa7659b84a40205ceacda8b2ca5f48e1dc6f7b";
|
|
136018
|
+
var buildId = "14319632927-1";
|
|
135817
136019
|
var versionInfo = { version: version2, hash, buildId };
|
|
135818
136020
|
async function runFunction(req, fn) {
|
|
135819
136021
|
if (!req.timer.timers.has("lambda"))
|
|
@@ -136148,14 +136350,20 @@ var SafeBuckets = /* @__PURE__ */ new Set([
|
|
|
136148
136350
|
var SafeProtocols = /* @__PURE__ */ new Set([new URL("s3://foo").protocol, new URL("memory://foo.json").protocol]);
|
|
136149
136351
|
var ConfigLoader = class {
|
|
136150
136352
|
/** Exposed for testing */
|
|
136151
|
-
static async getDefaultConfig() {
|
|
136353
|
+
static async getDefaultConfig(req) {
|
|
136152
136354
|
const config = getDefaultConfig();
|
|
136153
|
-
|
|
136154
|
-
|
|
136155
|
-
|
|
136156
|
-
|
|
136157
|
-
|
|
136158
|
-
|
|
136355
|
+
const cb = await config.ConfigBundle.get("cb_latest");
|
|
136356
|
+
if (cb == null)
|
|
136357
|
+
return config;
|
|
136358
|
+
req?.timer.start("config:load");
|
|
136359
|
+
return CachedConfig.get(Fsa.toUrl(cb.path)).then((cfg) => {
|
|
136360
|
+
req?.timer.end("config:load");
|
|
136361
|
+
if (cfg == null)
|
|
136362
|
+
throw new LambdaHttpResponse(500, "Unable to find latest configuration");
|
|
136363
|
+
if (cfg.assets == null)
|
|
136364
|
+
cfg.assets = cb.assets;
|
|
136365
|
+
return cfg;
|
|
136366
|
+
});
|
|
136159
136367
|
}
|
|
136160
136368
|
/** Lookup the config path from a request and return a standardized location */
|
|
136161
136369
|
static extract(req) {
|
|
@@ -136470,6 +136678,8 @@ var Validate = {
|
|
|
136470
136678
|
* Defaults to standard image format output if no outputs are defined on the tileset
|
|
136471
136679
|
*/
|
|
136472
136680
|
pipeline(tileSet, tileType, pipeline2) {
|
|
136681
|
+
if (tileSet.outputs?.length === 1 && pipeline2 == null)
|
|
136682
|
+
pipeline2 = tileSet.outputs[0].name;
|
|
136473
136683
|
if (pipeline2 != null && pipeline2 !== "rgba") {
|
|
136474
136684
|
if (tileSet.outputs == null)
|
|
136475
136685
|
throw new LambdaHttpResponse(404, "TileSet has no pipelines");
|
|
@@ -138221,7 +138431,7 @@ function cropResize(tiff, data, comp, mode) {
|
|
|
138221
138431
|
const cropVal = comp.crop;
|
|
138222
138432
|
if (cropVal == null)
|
|
138223
138433
|
return data;
|
|
138224
|
-
return applyCrop(
|
|
138434
|
+
return applyCrop(data, cropVal);
|
|
138225
138435
|
}
|
|
138226
138436
|
if (data.channels !== 1)
|
|
138227
138437
|
throw new Error("Unable to crop-resize more than one channel got:" + data.channels);
|
|
@@ -138257,14 +138467,14 @@ function cropResize(tiff, data, comp, mode) {
|
|
|
138257
138467
|
throw new Error("Unable to use resize kernel: " + mode);
|
|
138258
138468
|
}
|
|
138259
138469
|
}
|
|
138260
|
-
function applyCrop(
|
|
138261
|
-
const output =
|
|
138470
|
+
function applyCrop(data, crop) {
|
|
138471
|
+
const output = getOutputBuffer(data, { width: crop.width, height: crop.height });
|
|
138262
138472
|
for (let y = 0; y < crop.height; y++) {
|
|
138263
138473
|
const source = ((y + crop.y) * data.width + crop.x) * data.channels;
|
|
138264
138474
|
const length = crop.width * data.channels;
|
|
138265
|
-
output.set(data.pixels.subarray(source, source + length), y * crop.width);
|
|
138475
|
+
output.pixels.set(data.pixels.subarray(source, source + length), y * crop.width);
|
|
138266
138476
|
}
|
|
138267
|
-
return
|
|
138477
|
+
return output;
|
|
138268
138478
|
}
|
|
138269
138479
|
function resizeNearest(data, comp, source, target) {
|
|
138270
138480
|
const maxWidth = Math.min(comp.source.width, data.width) - 1;
|
|
@@ -138362,9 +138572,21 @@ function resizeBilinear(data, comp, source, target, noData) {
|
|
|
138362
138572
|
return ret;
|
|
138363
138573
|
}
|
|
138364
138574
|
|
|
138365
|
-
// ../tiler-sharp/build/pipeline/
|
|
138575
|
+
// ../tiler-sharp/build/pipeline/colorize/color.ramp.js
|
|
138366
138576
|
var ColorRamp = class {
|
|
138367
138577
|
constructor(ramp) {
|
|
138578
|
+
Object.defineProperty(this, "min", {
|
|
138579
|
+
enumerable: true,
|
|
138580
|
+
configurable: true,
|
|
138581
|
+
writable: true,
|
|
138582
|
+
value: void 0
|
|
138583
|
+
});
|
|
138584
|
+
Object.defineProperty(this, "max", {
|
|
138585
|
+
enumerable: true,
|
|
138586
|
+
configurable: true,
|
|
138587
|
+
writable: true,
|
|
138588
|
+
value: void 0
|
|
138589
|
+
});
|
|
138368
138590
|
Object.defineProperty(this, "ramps", {
|
|
138369
138591
|
enumerable: true,
|
|
138370
138592
|
configurable: true,
|
|
@@ -138377,38 +138599,89 @@ var ColorRamp = class {
|
|
|
138377
138599
|
const numbers = parts.map(Number);
|
|
138378
138600
|
this.ramps.push({ v: numbers[0], color: numbers.slice(1) });
|
|
138379
138601
|
}
|
|
138602
|
+
this.min = this.ramps[0].v;
|
|
138603
|
+
this.max = this.ramps[this.ramps.length - 1].v;
|
|
138380
138604
|
}
|
|
138381
|
-
|
|
138382
|
-
|
|
138383
|
-
|
|
138384
|
-
|
|
138605
|
+
set(val2, data, targetOffset) {
|
|
138606
|
+
if (val2 <= this.min) {
|
|
138607
|
+
const color = this.ramps[0].color;
|
|
138608
|
+
data[targetOffset] = color[0];
|
|
138609
|
+
data[targetOffset + 1] = color[1];
|
|
138610
|
+
data[targetOffset + 2] = color[2];
|
|
138611
|
+
data[targetOffset + 3] = color[3];
|
|
138612
|
+
return;
|
|
138613
|
+
} else if (val2 >= this.max) {
|
|
138614
|
+
const color = this.ramps[this.ramps.length - 1].color;
|
|
138615
|
+
data[targetOffset] = color[0];
|
|
138616
|
+
data[targetOffset + 1] = color[1];
|
|
138617
|
+
data[targetOffset + 2] = color[2];
|
|
138618
|
+
data[targetOffset + 3] = color[3];
|
|
138619
|
+
return;
|
|
138620
|
+
}
|
|
138385
138621
|
for (let i = 0; i < this.ramps.length - 1; i++) {
|
|
138386
138622
|
const ramp = this.ramps[i];
|
|
138387
|
-
if (
|
|
138623
|
+
if (val2 < ramp.v)
|
|
138388
138624
|
continue;
|
|
138389
|
-
if (ramp.v ===
|
|
138390
|
-
|
|
138625
|
+
if (ramp.v === val2) {
|
|
138626
|
+
const color = ramp.color;
|
|
138627
|
+
data[targetOffset] = color[0];
|
|
138628
|
+
data[targetOffset + 1] = color[1];
|
|
138629
|
+
data[targetOffset + 2] = color[2];
|
|
138630
|
+
data[targetOffset + 3] = color[3];
|
|
138631
|
+
return;
|
|
138632
|
+
}
|
|
138391
138633
|
const rampNext = this.ramps[i + 1];
|
|
138392
|
-
if (
|
|
138634
|
+
if (val2 >= rampNext.v)
|
|
138393
138635
|
continue;
|
|
138394
138636
|
const range = rampNext.v - ramp.v;
|
|
138395
|
-
const offset =
|
|
138637
|
+
const offset = val2 - ramp.v;
|
|
138396
138638
|
const scale = offset / range;
|
|
138397
138639
|
const r = Math.round((rampNext.color[0] - ramp.color[0]) * scale + ramp.color[0]);
|
|
138398
138640
|
const g = Math.round((rampNext.color[1] - ramp.color[1]) * scale + ramp.color[1]);
|
|
138399
138641
|
const b = Math.round((rampNext.color[2] - ramp.color[2]) * scale + ramp.color[2]);
|
|
138400
138642
|
const a = Math.round((rampNext.color[3] - ramp.color[3]) * scale + ramp.color[3]);
|
|
138401
|
-
|
|
138643
|
+
data[targetOffset] = r;
|
|
138644
|
+
data[targetOffset + 1] = g;
|
|
138645
|
+
data[targetOffset + 2] = b;
|
|
138646
|
+
data[targetOffset + 3] = a;
|
|
138647
|
+
return;
|
|
138402
138648
|
}
|
|
138403
|
-
|
|
138649
|
+
throw new Error("Ramp value assertion failure");
|
|
138404
138650
|
}
|
|
138405
138651
|
};
|
|
138652
|
+
|
|
138653
|
+
// ../tiler-sharp/build/pipeline/colorize/grey.scale.js
|
|
138654
|
+
var GreyScale = class {
|
|
138655
|
+
constructor(minVal, maxVal) {
|
|
138656
|
+
Object.defineProperty(this, "min", {
|
|
138657
|
+
enumerable: true,
|
|
138658
|
+
configurable: true,
|
|
138659
|
+
writable: true,
|
|
138660
|
+
value: void 0
|
|
138661
|
+
});
|
|
138662
|
+
Object.defineProperty(this, "max", {
|
|
138663
|
+
enumerable: true,
|
|
138664
|
+
configurable: true,
|
|
138665
|
+
writable: true,
|
|
138666
|
+
value: void 0
|
|
138667
|
+
});
|
|
138668
|
+
this.min = minVal;
|
|
138669
|
+
this.max = maxVal;
|
|
138670
|
+
}
|
|
138671
|
+
set(val2, data, targetOffset) {
|
|
138672
|
+
const scaledValue = (val2 - this.min) * 255 / (this.max - this.min);
|
|
138673
|
+
data[targetOffset] = scaledValue;
|
|
138674
|
+
data[targetOffset + 1] = scaledValue;
|
|
138675
|
+
data[targetOffset + 2] = scaledValue;
|
|
138676
|
+
data[targetOffset + 3] = 255;
|
|
138677
|
+
}
|
|
138678
|
+
};
|
|
138679
|
+
|
|
138680
|
+
// ../tiler-sharp/build/pipeline/pipeline.color.ramp.js
|
|
138406
138681
|
var Ramps = {
|
|
138407
138682
|
float32: new ColorRamp(DefaultColorRamp),
|
|
138408
|
-
uint8: new
|
|
138409
|
-
|
|
138410
|
-
uint32: new ColorRamp(`0 0 0 0 255
|
|
138411
|
-
${2 ** 32 - 1} 255 255 255 255`)
|
|
138683
|
+
uint8: new GreyScale(0, 255),
|
|
138684
|
+
uint32: new GreyScale(0, 2 ** 32 - 1)
|
|
138412
138685
|
};
|
|
138413
138686
|
var PipelineColorRamp = {
|
|
138414
138687
|
type: "color-ramp",
|
|
@@ -138430,11 +138703,7 @@ var PipelineColorRamp = {
|
|
|
138430
138703
|
if (noData != null && px === noData)
|
|
138431
138704
|
continue;
|
|
138432
138705
|
const target = i * 4;
|
|
138433
|
-
|
|
138434
|
-
raw[target + 0] = color[0];
|
|
138435
|
-
raw[target + 1] = color[1];
|
|
138436
|
-
raw[target + 2] = color[2];
|
|
138437
|
-
raw[target + 3] = color[3];
|
|
138706
|
+
ramp.set(px, raw, target);
|
|
138438
138707
|
}
|
|
138439
138708
|
return output;
|
|
138440
138709
|
}
|
|
@@ -140157,17 +140426,17 @@ function versionGet() {
|
|
|
140157
140426
|
* last git version tag
|
|
140158
140427
|
* @example "v6.42.1"
|
|
140159
140428
|
*/
|
|
140160
|
-
version: "v7.
|
|
140429
|
+
version: "v7.15.1-10-g25fa7659",
|
|
140161
140430
|
/**
|
|
140162
140431
|
* Full git commit hash
|
|
140163
140432
|
* @example "e4231b1ee62c276c8657c56677ced02681dfe5d6"
|
|
140164
140433
|
*/
|
|
140165
|
-
hash: "
|
|
140434
|
+
hash: "25fa7659b84a40205ceacda8b2ca5f48e1dc6f7b",
|
|
140166
140435
|
/**
|
|
140167
140436
|
* The exact build that this release was run from
|
|
140168
140437
|
* @example "1658821493-3"
|
|
140169
140438
|
*/
|
|
140170
|
-
buildId: "
|
|
140439
|
+
buildId: "14319632927-1"
|
|
140171
140440
|
});
|
|
140172
140441
|
return Promise.resolve(response);
|
|
140173
140442
|
}
|
|
@@ -140538,7 +140807,8 @@ var IgnoredTitles = /* @__PURE__ */ new Set([
|
|
|
140538
140807
|
"flat",
|
|
140539
140808
|
// Projections
|
|
140540
140809
|
"2193",
|
|
140541
|
-
"3857"
|
|
140810
|
+
"3857",
|
|
140811
|
+
"3793"
|
|
140542
140812
|
]);
|
|
140543
140813
|
function getImageryName(target) {
|
|
140544
140814
|
const parts = target.pathname.split("/");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@basemaps/server",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.16.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.
|
|
57
|
-
"@basemaps/geo": "^7.
|
|
58
|
-
"@basemaps/lambda-tiler": "^7.
|
|
55
|
+
"@basemaps/config": "^7.16.0",
|
|
56
|
+
"@basemaps/config-loader": "^7.16.0",
|
|
57
|
+
"@basemaps/geo": "^7.16.0",
|
|
58
|
+
"@basemaps/lambda-tiler": "^7.16.0",
|
|
59
59
|
"@basemaps/landing": "^6.39.0",
|
|
60
|
-
"@basemaps/shared": "^7.
|
|
60
|
+
"@basemaps/shared": "^7.16.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": "25fa7659b84a40205ceacda8b2ca5f48e1dc6f7b"
|
|
68
68
|
}
|