Imagery Display Module This code creates GeoTIFF images, PNG images, and shapefiles from the NetCDF4 output of Sanmei Li's Flood Detection software. Required Libraries No libraries are required if you wish to use the included runtime, suitable for CentOS 7 (and like) systems. You can initialize it like so: export PATH="$PWD"/runtimes/ShellB3/bin:"$PATH" export GDAL_DATA="$PWD"/runtimes/ShellB3/share/gdal/ It requires no $PATH setup as long as the runtimes/, scripts/, and tif/ directory are kept together in the same relative position. Otherwise, we require: * Python 3.6, with: * numpy * gdal, compiled with python bindings, NetCDF4, shapefile, & GeoTIFF support * These gdal commands must be available in $PATH: * gdal_translate * gdalwarp * gdal_calc.py * gdal_polygonize.py * zip (unix command) * mktemp (unix command) Scripts scripts/flood-nc2tif.sh This script will create a GeoTIFF image from a given NetCDF4 file. It can be called like: flood-nc2tif.sh VIIRS-Flood_j01_s202002251729040_e202002251731005_c202003011858011.nc And it will create VIIRS-Flood_j01_s202002251729040_e202002251731005_c202003011858011.tif scripts/flood-tif2png.sh This script will create a PNG image from a given GeoTIFF file. It can be called like: flood-tif2png.sh VIIRS-Flood_j01_s202002251733056_e202002251735020_c202003011909027.tif And it will create VIIRS-Flood_j01_s202002251733056_e202002251735020_c202003011909027.png scripts/flood-tif2shape.sh This script will create a set of shapefiles from a given GeoTIFF file. It can be called like: flood-tif2shape.sh VIIRS-Flood_j01_s202002251907049_e202002251909013_c202003011914032.tif And it will create a zip file containing six shapefiles (each of which is a set of .shp, .dbf, .prj, and .shx), one for each 20% region of flood fraction. They correspond as: FloodWater_80-100_VIIRS-Flood... - floodwater fraction from 80 to 100% FloodWater_60-80_VIIRS-Flood... - floodwater fraction from 60 to 80% FloodWater_40-60_VIIRS-Flood... - floodwater fraction from 40 to 60% FloodWater_20-40_VIIRS-Flood... - floodwater fraction from 20 to 40% FloodWater_00-20_VIIRS-Flood... - floodwater fraction from 0 to 20% FloodWater_00-100_VIIRS-Flood... - floodwater fraction from 0 to 100%