@basemaps/lambda-tiler 6.46.0 → 7.0.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/CHANGELOG.md +13 -0
- package/README.md +93 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +3 -11
- package/build/index.js.map +1 -1
- package/build/util/config.loader.d.ts.map +1 -1
- package/build/util/config.loader.js +7 -1
- package/build/util/config.loader.js.map +1 -1
- package/package.json +11 -11
- package/src/index.ts +3 -12
- package/src/util/config.loader.ts +7 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/typedoc.json +4 -0
- package/build/arcgis/__tests__/arcgis.style.json.test.d.ts +0 -2
- package/build/arcgis/__tests__/arcgis.style.json.test.d.ts.map +0 -1
- package/build/arcgis/__tests__/arcgis.style.json.test.js +0 -131
- package/build/arcgis/__tests__/arcgis.style.json.test.js.map +0 -1
- package/build/arcgis/__tests__/vector.tiler.server.test.d.ts +0 -2
- package/build/arcgis/__tests__/vector.tiler.server.test.d.ts.map +0 -1
- package/build/arcgis/__tests__/vector.tiler.server.test.js +0 -54
- package/build/arcgis/__tests__/vector.tiler.server.test.js.map +0 -1
- package/build/arcgis/arcgis.info.d.ts +0 -3
- package/build/arcgis/arcgis.info.d.ts.map +0 -1
- package/build/arcgis/arcgis.info.js +0 -25
- package/build/arcgis/arcgis.info.js.map +0 -1
- package/build/arcgis/arcgis.style.json.d.ts +0 -9
- package/build/arcgis/arcgis.style.json.d.ts.map +0 -1
- package/build/arcgis/arcgis.style.json.js +0 -75
- package/build/arcgis/arcgis.style.json.js.map +0 -1
- package/build/arcgis/vector.tile.server.d.ts +0 -8
- package/build/arcgis/vector.tile.server.d.ts.map +0 -1
- package/build/arcgis/vector.tile.server.js +0 -73
- package/build/arcgis/vector.tile.server.js.map +0 -1
- package/src/arcgis/__tests__/arcgis.style.json.test.ts +0 -157
- package/src/arcgis/__tests__/vector.tiler.server.test.ts +0 -70
- package/src/arcgis/arcgis.info.ts +0 -26
- package/src/arcgis/arcgis.style.json.ts +0 -83
- package/src/arcgis/vector.tile.server.ts +0 -81
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,19 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [7.0.0](https://github.com/linz/basemaps/compare/v6.46.0...v7.0.0) (2023-11-27)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* Add proof of concept docs site BM-917 ([#2990](https://github.com/linz/basemaps/issues/2990)) ([cabccc7](https://github.com/linz/basemaps/commit/cabccc730de0c0016e9d102dc8df6acbf1510e00))
|
|
12
|
+
* allow reads from linz "-scratch" buckets TDE-906 ([#2982](https://github.com/linz/basemaps/issues/2982)) ([615334f](https://github.com/linz/basemaps/commit/615334f0f26bcda4f7155e4b3b83bc39f39701af))
|
|
13
|
+
* **doc:** Improve the individual package documentations. BM-776 ([#2981](https://github.com/linz/basemaps/issues/2981)) ([5a4adcb](https://github.com/linz/basemaps/commit/5a4adcbbff15857a6f4c315d54280d542f785fec))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
6
19
|
# [6.46.0](https://github.com/linz/basemaps/compare/v6.45.0...v6.46.0) (2023-10-10)
|
|
7
20
|
|
|
8
21
|
|
package/README.md
CHANGED
|
@@ -1,3 +1,95 @@
|
|
|
1
1
|
# @basemaps/lambda-tiler
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Lambda server for xyz map generation to provide apis for serving both raster and vector map.
|
|
4
|
+
|
|
5
|
+
## APIs
|
|
6
|
+
|
|
7
|
+
All available APIs are defined in the [index.ts](./src/index.ts)
|
|
8
|
+
|
|
9
|
+
`Host: https://basemaps.linz.govt.nz/`
|
|
10
|
+
|
|
11
|
+
### Server APIs
|
|
12
|
+
|
|
13
|
+
Validate the server status, health, version which is using for the ci/cd.
|
|
14
|
+
|
|
15
|
+
- GET [/ping](./src/routes/ping.ts)
|
|
16
|
+
- GET [/v1/ping](./src/routes/ping.ts)
|
|
17
|
+
- GET [/version](./src/routes/version.ts)
|
|
18
|
+
- GET [/v1/version](./src/routes/version.ts)
|
|
19
|
+
- GET [/health](./src/routes/health.ts)
|
|
20
|
+
- GET [/v1/health](./src/routes/health.ts)
|
|
21
|
+
|
|
22
|
+
### xyz tile generation API
|
|
23
|
+
|
|
24
|
+
Get a tile from the xyz and format for map generation, support both vector and raster tileSet.
|
|
25
|
+
|
|
26
|
+
- GET [/v1/tiles/:tileSet/:tileMatrix/:z/:x/:y.:tileType](./src/routes/tile.xyz.ts)
|
|
27
|
+
|
|
28
|
+
Example:
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
/v1/tiles/topographic/WebMercatorQuad/2/1/1.pbf - Vector Tile
|
|
32
|
+
/v1/tiles/aerial/WebMercatorQuad/6/0/38.webp - Raster Tile
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Imagery Metadata API
|
|
36
|
+
|
|
37
|
+
Fetch the imagery metadata based on the imageryId
|
|
38
|
+
|
|
39
|
+
- GET [/v1/imagery/:imageryId/:fileName](./src/routes/imagery.ts)
|
|
40
|
+
|
|
41
|
+
Examples:
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
/v1/imagery/:imageryId/source.geojson - Source boudning boxes
|
|
45
|
+
/v1/imagery/:imageryId/covering.geojson - Output tile bounding boxes
|
|
46
|
+
/v1/imagery/:imageryId/cutline.geojson - Cutline used ont he imagery set
|
|
47
|
+
/v1/imagery/:imageryId/collection.json - STAC Collection
|
|
48
|
+
/v1/imagery/:imageryId/15-32659-21603.json - STAC Item
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Config APIs
|
|
52
|
+
|
|
53
|
+
Fetch the imagery and tile set configurations
|
|
54
|
+
|
|
55
|
+
- GET [/v1/config/:tileSet.json](./src/routes/config.ts)
|
|
56
|
+
- GET [/v1/config/:tileSet/:imageryId.json](./src/routes/config.ts)
|
|
57
|
+
|
|
58
|
+
### Sprite and Fonts APIs
|
|
59
|
+
|
|
60
|
+
To get the fonts and sprites for the vector map.
|
|
61
|
+
|
|
62
|
+
- GET [/v1/sprites/:spriteName](./src/routes/sprites.ts)
|
|
63
|
+
- GET [/v1/fonts.json](./src/routes/fonts.ts)
|
|
64
|
+
- GET [/v1/fonts/:fontStack/:range.pbf](./src/routes/fonts.ts)
|
|
65
|
+
|
|
66
|
+
### StyleJSON and TileJSON APIs
|
|
67
|
+
|
|
68
|
+
Get the style json and tile json for the vector map.
|
|
69
|
+
|
|
70
|
+
- GET [/v1/styles/:styleName.json](./src/routes/tile.style.json.ts)
|
|
71
|
+
- GET [/v1/tiles/:tileSet/:tileMatrix/tile.json](./src/routes/tile.json.ts)
|
|
72
|
+
|
|
73
|
+
### Preview APIs
|
|
74
|
+
|
|
75
|
+
Serve a preview of a imagery set
|
|
76
|
+
|
|
77
|
+
- GET [/v1/preview/:tileSet/:tileMatrix/:z/:lon/:lat](./src/routes/preview.ts)
|
|
78
|
+
- GET [/v1/@:location](./src/routes/preview.index.ts)
|
|
79
|
+
- GET [/@:location](./src/routes/preview.index.ts)
|
|
80
|
+
|
|
81
|
+
### Attribution APIs
|
|
82
|
+
|
|
83
|
+
Get attribution json for the map attributions.
|
|
84
|
+
|
|
85
|
+
- GET [/v1/tiles/:tileSet/:tileMatrix/attribution.json](./src/routes/attribution.ts)
|
|
86
|
+
- GET [/v1/attribution/:tileSet/:tileMatrix/summary.json](./src/routes/attribution.ts)
|
|
87
|
+
|
|
88
|
+
### WMTS Capabilities APIs
|
|
89
|
+
|
|
90
|
+
Get WMTS xml from the server to support QGIS and Arcgis
|
|
91
|
+
|
|
92
|
+
- GET [/v1/tiles/:tileSet/:tileMatrix/WMTSCapabilities.xml](./src/routes/tile.wmts.ts)
|
|
93
|
+
- GET [/v1/tiles/:tileSet/WMTSCapabilities.xml](./src/routes/tile.wmts.ts)
|
|
94
|
+
- GET [/v1/tiles/WMTSCapabilities.xml](./src/routes/tile.wmts.ts)
|
|
95
|
+
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAoBA,eAAO,MAAM,OAAO,uRAA2B,CAAC"}
|
package/build/index.js
CHANGED
|
@@ -1,25 +1,22 @@
|
|
|
1
1
|
import { LogConfig } from '@basemaps/shared';
|
|
2
2
|
import { LambdaHttpResponse, lf } from '@linzjs/lambda';
|
|
3
|
-
import { arcgisInfoGet } from './arcgis/arcgis.info.js';
|
|
4
|
-
import { arcgisStyleJsonGet } from './arcgis/arcgis.style.json.js';
|
|
5
|
-
import { arcgisTileServerGet } from './arcgis/vector.tile.server.js';
|
|
6
3
|
import { tileAttributionGet } from './routes/attribution.js';
|
|
7
4
|
import { configImageryGet, configTileSetGet } from './routes/config.js';
|
|
8
5
|
import { fontGet, fontList } from './routes/fonts.js';
|
|
9
6
|
import { healthGet } from './routes/health.js';
|
|
10
7
|
import { imageryGet } from './routes/imagery.js';
|
|
11
8
|
import { pingGet } from './routes/ping.js';
|
|
9
|
+
import { previewIndexGet } from './routes/preview.index.js';
|
|
10
|
+
import { tilePreviewGet } from './routes/preview.js';
|
|
12
11
|
import { spriteGet } from './routes/sprites.js';
|
|
13
12
|
import { tileJsonGet } from './routes/tile.json.js';
|
|
14
13
|
import { styleJsonGet } from './routes/tile.style.json.js';
|
|
15
14
|
import { wmtsCapabilitiesGet } from './routes/tile.wmts.js';
|
|
16
15
|
import { tileXyzGet } from './routes/tile.xyz.js';
|
|
17
16
|
import { versionGet } from './routes/version.js';
|
|
18
|
-
import { NotFound
|
|
17
|
+
import { NotFound } from './util/response.js';
|
|
19
18
|
import { CoSources } from './util/source.cache.js';
|
|
20
19
|
import { St } from './util/source.tracer.js';
|
|
21
|
-
import { tilePreviewGet } from './routes/preview.js';
|
|
22
|
-
import { previewIndexGet } from './routes/preview.index.js';
|
|
23
20
|
export const handler = lf.http(LogConfig.get());
|
|
24
21
|
/** If the request takes too long, respond with a 408 timeout when there is approx 1 second remaining */
|
|
25
22
|
handler.router.timeoutEarlyMs = 1000;
|
|
@@ -90,9 +87,4 @@ handler.router.get('/v1/attribution/:tileSet/:tileMatrix/summary.json', tileAttr
|
|
|
90
87
|
handler.router.get('/v1/tiles/:tileSet/:tileMatrix/WMTSCapabilities.xml', wmtsCapabilitiesGet);
|
|
91
88
|
handler.router.get('/v1/tiles/:tileSet/WMTSCapabilities.xml', wmtsCapabilitiesGet);
|
|
92
89
|
handler.router.get('/v1/tiles/WMTSCapabilities.xml', wmtsCapabilitiesGet);
|
|
93
|
-
// Arcgis Vector
|
|
94
|
-
handler.router.get('/v1/arcgis/rest/services/:tileSet/VectorTileServer', arcgisTileServerGet);
|
|
95
|
-
handler.router.post('/v1/arcgis/rest/services/:tileSet/VectorTileServer', OkResponse);
|
|
96
|
-
handler.router.get('/v1/arcgis/rest/services/:tileSet/VectorTileServer/root.json', arcgisStyleJsonGet);
|
|
97
|
-
handler.router.get('/v1/arcgis/rest/info', arcgisInfoGet);
|
|
98
90
|
//# sourceMappingURL=index.js.map
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE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AAsD,EAAE,YAAY,CAAC,CAAC;AAEzF,WAAW;AACX,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,0CAA0C,EAAE,WAAW,CAAC,CAAC;AAE5E,QAAQ;AACR,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,mDAAmD,EAAE,UAAU,CAAC,CAAC;AAEpF,UAAU;AACV,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,+CAA+C,EAAE,cAAc,CAAC,CAAC;AACpF,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,gBAAgB,EAAE,eAAe,CAAC,CAAC;AACtD,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,aAAa,EAAE,eAAe,CAAC,CAAC;AAEnD,cAAc;AACd,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,iDAAiD,EAAE,kBAAkB,CAAC,CAAC;AAC1F,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,mDAAmD,EAAE,kBAAkB,CAAC,CAAC;AAE5F,oBAAoB;AACpB,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,qDAAqD,EAAE,mBAAmB,CAAC,CAAC;AAC/F,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,yCAAyC,EAAE,mBAAmB,CAAC,CAAC;AACnF,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,gCAAgC,EAAE,mBAAmB,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.loader.d.ts","sourceRoot":"","sources":["../../src/util/config.loader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,sBAAsB,EAAY,MAAM,kBAAkB,CAAC;AAG5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"config.loader.d.ts","sourceRoot":"","sources":["../../src/util/config.loader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,sBAAsB,EAAY,MAAM,kBAAkB,CAAC;AAG5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAcnD,qBAAa,YAAY;IACvB,0BAA0B;WACb,gBAAgB,IAAI,OAAO,CAAC,sBAAsB,CAAC;IAShE,+EAA+E;IAC/E,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,iBAAiB,GAAG,MAAM,GAAG,IAAI;WAOxC,IAAI,CAAC,GAAG,EAAE,iBAAiB,GAAG,OAAO,CAAC,sBAAsB,CAAC;CAwB3E"}
|
|
@@ -4,7 +4,13 @@ import { parseUri } from '@chunkd/core';
|
|
|
4
4
|
import { CachedConfig } from './config.cache.js';
|
|
5
5
|
import { getDefaultConfig } from '@basemaps/shared';
|
|
6
6
|
// FIXME load this from process.env COG BUCKETS?
|
|
7
|
-
const SafeBuckets = new Set([
|
|
7
|
+
const SafeBuckets = new Set([
|
|
8
|
+
'linz-workflows-scratch',
|
|
9
|
+
'linz-workflow-artifacts',
|
|
10
|
+
'linz-basemaps',
|
|
11
|
+
'linz-basemaps-staging',
|
|
12
|
+
'linz-basemaps-scratch',
|
|
13
|
+
]);
|
|
8
14
|
const SafeProtocols = new Set(['s3', 'memory']);
|
|
9
15
|
export class ConfigLoader {
|
|
10
16
|
/** Exposed for testing */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.loader.js","sourceRoot":"","sources":["../../src/util/config.loader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAA0B,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD,gDAAgD;AAChD,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"config.loader.js","sourceRoot":"","sources":["../../src/util/config.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AC,IAAI,IAAI;gBAAE,MAAM,IAAI,kBAAkB,CAAC,GAAG,EAAE,8BAA8B,cAAc,EAAE,CAAC,CAAC;YACjG,OAAO,CAAC,CAAC;QACX,CAAC,CAAC,CAAC;IACL,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@basemaps/lambda-tiler",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/linz/basemaps.git",
|
|
@@ -22,20 +22,20 @@
|
|
|
22
22
|
"types": "./build/index.d.ts",
|
|
23
23
|
"license": "MIT",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@basemaps/config": "^
|
|
26
|
-
"@basemaps/geo": "^
|
|
27
|
-
"@basemaps/shared": "^
|
|
28
|
-
"@basemaps/tiler": "^
|
|
29
|
-
"@basemaps/tiler-sharp": "^
|
|
25
|
+
"@basemaps/config": "^7.0.0",
|
|
26
|
+
"@basemaps/geo": "^7.0.0",
|
|
27
|
+
"@basemaps/shared": "^7.0.0",
|
|
28
|
+
"@basemaps/tiler": "^7.0.0",
|
|
29
|
+
"@basemaps/tiler-sharp": "^7.0.0",
|
|
30
30
|
"@chunkd/fs": "^10.0.2",
|
|
31
31
|
"@cogeotiff/core": "^7.2.0",
|
|
32
32
|
"@cotar/core": "^5.4.0",
|
|
33
|
-
"@linzjs/geojson": "^
|
|
33
|
+
"@linzjs/geojson": "^7.0.0",
|
|
34
34
|
"@linzjs/lambda": "^4.0.0",
|
|
35
35
|
"p-limit": "^4.0.0",
|
|
36
36
|
"path-to-regexp": "^6.1.0",
|
|
37
37
|
"pixelmatch": "^5.1.0",
|
|
38
|
-
"sharp": "^0.
|
|
38
|
+
"sharp": "^0.32.6"
|
|
39
39
|
},
|
|
40
40
|
"bundle": {
|
|
41
41
|
"entry": "src/index.ts",
|
|
@@ -50,12 +50,12 @@
|
|
|
50
50
|
"bundle": "./bundle.sh"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@basemaps/attribution": "^
|
|
53
|
+
"@basemaps/attribution": "^7.0.0",
|
|
54
54
|
"@chunkd/source-memory": "^10.0.0",
|
|
55
55
|
"@types/aws-lambda": "^8.10.75",
|
|
56
56
|
"@types/pixelmatch": "^5.0.0",
|
|
57
|
-
"@types/sharp": "^0.
|
|
57
|
+
"@types/sharp": "^0.32.0",
|
|
58
58
|
"pretty-json-log": "^1.0.0"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "82d9e6d431240133f4e4d783dd0b4138c2d1f66a"
|
|
61
61
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,25 +1,22 @@
|
|
|
1
1
|
import { LogConfig } from '@basemaps/shared';
|
|
2
2
|
import { LambdaHttpResponse, lf } from '@linzjs/lambda';
|
|
3
|
-
import { arcgisInfoGet } from './arcgis/arcgis.info.js';
|
|
4
|
-
import { arcgisStyleJsonGet } from './arcgis/arcgis.style.json.js';
|
|
5
|
-
import { arcgisTileServerGet } from './arcgis/vector.tile.server.js';
|
|
6
3
|
import { tileAttributionGet } from './routes/attribution.js';
|
|
7
4
|
import { configImageryGet, configTileSetGet } from './routes/config.js';
|
|
8
5
|
import { fontGet, fontList } from './routes/fonts.js';
|
|
9
6
|
import { healthGet } from './routes/health.js';
|
|
10
7
|
import { imageryGet } from './routes/imagery.js';
|
|
11
8
|
import { pingGet } from './routes/ping.js';
|
|
9
|
+
import { previewIndexGet } from './routes/preview.index.js';
|
|
10
|
+
import { tilePreviewGet } from './routes/preview.js';
|
|
12
11
|
import { spriteGet } from './routes/sprites.js';
|
|
13
12
|
import { tileJsonGet } from './routes/tile.json.js';
|
|
14
13
|
import { styleJsonGet } from './routes/tile.style.json.js';
|
|
15
14
|
import { wmtsCapabilitiesGet } from './routes/tile.wmts.js';
|
|
16
15
|
import { tileXyzGet } from './routes/tile.xyz.js';
|
|
17
16
|
import { versionGet } from './routes/version.js';
|
|
18
|
-
import { NotFound
|
|
17
|
+
import { NotFound } from './util/response.js';
|
|
19
18
|
import { CoSources } from './util/source.cache.js';
|
|
20
19
|
import { St } from './util/source.tracer.js';
|
|
21
|
-
import { tilePreviewGet } from './routes/preview.js';
|
|
22
|
-
import { previewIndexGet } from './routes/preview.index.js';
|
|
23
20
|
|
|
24
21
|
export const handler = lf.http(LogConfig.get());
|
|
25
22
|
|
|
@@ -108,9 +105,3 @@ handler.router.get('/v1/attribution/:tileSet/:tileMatrix/summary.json', tileAttr
|
|
|
108
105
|
handler.router.get('/v1/tiles/:tileSet/:tileMatrix/WMTSCapabilities.xml', wmtsCapabilitiesGet);
|
|
109
106
|
handler.router.get('/v1/tiles/:tileSet/WMTSCapabilities.xml', wmtsCapabilitiesGet);
|
|
110
107
|
handler.router.get('/v1/tiles/WMTSCapabilities.xml', wmtsCapabilitiesGet);
|
|
111
|
-
|
|
112
|
-
// Arcgis Vector
|
|
113
|
-
handler.router.get('/v1/arcgis/rest/services/:tileSet/VectorTileServer', arcgisTileServerGet);
|
|
114
|
-
handler.router.post('/v1/arcgis/rest/services/:tileSet/VectorTileServer', OkResponse);
|
|
115
|
-
handler.router.get('/v1/arcgis/rest/services/:tileSet/VectorTileServer/root.json', arcgisStyleJsonGet);
|
|
116
|
-
handler.router.get('/v1/arcgis/rest/info', arcgisInfoGet);
|
|
@@ -6,7 +6,13 @@ import { CachedConfig } from './config.cache.js';
|
|
|
6
6
|
import { getDefaultConfig } from '@basemaps/shared';
|
|
7
7
|
|
|
8
8
|
// FIXME load this from process.env COG BUCKETS?
|
|
9
|
-
const SafeBuckets = new Set([
|
|
9
|
+
const SafeBuckets = new Set([
|
|
10
|
+
'linz-workflows-scratch',
|
|
11
|
+
'linz-workflow-artifacts',
|
|
12
|
+
'linz-basemaps',
|
|
13
|
+
'linz-basemaps-staging',
|
|
14
|
+
'linz-basemaps-scratch',
|
|
15
|
+
]);
|
|
10
16
|
const SafeProtocols = new Set(['s3', 'memory']);
|
|
11
17
|
|
|
12
18
|
export class ConfigLoader {
|