Add setup_dirs.sh for default raw/archives layout

This commit is contained in:
s0wlz (Matthias Puchstein)
2025-12-15 21:11:56 +01:00
parent cb0ba6d6b5
commit 4e7697e73a
3 changed files with 28 additions and 0 deletions

View File

@@ -9,6 +9,7 @@
## Build, Test, and Development Commands
- Create a venv: `uv venv && source .venv/bin/activate`. Install deps: `uv sync` (generates `uv.lock`).
- If wheels fail, install system GDAL first (e.g., `brew install gdal` or `apt-get install gdal-bin libgdal-dev`), then rerun `uv sync`.
- Prepare the directory tree (raw/archives/work/exports): `bash setup_dirs.sh`.
- Heightmap export (rebuilds VRT if absent): `uv run python export_heightmaps.py`.
- Orthophoto export: `uv run python export_ortho_tiles.py` (requires JP2s under `raw/dop/jp2/`; legacy `raw_dop/jp2/` still works).
- Refresh VRT manually if needed: `gdalbuildvrt work/dgm.vrt raw/dgm1/*.tif` (legacy: `raw_dgm1/*.tif`).

View File

@@ -12,6 +12,7 @@ This repository converts DGM1 elevation tiles into Unity-ready 16-bit PNG height
- Create a project venv: `uv venv && source .venv/bin/activate`.
- Install dependencies from `pyproject.toml`: `uv sync` (generates `uv.lock`; warning-free with dependency-groups).
- If wheels fail to resolve, ensure system GDAL is present (e.g., `brew install gdal` or `apt-get install gdal-bin libgdal-dev`), then rerun `uv sync`.
- Create the default directory tree (inputs/archives/outputs): `bash setup_dirs.sh`.
### Repository Layout
- `raw/` — preferred working inputs (not versioned): `raw/dgm1/`, `raw/dop/jp2/`, `raw/citygml/lod1/`, `raw/citygml/lod2/`. Legacy directories (`raw_dgm1/`, `raw_dop/`, `raw_3dgeb_lod1/`, `raw_3dgeb_lod2/`) are still honored by the scripts.

26
setup_dirs.sh Normal file
View File

@@ -0,0 +1,26 @@
#!/usr/bin/env bash
set -euo pipefail
# Create the default directory layout for GeoData inputs/outputs.
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
DIRS=(
"$ROOT/raw/dgm1"
"$ROOT/raw/dop/jp2"
"$ROOT/raw/citygml/lod1"
"$ROOT/raw/citygml/lod2"
"$ROOT/archives/dgm1"
"$ROOT/archives/dop"
"$ROOT/archives/citygml/lod1"
"$ROOT/archives/citygml/lod2"
"$ROOT/work"
"$ROOT/export_unity/height_png16"
"$ROOT/export_unity/ortho_jpg"
)
for dir in "${DIRS[@]}"; do
mkdir -p "$dir"
done
echo "Created default directories:"
printf ' - %s\n' "${DIRS[@]}"