Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

56 Commits

Folders and files

Repository files navigation

lagebuch-geodata

Offline map packs for the LageBuch fire-brigade incident log, one per Landkreis in Bayern. A pack holds:

  • an OpenStreetMap base map as vector tiles, zoom 0–15, which the app draws itself at any zoom (map.pmtiles);
  • bare-earth terrain heights from Bayern's DGM5 at 5 m (elevation.tif), for planning a Wasserförderung over a long distance;
  • hydrants, Saugstellen, Löschwasserbehälter and Löschteiche (water.geojson);
  • every address, for finding a location without a network (addresses.sqlite);
  • the pack's own area, within which all of the above is complete (boundary.geojson).

Next to each pack, the same release holds an optional road graph (<slug>-roads-v<N>.zip, a GeoPackage). With it, an app routes offline to a hydrant along streets and footways, on foot or by vehicle.

Each pack covers its Landkreis's real boundary plus 3 km, so an Einsatz just across the border still fits.

FORMAT.md is the contract the app reads, and documents every file. All of them are open standards (PMTiles, Cloud Optimized GeoTIFF, GeoJSON, SQLite, GeoPackage) that QGIS opens as they are.

The app fetches packs.json. Each entry points at a GitHub Release asset and carries its SHA-256, and every release has a build provenance attestation.

Requesting a pack

Open a new pack request with the Landkreis's OSM relation ID. A maintainer adds the approved label, and the build runs, publishes a release and opens a pull request that adds the pack to packs.json. Merging that pull request publishes the pack to the app.

Only Bayern is supported for now, because the elevation comes from the Bayerische Vermessungsverwaltung's open DGM5. Published packs rebuild automatically every quarter.

How a pack is built

scripts/run_build.sh runs the whole build, locally the same way as in CI. The host needs only bash, curl, python3 and docker. Every geodata tool runs in docker/toolbox.Dockerfile (GDAL and osmium, pinned by digest).

SLUG=ffb NAME="Landkreis Fürstenfeldbruck" RELATION_ID=62595 scripts/run_build.sh
  1. Boundary. The Landkreis polygon comes from Nominatim and is buffered by 3 km in EPSG:25832.
  2. Elevation. The DGM5 1 km tiles that touch the area are taken from Bayern's open-data Metalink, and each download is checked against the publisher's SHA-256. GDAL converts them to a COG and cuts it to the area, without resampling.
  3. OSM. The Geofabrik extract is clipped to the area with osmium. In CI it is downloaded once per day and shared by every pack built that day. Water points and addresses are exported from it. So is the road network, as a routable graph (roads.gpkg, scripts/road_graph.py). It is released next to the pack as the optional <slug>-roads-v<N>.zip.
  4. Vector map. Planetiler builds PMTiles with the Protomaps basemap profile, compiled from a pinned commit and patched to keep German as the only translated name, and to keep the kind of a social_facility (Altenheim or Tafel) and the number of a Rettungspunkt (docker/vector-tiles.Dockerfile). The profile also reads worldwide sources: Natural Earth, OSM's land and water polygons, and landcover. They are downloaded (2.4 GB, cached for a month in CI) and cut to the area before Planetiler sees them, and every geometry is cut to the area exactly.
  5. Check. scripts/validate_pack.py and scripts/validate_roads.py check every file against FORMAT.md. That includes comparing the elevation with DGM5's own values at a few thousand sampled cells. A pack that fails is never released.

Licences

  • Code in this repository: MIT.
  • map.pmtiles, water.geojson, addresses.sqlite and the road graph roads.gpkg: © OpenStreetMap contributors. These are derived databases under the ODbL 1.0, so share-alike applies.
  • Elevation: DGM5 © Bayerische Vermessungsverwaltung, www.geodaten.bayern.de, CC BY 4.0.

Replaces lagebuch-regions

This repository replaces CodeForFire/lagebuch-regions, whose packs used SRTM heights in a custom binary format. That repository stays online and unchanged until the app reads this format; already-released app builds keep downloading from it.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages