Skip to main content

Tile Schema

tile57's vector tiles use a fixed set of layers and fields. The generated MapLibre style depends on this schema, so the names are a contract. Do not rename a layer or a field without updating the style generator (src/assets/style.zig) to match and bumping the schema version.

This vocabulary is versioned as tile57/1. A chart bundle stamps both halves — the tiles and the portrayal assets — with that schema_version in its manifest.json, so a renderer can refuse a bundle whose schema it doesn't speak. Any change to a layer name or field key bumps it.

Every tile uses an extent of 4096 and a buffer of 64.

Live path coverage

Whether the tiles come from a pre-baked PMTiles archive or are generated live from a raw S-57 cell, the schema is the same. The live path (src/s57_mvt/) emits areas, area_patterns, lines, point_symbols, soundings, and text, plus the *_scamin declutter buckets (features carrying SCAMIN, attr 133) and a draw_prio property for S-52 fill ordering. DEPCNT lines carry valdco (the contour value, including the 0 m drying line) for line-centre labels.

Color is always a name

Fields like color_token and halo_color_token hold S-101 color names, not RGB values. The style resolves them against colortables.json to get the right Day, Dusk, or Night color — which is how a renderer switches palette without regenerating tiles.

Zoom levels and navigational bands

A nautical chart is not one map at one scale. NOAA compiles each ENC cell for a navigational purpose — from a wide overview to a close-in berthing plan — and the right cell to show depends on how far you are zoomed in. Each cell carries a compilation scale (CSCL, a 1:N denominator) that maps to a band, and each band covers the Web-Mercator zoom range that matches its scale:

BandZoom range
Overview5 – 8
General8 – 10
Coastal10 – 12
Approach12 – 14
Harbor14 – 16
Berthing16 – 18

Vector tiles scale crisply, so a renderer overzooms the top level rather than baking more. Within a band, each feature carries an S-52 SCAMIN (the scale below which it should disappear); honoring it per-feature is what the *_scamin buckets are for, so minor features drop out at their own thresholds and the chart never clutters.

The seven layers

areas

Filled polygons, such as depth areas and land.

FieldTypeMeaning
color_tokenstringFill color name.
classstringS-57 object class.
draw_priointDraw priority.
catCategory.
bndBoundary-pass marker.

area_patterns

Polygons filled with a repeating pattern instead of a flat color.

FieldTypeMeaning
pattern_namestringName of the fill pattern.
classstringS-57 object class.
draw_priointDraw priority.

lines

Stroked lines, such as depth contours. Sector-light legs and arcs also go here.

FieldTypeMeaning
classstringS-57 object class.
color_tokenstringStroke color name.
width_pxintStroke width in pixels.
dashDash pattern.

complex_lines

Lines drawn with a named, repeating line style.

FieldTypeMeaning
classstringS-57 object class.
linestyle_namestringName of the line style.

point_symbols

Single symbols placed at a point, such as buoys and beacons.

FieldTypeMeaning
classstringS-57 object class.
symbol_namestringName of the symbol.
rotation_degnumberRotation in degrees.
scalenumberScale factor.
offset_x, offset_ynumberPixel offset from the point.
halo_color_tokenstringHalo color name.
draw_priointDraw priority.

soundings

Depth soundings, drawn as digit symbols (SNDFRM04 digit composition).

FieldTypeMeaning
classstringS-57 object class.
symbol_namesstringThe digit symbols that make up the sounding.
scalenumberScale factor.
draw_priointDraw priority.

text

Text labels (the name typically derives from OBJNAM via the featureName attribute).

FieldTypeMeaning
classstringS-57 object class.
textstringThe label text.
font_size_pxnumberFont size in pixels.
color_tokenstringText color name.
halign, valignHorizontal and vertical alignment.
offset_x, offset_ynumberPixel offset from the anchor.
halo_color_tokenstringHalo color name.
draw_priointDraw priority.