feat(extract): Beschriftungen in run.py entfernen, Minimap am Ende erzeugen

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
knsoandClaude Opus 5 committed 2026-09-13 19:30:51 +02:00
1 parent 97ff63b2b6
commit b219013bbf
1 file changed
+8
+8
View File
@@ -2,6 +2,7 @@
import json
from pathlib import Path
from leonida.annotations import load_annotations, mark_generated, remove_annotations
from leonida.buildings import building_polygons
from leonida.classify import CLASSES, class_shares, classify, drop_map_labels
from leonida.emit import (chunk_box_of, chunk_payload, in_chunk, split_by_chunk_all,
@@ -9,6 +10,7 @@ from leonida.emit import (chunk_box_of, chunk_payload, in_chunk, split_by_chunk_
from leonida.heights import assign_heights, palm_points
from leonida.tiles import COMMIT, download_tiles, load_mosaic
from leonida.vectors import centerlines, land_polygons, mask_polygons, road_polygons
from overview import render_map
SEED = 20260912
OUT = Path(__file__).resolve().parents[2] / "public" / "data" / "vice-a"
@@ -21,6 +23,9 @@ def main() -> None:
mosaic = load_mosaic(cache)
labels, unknown_share = classify(mosaic, report_unknown=True)
labels = drop_map_labels(labels)
removal = remove_annotations(mosaic, labels, load_annotations(Path("data/annotations.toml")))
labels = removal.labels
print(removal.report())
if unknown_share > 0.05:
raise SystemExit(f"{unknown_share:.1%} der Pixel unbekannt. Palette kalibrieren, nicht die Grenze anheben.")
shares = class_shares(labels)
@@ -62,6 +67,8 @@ def main() -> None:
landmarks = json.loads(Path("data/skyline.json").read_text())["landmarks"]
districts = json.loads(Path("data/districts.json").read_text())
heights = assign_heights([p for p, _ in buildings], landmarks, districts, SEED)
marked = mark_generated([p for p, _ in buildings], heights, removal.generated)
print(f"Gebäude: {len(buildings)}, davon {marked} unter entfernten Beschriftungen ergänzt")
palms = palm_points(sand, parks, lines, [p for p, _ in buildings], road_shapes,
land, SEED)
@@ -85,6 +92,7 @@ def main() -> None:
"class_shares": shares,
"attribution": "Kartenkacheln: GTA VI Map (CC BY 4.0) — https://map.gtadb.org, YANIS v15. Wahrzeichen: rolux/gtamaplib-vc (Unlicense).",
})
print(render_map(OUT, OUT), "->", OUT)
if __name__ == "__main__":