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

add: color calculation in server

parent 5cbaddee
No related branches found
No related tags found
2 merge requests!9Clhp map,!8Clhp map
No preview for this file type
......@@ -84,3 +84,16 @@ def get_all_markers(self, cursor, waterBodyName):
# Write marker data to response object
self.wfile.write(marker_data.encode('utf-8'))
def calculateColor(thickness: int): # NB not final colors nor ranges
if 0 < thickness < 4:
return 0xFFff0000 # Red
elif 4 < thickness < 6:
return 0xFFff9400 # Orange
elif 6 < thickness < 8:
return 0xFFb1ff00 # Green
elif thickness > 8:
return 0xFF00d6ff # Blue
else:
return 0xFF939393 # Gray
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