src.eddie.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.eddie.digitaltwin.retrieve_from_instructions.main(selected_polygon_gdf: geopandas.GeoDataFrame, instruction_json_path: pathlib.Path | str | None, log_level: eddie.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 | str | None) – The path to the instruction json file that specifies the geospatial data to be retrieved. Can be a string to allow crossing over interfaces that only allow more primitive types. If this is None, then no new data will be downloaded from the internet but meta tables and geoserver will still be initialised.
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.eddie.digitaltwin.retrieve_from_instructions.sample_polygon