Skip to content

Per-tile WMS GetMap layer type; radar to nowCOAST; GEBCO preset live (#118)#176

Open
rolker wants to merge 7 commits into
jazzyfrom
feature/issue-118
Open

Per-tile WMS GetMap layer type; radar to nowCOAST; GEBCO preset live (#118)#176
rolker wants to merge 7 commits into
jazzyfrom
feature/issue-118

Conversation

@rolker

@rolker rolker commented Jul 24, 2026

Copy link
Copy Markdown
Owner

Closes #118

What

Adds a per-tile WMS 1.3.0 GetMap layer type to the camp map system (ADR-0012), switches the weather-radar overlay from the IEM XYZ stopgap to authoritative NOAA nowCOAST, and brings the #117 GEBCO bathymetry preset live.

Live smoke check (2026-07-24)

  • GEBCO GetMap, zoom-1 NE-quadrant bbox → HTTP 200, image/png, 117 KB.
  • nowCOAST: the issue's bare layer name base_reflectivity_mosaic returns LayerNotDefined — the workspace-qualified weather_radar:base_reflectivity_mosaic is required, then HTTP 200, 256×256 PNG. Preset fixed accordingly.

Test plan

Review

Pre-push review round 1: approved, Ship: recommended, 0 must-fix (timeline in .agent/work-plans/issue-118/progress.md; plan in plan.md). Follows #117 / PR #175.


Authored-By: Claude Code Agent
Model: Claude Fable 5

Claude Code Agent added 7 commits July 24, 2026 21:07
Per-tile WMS GetMap via WMS_BBOX key in TileLayout::getUrl(); wms.cpp analog to osm.cpp; nowCOAST radar + GEBCO presets
…preset live

- WMS_BBOX template key in TileLayout::getUrl() (EPSG:3857 minx,miny,maxx,maxy,
  WMS 1.3.0 axis order, cm precision)
- wms::generateWmsLayout(): OSM-identical grid, GetMap URL template;
  WIDTH/HEIGHT derived from osm::tile_size; VERSION/CRS hardcoded (ADR-0012)
- type="wms" wired in BackgroundManager::createTileLayer(); full MapTiles
  lifecycle inherited (cache, #98 eviction, #99/#111 refresh + cache-buster
  '&' branch)
- radar preset -> nowCOAST weather_radar:base_reflectivity_mosaic
  (workspace-qualified — bare name returns LayerNotDefined; smoke-checked
  live, 200/PNG), latest-frame only, #99 defaults kept, name retained for
  persisted-state continuity; IEM stopgap retired
- GEBCO preset live (smoke-checked live, 200/PNG 117KB)
- ADR-0012 records granularity/TIME/hardcoded-params decisions; ADR-0003
  addendum gains wms type
- tests: bbox zoom-0/zoom-1 math vs OSM constants, required GetMap params,
  grid identity with OSM layout; persistence suite: unconstructible-type
  refusal + WMS preset round-trip
Copilot AI review requested due to automatic review settings July 24, 2026 22:00

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds per-tile WMS 1.3.0 GetMap support to CAMP’s MapTiles pipeline (via a WMS_BBOX URL template key), migrates the radar overlay preset to NOAA nowCOAST WMS, and enables the GEBCO WMS bathymetry preset, with ADR + unit-test coverage.

Changes:

  • Implement WMS_BBOX expansion in TileLayout::getUrl() and add wms::generateWmsLayout() to build an OSM-identical grid with a WMS GetMap URL template.
  • Wire type="wms" in BackgroundManager::createTileLayer() and update built-in presets (nowCOAST radar + live GEBCO).
  • Add ADR-0012 and new pure-logic URL generation tests; update persistence tests and CMake test registration.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
test/test_wms_url_generation.cpp New pure-logic unit tests validating bbox expansion, required params, and grid identity.
test/test_background_persistence.cpp Updates persistence tests for new constructible WMS type and a synthetic invalid-type refusal case.
src/camp_map/map_tiles/wms.h Declares generateWmsLayout() for WMS GetMap-based tile layouts.
src/camp_map/map_tiles/wms.cpp Implements WMS layout generation by reusing the OSM grid and swapping URL templating.
src/camp_map/map_tiles/tile_layout.cpp Adds WMS_BBOX key expansion support in TileLayout::getUrl().
src/camp_map/background/tile_layer_presets.h Switches radar preset to nowCOAST WMS, enables GEBCO WMS, and updates preset metadata comments.
src/camp_map/background/background_manager.cpp Constructs WMS-backed MapTiles layers when preset.type == "wms".
docs/decisions/0012-wms-getmap-layer-type.md New ADR documenting the per-tile WMS design and scope decisions.
docs/decisions/0003-backgrounds-as-layers-and-depth-tree.md ADR-0003 addendum updated to include wms type in the schema.
CMakeLists.txt Adds wms.cpp to build and registers the new gtest target.
.agent/work-plans/issue-118/progress.md Work-plan progress log for issue #118.
.agent/work-plans/issue-118/plan.md Work-plan describing intended design/implementation/testing for #118.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +26 to +30
base_url + "?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=");
layout.url_variable_keys.push_back("WMS_BBOX");
layout.url_static_parts.push_back(
"&CRS=EPSG:3857&WIDTH=" + size + "&HEIGHT=" + size +
"&FORMAT=image/png&TRANSPARENT=TRUE&LAYERS=" + layer_id);
Comment on lines +178 to +188
if(preset.type == "wms")
{
// [camp#118] Per-tile WMS 1.3.0 GetMap on the OSM grid (ADR-0012): rides
// the identical MapTiles lifecycle as XYZ — cache, eviction, refresh and
// cache-buster (the buster's '&' branch handles the query string).
auto tiles = new map_tiles::MapTiles(layers, preset.name,
wms::generateWmsLayout(preset.url.toStdString(), preset.layer_id.toStdString()));
if(preset.refresh_ms > 0)
tiles->setRefreshInterval(preset.refresh_ms);
return tiles;
}
#ifndef CAMP_MAP_TILES_WMS_H
#define CAMP_MAP_TILES_WMS_H

#include "tile_layout.h"
Comment on lines +6 to +9
#include <gtest/gtest.h>

#include <string>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add WMS GetMap layer support; adopt nowCOAST radar (authoritative NOAA) for the #99 overlay

2 participants