@chrtco/sdk 0.10.7 → 0.10.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -345,6 +345,8 @@ var TilesEndpoint = class {
345
345
  if (opts.theme) params.set("theme", opts.theme);
346
346
  if (opts.symbols) params.set("symbols", opts.symbols);
347
347
  if (opts.mode) params.set("mode", opts.mode);
348
+ if (opts.land) params.set("land", "1");
349
+ if (opts.relief) params.set("relief", "1");
348
350
  const query2 = params.size > 0 ? `?${params.toString()}` : "";
349
351
  return `${this.tileBaseUrl}/v1/styles/${this.region}/style.json${query2}`;
350
352
  }
@@ -1641,6 +1643,14 @@ var CATWRK_CODES = {
1641
1643
  4: { code: 4, name: "Wreck showing mast/masts" },
1642
1644
  5: { code: 5, name: "Wreck showing any portion of hull or superstructure" }
1643
1645
  };
1646
+ var CATZOC_CODES = {
1647
+ 1: { code: 1, name: "Zone of confidence A1" },
1648
+ 2: { code: 2, name: "Zone of confidence A2" },
1649
+ 3: { code: 3, name: "Zone of confidence B" },
1650
+ 4: { code: 4, name: "Zone of confidence C" },
1651
+ 5: { code: 5, name: "Zone of confidence D" },
1652
+ 6: { code: 6, name: "Zone of confidence U (data not assessed)" }
1653
+ };
1644
1654
  var COLOUR_CODES = {
1645
1655
  1: { code: 1, name: "White", abbr: "W" },
1646
1656
  2: { code: 2, name: "Black", abbr: "B" },
@@ -1700,6 +1710,18 @@ var MARSYS_CODES = {
1700
1710
  9: { code: 9, name: "No system" },
1701
1711
  10: { code: 10, name: "Other system" }
1702
1712
  };
1713
+ var NATQUA_CODES = {
1714
+ 1: { code: 1, name: "Fine" },
1715
+ 2: { code: 2, name: "Medium" },
1716
+ 3: { code: 3, name: "Coarse" },
1717
+ 4: { code: 4, name: "Broken" },
1718
+ 5: { code: 5, name: "Sticky" },
1719
+ 6: { code: 6, name: "Soft" },
1720
+ 7: { code: 7, name: "Stiff" },
1721
+ 8: { code: 8, name: "Volcanic" },
1722
+ 9: { code: 9, name: "Calcareous" },
1723
+ 10: { code: 10, name: "Hard" }
1724
+ };
1703
1725
  var NATSUR_CODES = {
1704
1726
  1: { code: 1, name: "Mud" },
1705
1727
  2: { code: 2, name: "Clay" },
@@ -1841,11 +1863,13 @@ var S57_CODELISTS = /* @__PURE__ */ new Map([
1841
1863
  ["CATREA", CATREA_CODES],
1842
1864
  ["CATSCF", CATSCF_CODES],
1843
1865
  ["CATWRK", CATWRK_CODES],
1866
+ ["CATZOC", CATZOC_CODES],
1844
1867
  ["COLOUR", COLOUR_CODES],
1845
1868
  ["CONDTN", CONDTN_CODES],
1846
1869
  ["CONVIS", CONVIS_CODES],
1847
1870
  ["LITCHR", LITCHR_CODES],
1848
1871
  ["MARSYS", MARSYS_CODES],
1872
+ ["NATQUA", NATQUA_CODES],
1849
1873
  ["NATSUR", NATSUR_CODES],
1850
1874
  ["QUASOU", QUASOU_CODES],
1851
1875
  ["RESTRN", RESTRN_CODES],
@@ -7212,6 +7236,222 @@ var S52_LOOKUP = {
7212
7236
  displayCategory: "META",
7213
7237
  style: { type: "fill", paint: { "fill-color": "CHGRF", "fill-opacity": 0 } },
7214
7238
  auditIgnore: true
7239
+ },
7240
+ // ── Inland ENC domain (USACE IENC) ──────────────────────
7241
+ //
7242
+ // The Inland ENC domain defines its own object classes in the 17000+ OBJL
7243
+ // range, alongside — not instead of — S-57 Appendix A. Both appear in the
7244
+ // same cell: measured on the 2026-08 USACE exchange set, `RESARE` (OBJL 112)
7245
+ // and `resare` (17005) coexist, as do `HRBFAC` (64) and `hrbfac` (17015).
7246
+ // They are genuinely different classes, and GDAL reports the inland ones in
7247
+ // lowercase, which is why the pre-2026-08-18 layer-admission rule discarded
7248
+ // them entirely.
7249
+ //
7250
+ // Until these entries existed the tiles carried them and nothing drew them:
7251
+ // locks, bridges, distance marks and notice marks were served and invisible.
7252
+ //
7253
+ // PROVENANCE OF THE SYMBOLOGY, because it differs per class and the
7254
+ // difference matters:
7255
+ //
7256
+ // • Nine inherit their S-57 cousin's treatment — a bridge is a bridge and
7257
+ // a mariner should read the same symbol whether the cell came from NOAA
7258
+ // or USACE. The inland class carries different ATTRIBUTES (clearances
7259
+ // referenced to inland water levels, for instance), but the cartographic
7260
+ // intent is identical, so diverging would be a change for its own sake.
7261
+ // Their `int1Ref` is inherited too and is honest: it points at the
7262
+ // Chart No. 1 entry a reader would look up.
7263
+ //
7264
+ // • Five have NO S-57 cousin in this atlas — `hrbare`, `sistaw`, `lokbsn`,
7265
+ // `notmrk`, `termnl`. These are styled by geometry and family so they
7266
+ // render legibly and consistently, and they deliberately carry NO
7267
+ // `int1Ref`: Chart No. 1 has no entry for them and inventing a reference
7268
+ // would be a false citation in a safety-relevant table.
7269
+ //
7270
+ // NOT YET IMPLEMENTED, and the gap is real: the Inland ECDIS Standard has
7271
+ // its own Presentation Library (CESNI Ed 2.3) with a dedicated symbol set —
7272
+ // `notmrk01/02/03` for notice marks among them, carrying the actual
7273
+ // regulatory signboard faces. These entries make the classes visible and
7274
+ // correct in kind; they do not implement that library. Notice marks in
7275
+ // particular render here as a generic mark rather than the specific sign,
7276
+ // which is a legibility floor rather than the finished portrayal.
7277
+ achare: {
7278
+ // Inherits ACHARE (S-57 4). Same faint tint + companion boundary/anchor.
7279
+ objectClass: "achare",
7280
+ name: "Anchorage Area (Inland)",
7281
+ category: "Regulated Areas",
7282
+ displayCategory: "STANDARD",
7283
+ int1Ref: "N12",
7284
+ style: { type: "fill", paint: { "fill-color": "TRFCD", "fill-opacity": 0.1 } },
7285
+ viewingGroup: 26010,
7286
+ scamin: 9e4
7287
+ },
7288
+ resare: {
7289
+ // Inherits RESARE (S-57 112) — boundary-only, no flood fill. The stacked
7290
+ // magenta wash that motivated RESARE's treatment applies here too: an
7291
+ // inland reach can carry overlapping regulated areas just as a harbour can.
7292
+ objectClass: "resare",
7293
+ name: "Restricted Area (Inland)",
7294
+ category: "Regulated Areas",
7295
+ displayCategory: "STANDARD",
7296
+ int1Ref: "N2",
7297
+ style: { type: "line", paint: { "line-color": "TRFCD", "line-width": 1.2, "line-opacity": 0.7 } },
7298
+ viewingGroup: 26010,
7299
+ scamin: 9e4
7300
+ },
7301
+ bridge: {
7302
+ // Inherits BRIDGE (S-57 11). The IENC set carries ONLY the inland class —
7303
+ // no uppercase BRIDGE appears in any of the 109 cells — so this entry is
7304
+ // the sole reason a river bridge draws at all. 3,693 features.
7305
+ objectClass: "bridge",
7306
+ name: "Bridge (Inland)",
7307
+ category: "Infrastructure",
7308
+ displayCategory: "STANDARD",
7309
+ int1Ref: "D20",
7310
+ style: { type: "line", paint: { "line-color": "CHGRD", "line-width": 2 } },
7311
+ hasConditional: true,
7312
+ conditionalAttributes: ["CATBRG", "VERCLR"],
7313
+ viewingGroup: 12210,
7314
+ scamin: 22e3
7315
+ },
7316
+ hrbfac: {
7317
+ // Inherits HRBFAC (S-57 64).
7318
+ objectClass: "hrbfac",
7319
+ name: "Harbour Facility (Inland)",
7320
+ category: "Infrastructure",
7321
+ displayCategory: "OTHER",
7322
+ int1Ref: "F10",
7323
+ style: { type: "circle", paint: { "circle-color": "TRFCD", "circle-radius": 4, "circle-stroke-color": "CHBLK", "circle-stroke-width": 0.5 } },
7324
+ viewingGroup: 12410,
7325
+ scamin: 22e3
7326
+ },
7327
+ berths: {
7328
+ // Inherits BERTHS (S-57 10).
7329
+ objectClass: "berths",
7330
+ name: "Berth (Inland)",
7331
+ category: "Infrastructure",
7332
+ displayCategory: "OTHER",
7333
+ int1Ref: "F19",
7334
+ style: { type: "line", paint: { "line-color": "CHBLK", "line-width": 1.5 } },
7335
+ viewingGroup: 12410,
7336
+ scamin: 22e3
7337
+ },
7338
+ cblohd: {
7339
+ // Inherits CBLOHD (S-57 21). Overhead cables are a clearance hazard on a
7340
+ // river in a way they rarely are offshore — 1,631 features across the set.
7341
+ objectClass: "cblohd",
7342
+ name: "Overhead Cable (Inland)",
7343
+ category: "Infrastructure",
7344
+ displayCategory: "STANDARD",
7345
+ int1Ref: "L31",
7346
+ style: { type: "line", paint: { "line-color": "CHMGD", "line-width": 1 } },
7347
+ hasConditional: true,
7348
+ conditionalAttributes: ["CATCBL", "VERCLR", "STATUS"],
7349
+ viewingGroup: 24070,
7350
+ scamin: 9e4
7351
+ },
7352
+ dismar: {
7353
+ // Inherits DISMAR (S-57 44). River mile markers — the single most numerous
7354
+ // inland class at 7,453 features, and the primary way position is
7355
+ // communicated on the inland system.
7356
+ objectClass: "dismar",
7357
+ name: "Distance Mark (Inland)",
7358
+ category: "Navigation Aids",
7359
+ displayCategory: "OTHER",
7360
+ int1Ref: "B25",
7361
+ style: { type: "circle", paint: { "circle-color": "CHBLK", "circle-radius": 3, "circle-stroke-width": 0 } },
7362
+ viewingGroup: 27010,
7363
+ scamin: 22e3
7364
+ },
7365
+ sistat: {
7366
+ // Inherits SISTAT (S-57 90), including its symbol.
7367
+ objectClass: "sistat",
7368
+ name: "Signal Station, Traffic (Inland)",
7369
+ category: "Infrastructure",
7370
+ displayCategory: "OTHER",
7371
+ int1Ref: "T20",
7372
+ style: { type: "symbol", paint: {}, layout: { "icon-size": 0.6, "icon-allow-overlap": true }, iconImage: "SISTAT02" },
7373
+ viewingGroup: 27080,
7374
+ scamin: 22e3
7375
+ },
7376
+ m_nsys: {
7377
+ // Inherits M_NSYS (S-57 306) — a metadata class, never drawn, present so
7378
+ // click-query can report which buoyage system applies.
7379
+ objectClass: "m_nsys",
7380
+ name: "Nav System of Marks (Inland)",
7381
+ category: "Meta",
7382
+ displayCategory: "META",
7383
+ style: { type: "fill", paint: { "fill-color": "CHGRF", "fill-opacity": 0 } },
7384
+ auditIgnore: true
7385
+ },
7386
+ // ── No S-57 cousin: styled by family, no INT1 reference ──
7387
+ sistaw: {
7388
+ // Warning signal station. S-57 has SISTAW (91) but this atlas never needed
7389
+ // it, so there is nothing to inherit. Styled as its traffic sibling with a
7390
+ // hazard-magenta ring, because a warning station is the one a mariner most
7391
+ // needs to notice. 522 features.
7392
+ objectClass: "sistaw",
7393
+ name: "Signal Station, Warning (Inland)",
7394
+ category: "Infrastructure",
7395
+ displayCategory: "OTHER",
7396
+ style: { type: "circle", paint: { "circle-color": "CHWHT", "circle-radius": 3.5, "circle-stroke-color": "CHMGD", "circle-stroke-width": 1.2 } },
7397
+ viewingGroup: 27080,
7398
+ scamin: 22e3
7399
+ },
7400
+ lokbsn: {
7401
+ // Lock basin — the chamber itself. Drawn as a water-toned area with a firm
7402
+ // outline: it IS navigable water, so a hazard tint would be wrong, but its
7403
+ // edges are hard structures a mariner must not drift into. 174 features
7404
+ // across the set and the defining feature of the inland system.
7405
+ objectClass: "lokbsn",
7406
+ name: "Lock Basin (Inland)",
7407
+ category: "Infrastructure",
7408
+ displayCategory: "STANDARD",
7409
+ style: { type: "fill", paint: { "fill-color": "DEPVS", "fill-opacity": 0.35, "fill-outline-color": "CHGRD" } },
7410
+ viewingGroup: 12210,
7411
+ scamin: 45e3
7412
+ },
7413
+ hrbare: {
7414
+ // Harbour area. Inland ports are areas rather than the point facilities
7415
+ // NOAA models, so this is an area at the same low tint as other
7416
+ // infrastructure regions. Only 1 feature set-wide — rare, but it renders.
7417
+ objectClass: "hrbare",
7418
+ name: "Harbour Area (Inland)",
7419
+ category: "Infrastructure",
7420
+ displayCategory: "OTHER",
7421
+ style: { type: "fill", paint: { "fill-color": "TRFCD", "fill-opacity": 0.08 } },
7422
+ viewingGroup: 12410,
7423
+ scamin: 22e3
7424
+ },
7425
+ termnl: {
7426
+ // Terminal — a commercial loading facility. Same family as harbour
7427
+ // facility, distinguished by a square-ish footprint rather than a point.
7428
+ // 59 features.
7429
+ objectClass: "termnl",
7430
+ name: "Terminal (Inland)",
7431
+ category: "Infrastructure",
7432
+ displayCategory: "OTHER",
7433
+ style: { type: "fill", paint: { "fill-color": "TRFCD", "fill-opacity": 0.12, "fill-outline-color": "CHBLK" } },
7434
+ viewingGroup: 12410,
7435
+ scamin: 22e3
7436
+ },
7437
+ notmrk: {
7438
+ // Notice mark — the regulatory signboards along an inland waterway. These
7439
+ // carry real instructions (speed limits, no-wake, keep-out, overhead
7440
+ // clearance), which makes this the class most under-served by a generic
7441
+ // symbol.
7442
+ //
7443
+ // The Inland ECDIS Presentation Library defines `notmrk01/02/03` with the
7444
+ // actual sign faces, and implementing that set is the right end state.
7445
+ // Until then a magenta-ringed mark says "regulatory information here" and
7446
+ // click-query carries the attributes, which is a legibility floor rather
7447
+ // than the finished portrayal. 266 features.
7448
+ objectClass: "notmrk",
7449
+ name: "Notice Mark (Inland)",
7450
+ category: "Regulated Areas",
7451
+ displayCategory: "STANDARD",
7452
+ style: { type: "circle", paint: { "circle-color": "CHMGD", "circle-radius": 3, "circle-stroke-color": "CHWHT", "circle-stroke-width": 1 } },
7453
+ viewingGroup: 26010,
7454
+ scamin: 45e3
7215
7455
  }
7216
7456
  };
7217
7457
 
@@ -7224,6 +7464,7 @@ var S52_DRAW_ORDER = [
7224
7464
  "M_NSYS",
7225
7465
  "M_QUAL",
7226
7466
  "M_SREL",
7467
+ "m_nsys",
7227
7468
  // 2. Depth areas – broadest first (fill).
7228
7469
  //
7229
7470
  // SEAARE goes BEFORE DEPARE so its uniform "deep water" base fill paints
@@ -7281,6 +7522,12 @@ var S52_DRAW_ORDER = [
7281
7522
  "PRDARE",
7282
7523
  "OSPARE",
7283
7524
  "LOGPON",
7525
+ // Inland ENC regulated areas — beside their S-57 cousins so an inland
7526
+ // restricted area paints in the same band as a coastal one.
7527
+ "achare",
7528
+ "resare",
7529
+ "hrbare",
7530
+ "termnl",
7284
7531
  "CBLARE",
7285
7532
  "PIPARE",
7286
7533
  // 6a. Jurisdictional zones + IMO routing measures (boundary-only via
@@ -7302,6 +7549,9 @@ var S52_DRAW_ORDER = [
7302
7549
  "BRIDGE",
7303
7550
  "PYLONS",
7304
7551
  "FORSTC",
7552
+ // Lock basin is navigable water inside a structure — painted with the
7553
+ // infrastructure areas so its hard edges sit above the land fill.
7554
+ "lokbsn",
7305
7555
  // 8. Coastline / shore (line)
7306
7556
  // DYKCON (dyke) and CAUSWY (causeway) join the SLCONS family — solid
7307
7557
  // black lines representing man-made shoreline modifications. Drawn in
@@ -7341,6 +7591,9 @@ var S52_DRAW_ORDER = [
7341
7591
  "GATCON",
7342
7592
  "DAMCON",
7343
7593
  "BERTHS",
7594
+ "cblohd",
7595
+ "berths",
7596
+ "bridge",
7344
7597
  // 11. Point features
7345
7598
  // CGUSTA (coast guard station, emergency-context) sits with the building
7346
7599
  // / landmark family — a structural-presence cue rather than a routing
@@ -7361,6 +7614,8 @@ var S52_DRAW_ORDER = [
7361
7614
  "DISMAR",
7362
7615
  "ACHBRT",
7363
7616
  "CGUSTA",
7617
+ "hrbfac",
7618
+ "dismar",
7364
7619
  "NEWOBJ",
7365
7620
  // 12. Nav aids (on top)
7366
7621
  "FOGSIG",
@@ -7370,6 +7625,11 @@ var S52_DRAW_ORDER = [
7370
7625
  "PILBOP",
7371
7626
  "DAYMAR",
7372
7627
  "TOPMAR",
7628
+ // Notice marks last of the point family: they carry regulatory
7629
+ // instructions and should not be occluded by nearby infrastructure.
7630
+ "sistat",
7631
+ "sistaw",
7632
+ "notmrk",
7373
7633
  "BCNSPP",
7374
7634
  "BCNCAR",
7375
7635
  "BCNISD",
@@ -26334,6 +26594,11 @@ var BUILD_MINZOOM = 0;
26334
26594
  var BUILD_MAXZOOM = 14;
26335
26595
 
26336
26596
  // src/atlas/source-registry.ts
26597
+ var LAND_REGION = "CHRT_LAND";
26598
+ var RELIEF_REGION = "CHRT_RELIEF";
26599
+ var RELIEF_MINZOOM = 8;
26600
+ var RELIEF_MAXZOOM = 13;
26601
+ var RELIEF_TILE_SIZE = 512;
26337
26602
  var DEFAULT_TILE_BASE_URL2 = "https://tiles.chrt.co";
26338
26603
  var DEFAULT_REGION = "NOAA_ENC";
26339
26604
  function buildSources(opts = {}) {
@@ -26348,7 +26613,7 @@ function buildSources(opts = {}) {
26348
26613
  };
26349
26614
  }
26350
26615
  const base = (opts.tileBaseUrl ?? DEFAULT_TILE_BASE_URL2).replace(/\/+$/, "");
26351
- return {
26616
+ const sources = {
26352
26617
  [region]: {
26353
26618
  type: "vector",
26354
26619
  tiles: [`${base}/v1/tiles/${region}/{z}/{x}/{y}.mvt`],
@@ -26356,6 +26621,25 @@ function buildSources(opts = {}) {
26356
26621
  maxzoom: BUILD_MAXZOOM
26357
26622
  }
26358
26623
  };
26624
+ if (opts.land) {
26625
+ sources[LAND_REGION] = {
26626
+ type: "vector",
26627
+ tiles: [`${base}/v1/tiles/${LAND_REGION}/{z}/{x}/{y}.mvt`],
26628
+ minzoom: BUILD_MINZOOM,
26629
+ maxzoom: BUILD_MAXZOOM
26630
+ };
26631
+ }
26632
+ if (opts.relief) {
26633
+ sources[RELIEF_REGION] = {
26634
+ type: "raster-dem",
26635
+ tiles: [`${base}/v1/tiles/${RELIEF_REGION}/{z}/{x}/{y}.png`],
26636
+ encoding: "terrarium",
26637
+ tileSize: RELIEF_TILE_SIZE,
26638
+ minzoom: RELIEF_MINZOOM,
26639
+ maxzoom: RELIEF_MAXZOOM
26640
+ };
26641
+ }
26642
+ return sources;
26359
26643
  }
26360
26644
 
26361
26645
  // src/atlas/layer-builder.ts
@@ -27593,6 +27877,209 @@ function getOrderedClasses() {
27593
27877
  return ordered;
27594
27878
  }
27595
27879
 
27880
+ // src/atlas/land-layers.ts
27881
+ var LAND_THEMES = {
27882
+ DAY: {
27883
+ base: "#e8d9b0",
27884
+ cover: { wood: "#cfd8b4", wetland: "#c9d3c4", urban: "#dedad2", sand: "#efe4c2" },
27885
+ contour: "#a89878",
27886
+ contourIndex: "#8a7a5c",
27887
+ road: "#d9c9a4",
27888
+ roadMajor: "#d2bd8e",
27889
+ label: "#5b4f3a",
27890
+ halo: "#f2ead6",
27891
+ shadow: "#6b5a3e",
27892
+ highlight: "#fffaf0"
27893
+ },
27894
+ DUSK: {
27895
+ base: "#4a4433",
27896
+ cover: { wood: "#414a38", wetland: "#3f4740", urban: "#4e4a42", sand: "#544c39" },
27897
+ contour: "#6b6250",
27898
+ contourIndex: "#837961",
27899
+ road: "#565040",
27900
+ roadMajor: "#63594440",
27901
+ label: "#c3b898",
27902
+ halo: "#2b2820",
27903
+ shadow: "#2e2a20",
27904
+ highlight: "#8a8068"
27905
+ },
27906
+ NIGHT: {
27907
+ base: "#2a2620",
27908
+ cover: { wood: "#242a20", wetland: "#232823", urban: "#2c2925", sand: "#302b22" },
27909
+ contour: "#413b30",
27910
+ contourIndex: "#524a3b",
27911
+ road: "#332f27",
27912
+ roadMajor: "#3d382d",
27913
+ label: "#7d745e",
27914
+ halo: "#15130f",
27915
+ shadow: "#1a1712",
27916
+ highlight: "#4a4436"
27917
+ }
27918
+ };
27919
+ var FITS = ["<=", ["coalesce", ["get", "min_z"], 0], ["zoom"]];
27920
+ var ANCHOR = ["coalesce", ["get", "anchor"], "top"];
27921
+ var anchorOffset = (em) => [
27922
+ "match",
27923
+ ["get", "anchor"],
27924
+ "left",
27925
+ ["literal", [0.6, 0]],
27926
+ "right",
27927
+ ["literal", [-0.6, 0]],
27928
+ "bottom",
27929
+ ["literal", [0, -em]],
27930
+ ["literal", [0, em]]
27931
+ ];
27932
+ var FONT = ["Open Sans Regular"];
27933
+ var FONT_ITALIC = ["Open Sans Italic"];
27934
+ function landLayers(opts = {}) {
27935
+ const palette = opts.palette ?? "DAY";
27936
+ const T = LAND_THEMES[palette] ?? LAND_THEMES.DAY;
27937
+ const src = opts.sourceId ?? LAND_REGION;
27938
+ const demSrc = opts.reliefSourceId ?? RELIEF_REGION;
27939
+ const L = (o) => o;
27940
+ const layers = [
27941
+ // 1. The land itself — LNDARE ∩ coverage, so it can never outrun the chart.
27942
+ L({
27943
+ id: "chrtland-base",
27944
+ type: "fill",
27945
+ source: src,
27946
+ "source-layer": "land_base",
27947
+ paint: { "fill-color": T.base }
27948
+ })
27949
+ ];
27950
+ layers.push(L({
27951
+ id: "chrtland-cover",
27952
+ type: "fill",
27953
+ source: src,
27954
+ "source-layer": "land_cover",
27955
+ filter: ["<=", ["coalesce", ["get", "min_z"], 0], ["zoom"]],
27956
+ paint: {
27957
+ "fill-color": [
27958
+ "match",
27959
+ ["get", "class"],
27960
+ "wood",
27961
+ T.cover.wood,
27962
+ "wetland",
27963
+ T.cover.wetland,
27964
+ "urban",
27965
+ T.cover.urban,
27966
+ "sand",
27967
+ T.cover.sand,
27968
+ T.base
27969
+ ],
27970
+ "fill-opacity": 0.85
27971
+ }
27972
+ }));
27973
+ if (opts.relief) {
27974
+ layers.push(L({
27975
+ id: "chrtland-hillshade",
27976
+ type: "hillshade",
27977
+ source: demSrc,
27978
+ paint: {
27979
+ "hillshade-exaggeration": 0.45,
27980
+ "hillshade-shadow-color": T.shadow,
27981
+ "hillshade-highlight-color": T.highlight,
27982
+ "hillshade-accent-color": T.shadow
27983
+ }
27984
+ }));
27985
+ }
27986
+ layers.push(L({
27987
+ id: "chrtland-contour",
27988
+ type: "line",
27989
+ source: src,
27990
+ "source-layer": "land_contour",
27991
+ paint: {
27992
+ "line-color": ["case", ["==", ["get", "is_index"], 1], T.contourIndex, T.contour],
27993
+ "line-width": ["case", ["==", ["get", "is_index"], 1], 0.8, 0.4],
27994
+ "line-opacity": 0.7
27995
+ }
27996
+ }));
27997
+ layers.push(L({
27998
+ id: "chrtland-road",
27999
+ type: "line",
28000
+ source: src,
28001
+ "source-layer": "land_road",
28002
+ minzoom: 10,
28003
+ paint: {
28004
+ "line-color": ["match", ["get", "kind"], "highway", T.roadMajor, T.road],
28005
+ "line-width": [
28006
+ "interpolate",
28007
+ ["linear"],
28008
+ ["zoom"],
28009
+ 10,
28010
+ ["match", ["get", "kind"], "highway", 0.8, 0.4],
28011
+ 14,
28012
+ ["match", ["get", "kind"], "highway", 2.4, 1.2]
28013
+ ],
28014
+ "line-opacity": 0.8
28015
+ }
28016
+ }));
28017
+ layers.push(L({
28018
+ id: "chrtland-town",
28019
+ type: "symbol",
28020
+ source: src,
28021
+ "source-layer": "land_town",
28022
+ minzoom: 9,
28023
+ filter: FITS,
28024
+ layout: {
28025
+ "text-field": [
28026
+ "case",
28027
+ ["==", ["get", "upcase"], true],
28028
+ ["upcase", ["get", "name"]],
28029
+ ["get", "name"]
28030
+ ],
28031
+ "text-font": FONT,
28032
+ "text-size": ["interpolate", ["linear"], ["zoom"], 9, 10, 14, 13.5],
28033
+ "text-letter-spacing": ["case", ["==", ["get", "upcase"], true], 0.14, 0],
28034
+ "text-offset": anchorOffset(0.75),
28035
+ "text-anchor": ANCHOR,
28036
+ "text-padding": 6,
28037
+ "text-allow-overlap": false,
28038
+ "symbol-sort-key": 2
28039
+ },
28040
+ paint: { "text-color": T.label, "text-halo-color": T.halo, "text-halo-width": 1.2 }
28041
+ }));
28042
+ layers.push(L({
28043
+ id: "chrtland-summit",
28044
+ type: "symbol",
28045
+ source: src,
28046
+ "source-layer": "land_summit",
28047
+ minzoom: 11.5,
28048
+ filter: ["all", FITS, [">=", ["get", "peak_m"], 40]],
28049
+ layout: {
28050
+ "text-field": ["concat", ["get", "name"], "\n", ["to-string", ["get", "peak_m"]], " m"],
28051
+ "text-font": FONT,
28052
+ "text-size": ["interpolate", ["linear"], ["zoom"], 11.5, 8.5, 14, 11],
28053
+ "text-offset": anchorOffset(0.8),
28054
+ "text-anchor": ANCHOR,
28055
+ "text-padding": 5,
28056
+ "text-allow-overlap": false,
28057
+ "symbol-sort-key": 3
28058
+ },
28059
+ paint: { "text-color": T.label, "text-halo-color": T.halo, "text-halo-width": 1.2 }
28060
+ }));
28061
+ layers.push(L({
28062
+ id: "chrtland-poi",
28063
+ type: "symbol",
28064
+ source: src,
28065
+ "source-layer": "land_poi",
28066
+ minzoom: 13,
28067
+ filter: FITS,
28068
+ layout: {
28069
+ "text-field": ["get", "name"],
28070
+ "text-font": FONT_ITALIC,
28071
+ "text-size": ["interpolate", ["linear"], ["zoom"], 13, 8, 14, 9.5],
28072
+ "text-offset": anchorOffset(0.7),
28073
+ "text-anchor": ANCHOR,
28074
+ "text-padding": 5,
28075
+ "text-allow-overlap": false,
28076
+ "symbol-sort-key": 5
28077
+ },
28078
+ paint: { "text-color": T.label, "text-halo-color": T.halo, "text-halo-width": 1.2 }
28079
+ }));
28080
+ return layers;
28081
+ }
28082
+
27596
28083
  // src/atlas/band-priority.ts
27597
28084
  var BAND_PRIORITY_RANGES = {
27598
28085
  "1": { minzoom: 0 },
@@ -28056,6 +28543,12 @@ function generateStyle(palette = "DAY", opts = {}) {
28056
28543
  paint: { "background-color": resolveColor("NODTA", palette) }
28057
28544
  };
28058
28545
  const layers = [backgroundLayer];
28546
+ if (opts.land) {
28547
+ layers.push(...landLayers({
28548
+ palette,
28549
+ ...opts.relief ? { relief: true } : {}
28550
+ }));
28551
+ }
28059
28552
  const labelLayers = [];
28060
28553
  const chartCascade = opts.chartMode ? CHART_CASCADE_CODES[opts.chartMode.band] : null;
28061
28554
  const chartRequestedCodes = opts.chartMode ? CHART_BAND_CODES[opts.chartMode.band] : null;
@@ -28189,6 +28682,8 @@ function generateStyle(palette = "DAY", opts = {}) {
28189
28682
  "chrt:color-table": palette,
28190
28683
  "chrt:generated-at": (/* @__PURE__ */ new Date()).toISOString(),
28191
28684
  "chrt:layer-count": layers.length,
28685
+ "chrt:land": Boolean(opts.land),
28686
+ "chrt:relief": Boolean(opts.relief),
28192
28687
  "chrt:render-mode": opts.chartMode ? `chart:${opts.chartMode.band}` : "continuous",
28193
28688
  "chrt:description": "IHO S-52 portrayal rules for Electronic Navigational Charts (ENCs). Generated from the CHRT atlas engine."
28194
28689
  },
@@ -29029,6 +29524,7 @@ export {
29029
29524
  LABEL_BEHAVIOR,
29030
29525
  LABEL_LAYER_GROUPS,
29031
29526
  LABEL_PRIORITY,
29527
+ LAND_REGION,
29032
29528
  NAUTICAL_SYMBOLS,
29033
29529
  NAV_AID_LAYER_GROUPS,
29034
29530
  NAV_AID_QUERY_LAYERS,
@@ -29039,6 +29535,7 @@ export {
29039
29535
  RASTER_ATON_CLASSES,
29040
29536
  RASTER_GLYPH_NAMES,
29041
29537
  RASTER_ICON_PREFIX,
29538
+ RELIEF_REGION,
29042
29539
  S101_AREA_FILL_NAMES,
29043
29540
  S101_CHART_SECTIONS,
29044
29541
  S101_FEATURES,