floodpy.utils package

Submodules

floodpy.utils.Reproject module

floodpy.utils.Reproject.reproject_image_to_master(master, slave, dst_filename, res=None)

Reprojection funcionality

floodpy.utils.S2_background module

floodpy.utils.folium_categorical_legend module

floodpy.utils.folium_categorical_legend.get_folium_categorical_template(categories)

floodpy.utils.geo_utils module

floodpy.utils.geo_utils.create_polygon(coordinates)

floodpy.utils.read_AOI module

floodpy.utils.read_template_file module

floodpy.utils.read_template_file.read_template(fname, delimiter='=')

Reads the template file into a python dictionary structure.

Parameters
  • fname (str) – full path to the template file.

  • delimiter (str, optional) – string to separate the key and value. Defaults to ‘=’.

Returns

python dictionary with information from template file

Return type

template_dict (dict)

floodpy.utils.save_raster module

floodpy.utils.save_raster.nparray_to_tiff(nparray: array, reference_gdal_dataset: str, target_gdal_dataset: str) None

Functionality that saves information numpy array to geotiff given a reference geotiff.

Parameters
  • nparray (np.array) – Information we want to save to geotiff

  • reference_gdal_dataset (str) – Path of the reference geotiff file

  • target_gdal_dataset (str) – Path of the output geotiff file

Module contents