From fd6b9d7a10302da9a897adec4c6884c6c5ae23dd Mon Sep 17 00:00:00 2001 From: "s0wlz (Matthias Puchstein)" Date: Mon, 15 Dec 2025 23:09:07 +0100 Subject: [PATCH] Finalize archive build flag and setup-only behavior --- AGENTS.md | 2 +- geodata_to_unity.py | 10 +--------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 14f3ae4..0b5cb50 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -18,7 +18,7 @@ - Populate raw data from archives: `uv run python geodata_to_unity.py --build-from-archive --export all` (unzips `archive/*`; dop20 filelist stays in archive for the downloader). - Rebuild VRTs after moving data: add `--force-vrt`. - Expected warning: `Computed -srcwin ... falls partially outside source raster extent` means the DOP coverage is slightly smaller than the tile footprint; edge pixels will be filled with NoData/zeros. Add adjacent JP2s or shrink the requested window if you need to silence it. -- Scripts accept CLI overrides (e.g., `--config`, `--raw-dgm1-path`, `--raw-dop20-path`, `--export`); run `uv run python geodata_to_unity.py -h` to see options. +- Scripts accept CLI overrides (e.g., `--config`, `--raw-dgm1-path`, `--raw-dop20-path`, `--export`, `--build-from-archive`); run `uv run python geodata_to_unity.py -h` to see options. ## Coding Style & Naming Conventions - Python scripts use 4-space indentation, early-exit error handling, and `SystemExit` for fatal issues; follow PEP 8 where practical. diff --git a/geodata_to_unity.py b/geodata_to_unity.py index a928601..832e767 100644 --- a/geodata_to_unity.py +++ b/geodata_to_unity.py @@ -43,11 +43,6 @@ def parse_args(argv: Iterable[str] | None = None) -> argparse.Namespace: action="store_true", help="Rebuild VRTs even if present (useful after moving raw data).", ) - parser.add_argument( - "--no-export", - action="store_true", - help="Only run setup/archive prep without exporting.", - ) return parser.parse_args(argv) @@ -71,15 +66,12 @@ def main(argv: Iterable[str] | None = None) -> int: if args.setup: ensure_directories(cfg) print(f"Directories ensured. Config at {args.config}.") - if args.no_export or args.export is None: + if args.export is None: return 0 if args.build_from_archive: materialize_archives(cfg) - if args.no_export: - return 0 - exit_codes = [] if args.export in ("heightmap", "all"): exit_codes.append(export_heightmaps(cfg, force_vrt=args.force_vrt))