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

update: coord rounding and stats widget text

parent efcb8770
No related branches found
No related tags found
1 merge request!16Clhp map into main
......@@ -274,9 +274,10 @@ class _MapContainerWidgetState extends State<MapContainerWidget> {
),
const SizedBox(height: contPadding),
Text(
'Measuring point: (${selectedMeasurement?.measurementID}, ${selectedMeasurement?.measurementID})',
'Center coordinate: (${selectedSubDiv?.center.latitude}, ${selectedSubDiv?.center.longitude})',
style: regTextStyle,
),
const SizedBox(height: contPadding/3),
Text(
'Data certainty: ${selectedSubDiv?.accuracy}/4',
style: regTextStyle,
......
source diff could not be displayed: it is too large. Options to address this: view the blob.
No preview for this file type
......@@ -48,8 +48,9 @@ def update_measurements(self, lake_name: str):
}
for sub_division in measurement['Subdivisions']:
subdiv_id = sub_division['SubdivID']
center_lat = sub_division['CenLatitude']
center_lng = sub_division['CenLongitude']
# Extract center coordinates and round to 4 decimals
center_lat = round(sub_division['CenLatitude'], 4)
center_lng = round(sub_division['CenLongitude'], 4)
avg_thickness = sub_division['AvgThickness']
# Retrieve ice statistics for current subdivision
......@@ -149,8 +150,9 @@ def fill_remaining_subdivisions(lake_name: str, processed_ids: list):
sub_div_id = int(sub_div['properties']['sub_div_id'])
# Only get subdivisions that are not in the list already
if sub_div_id not in processed_ids:
center_lat = sub_div['properties']['sub_div_center'][0]
center_lng = sub_div['properties']['sub_div_center'][1]
# Extract center coordinates and round to 4 decimals
center_lat = round(sub_div['properties']['sub_div_center'][0], 4)
center_lng = round(sub_div['properties']['sub_div_center'][1], 4)
# Fetch weather data for each subdivision from the NVE model
# NB hard coded date to december 2024 for testing, remove to_date param before use
......
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