nismod / open-gira

Open-data Global Infrastructure Risk/Resilience Analysis
https://nismod.github.io/open-gira/
MIT License
12 stars 3 forks source link

make_exposure_img only maps one of input hazards? #87

Closed thomas-fred closed 11 months ago

thomas-fred commented 1 year ago

Ensure at least two .tifs are listed in the file hazard_datasets['aqueduct-river'] points to.

Try and run something like: snakemake --cores all results/exposure/egypt-latest_filter-highway-secondary/hazard-aqueduct-river/img

I only appear to be generating a single .png, despite the multiple hazard maps as input.

tomalrussell commented 1 year ago

Is this line at issue in the preceding rule, which generates exposure TIFFs? - looks like the script is picking only the first hazard TIFF to work from, which would give only one exposure TIFF in results/exposure/egypt-latest_filter-highway-secondary/hazard-aqueduct-river/raster and so only one to plot to a PNG output in .../img

https://github.com/nismod/open-gira/blob/0a9263d27f6d6c7bf06453ec7087f5a47f84dd03/workflow/scripts/make_exposure_tif.py#L22