Skip to content

Tile Serving — martin MVT path (retired)

Climate-Lama previously served Mapbox Vector Tiles (MVT) directly from PostGIS via martin — see ADR-032 for the original decision. The whole path was retired in issue #562: it never had a consumer.

For hazard raster tiles (the path that is live), see Raster Serving — titiler + Cloud-Optimized GeoTIFF.


Why this was safe to remove

  • models/layer_spec.py::layer_specs_for_hazard_dataset() fills source_url only for raster layers with a cog_path. The vector_point/line specs (the ones an MVT tile would have served) always shipped source_url: "" — martin URLs were never wired into them.
  • GET /v1/hazards/{id}/layers is the only LayerSpec producer, so no MVT tile URL was ever emitted to a client.
  • No SDK, Postman collection, or UI reference existed for the MVT route.
  • This doc itself had drifted from reality even before the retirement: it described nginx proxying /tiles/martin:3000 in production, but nginx/nginx.conf never contained that proxy block — the claim was aspirational, not implemented.
  • The live point path was, and remains, GeoJSON via GET /v1/results/{id}/geojson, not MVT.

What was removed

  • The mvt_hazard_centroids PostGIS function (created in migrations/versions/0033_mvt_tile_functions.py, dropped in migrations/versions/0067_drop_mvt_hazard_centroids_function.py).
  • The martin service from docker-compose.yml and docker-compose.prod.yml, and the martin_base_url setting from config.py.
  • The GET /v1/tiles/mvt/{dataset_id}/{z}/{x}/{y}.pbf proxy route (api/v1/tiles.py) and the "mvt" TileType / metric label (core/tile_cache.py, metrics.py).
  • tests/test_mvt_functions.py, the MVT cases in test_tiles_proxy.py, and scripts/bench_tiles.py (which existed solely to benchmark the dropped function).

hazard_centroids itself — the table the function read from — was not dropped; that is tracked as a separate, gated issue so as not to conflate a dead-code removal with a data-model change.

The COG raster tile route (GET /v1/tiles/cog/{dataset_id}/{z}/{x}/{y}.png) is unaffected — see Raster Serving for its architecture.