Skip to content

Add built-in XYZ tile store (map.type = xyz)#201

Open
comoglu wants to merge 1 commit into
SeisComP:mainfrom
comoglu:feature/xyz-tilestore
Open

Add built-in XYZ tile store (map.type = xyz)#201
comoglu wants to merge 1 commit into
SeisComP:mainfrom
comoglu:feature/xyz-tilestore

Conversation

@comoglu

@comoglu comoglu commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds an XYZ / slippy-map tile store to the GUI map library so SeisComP GUIs (scolv, scmv, scmvx, scesv, scmapcut, …) can use basemaps from any standard XYZ tile server — OpenStreetMap, OpenTopoMap, ESRI World Imagery, CartoDB, or a custom server — out of the box, selected with map.type = xyz. Previously the only built-in store was the file-based TileDirectory.

This follows Jan's guidance: implemented inside the GUI library, privately (anonymous namespace, no public header) so it isn't part of the API and adding members later doesn't affect the library ABI. It registers itself with the TileStore factory as "xyz".

What's included

  • libs/seiscomp/gui/map/tilestores/xyz.cpp — the implementation, plus its CMakeLists.txt, wired into the gui lib via SC_ADD_GUI_SUBDIR_SOURCES(GUI_MAP tilestores).
  • Qt Network added to the gui library's Qt components/links (the store fetches tiles over HTTP).
  • map.xyz.* documented in apps/gui/descriptions/global_gui.xml, and the map.type description updated to mention the built-in xyz store.

Features

  • map.xyz.sources — list of minLevel:maxLevel:urlTemplate bands, so different basemaps can be shown at different zoom levels (overrides map.location).
  • map.xyz.minLevel / maxLevel — single-source zoom clamp (default max 19 = OSM standard; hard ceiling TileIndex::MaxLevel).
  • On-disk cache with TTL (map.xyz.cacheDir / cacheDuration).
  • Negative caching of HTTP ≥ 400 tiles (map.xyz.missingTTL) so absent tiles aren't re-requested every redraw.
  • {s} subdomain rotation and 256/512 tile size (with a one-time warning if the served size differs).

URL template tokens: {z}/{x}/{y}/{s} (note ESRI uses {z}/{y}/{x} order).

Notes

  • The projection is declared the same way as TileDirectory (_projection = Mercator).
  • No Q_OBJECT/moc: replies are dispatched via the functor-based connect overload, keeping the implementation header-free.
  • Builds cleanly into libseiscomp_qt (verified locally, Qt5). An external standalone plugin remains available for SeisComP < 7.

@cla-bot cla-bot Bot added the cla-signed The CLA has been signed by all contributors label Jun 16, 2026
Add an XYZ / slippy-map tile store to the GUI map library so SeisComP GUIs
can use basemaps from any standard XYZ server (OpenStreetMap, OpenTopoMap,
ESRI, CartoDB, custom) out of the box, without an external plugin.

- Implemented privately in an anonymous namespace in
  libs/seiscomp/gui/map/tilestores/xyz.cpp; no public header, so adding
  members later does not affect the library ABI. Registers itself with the
  TileStore factory as "xyz".
- Features: per-zoom-level source bands (map.xyz.sources), single-source
  min/maxLevel, on-disk caching with TTL, negative-caching of HTTP>=400
  tiles (map.xyz.missingTTL), {s} subdomain rotation, 256/512 tile size.
- Link Qt Network into the gui library; document map.xyz.* in global_gui.xml.
@comoglu comoglu force-pushed the feature/xyz-tilestore branch from 22cca92 to da3abfe Compare June 16, 2026 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The CLA has been signed by all contributors

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant