src.flood_model.process_hydro_dem ================================= .. py:module:: src.flood_model.process_hydro_dem .. autoapi-nested-parse:: This script fetches LiDAR terrain data for a region of interest and creates a hydrologically-conditioned DEM. Attributes ---------- .. autoapisummary:: src.flood_model.process_hydro_dem.log Functions --------- .. autoapisummary:: src.flood_model.process_hydro_dem.ensure_lidar_datasets_initialised src.flood_model.process_hydro_dem.process_dem src.flood_model.process_hydro_dem.refresh_lidar_datasets src.flood_model.process_hydro_dem.main Module Contents --------------- .. py:data:: log .. py:function:: 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. :rtype: None .. py:function:: process_dem(selected_polygon_gdf: geopandas.GeoDataFrame) -> None Ensures hydrologically-conditioned DEM is processed for the given area and added to the database. :param selected_polygon_gdf: The polygon defining the selected area to process the DEM for. :type selected_polygon_gdf: gpd.GeoDataFrame :returns: This function does not return any value. :rtype: None .. py:function:: 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. :rtype: None .. py:function:: 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. :param selected_polygon_gdf: A GeoDataFrame representing the selected polygon, i.e., the catchment area. :type selected_polygon_gdf: gpd.GeoDataFrame :param log_level: 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) :type log_level: LogLevel = LogLevel.DEBUG :returns: This function does not return any value. :rtype: None