@signalk/charts-plugin 3.2.0 → 3.5.0-beta

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/.mocharc.cjs ADDED
@@ -0,0 +1,5 @@
1
+ module.exports = {
2
+ extensions: ['ts'],
3
+ spec: 'test/**/*.ts',
4
+ 'node-option': ['import=tsx']
5
+ }
@@ -0,0 +1,7 @@
1
+ node_modules
2
+ coverage
3
+ .nyc_output
4
+ .claude
5
+ plugin
6
+ reports
7
+ .stryker-tmp
package/README.md CHANGED
@@ -1,8 +1,13 @@
1
1
  # Signal K server Charts plugin
2
2
 
3
+ [![CI](https://github.com/SignalK/charts-plugin/actions/workflows/ci.yml/badge.svg)](https://github.com/SignalK/charts-plugin/actions/workflows/ci.yml)
4
+ [![npm version](https://img.shields.io/npm/v/@signalk/charts-plugin.svg)](https://www.npmjs.com/package/@signalk/charts-plugin)
5
+ [![License](https://img.shields.io/npm/l/@signalk/charts-plugin.svg)](https://github.com/SignalK/charts-plugin/blob/master/LICENSE)
6
+
3
7
  Signal K Node server plugin to provide chart metadata, such as name, description and location of the actual chart tile data.
4
8
 
5
9
  Chart metadata is derived from the following supported chart file types:
10
+
6
11
  - MBTiles _(.mbtiles)_
7
12
  - TMS _(tilemapresource.xml and tiles)_
8
13
 
@@ -10,19 +15,18 @@ Additionally, chart metadata can be entered via the plugin configuration for oth
10
15
 
11
16
  Chart metadata is made available to both v1 and v2 Signal K `resources` api paths.
12
17
 
13
- | Server Version | API | Path |
14
- |--- |--- |--- |
15
- | 1.x.x | v1 | `/signalk/v1/api/resources/charts` |
16
- | 2.x.x | v2 | `/signalk/v2/api/resources/charts` |
18
+ | Server Version | API | Path |
19
+ | -------------- | --- | ---------------------------------- |
20
+ | 1.x.x | v1 | `/signalk/v1/api/resources/charts` |
21
+ | 2.x.x | v2 | `/signalk/v2/api/resources/charts` |
17
22
 
18
-
19
23
  _Note: Version 2 resource paths will only be made available on Signal K server v2.0.0 and later_
20
24
 
21
25
  ## Usage
22
26
 
23
27
  1. Install `@signalk/signalk-charts` from the Signal K Server Appstore
24
28
 
25
- 2. Configure the plugin in the Admin UI _(**Server -> Plugin Config -> Signal K Charts**)_
29
+ 2. Configure the plugin in the Admin UI _(**Server -> Plugin Config -> Signal K Charts**)_
26
30
 
27
31
  3. Activate the plugin
28
32
 
@@ -30,32 +34,34 @@ _Note: Version 2 resource paths will only be made available on Signal K server v
30
34
  > On Victron Venus devices you [need to install some dependencies manually](https://github.com/SignalK/charts-plugin/issues/40#issuecomment-3396744642) before installing the plugin.
31
35
 
32
36
  Chart metadata will then be available to client apps via the resources api `/resources/charts` for example:
37
+
33
38
  - [Freeboard SK](https://www.npmjs.com/package/@signalk/freeboard-sk)
34
39
  - [Tuktuk Chart Plotter](https://www.npmjs.com/package/tuktuk-chart-plotter)
35
40
 
36
-
37
41
  ## Configuration
38
42
 
39
-
40
43
  ### Local Chart Files
41
44
 
42
45
  To use chart files stored on the Signal K Server the plugin needs to know where your local chart files
43
46
  are stored to generate the chart metadata.
44
47
 
45
48
  You can either:
46
- 1. Put the chart files in the default location _(`/home/<user>/.signalk/charts`)_
47
- 2. Add configuration entries for the folders where the chart files are stored.
49
+
50
+ 1. Put the chart files in the default location _(`/home/<user>/.signalk/charts`)_
51
+ 2. Add configuration entries for the folders where the chart files are stored.
48
52
 
49
53
  <img src="https://user-images.githubusercontent.com/1435910/39382493-57c1e4dc-4a6e-11e8-93e1-cedb4c7662f4.png" alt="Chart paths configuration" width="450"/>
50
54
 
51
- >**Note:** After chart files have been added to folders they will be processed after the plugin has been restarted! _(disable / enable the plugin)_
55
+ The plugin watches each configured chart path and picks up new, renamed, or deleted chart files automatically, including files in nested subdirectories (e.g. `charts/<region>/<chart>.mbtiles`). Changes are applied after a short debounce (5 seconds by default) so bursts of events from file copies and atomic saves are collapsed into a single reload.
52
56
 
57
+ > **Note:** File-system watching relies on native OS events. On some network mounts (SMB/NFS) events may be missed; if a chart doesn't appear after the debounce window, disable and re-enable the plugin.
53
58
 
54
59
  ### Online chart providers
55
60
 
56
61
  If your chart source is not local to the Signal K Server you can add "Online Chart Providers" and enter the required charts metadata for the source.
57
62
 
58
63
  You will need to provide the following information:
64
+
59
65
  1. A chart name for client applications to display
60
66
  2. The URL to the chart source
61
67
  3. Select the chart image format
@@ -71,6 +77,28 @@ For WMS & WMTS sources you can specify the layers you wish to display.
71
77
 
72
78
  A proxy for online charts can be created using the "Proxy through SignalK server" option. If enabled tiles will be fetched from the remote server and cached by the SignalK server making it possible to store the tiles for offline usage. Additional http headers can be passed to the remote server by adding colon separated headers, e.g. User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64). User-Agent is the header name and Mozilla... will be the value.
73
79
 
80
+ #### URL placeholders
81
+
82
+ The following placeholders are substituted in the chart URL when the proxy fetches each tile:
83
+
84
+ | Placeholder | Replaced with |
85
+ | ------------- | --------------------------------------------------------------------------------- |
86
+ | `{z}` | Tile zoom level |
87
+ | `{x}` | Tile column |
88
+ | `{y}` | Tile row (XYZ / Google / OSM scheme, origin at top-left) |
89
+ | `{-y}` | Tile row flipped to TMS scheme (origin at bottom-left) |
90
+ | `{z-2}` | Zoom minus 2, for NOAA WMTS sources served as a tilemap |
91
+ | `{bbox}` | Tile bounds in EPSG:4326, as `minLon,minLat,maxLon,maxLat` (WMS 1.1.1 axis order) |
92
+ | `{bbox_3857}` | Tile bounds in EPSG:3857 / Web Mercator meters, as `minX,minY,maxX,maxY` |
93
+
94
+ `{bbox}` and `{bbox_3857}` make it possible to proxy and cache WMS sources that do not offer an XYZ endpoint. Prefer `{bbox_3857}` with WMS 1.3.0 endpoints, because WMS 1.3.0 requires `lat,lon` axis order for geographic CRSes such as EPSG:4326 and `{bbox}` always emits `lon,lat`.
95
+
96
+ Example: NOAA Chart Display Service (S-57 ENC) as a cacheable tile source — set server type `tilelayer`, format `png`, proxy enabled, and use:
97
+
98
+ ```
99
+ https://gis.charttools.noaa.gov/arcgis/rest/services/MCS/NOAAChartDisplay/MapServer/exts/MaritimeChartService/WMSServer?service=WMS&version=1.3.0&request=GetMap&layers=0,1,2,3,4,5,6,7,8,9,10,11,12&styles=&crs=EPSG:3857&bbox={bbox_3857}&width=256&height=256&format=image/png&transparent=true
100
+ ```
101
+
74
102
  ### Supported chart formats
75
103
 
76
104
  - [MBTiles](https://github.com/mapbox/mbtiles-spec) files
@@ -79,11 +107,11 @@ A proxy for online charts can be created using the "Proxy through SignalK server
79
107
  - Online [TMS](https://wiki.osgeo.org/wiki/Tile_Map_Service_Specification)
80
108
 
81
109
  Publicly available MBTiles charts can be found from:
110
+
82
111
  - [NOAA Nautical charts](https://distribution.charts.noaa.gov/ncds/index.html)
83
112
  - [Finnish Transport Agency nautical charts](https://github.com/vokkim/rannikkokartat-mbtiles)
84
113
  - [Signal K World Coastline Map](https://github.com/netAction/signalk-world-coastline-map), download [MBTiles release](https://github.com/netAction/signalk-world-coastline-map/releases/download/v1.0/signalk-world-coastline-map-database.tgz)
85
114
 
86
-
87
115
  ---
88
116
 
89
117
  ### API
@@ -93,17 +121,18 @@ Plugin adds support for `/resources/charts` endpoints described in [Signal K spe
93
121
  #### List available charts
94
122
 
95
123
  ```bash
96
- GET /signalk/v2/api/resources/charts/`
124
+ GET /signalk/v2/api/resources/charts/`
97
125
  ```
98
126
 
99
127
  #### Return metadata for selected chart
100
128
 
101
129
  ```bash
102
130
 
103
- GET /signalk/v2/api/resources/charts/${identifier}`
131
+ GET /signalk/v2/api/resources/charts/${identifier}`
104
132
  ```
105
133
 
106
134
  #### Chart Tiles
135
+
107
136
  Chart tiles are retrieved using the url defined in the chart metadata.
108
137
 
109
138
  For local chart files located in the Chart Path(s) defined in the plugin configuration, the url will be:
@@ -112,8 +141,8 @@ For local chart files located in the Chart Path(s) defined in the plugin configu
112
141
  /signalk/chart-tiles/${identifier}/${z}/${x}/${y}
113
142
  ```
114
143
 
115
- License
116
- -------
144
+ ## License
145
+
117
146
  Copyright 2018 Mikko Vesikkala
118
147
 
119
148
  Licensed under the Apache License, Version 2.0 (the "License");
package/package.json CHANGED
@@ -1,19 +1,22 @@
1
1
  {
2
2
  "name": "@signalk/charts-plugin",
3
- "version": "3.2.0",
3
+ "version": "3.5.0-beta",
4
4
  "description": "Signal K plugin to provide chart support for Signal K server",
5
5
  "main": "plugin/index.js",
6
6
  "scripts": {
7
- "build": "tsc",
8
- "build-declaration": "tsc --declaration --allowJs false",
7
+ "build": "tsc -p tsconfig.build.json",
8
+ "clean": "rimraf plugin",
9
+ "prebuild": "npm run clean",
9
10
  "watch": "npm run build -- -w",
10
11
  "start": "npm run build -- -w",
11
- "prepare": "tsc",
12
- "prettier": "prettier -w src/",
13
- "lint": "eslint -c .eslintrc.js --ext .ts --ext .js --fix src/",
14
- "format": "npm run prettier && npm run lint",
15
- "ci-lint": "eslint -c .eslintrc.js --ext .ts --ext .js src/ && prettier --check src/",
16
- "test": "mocha"
12
+ "typecheck": "tsc --noEmit",
13
+ "prettier:check": "prettier --check .",
14
+ "prettier": "prettier --write .",
15
+ "format": "npm run prettier",
16
+ "test": "mocha",
17
+ "coverage": "c8 --reporter=text --reporter=lcov npm test",
18
+ "mutation": "stryker run",
19
+ "prepublishOnly": "npm run build"
17
20
  },
18
21
  "license": "Apache-2.0",
19
22
  "keywords": [
@@ -30,37 +33,37 @@
30
33
  "email": "mikko.vesikkala@iki.fi"
31
34
  },
32
35
  "dependencies": {
33
- "@mapbox/mbtiles": "^0.12.1",
36
+ "@signalk/mbtiles": "0.1.1",
34
37
  "@signalk/server-api": "^2.0.0",
35
38
  "@turf/bbox": "^7.2.0",
36
39
  "@turf/boolean-intersects": "^7.2.0",
37
40
  "@turf/helpers": "^7.2.0",
38
- "bluebird": "3.5.1",
39
41
  "check-disk-space": "^3.4.0",
42
+ "fast-xml-parser": "^5.7.1",
40
43
  "geojson-antimeridian-cut": "^0.1.0",
41
44
  "lodash": "^4.17.11",
42
- "p-limit": "^7.2.0",
43
- "xml2js": "0.6.2"
45
+ "p-limit": "^7"
44
46
  },
45
47
  "repository": {
46
48
  "type": "git",
47
49
  "url": "https://github.com/SignalK/charts-plugin"
48
50
  },
49
51
  "devDependencies": {
50
- "@types/baconjs": "^0.7.34",
52
+ "@stryker-mutator/core": "^9.6.1",
53
+ "@stryker-mutator/mocha-runner": "^9.6.1",
54
+ "@types/chai": "^4.3.11",
51
55
  "@types/express": "^4.17.17",
52
56
  "@types/lodash": "^4.14.191",
53
- "@types/node": "^18.14.4",
54
- "@typescript-eslint/eslint-plugin": "^5.52.0",
55
- "@typescript-eslint/parser": "^5.52.0",
56
- "body-parser": "^1.18.2",
57
+ "@types/mocha": "^10.0.10",
58
+ "@types/node": "^25.6.0",
59
+ "c8": "^11.0.0",
57
60
  "chai": "4.1.2",
58
- "chai-http": "^4.2.1",
59
- "eslint": "^8.34.0",
60
- "eslint-config-prettier": "^8.6.0",
61
- "express": "^4.19.2",
61
+ "chai-http": "^5.1.2",
62
+ "express": "^4.20.0",
62
63
  "mocha": "^11.7.1",
63
- "prettier": "^2.8.4",
64
- "typescript": "^4.5.4"
64
+ "prettier": "^3.8.2",
65
+ "rimraf": "^6.1.3",
66
+ "tsx": "^4.20.3",
67
+ "typescript": "^6.0.3"
65
68
  }
66
69
  }
@@ -1,5 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
1
  import type { BBox, FeatureCollection } from 'geojson';
4
2
  import { ResourcesApi } from '@signalk/server-api';
5
3
  import { ChartProvider } from './types';
@@ -16,7 +14,8 @@ export declare class ChartSeedingManager {
16
14
  static ActiveJobs: {
17
15
  [key: number]: ChartDownloader;
18
16
  };
19
- static createJob(resourcesApi: ResourcesApi, chartsPath: string, provider: ChartProvider, maxZoom: number, regionGUI?: string | undefined, bbox?: BBox | undefined, tile?: Tile | undefined): Promise<ChartDownloader>;
17
+ static createJob(resourcesApi: ResourcesApi, chartsPath: string, provider: ChartProvider, maxZoom: number, regionGUID?: string | undefined, bbox?: BBox | undefined, tile?: Tile | undefined): Promise<ChartDownloader>;
18
+ static cancelAll(): void;
20
19
  }
21
20
  export declare class ChartDownloader {
22
21
  private resourcesApi;
@@ -25,7 +24,6 @@ export declare class ChartDownloader {
25
24
  private static MINIMUM_FREE_DISK_SPACE;
26
25
  private static nextJobId;
27
26
  private id;
28
- private maxZoom;
29
27
  private status;
30
28
  private totalTiles;
31
29
  private downloadedTiles;
@@ -38,7 +36,7 @@ export declare class ChartDownloader {
38
36
  private tilesToDownload;
39
37
  constructor(resourcesApi: ResourcesApi, chartsPath: string, provider: ChartProvider);
40
38
  get ID(): number;
41
- initalizeJobFromRegion(regionGUID: string, maxZoom: number): Promise<void>;
39
+ initializeJobFromRegion(regionGUID: string, maxZoom: number): Promise<void>;
42
40
  initializeJobFromBBox(bbox: BBox, maxZoom: number): Promise<void>;
43
41
  initializeJobFromTile(tile: Tile, maxZoom: number): Promise<void>;
44
42
  /**
@@ -70,7 +68,6 @@ export declare class ChartDownloader {
70
68
  getTilesForBBox(bbox: BBox, maxZoom: number): Tile[];
71
69
  getTilesForGeoJSON(geojson: FeatureCollection, zoomMin?: number, zoomMax?: number): Tile[];
72
70
  private convertRegionToGeoJSON;
73
- private lonLatToTileXY;
74
- private tileToBBox;
75
71
  private bboxPolygon;
76
72
  }
73
+ //# sourceMappingURL=chartDownloader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chartDownloader.d.ts","sourceRoot":"","sources":["../src/chartDownloader.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,IAAI,EACJ,iBAAiB,EAKlB,MAAM,SAAS,CAAA;AAMhB,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAGvC,MAAM,WAAW,IAAI;IACnB,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;CACV;AAED,oBAAY,MAAM;IAChB,OAAO,IAAA;IACP,OAAO,IAAA;CACR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B,CAChC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,IAAI,CAAC;IAUhB;;;OAGG;IACG,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IA0D1B,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAwB3B,SAAS;YAIF,iBAAiB;IAgCxB,IAAI;;;;;;;;;;;WAkBE,wBAAwB,CACnC,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,aAAa,EACvB,IAAI,EAAE,IAAI,GACT,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;WA2BZ,mBAAmB,CAC9B,QAAQ,EAAE,aAAa,EACvB,IAAI,EAAE,IAAI,EACV,SAAS,SAAO,GACf,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAqDzB,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,EAAE;IAoBhD;;;OAGG;IACH,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,EAAE;IA2CpD,kBAAkB,CAChB,OAAO,EAAE,iBAAiB,EAC1B,OAAO,SAAI,EACX,OAAO,SAAK,GACX,IAAI,EAAE;IAiDT,OAAO,CAAC,sBAAsB;IA6D9B,OAAO,CAAC,WAAW;CAYpB"}
@@ -12,25 +12,38 @@ const boolean_intersects_1 = __importDefault(require("@turf/boolean-intersects")
12
12
  const bbox_1 = require("@turf/bbox");
13
13
  const helpers_1 = require("@turf/helpers");
14
14
  const check_disk_space_1 = __importDefault(require("check-disk-space"));
15
+ const projection_1 = require("./projection");
15
16
  var Status;
16
17
  (function (Status) {
17
18
  Status[Status["Stopped"] = 0] = "Stopped";
18
19
  Status[Status["Running"] = 1] = "Running";
19
- })(Status = exports.Status || (exports.Status = {}));
20
+ })(Status || (exports.Status = Status = {}));
20
21
  class ChartSeedingManager {
21
22
  static ActiveJobs = {};
22
- static async createJob(resourcesApi, chartsPath, provider, maxZoom, regionGUI = undefined, bbox = undefined, tile = undefined) {
23
+ static async createJob(resourcesApi, chartsPath, provider, maxZoom, regionGUID = undefined, bbox = undefined, tile = undefined) {
23
24
  const downloader = new ChartDownloader(resourcesApi, chartsPath, provider);
24
- if (regionGUI)
25
- downloader.initalizeJobFromRegion(regionGUI, maxZoom);
25
+ // Init must complete before the job is usable; callers get back a job that
26
+ // knows its tile set and totalTiles. Without awaiting, a follow-up "start"
27
+ // action would race the init reads of this.tiles.
28
+ if (regionGUID)
29
+ await downloader.initializeJobFromRegion(regionGUID, maxZoom);
26
30
  else if (bbox)
27
- downloader.initializeJobFromBBox(bbox, maxZoom);
28
- else if (tile) {
29
- downloader.initializeJobFromTile(tile, maxZoom);
30
- }
31
+ await downloader.initializeJobFromBBox(bbox, maxZoom);
32
+ else if (tile)
33
+ await downloader.initializeJobFromTile(tile, maxZoom);
34
+ else
35
+ throw new Error('createJob requires regionGUID, bbox, or tile');
31
36
  this.ActiveJobs[downloader.ID] = downloader;
32
37
  return downloader;
33
38
  }
39
+ // Cancel all running jobs and clear the registry. Used when the plugin stops
40
+ // so a disabled plugin doesn't keep pulling tiles in the background.
41
+ static cancelAll() {
42
+ for (const job of Object.values(this.ActiveJobs)) {
43
+ job.cancelJob();
44
+ }
45
+ this.ActiveJobs = {};
46
+ }
34
47
  }
35
48
  exports.ChartSeedingManager = ChartSeedingManager;
36
49
  class ChartDownloader {
@@ -40,7 +53,6 @@ class ChartDownloader {
40
53
  static MINIMUM_FREE_DISK_SPACE = 1024 * 1024 * 1024; // 1 GB
41
54
  static nextJobId = 1;
42
55
  id = ChartDownloader.nextJobId++;
43
- maxZoom = 15;
44
56
  status = Status.Stopped;
45
57
  totalTiles = 0;
46
58
  downloadedTiles = 0;
@@ -59,7 +71,7 @@ class ChartDownloader {
59
71
  get ID() {
60
72
  return this.id;
61
73
  }
62
- async initalizeJobFromRegion(regionGUID, maxZoom) {
74
+ async initializeJobFromRegion(regionGUID, maxZoom) {
63
75
  const region = (await this.resourcesApi.getResource('regions', regionGUID));
64
76
  const geojson = this.convertRegionToGeoJSON(region);
65
77
  this.tiles = this.getTilesForGeoJSON(geojson, this.provider.minzoom, maxZoom);
@@ -68,7 +80,6 @@ class ChartDownloader {
68
80
  this.totalTiles = this.tiles.length;
69
81
  this.cachedTiles = this.totalTiles - this.tilesToDownload.length;
70
82
  this.areaDescription = `Region: ${region?.name ?? ''}`;
71
- this.maxZoom = maxZoom;
72
83
  }
73
84
  async initializeJobFromBBox(bbox, maxZoom) {
74
85
  this.tiles = this.getTilesForBBox(bbox, maxZoom);
@@ -77,7 +88,6 @@ class ChartDownloader {
77
88
  this.totalTiles = this.tiles.length;
78
89
  this.cachedTiles = this.totalTiles - this.tilesToDownload.length;
79
90
  this.areaDescription = `BBox: [${bbox.join(', ')}]`;
80
- this.maxZoom = maxZoom;
81
91
  }
82
92
  async initializeJobFromTile(tile, maxZoom) {
83
93
  this.tiles = this.getSubTiles(tile, maxZoom);
@@ -86,13 +96,16 @@ class ChartDownloader {
86
96
  this.totalTiles = this.tiles.length;
87
97
  this.cachedTiles = this.totalTiles - this.tilesToDownload.length;
88
98
  this.areaDescription = `Tile: [${tile.x}, ${tile.y}, ${tile.z}]`;
89
- this.maxZoom = maxZoom;
90
99
  }
91
100
  /**
92
101
  * Download map tiles for a specific area.
93
102
  *
94
103
  */
95
104
  async seedCache() {
105
+ // Guard against double-start: a second call while Running would share
106
+ // counters and concurrency slots with the first and corrupt progress.
107
+ if (this.status === Status.Running)
108
+ return;
96
109
  this.cancelRequested = false;
97
110
  this.status = Status.Running;
98
111
  this.tilesToDownload = await this.filterCachedTiles(this.tiles);
@@ -101,30 +114,32 @@ class ChartDownloader {
101
114
  this.cachedTiles = this.totalTiles - this.tilesToDownload.length;
102
115
  const limit = (0, p_limit_1.default)(this.concurrentDownloadsLimit); // concurrent download limit
103
116
  let tileCounter = 0;
104
- this.tilesToDownload = await this.filterCachedTiles(this.tiles);
105
117
  const tasks = this.tilesToDownload.map((tile) => limit(async () => {
106
- if (this.cancelRequested) {
107
- this.status = Status.Stopped;
118
+ if (this.cancelRequested)
108
119
  return;
109
- }
110
120
  if (tileCounter % 1000 === 0) {
111
121
  await new Promise((r) => setTimeout(r, 0));
112
122
  try {
113
123
  const { free } = await (0, check_disk_space_1.default)(this.chartsPath);
114
124
  if (free < ChartDownloader.MINIMUM_FREE_DISK_SPACE) {
115
125
  console.warn(`Low disk space. Stopping download.`);
116
- this.status = Status.Stopped;
126
+ this.cancelRequested = true;
117
127
  return;
118
128
  }
119
129
  }
120
130
  catch (err) {
121
131
  console.error(`Error checking disk space:`, err);
122
- this.status = Status.Stopped;
132
+ this.cancelRequested = true;
123
133
  return;
124
134
  }
125
135
  }
126
136
  tileCounter++;
127
137
  const buffer = await ChartDownloader.getTileFromCacheOrRemote(this.chartsPath, this.provider, tile);
138
+ // Re-check after the await: the job may have been cancelled while the
139
+ // fetch was in flight. Still-running fetches would otherwise keep
140
+ // mutating counters after status flips to Stopped.
141
+ if (this.cancelRequested)
142
+ return;
128
143
  if (buffer === null) {
129
144
  this.failedTiles++;
130
145
  }
@@ -162,7 +177,11 @@ class ChartDownloader {
162
177
  this.cancelRequested = true;
163
178
  }
164
179
  async filterCachedTiles(allTiles) {
165
- const checks = allTiles.map(async (tile) => {
180
+ // Bound the concurrent fs.access calls. 100k+ tiles in a large bbox would
181
+ // otherwise fire all accesses at once, risking EMFILE on default rlimit
182
+ // and spiking the event loop.
183
+ const limit = (0, p_limit_1.default)(64);
184
+ const checks = allTiles.map((tile) => limit(async () => {
166
185
  const tilePath = path_1.default.join(this.chartsPath, this.provider.name, `${tile.z}`, `${tile.x}`, `${tile.y}.${this.provider.format}`);
167
186
  try {
168
187
  await fs_1.default.promises.access(tilePath); // file exists
@@ -175,7 +194,7 @@ class ChartDownloader {
175
194
  console.error('Unexpected fs error:', err);
176
195
  return tile; // treat unknown errors as uncached
177
196
  }
178
- });
197
+ }));
179
198
  const results = await Promise.all(checks);
180
199
  return results.filter((t) => t !== null);
181
200
  }
@@ -221,13 +240,29 @@ class ChartDownloader {
221
240
  console.error(`No remote URL defined for provider ${provider.name}`);
222
241
  return null;
223
242
  }
224
- const url = provider.remoteUrl
243
+ let url = provider.remoteUrl
225
244
  .replace('{z}', tile.z.toString())
226
245
  // To be able to handle NOAA WMTS caching as a tilemap source with -2 offset
227
246
  .replace('{z-2}', (tile.z - 2).toString())
228
247
  .replace('{x}', tile.x.toString())
229
248
  .replace('{y}', tile.y.toString())
230
249
  .replace('{-y}', (Math.pow(2, tile.z) - 1 - tile.y).toString());
250
+ // Support {bbox} (EPSG:4326) and {bbox_3857} (EPSG:3857) for WMS-style sources.
251
+ // {bbox} emits minLon,minLat,maxLon,maxLat — this is WMS 1.1.1 order, and also
252
+ // matches WMS 1.3.0 for projected CRSes. For WMS 1.3.0 with a geographic CRS
253
+ // (e.g. EPSG:4326) the spec requires lat,lon axis order; prefer {bbox_3857} in
254
+ // that case, or use a WMS 1.1.1 endpoint.
255
+ if (url.includes('{bbox}') || url.includes('{bbox_3857}')) {
256
+ const [minLon, minLat, maxLon, maxLat] = (0, projection_1.tileToBBox)(tile.x, tile.y, tile.z);
257
+ if (url.includes('{bbox}')) {
258
+ url = url.replace('{bbox}', `${minLon},${minLat},${maxLon},${maxLat}`);
259
+ }
260
+ if (url.includes('{bbox_3857}')) {
261
+ const [mx1, my1] = (0, projection_1.lonLatToMercator)(minLon, minLat);
262
+ const [mx2, my2] = (0, projection_1.lonLatToMercator)(maxLon, maxLat);
263
+ url = url.replace('{bbox_3857}', `${mx1},${my1},${mx2},${my2}`);
264
+ }
265
+ }
231
266
  const controller = new AbortController();
232
267
  const id = setTimeout(() => controller.abort(), timeoutMs);
233
268
  try {
@@ -272,11 +307,16 @@ class ChartDownloader {
272
307
  const tiles = [];
273
308
  const [minLon, minLat, maxLon, maxLat] = bbox;
274
309
  const crossesAntiMeridian = minLon > maxLon;
275
- // Helper to process a lon/lat box normally
310
+ // Respect the provider's minzoom: low zooms outside the provider's range
311
+ // would 404 from the remote and just inflate totalTiles.
312
+ const minZoom = Math.max(1, this.provider.minzoom ?? 1);
313
+ // Helper to process a lon/lat box normally. lonLatToTileXY returns
314
+ // tile-Y increasing southward, so for a box with minLat < maxLat the
315
+ // south edge yields the larger tile-Y.
276
316
  const processBBox = (lo1, la1, lo2, la2) => {
277
- for (let z = 0; z <= maxZoom; z++) {
278
- const [minX, maxY] = this.lonLatToTileXY(lo1, la1, z);
279
- const [maxX, minY] = this.lonLatToTileXY(lo2, la2, z);
317
+ for (let z = minZoom; z <= maxZoom; z++) {
318
+ const [minX, maxY] = (0, projection_1.lonLatToTile)(lo1, la1, z); // SW corner
319
+ const [maxX, minY] = (0, projection_1.lonLatToTile)(lo2, la2, z); // NE corner
280
320
  for (let x = minX; x <= maxX; x++) {
281
321
  for (let y = minY; y <= maxY; y++) {
282
322
  tiles.push({ x, y, z });
@@ -306,12 +346,27 @@ class ChartDownloader {
306
346
  }
307
347
  const boundingBox = (0, bbox_1.bbox)(feature.geometry); // [minX, minY, maxX, maxY]
308
348
  for (let z = zoomMin; z <= zoomMax; z++) {
309
- const [minX, minY] = this.lonLatToTileXY(boundingBox[0], boundingBox[3], z); // top-left
310
- const [maxX, maxY] = this.lonLatToTileXY(boundingBox[2], boundingBox[1], z); // bottom-right
349
+ const [minX, minY] = (0, projection_1.lonLatToTile)(boundingBox[0], boundingBox[3], z); // top-left
350
+ const [maxX, maxY] = (0, projection_1.lonLatToTile)(boundingBox[2], boundingBox[1], z); // bottom-right
311
351
  for (let x = minX; x <= maxX; x++) {
312
352
  for (let y = minY; y <= maxY; y++) {
313
- const tileBbox = this.tileToBBox(x, y, z);
314
- const tilePoly = this.bboxPolygon(tileBbox);
353
+ // Cheap AABB pre-filter avoids allocating a turf polygon and
354
+ // running booleanIntersects for tiles that can't possibly
355
+ // overlap the feature's bbox. Saves 90%+ of the turf work on
356
+ // concave regions.
357
+ const [tMinLon, tMinLat, tMaxLon, tMaxLat] = (0, projection_1.tileToBBox)(x, y, z);
358
+ if (tMaxLon < boundingBox[0] ||
359
+ tMinLon > boundingBox[2] ||
360
+ tMaxLat < boundingBox[1] ||
361
+ tMinLat > boundingBox[3]) {
362
+ continue;
363
+ }
364
+ const tilePoly = this.bboxPolygon([
365
+ tMinLon,
366
+ tMinLat,
367
+ tMaxLon,
368
+ tMaxLat
369
+ ]);
315
370
  if ((0, boolean_intersects_1.default)(feature, tilePoly)) {
316
371
  tiles.push({ x, y, z });
317
372
  }
@@ -354,9 +409,8 @@ class ChartDownloader {
354
409
  };
355
410
  const f = splitGeoFeature;
356
411
  if (f.geometry && f.geometry.type === 'MultiPolygon') {
357
- for (let i = 0; i < f.geometry.coordinates.length; i++) {
358
- pushFeaturePolygon(f, f.geometry.coordinates[i], i);
359
- }
412
+ const coords = f.geometry.coordinates;
413
+ coords.forEach((ring, i) => pushFeaturePolygon(f, ring, i));
360
414
  }
361
415
  else if (f.geometry && f.geometry.type === 'Polygon') {
362
416
  features.push(f);
@@ -366,24 +420,6 @@ class ChartDownloader {
366
420
  features
367
421
  };
368
422
  }
369
- lonLatToTileXY(lon, lat, zoom) {
370
- const n = 2 ** zoom;
371
- const x = Math.floor(((lon + 180) / 360) * n);
372
- const y = Math.floor(((1 -
373
- Math.log(Math.tan((lat * Math.PI) / 180) + 1 / Math.cos((lat * Math.PI) / 180)) /
374
- Math.PI) /
375
- 2) *
376
- n);
377
- return [x, y];
378
- }
379
- tileToBBox(x, y, z) {
380
- const n = 2 ** z;
381
- const lon1 = (x / n) * 360 - 180;
382
- const lat1 = (Math.atan(Math.sinh(Math.PI * (1 - (2 * y) / n))) * 180) / Math.PI;
383
- const lon2 = ((x + 1) / n) * 360 - 180;
384
- const lat2 = (Math.atan(Math.sinh(Math.PI * (1 - (2 * (y + 1)) / n))) * 180) / Math.PI;
385
- return [lon1, lat2, lon2, lat1];
386
- }
387
423
  bboxPolygon(boundingBox) {
388
424
  const [minLon, minLat, maxLon, maxLat] = boundingBox;
389
425
  return (0, helpers_1.polygon)([
@@ -398,3 +434,4 @@ class ChartDownloader {
398
434
  }
399
435
  }
400
436
  exports.ChartDownloader = ChartDownloader;
437
+ //# sourceMappingURL=chartDownloader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chartDownloader.js","sourceRoot":"","sources":["../src/chartDownloader.ts"],"names":[],"mappings":";;;;;;AAAA,4CAAmB;AACnB,gDAAuB;AACvB,sDAA4B;AAS5B,wFAAmD;AACnD,kFAAwD;AACxD,qCAAiC;AACjC,2CAAuC;AACvC,wEAA6C;AAG7C,6CAAyE;AAQzE,IAAY,MAGX;AAHD,WAAY,MAAM;IAChB,yCAAO,CAAA;IACP,yCAAO,CAAA;AACT,CAAC,EAHW,MAAM,sBAAN,MAAM,QAGjB;AAED,MAAa,mBAAmB;IACvB,MAAM,CAAC,UAAU,GAAuC,EAAE,CAAA;IAE1D,MAAM,CAAC,KAAK,CAAC,SAAS,CAC3B,YAA0B,EAC1B,UAAkB,EAClB,QAAuB,EACvB,OAAe,EACf,aAAiC,SAAS,EAC1C,OAAyB,SAAS,EAClC,OAAyB,SAAS;QAElC,MAAM,UAAU,GAAG,IAAI,eAAe,CAAC,YAAY,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAA;QAC1E,2EAA2E;QAC3E,2EAA2E;QAC3E,kDAAkD;QAClD,IAAI,UAAU;YACZ,MAAM,UAAU,CAAC,uBAAuB,CAAC,UAAU,EAAE,OAAO,CAAC,CAAA;aAC1D,IAAI,IAAI;YAAE,MAAM,UAAU,CAAC,qBAAqB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;aAC/D,IAAI,IAAI;YAAE,MAAM,UAAU,CAAC,qBAAqB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;;YAC/D,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAA;QACpE,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC,GAAG,UAAU,CAAA;QAC3C,OAAO,UAAU,CAAA;IACnB,CAAC;IAED,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MAAM,EAAE,MAAM,CAAC;gBAChB,CAAC,MAAM,EAAE,MAAM,CAAC;gBAChB,CAAC,MAAM,EAAE,MAAM,CAAC;gBAChB,CAAC,MAAM,EAAE,MAAM,CAAC;gBAChB,CAAC,MAAM,EAAE,MAAM,CAAC;aACjB;SACF,CAAC,CAAA;IACJ,CAAC;;AAhfH,0CAifC"}
@@ -1 +1,5 @@
1
- export declare function findCharts(chartBaseDir: string): Promise<any>;
1
+ import { ChartProvider } from './types';
2
+ export declare function findCharts(chartBaseDir: string): Promise<{
3
+ [identifier: string]: ChartProvider;
4
+ }>;
5
+ //# sourceMappingURL=charts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"charts.d.ts","sourceRoot":"","sources":["../src/charts.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AA4DvC,wBAAsB,UAAU,CAC9B,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC;IAAE,CAAC,UAAU,EAAE,MAAM,GAAG,aAAa,CAAA;CAAE,CAAC,CAUlD"}