Experiment: Voronoi-based kingdom territory map#431
Draft
baltinerdist wants to merge 2 commits intoamtgard:masterfrom
Draft
Experiment: Voronoi-based kingdom territory map#431baltinerdist wants to merge 2 commits intoamtgard:masterfrom
baltinerdist wants to merge 2 commits intoamtgard:masterfrom
Conversation
Adds map/build_map.py — a standalone Python script that generates an interactive Leaflet/OpenStreetMap HTML visualization of Amtgard kingdom territories using a Voronoi diagram. - Each active non-freehold park is a Voronoi node; every point on the map belongs to the nearest park's kingdom - Adjacent same-kingdom parks form contiguous regions with no gaps - Territories are clipped to US and Canada borders (Natural Earth 110m) - Each kingdom's heraldry badge is base64-embedded at the centroid of its largest territory polygon - Parks with lat=0 have coordinates recovered by parsing the stored google_geocode blob via regex (273 parks vs 263 with direct coords) - Freeholds (kingdom_id=8) excluded from all calculations Run: pip install -r map/requirements.txt && python3 map/build_map.py Output: map/amtgard_kingdoms.html (self-contained, open in any browser) Requires the ork3-php8-db Docker container to be running. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
map/amtgard_kingdoms.html is regenerated from live DB data on each run and should not be tracked. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
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 #151
Summary
Adds
map/build_map.py— a standalone Python script that generates an interactive Leaflet/OpenStreetMap HTML visualization of Amtgard kingdom territories.latitude/longitudehave their coordinates recovered by parsing the storedgoogle_geocodeblob (273 parks plotted vs 263 with direct coords only)Running
pip install -r map/requirements.txt python3 map/build_map.py # Output: map/amtgard_kingdoms.htmlRequires the
ork3-php8-dbDocker container to be running. The generated HTML file is self-contained and opens in any browser.🤖 Generated with Claude Code