src.digitaltwin.retrieve_from_instructions ========================================== .. py:module:: src.digitaltwin.retrieve_from_instructions .. autoapi-nested-parse:: 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 ---------- .. autoapisummary:: src.digitaltwin.retrieve_from_instructions.sample_polygon Functions --------- .. autoapisummary:: src.digitaltwin.retrieve_from_instructions.main Module Contents --------------- .. py:function:: 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. :param selected_polygon_gdf: A GeoDataFrame representing the selected polygon, i.e., the catchment area. :type selected_polygon_gdf: gpd.GeoDataFrame :param instruction_json_path: The path to the instruction json file that specifies the geospatial data to be retrieved. :type instruction_json_path: pathlib.Path :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 .. py:data:: sample_polygon