Add web map with zone generation API, side job queue, and restore historical DTM hole rendering

- webapp.py: FastAPI serving the continuous map (port 8973) with
  /api/preview, /api/generate and /api/status; tiles are downloaded
  from IGN and processed in a logged subprocess, tracked live in a
  side "File de génération" panel that survives page reloads
- fetch_ign.py: download missing 1 km LiDAR HD tiles from the IGN
  geoplateforme before processing
- index.py: tile thumbnails and 500 m subtiles are now invalidated by
  mtime so regenerating a tile refreshes its cached images; progress
  logging per tile
- dtm.py: back to the historical gap handling (small gaps filled by
  fillnodata only, larger holes left as nodata rendered black);
  lowest-return floor only via --bare-earth, IGN class selection via
  --ign-classes
- cli.py: positional input now optional (--rebuild-index works alone)
- docker-compose.yml: serve (GPU, port 8973) and process services;
  launch via docker compose only (documented in AGENTS.md/AGENTS.md)
- tests: 131 passing, incl. regressions for thumbnail staleness,
  --rebuild-index without input, and nodata rendering
This commit is contained in:
Antoine Jacquin
2026-08-31 18:07:14 +02:00
parent 35bd827790
commit 8ca65155db
19 changed files with 3676 additions and 771 deletions

View File

@ -1,38 +1,61 @@
version: '3.8'
# Lancement du pipeline LiDAR — TOUJOURS via docker compose :
# docker compose build # après chaque édition de code (code baké dans l'image)
# docker compose up -d serve # carte interactive + API sur http://localhost:8973
# docker compose logs -f serve # journal du serveur
# docker compose down # arrêt
# Traitement ponctuel (sans serveur) :
# docker compose run --rm process [-r 0.5,0.2 | --force | --file ...]
# Jupyter (opt-in) :
# docker compose --profile interactive up -d jupyter
services:
lidar:
# Carte interactive + API de génération (mode ./run.sh --serve)
serve:
build: .
container_name: lidar-archeo
image: lidar-lidar
container_name: lidar-serve
init: true
user: "1000:1000"
gpus: all
ports:
- "8973:8973"
volumes:
# Mount your LAZ files directory here
- ./input:/data/input:ro
# Output directory
# input/ en écriture : l'API y télécharge les dalles IGN manquantes
- ./input:/data/input
- ./output:/data/output
# Optional: Mount a large data directory
# - /path/to/your/laz/files:/data/input:ro
environment:
- TZ=Europe/Paris
# Processing parameters
- RESOLUTION=0.5
- WHITEBOX_THREADS=4
# Resource limits (adjust based on your system)
deploy:
resources:
limits:
cpus: '4'
memory: 8G
reservations:
cpus: '2'
memory: 4G
# Override default command
command: ["process_lidar.py", "/data/input", "-o", "/data/output", "-r", "0.5"]
- LIDAR_INPUT_DIR=/data/input
- LIDAR_OUTPUT_DIR=/data/output
# Les générations lancées depuis la carte utilisent le GPU
- LIDAR_GPU=1
- LIDAR_WORKERS=2
command: python3 -m uvicorn lidar_pipeline.webapp:app --host 0.0.0.0 --port 8973
restart: unless-stopped
# Optional: Jupyter notebook for interactive exploration
# Traitement ponctuel des dalles input/ (une passe puis arrêt)
process:
build: .
image: lidar-lidar
container_name: lidar-process
init: true
user: "1000:1000"
gpus: all
volumes:
- ./input:/data/input
- ./output:/data/output
environment:
- TZ=Europe/Paris
command: ["python3", "-m", "lidar_pipeline", "/data/input", "-o", "/data/output", "-r", "0.5,0.2", "-g", "all"]
profiles:
- process
# Exploration interactive (opt-in : --profile interactive)
jupyter:
build: .
image: lidar-lidar
container_name: lidar-jupyter
init: true
ports:
- "8888:8888"
volumes: