diff --git a/app/lib/widgets/main_layout.dart b/app/lib/widgets/main_layout.dart index 1d20c1e67e52bd16d961a4d4c178b178493c014f..e26e12553940d8aacf051d5af1be4f336a656ab3 100644 --- a/app/lib/widgets/main_layout.dart +++ b/app/lib/widgets/main_layout.dart @@ -269,7 +269,7 @@ class _MapContainerWidgetState extends State<MapContainerWidget> { ), ), ), - Positioned( // Color info button + Positioned( // Color info layer button top: 170, right: 10, child: GestureDetector( diff --git a/server/map_handler/add_new_lake.py b/server/map_handler/add_new_lake.py index 4f57b40929d79322d642a820cf4c2b28071e41df..b94b87a38a978ac230191af1179e6b4ed02ebfc7 100644 --- a/server/map_handler/add_new_lake.py +++ b/server/map_handler/add_new_lake.py @@ -30,6 +30,8 @@ def cut_map(cursor, lake_name: str, cell_size_in_km: float = 0.5) -> (int, str): cursor (cursor): An Sqlite3 cursor object that points to the database lake_name (str): The name of the lake to be cut cell_size_in_km (float): The selected cell size in kilometers + Returns: + (int, str): A HTTP status code and the updated data """ try: # Read relation from GeoJson file and extract all geometry of type Polygon @@ -137,7 +139,7 @@ def cut_map(cursor, lake_name: str, cell_size_in_km: float = 0.5) -> (int, str): return 500, f"Error in adding new map: {e}" -def create_grid(poly: Polygon, cell_width: float, cell_height: float): +def create_grid(poly: Polygon, cell_width: float, cell_height: float) -> list: """ Returns a list of vertical and horizontal LineStrings that create a grid. diff --git a/server/map_handler/get_lake_relation.py b/server/map_handler/get_lake_relation.py index f54746e124a291d4bb6ecc82c4c9107c43501903..024f47daabdf476695d6c3bf6241bc52d2c330e4 100644 --- a/server/map_handler/get_lake_relation.py +++ b/server/map_handler/get_lake_relation.py @@ -20,6 +20,8 @@ def fetch_data(file_name: str, measurement: bool) -> (int, str): Parameters: file_name (str): The name of the requested file/lake measurement (bool): Whether the file is of type _measurements.json or _div.json + Returns: + (int, str): A HTTP status code and the requested data """ try: if measurement: diff --git a/server/map_handler/update_measurements.py b/server/map_handler/update_measurements.py index cda26653e32aced76670a17bf5e663b588cd2007..53a9a3f34393745074af841139848e8a057b0dae 100644 --- a/server/map_handler/update_measurements.py +++ b/server/map_handler/update_measurements.py @@ -22,6 +22,8 @@ def update_measurements(lake_name: str) -> (int, str): Parameters: lake_name (str): The name of the requested lake + Returns: + (int, str): A HTTP status code and the updated data """ try: # Return immediately if an invalid lake name was provided @@ -155,7 +157,6 @@ def fill_remaining_subdivisions(lake_name: str, processed_ids: list, all_ice_sta Parameters: lake_name (str): The name of the requested file/lake processed_ids (list): List of ids (int) of all subdivisions that have already been processed - Returns: sub_divisions (list): A list of subdivision dictionaries """