Skip to content

martin-v1.15.0

Choose a tag to compare

@CommanderStorm CommanderStorm released this 02 Sep 09:55
· 90 commits to main since this release
ef44ded

Hillshade postprocessing

Martin can now bake a hillshade from a source serving Mapzen normal tiles, so clients get shaded relief instead of a normal map they have to shade themselves.

passthrough:
  sources:
    terrain:
      url: https://elevation-tiles-prod.s3.amazonaws.com/normal/{z}/{x}/{y}.png
      maxzoom: 14
      convert_to_hillshade: auto

auto bakes with the defaults, a map of settings overrides light angle, exaggeration, contrast, banding and output format (png, webp or jxl).
It is a per-source key only, since an inherited value would also reach sources that cannot be shaded.
Baking reads a 3x3 neighborhood so tiles do not have seams at their edges, and caches the normal maps rather than the baked output.
See the documentation.
Done in #3180.

Contour postprocessing

convert_to_contour traces contour lines from a source serving Mapzen Terrarium elevation tiles and serves them as MVT.
Each tile has one contour layer of linestrings tagged with their elevation (ele) and whether they are a major line (major), with the interval per zoom set by zoom_intervals.
Unlike hillshade the output is vector, so the client styles and labels the lines itself.
See the documentation.
Done in #3183.

Added

  • JPEG XL: jxl tiles are detected and decoded (via jxl-oxide), and hillshade can encode its output as lossless JPEG XL (via zune-jpegxl), which is usually smaller than PNG or lossless WebP (#3181)
  • (cache-control) per-source Cache-Control overrides on top of the server-wide default. A composite request only uses one if all of its sources are configured with the same value (#3167, #3148)
  • (postgres) --ssl-cert and --ssl-key flags for the client certificate and key, mirroring --ca-root-file (#3150 by @reddynitish)
  • (config) warn once at startup when Martin falls back to a legacy Postgres env var (DATABASE_URL, DEFAULT_SRID, PGSSLCERT, PGSSLKEY, PGSSLROOTCERT), naming the config key that replaces it. All five keep working, the removal is deferred to v2 (#3151 by @reddynitish)

Fixed

  • (mbtiles) avoid a full tiles scan when computing min/max zoom. Startup on a 5M tile file drops from 367ms to 203ms flat, and from 1650ms to 203ms normalized (#3185)
  • (catalog) serialize the catalog in a stable key order, so /catalog no longer differs between restarts (#3189)
  • (fonts) redirect glyph URLs ending in .pbf instead of answering 404, so OpenMapTiles styles work unedited (#3187)
  • (pmtiles) pick up the ECS and EKS credential env vars, so S3 sources use the task role on Fargate and EKS (#3165)
  • (reload) keep per-source convert_to_* overrides for file-backed (#3160) and Postgres (#3144) sources
  • (config) gate the resolve_process_config imports on _process (#3191)
  • fix cors logging logging unrecognisable (#3136)
  • (deps) update npm dependencies (#3177, #3175)

Other

  • (pmtiles) open file sources concurrently and share one client per store (#3131)
  • Reload and config refactors: the reloader is now the single writer of Postgres sources, the tile reloaders moved into TileReloaders, file source ids resolve before the sources open, and Discovery::discover returns its warnings (#3130, #3178, #3190, #3133, #3142, #3143)
  • Split MartinError into separate error types (#3162)
  • Docs: a postprocessing section for the two new guides (#3139, #3140), authenticating requests with nginx auth_request (#3184), typo fixes (#3147 by @vaibhav8a)
  • Lints and tests: warn on wildcard_enum_match_arm, adopt clippy 1.98, use assert_matches!, test cleanup and formatting (#3168, #3137, #3166, #3179, #3135)
  • CI: the save-config e2e tests moved to rust and tests/test.sh is gone, the bundled DuckDB builds once and without debuginfo, build caches and duplicated job setup were cleaned up, and a few flaky tests were fixed (#3105, #3186, #3169, #3157, #3161, #3152, #3145, #3132, #3149, #3146)
  • (deps) cargo dependencies, docker images, github actions and pre-commit autoupdates (#3172, #3174, #3171, #3173, #3176, #3155)