Skip to content
Snippets Groups Projects
Commit 83a4f615 authored by Sara Savanovic Djordjevic's avatar Sara Savanovic Djordjevic
Browse files

update: revert ice stats retrieval, update docstrings

parent 77227932
No related branches found
No related tags found
1 merge request!19Clhp map, license agreement
......@@ -269,7 +269,7 @@ class _MapContainerWidgetState extends State<MapContainerWidget> {
),
),
),
Positioned( // Color info button
Positioned( // Color info layer button
top: 170,
right: 10,
child: GestureDetector(
......
......@@ -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.
......
......@@ -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:
......
......@@ -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
"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment