Skip to content

martin-v1.12.0

Choose a tag to compare

@CommanderStorm CommanderStorm released this 07 Jul 22:33
5473950

GeoJSON tile source

Martin can now serve vector tiles directly from a .geojson/.json file, no pre-processing into MBTiles/PMTiles required.

How it works:

  • On startup the features are reprojected from WGS84 (EPSG:4326) to Web Mercator (EPSG:3857) and indexed in a packed Hilbert R-Tree.
  • Per tile request Martin queries the R-Tree for geometries overlapping the tile bbox, clips them (with a configurable buffer), transforms into tile coordinate space and encodes MVT, all on the fly. The tile extent and buffer are configurable.

Because it's file-backed, GeoJSON sources hot-reload: point Martin at a directory and it watches for .geojson/.json changes via filesystem events, adding, updating and removing sources without a restart, just like PMTiles and COG.

Great for smaller datasets and quick prototyping.
Done in #2538, #2925 by @thomfuhrmann.

Static map overlays

Building on the static rendering core from the last release, we added an endpoint to render a static map image with overlays drawn on top:

POST /style/{id}/static/{camera}/{wxh.fmt}

The camera can be a center point, a bounding box, or auto-fit to the overlays you pass in.
Overlays support fills, lines and circles with configurable color/opacity.
See the documentation for the full field list and examples.
Done in #2794, #2922.

mbtiles pack and mbtiles unpack

The mbtiles CLI gained two subcommands for converting between an MBTiles archive and a {z}/{x}/{y}.{ext} directory tree.
unpack extracts an archive into a directory (handy for inspecting individual tiles or serving them with any static HTTP server), and pack does the inverse.
Done in #2199 by @JakeLow.

Passthrough sources

Martin can now proxy tiles from an upstream HTTP tile server.
It fetches each tile from the configured upstream and serves the bytes verbatim, while the rest of Martin's pipeline (caching, headers, MVT↔MLT conversion) applies on top.
Use it to put Martin's cache in front of an existing tile server, hide an upstream API key from browsers, or spread requests across mirrors.

passthrough:
  sources:
    osm: https://tile.openstreetmap.org/{z}/{x}/{y}.png
    secure:
      url: https://api.example.com/{z}/{x}/{y}
      headers:
        Authorization: ${API_TOKEN}
      timeout: 30s

An upstream can be a {z}/{x}/{y} template, a TileJSON document URL, a list of mirror templates, or the detailed object form above.
See the documentation for the full field list.
Done in #2913, #2908, #2924.

More capable config parsing

We reworked how config files are parsed by migrating YAML handling to serde-saphyr (dropping serde_yaml).
YAML anchors and aliases now work, and the ${VAR:default} (with all the docker-compose shorthands now also supported) environment-variable substitution syntax is still supported.
Done in #2943, #2877, #2870, #2921.

☀️ GSoC spotlight: duckdb GeoParquet sources

GeoParquet (via DuckDB) config parsing and resolver wiring landed as a building block, continuing our GSoC DuckDB work.
Top-level config/lifecycle wiring is planned for a follow-up.
Done in #2931, #2902 by @manbhav234.

Fixed

  • (pg) Redact the password in the BadConnectionString error so it can't leak into logs (#2944).
  • Improve logging when a requested zoom is out of range (#2893).

Other