Per-tile WMS GetMap layer type; radar to nowCOAST; GEBCO preset live (#118)#176
Open
rolker wants to merge 7 commits into
Open
Per-tile WMS GetMap layer type; radar to nowCOAST; GEBCO preset live (#118)#176rolker wants to merge 7 commits into
rolker wants to merge 7 commits into
Conversation
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
There was a problem hiding this comment.
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_BBOXexpansion inTileLayout::getUrl()and addwms::generateWmsLayout()to build an OSM-identical grid with a WMS GetMap URL template. - Wire
type="wms"inBackgroundManager::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> | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
WMS_BBOXtemplate key inTileLayout::getUrl()— expands to the tile's EPSG:3857minx,miny,maxx,maxy(WMS 1.3.0 axis order, cm precision).wms::generateWmsLayout()— builds the identical grid asosm::generateTileLayout()(identity by construction) and swaps only the URL template;WIDTH/HEIGHTderive fromosm::tile_sizeso raster size and bbox math cannot drift.VERSION/CRSdeliberately hardcoded — rationale in ADR-0012.type="wms"wired inBackgroundManager::createTileLayer(); WMS layers inherit the fullMapTileslifecycle unchanged — disk cache, CAMP silently crashes on map zoom/pan during live ops (recurring) — likely OOM, prime suspect #96 GDAL leak #98 eviction, Add auto-refreshing weather radar tile overlay (stacked layer on the map system) #99/Weather radar (NEXRAD #99) overlay shows stale data — refresh not advancing to latest frame #111 refresh + cache-buster (its&branch already handles query-string URLs).weather_radar:base_reflectivity_mosaic, latest-frame only (TIME omitted), Add auto-refreshing weather radar tile overlay (stacked layer on the map system) #99 defaults kept (default-off, 0.65 opacity, 5-min refresh); preset namenexrad_radarretained for persisted-state continuity. IEM stopgap retired.wms.gebco.net/mapserv,GEBCO_LATEST).wmsin the type list.Live smoke check (2026-07-24)
image/png, 117 KB.base_reflectivity_mosaicreturnsLayerNotDefined— the workspace-qualifiedweather_radar:base_reflectivity_mosaicis required, then HTTP 200, 256×256 PNG. Preset fixed accordingly.Test plan
test_wms_url_generation(pure logic, no network): bbox expansion verified against the OSM tile math at zoom 0/1, all required GetMap parameters present, grid identity with the OSM layout.Review
Pre-push review round 1: approved, Ship: recommended, 0 must-fix (timeline in
.agent/work-plans/issue-118/progress.md; plan inplan.md). Follows #117 / PR #175.Authored-By:
Claude Code AgentModel:
Claude Fable 5