Finalize archive build flag and setup-only behavior

This commit is contained in:
s0wlz (Matthias Puchstein)
2025-12-15 23:09:07 +01:00
parent c28ea492ec
commit fd6b9d7a10
2 changed files with 2 additions and 10 deletions

View File

@@ -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.

View File

@@ -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))