Files
eagle0/tools
9aec075f51 Add smooth_boundaries.py for natural province boundary smoothing (#6382)
* Add smooth_boundaries.py for natural province boundary smoothing

Post-processing tool for rawGray.gz.bytes that replaces jagged
province boundaries with smooth, natural-looking ones using:
1. Majority-filter smoothing (iterative mode filter on boundary pixels)
2. Fragment cleanup (BFS expansion preserving ocean-separated islands)
3. Domain warping (Gaussian displacement for organic character)

Includes automated verification (province preservation, neighbor
adjacency, connectivity) and before/after visualization output.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Apply boundary smoothing to province map

Run smooth_boundaries.py --seed 42 to smooth jagged province boundaries.
Uses pixel-based adjacency instead of TSV for neighbor verification.
Updates centroids.json with new label positions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add targeted boundary smoothing for West Faluria borders

Adds --targeted-smooth mode to smooth_boundaries.py that applies a
bilateral majority filter to specific province border pairs. Smooths
the 40-37 (West Faluria/Yuetia) and 40-11 (West Faluria/Garholtia)
boundaries to reduce bubble protrusions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Redraw West Faluria borders via manual edit with roughened edges

Hand-edited province boundaries for West Faluria (40) expanding into
Usvol (33) and Hofolen (17), then applied localized domain warp to
roughen the new borders for a natural look. Added rawgray_editor.py
for PNG export/import workflow and roughen_borders.py for localized
border roughening.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 12:05:18 -08:00
..
2024-09-14 08:35:16 -07:00