floodresilience.flood_model.flood_scenario_process_service
Defines PyWPS WebProcessingService process for creating a flooding scenario.
Classes
Class representing a WebProcessingService process for creating a flooding scenario |
Functions
|
Create a dictionary in the format of a terria js catalog json for the building flood status layer. |
|
Create a dictionary in the format of a terria js catalog json for the flood depth layer. |
|
Query Geoserver to find the time slices available for a given layer. |
Module Contents
- class floodresilience.flood_model.flood_scenario_process_service.FloodScenarioProcessService
Bases:
pywps.Process
Class representing a WebProcessingService process for creating a flooding scenario
- static _handler(request: pywps.WPSRequest, response: pywps.response.execute.ExecuteResponse) None
Process handler for modelling a flood scenario
- Parameters:
request (WPSRequest) – The WPS request, containing input parameters.
response (ExecuteResponse) – The WPS response, containing output data.
- floodresilience.flood_model.flood_scenario_process_service.building_flood_status_catalog(scenario_id: int) dict
Create a dictionary in the format of a terria js catalog json for the building flood status layer.
- Parameters:
scenario_id (int) – The ID of the scenario to create the catalog item for.
- Returns:
The TerriaJS catalog item JSON for the building flood status layer.
- Return type:
dict
- floodresilience.flood_model.flood_scenario_process_service.flood_depth_catalog(scenario_id: int) dict
Create a dictionary in the format of a terria js catalog json for the flood depth layer.
- Parameters:
scenario_id (int) – The ID of the scenario to create the catalog item for.
- Returns:
The TerriaJS catalog item JSON for the flood depth layer.
- Return type:
dict
- floodresilience.flood_model.flood_scenario_process_service.query_time_dimension(gs_flood_model_workspace: str, layer_name: str) str
Query Geoserver to find the time slices available for a given layer.
- Parameters:
gs_flood_model_workspace (str) – The name of the Geoserver workspace.
layer_name (str) – The name of the Geoserver layer to query.
- Returns:
Comma-separated list of time slices available in ISO8601 format e.g. “2000-01-01T00:00:00.000Z,2000-01-01T00:00:01.000Z,2000-01-01T00:00:02.000Z”
- Return type:
str