Repository navigation
feat(basemap): geology map from the national geological surveys - #304
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The scanned 1:50 000 sheets have gaps (3.0E 45.5N) and few 1:250 000 sheets exist: there the tiles fell back to the 1:1 000 000 map, enlarged eight times. BD Charm-50 is continuous over metropolitan France: it is tried before the scans, up to zoom 16 where the layer stops rendering. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A 1:1 000 000 map draws no more detail past zoom 13: deeper tiles are enlarged instead. Half the WMS requests to this slow server, which timed out under load (3 of 24 tiles in Spain). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Yukon bedrock compilation (OGL - Yukon) and Saskatchewan bedrock geology at 1:250 000 and 1:1 000 000 (Unrestricted Use Data Licence, commercial use allowed). New Brunswick and Nova Scotia are listed to check: no licence is named for their bedrock maps. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Estonian geological maps at 1:50 000 and 1:400 000 (Land Board open data licence, commercial use allowed) and GSNI maps at 1:10 000 and 1:250 000 (Open Government Licence). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Natural Science Institute of Iceland maps (CC BY 4.0): 1:600 000 bedrock and the two 1:100 000 sheets on its GeoServer. Hungary (SZTFH 1:100 000) and Israel (GSI 1:50 000) work but are listed to check: their terms contradict the metadata or are not stated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SEGEMAR 1:250 000 sheets and 1:2 500 000 national map (CC BY 4.0), and the INEGI rock map of Mexico (INEGI free use terms, commercial use allowed). INGEMMET (Peru) is listed to check: its terms name no commercial use, its national map is CC BY-NC-ND, and its server sends an incomplete TLS chain. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
NTGS 1:250 000 mosaic and 1:2 500 000 map (CC BY 4.0) and AGS Map 600 bedrock geology of Alberta (OGL - Alberta). Newfoundland and Labrador GeoAtlas maps work but are listed to check: no licence is named and the GSNL disclaimer forbids digital copies to third parties. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Luxembourg INSPIRE surface geology 1:350 000 (CC BY 4.0). The detailed harmonised map of Luxembourg, the TNO map of the Netherlands and the Lithuanian 1:200 000 maps are listed to check: their dataset licences are open but other terms or the service contradict them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # requirements.txt
- Layer(sources, tile_by_tile) replaces the tuples of MAPS: the geology map declares its fill instead of it being guessed from finite scale windows. MAPS is defined once. - Source.wms_crs becomes bbox_crs (map server exports use it too), and its fields are documented for every source. - WEB_MERCATOR lives next to WGS84 in crs_functions, imported by the basemap modules. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…source check - A source failing 3 times in a row (timeout, HTTP error, non-image answer such as a maintenance page) is paused 120 s; it still serves its cached tiles, and one more failure after the pause pauses it again. A 404 or an empty tile is not a failure. - A tile-by-tile layer asks its sources two at a time: the wait is the slowest of the pair, not the sum, and the earlier source still wins every tile it serves. - Geology sources workflow: each night one real tile per shipped source, Slack notified on failure. Actions pinned by commit, read-only token. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxNumerique
marked this pull request as ready for review
November 26, 2026 15:27
…b-Back into feat/geology
JulienChampagnol
approved these changes
Dec 1, 2026
# Conflicts: # requirements.txt
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.
Summary
Adds a Geology map to the basemap, built from the national (and state/provincial) geological surveys' own map services.
basemap/geology_sources.json): one entry per survey layer (area, scale, protocol, licence, attribution). Adding a country is a new entry, no code. Onlyverifiedentries are loaded;to_checkentries document what was left out and why (notes).geologylayer takes, for each tile, the most detailed source whose scale window and area hold it and that actually serves it. A view across a border shows each country with its own survey. Every source hasmin_scale: 0, so a coarser map fills finer zooms where nothing more detailed serves. A tile no source serves stays empty: no world fallback.wms_version,SRS,EPSG:900913, longitude-firstEPSG:4326) served as tiles, one GetMap per Web Mercator tile; ArcGISexport. Bboxes are converted withconvert_xy_cornerswhen the WMS has no Web Mercator.Retry-After); a failing source logs one warning per minute. A non-image answer (e.g. a maintenance page) is not cached, so the source comes back by itself.max_zooma source is not asked; its parent tile is enlarged. Coarse WMS sources are capped where the server draws no more detail (EGDI 1:1M: zoom 13).buildacceptsmaps: ["geology"], stacked betweenplanandroutes.Licence rule
A source is shipped only if its licence clearly allows commercial use and caching. Any contradiction or unclear clause keeps it
to_check, whatever its technical state. Incomplete coverage of a country is accepted.Sources shipped (47)
Precision on the test models
Same 4 km faulted BRep placed in each country with its own projected CRS (
D:\data\crs_test_models), 2026-11-26:The coarse countries are limited by licences, not by code: their detailed surveys are listed
to_checkbelow.Performance (4 km extent, satellite + geology, 25-30 tiles at zoom 14): 1.6-2.5 s on first display (network), 0.05 s from the tile cache, 0.03 s for the mesh.
Left out (
to_check)Test plan
pytest tests/test_basemap.py tests/test_basemap_geology.pypytest -m network tests/test_basemap_geology.py: one real tile per shipped source, through the Back code (deselected by default inpytest.ini, not run in CI). Québec fails while the MRNF server shows its maintenance page.Related: OpenGeodeWeb-Front#609, Vease#936, Vease-Back#174 (all on
feat/geology).🤖 Generated with Claude Code