A marine chart plotter in Go. It reads NOAA S-57 ENC cells, draws them with the
S-101 Portrayal Catalogue, and bakes them into PMTiles vector-tile archives. A
<chart-plotter> web component renders the tiles with MapLibre GL JS. The native
libtile57 engine (Zig, the ./tile57 git submodule of github.com/beetlebugorg/tile57)
does all tiling, portrayal, style, and asset generation, linked into the Go
binary via CGO; the browser only renders pre-baked tiles. S-102 bathymetric
support is planned.
make build— buildbin/chartplotter. CGO build linkinglibtile57(built on demand from the./tile57git submodule with Zig 0.16); the S-101 catalogue is embedded in the lib, so there's no separate sync/embed step.buildfetches the submodule on demand (git submodule update --init --recursive) if it's missing, so a clone without--recurse-submodulesstill works. Needs git + Zig. (make build-tile57is a back-compat alias.)make test/make vet/make fmt— run before you commit.make serve— build and serveweb/on:8080. Baked tiles are the only tile path: import/bake charts through the app (orbake), no live tile set.make xbuild— cross-compile release binaries withzig cc(linux + windows, amd64/arm64). darwin is built natively on a macOS CI runner (Go's ownruntime/cgo/crypto/x509link Apple frameworks Zig doesn't bundle).
- CGO is required. libtile57 is the sole tile/portrayal engine, linked via CGO,
so
CGO_ENABLED=0no longer builds. Cross-compilation is preserved with Zig as the C toolchain (zig cc), not by staying CGO-free. Pure-Go deps are still preferred where a native lib isn't the point (e.g.modernc.org/sqlite, notmattn/go-sqlite3). The./tile57submodule (with its nested IHO catalogue submodules) + Zig 0.16 are hard build deps. - Engine dev override. The default engine source is the
./tile57git submodule — go.mod replaces the binding at./tile57/bindings/goand the Makefile defaultsTILE57 ?= tile57, so a plain--recurse-submodulesclone needs nogo.work. CI floats the submodule to the engine's latestmain; the committed pin is last-known-good (bump it withgit add tile57).go.workis OPTIONAL: use it only to build against a DIFFERENT engine checkout (e.g. a separate sibling clone you develop in), overriding BOTH halves — a gitignoredgo.workreplacinggithub.com/beetlebugorg/tile57/bindings/go => <path>/bindings/goplusmake TILE57=<path> …. Never commitgo.work. - Use https://www.openbridge.no/ for design and icons.
- Match the style of the code around you.
- Never run
git add -Aorgit add .. The repo holds large untracked files (testdata zips, PDFs, screenshots). Stage specific paths only.