src.flood_model.process_hydro_dem

This script fetches LiDAR terrain data for a region of interest and creates a hydrologically-conditioned DEM.

Attributes

log

Functions

ensure_lidar_datasets_initialised(→ None)

Check if LiDAR datasets table is initialised.

process_dem(→ None)

Ensures hydrologically-conditioned DEM is processed for the given area and added to the database.

refresh_lidar_datasets(→ None)

Web-scrapes OpenTopography metadata to create the datasets table containing links to LiDAR data sources.

main(→ None)

Retrieves LiDAR data for the selected polygon and processes it into a hydrologically-conditioned DEM.

Module Contents

src.flood_model.process_hydro_dem.log
src.flood_model.process_hydro_dem.ensure_lidar_datasets_initialised() None

Check if LiDAR datasets table is initialised. This table holds URLs to data sources for LiDAR. If it is not initialised, then it initialises it by web-scraping OpenTopography which takes a long time.

Returns:

This function does not return any value.

Return type:

None

src.flood_model.process_hydro_dem.process_dem(selected_polygon_gdf: geopandas.GeoDataFrame) None

Ensures hydrologically-conditioned DEM is processed for the given area and added to the database.

Parameters:

selected_polygon_gdf (gpd.GeoDataFrame) – The polygon defining the selected area to process the DEM for.

Returns:

This function does not return any value.

Return type:

None

src.flood_model.process_hydro_dem.refresh_lidar_datasets() None

Web-scrapes OpenTopography metadata to create the datasets table containing links to LiDAR data sources. Takes a long time to run but needs to be run periodically so that the datasets are up to date.

Returns:

This function does not return any value.

Return type:

None

src.flood_model.process_hydro_dem.main(selected_polygon_gdf: geopandas.GeoDataFrame, log_level: src.digitaltwin.utils.LogLevel = LogLevel.DEBUG) None

Retrieves LiDAR data for the selected polygon and processes it into a hydrologically-conditioned DEM.

Parameters:
  • selected_polygon_gdf (gpd.GeoDataFrame) – A GeoDataFrame representing the selected polygon, i.e., the catchment area.

  • log_level (LogLevel = LogLevel.DEBUG) – The log level to set for the root logger. Defaults to LogLevel.DEBUG. The available logging levels and their corresponding numeric values are: - LogLevel.CRITICAL (50) - LogLevel.ERROR (40) - LogLevel.WARNING (30) - LogLevel.INFO (20) - LogLevel.DEBUG (10) - LogLevel.NOTSET (0)

Returns:

This function does not return any value.

Return type:

None