src.digitaltwin.retrieve_from_instructions
This script automates the retrieval and storage of geospatial data from various providers using the ‘geoapis’ library. It populates the ‘geospatial_layers’ table in the database and stores user log information for tracking and reference.
Attributes
Functions
|
Connect to various data providers to fetch geospatial data for the selected polygon, i.e., the catchment area. |
Module Contents
- src.digitaltwin.retrieve_from_instructions.main(selected_polygon_gdf: geopandas.GeoDataFrame, instruction_json_path: pathlib.Path, log_level: src.digitaltwin.utils.LogLevel = LogLevel.DEBUG) None
Connect to various data providers to fetch geospatial data for the selected polygon, i.e., the catchment area. Subsequently, populate the ‘geospatial_layers’ table in the database and store user log information for tracking and reference.
- Parameters:
selected_polygon_gdf (gpd.GeoDataFrame) – A GeoDataFrame representing the selected polygon, i.e., the catchment area.
instruction_json_path (pathlib.Path) – The path to the instruction json file that specifies the geospatial data to be retrieved.
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)
- src.digitaltwin.retrieve_from_instructions.sample_polygon