Logo Lanfrica

wesleyhson/hex-country-maps

Domain:

geospatial

Record type:

software
Creator:
wes
Host:
Sovereign hex map pipeline — roads + H3 grid + labels + admin boundaries for any country. Full Africa coverage. # Country Hex Map Template One-command pipeline to build a complete hex map for any country. ## Usage ```bash cd ~/Desktop/hex-rooms/country-map-template # Ghana python3 build_country.py --country Ghana --code gh --osm-id 192781 # Senegal python3 build_country.py --country Senegal --code sn --osm-id 192775 # Nigeria python3 build_country.py --country Nigeria --code ng --osm-id 192787 # Kenya python3 build_country.py --country Kenya --code ke --osm-id 192798 # South Africa python3 build_country.py --country "South Africa" --code za --osm-id 87565 ``` ## Finding OSM Relation IDs Search at openstreetmap.org — the relation ID is in the URL. Or: nominatim.openstreetmap.org → osm_id field. ## What it builds - `{code}_tiles.db` — zstratum vector tile database - `admin_2.geojson` — national border (GeoJSON, clean rendering) - `admin_4.geojson` — regional boundaries (GeoJSON) - `hex_outline_{3,4,5}.geojson` — H3 hex grids (GeoJSON, no tile artifacts) - `{code}.svg` — hex flag (from hex-rooms flag set) - `index.html` — MapLibre viewer (auto-configured for the country) ## Serving ```bash # Terminal 1: tile server zstratum serve {code}-map/{code}_tiles.db --port 8085 # Terminal 2: static file server cd {code}-map && python3 -m http.server 8086 # Open: localhost ``` ## Layers | Layer | Type | Zoom | Source | |-------|------|------|--------| | National border | line | z2-18 | GeoJSON | | Regional boundaries | line | z4-18 | GeoJSON | | Hex grid res 3 | polygon | z2-6 | GeoJSON | | Hex grid res 4 | polygon | z6-8 | GeoJSON | | Hex grid res 5 | polygon | z8-10 | GeoJSON | | Hex grid res 6 | polygon | z10-12 | Vector tile | | Hex grid res 7 | polygon | z12-16 | Vector tile | | Major roads | line | z4-18 | Vector tile | | All roads | line | z8-18 | Vector tile | | Place labels | point | z5-18 | Vector tile | | Road labels | point | z10-18 | Vector tile | | District labels | point | z7-18 | Vector …