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:
@ -818,8 +818,11 @@ def tif_to_crop(tif_file, vis_dir, resolution, keep_tif=False, quality=98, outpu
|
||||
|
||||
# Convert to RGB using colormap
|
||||
if is_rgb_result:
|
||||
# RGB images are already in RGB
|
||||
rgb_data = (data * 255).astype(np.uint8)
|
||||
# RGB images are already in RGB (uint8 depuis le TIF IGN, ou float 0-1)
|
||||
if data.dtype == np.uint8:
|
||||
rgb_data = data
|
||||
else:
|
||||
rgb_data = (np.clip(data, 0, 1) * 255).astype(np.uint8)
|
||||
else:
|
||||
# Normalize data to 0-1 range for colormap
|
||||
cmap = plt.get_cmap(cmap_name)
|
||||
|
||||
Reference in New Issue
Block a user