Skip to content

martin-v1.9.0

Choose a tag to compare

@CommanderStorm CommanderStorm released this 07 May 09:27
· 85 commits to main since this release
6c7c632

MVT - MLT pre-processing encoding

Martin can now serve MLT (MapLibre Tiles) by transcoding MVT on the fly.
MLT is a columnar successor to MVT - for our test fixture it is roughly 39% smaller on the wire and 12% faster to serve from cache due to this size difference.
No tile re-generation or schema migration is required:
the conversion runs at request time when the client sends Accept: application/vnd.maplibre-tile.
We also can convert MLT tiles back to MVT if the client requests it.

The mlt cargo feature is now part of the default feature set, so prebuilt binaries ship with MLT support.
Builds without mlt will return an error if a client requests MLT.

You can configure this behaviour with the new convert-to-mlt or convert-to-mvt config key.
It accepts three states (auto, disabled, or an explicit encoder object) and can be set at three nesting levels (global, source-type, individual source).
The most-specific level wins and the default is auto.

convert-to-mlt: auto
convert-to-mvt: auto

postgres:
  connection_string: postgresql://localhost/mydb

pmtiles:
  sources:
    basemap:
      path: /data/basemap.pmtiles
      # inherits the global `auto`
    legacy:
      path: /data/legacy.pmtiles
      # this one source always serves MLT and configures how to serve it
      convert-to-mlt:
        tessellate: true
      convert-to-mvt: disabled

To override the encoder defaults (rarely needed; see the docs for the full field list), pass an explicit object:

convert-to-mlt:
  tessellate: false # Enable if your client supports pre-tessellated polygons and you benchmarked that this improves your usecase
  try_spatial_morton_sort: true # Disable if your data is already spatially ordered
  try_spatial_hilbert_sort: true # Disable if Morton sort doesn't compress well for your data
  try_id_sort: false # Enable when features have sequential IDs and spatial sorting isn't beneficial
  allow_fsst: true # Disable to reduce search space
  allow_fpf: true # Disable to reduce search space
  allow_shared_dict: true # Disable to reduce search space

A full guide is avaliable here.
Implemented in #2769 #2773 and #2775

Improved sprite and font previews in the Web UI

The Web UI now renders sprites and font previews directly using MapLibre GL and SDF glyph data.
Sprite catalogs support live PNG/SDF rendering, icon scaling, SDF tint and halo previews, and quick sprite ID copying.
Font cards now render real sample text from /font/{name}/0-255 instead of placeholder previews, with graceful fallback handling when glyph loading fails.
Existing sprite and font endpoints are unchanged. (#2774, #2772)

Structured logging for martin-core and mbtiles

martin-core and mbtiles now emit structured tracing fields instead of interpolated log strings.
Human-readable logs remain unchanged, but external log scrapers that rely on the old free-text format may need updates. (#2777, #2778)

Fixed

  • (mbtiles) Prevent folder sources from disappearing when a single MBTiles file fails to initialize.
    Invalid files now emit a warning while the remaining sources continue loading normally. (#2768)

Other