diff --git a/server/ModelFromNVE/__pycache__/setenvironment.cpython-39.pyc b/server/ModelFromNVE/__pycache__/setenvironment.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..63261d0d817d669727e168e9fb7e2432c5850f39 Binary files /dev/null and b/server/ModelFromNVE/__pycache__/setenvironment.cpython-39.pyc differ diff --git a/server/ModelFromNVE/icemodelling/__pycache__/constants.cpython-39.pyc b/server/ModelFromNVE/icemodelling/__pycache__/constants.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0683f9c28a6acdc32a4b624959f5bc3215c2e4e7 Binary files /dev/null and b/server/ModelFromNVE/icemodelling/__pycache__/constants.cpython-39.pyc differ diff --git a/server/ModelFromNVE/icemodelling/__pycache__/ice.cpython-39.pyc b/server/ModelFromNVE/icemodelling/__pycache__/ice.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..00b417e77e519efd8508c4b33dc3904b3ac62e83 Binary files /dev/null and b/server/ModelFromNVE/icemodelling/__pycache__/ice.cpython-39.pyc differ diff --git a/server/ModelFromNVE/icemodelling/__pycache__/icethickness.cpython-39.pyc b/server/ModelFromNVE/icemodelling/__pycache__/icethickness.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..dd8af51b401aa39e1c2eb6d1fa23906d73a44c88 Binary files /dev/null and b/server/ModelFromNVE/icemodelling/__pycache__/icethickness.cpython-39.pyc differ diff --git a/server/ModelFromNVE/icemodelling/__pycache__/parameterization.cpython-39.pyc b/server/ModelFromNVE/icemodelling/__pycache__/parameterization.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..40986d9f0d3d466904229ba65b3d2e8a39c1ac04 Binary files /dev/null and b/server/ModelFromNVE/icemodelling/__pycache__/parameterization.cpython-39.pyc differ diff --git a/server/ModelFromNVE/icemodelling/__pycache__/weatherelement.cpython-39.pyc b/server/ModelFromNVE/icemodelling/__pycache__/weatherelement.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ec96cdc43fb0aaed513f693ffc0904a108597af2 Binary files /dev/null and b/server/ModelFromNVE/icemodelling/__pycache__/weatherelement.cpython-39.pyc differ diff --git a/server/ModelFromNVE/icemodellingscripts/__pycache__/getIceThicknessLakes.cpython-39.pyc b/server/ModelFromNVE/icemodellingscripts/__pycache__/getIceThicknessLakes.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6fe0e8ef292c87abdb2a6e7852266f4f2db591a2 Binary files /dev/null and b/server/ModelFromNVE/icemodellingscripts/__pycache__/getIceThicknessLakes.cpython-39.pyc differ diff --git a/server/ModelFromNVE/utilities/__pycache__/doconversions.cpython-39.pyc b/server/ModelFromNVE/utilities/__pycache__/doconversions.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d74856929d58b4b450e8a668ee0544ac3631f07e Binary files /dev/null and b/server/ModelFromNVE/utilities/__pycache__/doconversions.cpython-39.pyc differ diff --git a/server/ModelFromNVE/utilities/__pycache__/getfiledata.cpython-39.pyc b/server/ModelFromNVE/utilities/__pycache__/getfiledata.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..81d7aa1252dafb42a9ca99c7bb25bfff8a5c4ce0 Binary files /dev/null and b/server/ModelFromNVE/utilities/__pycache__/getfiledata.cpython-39.pyc differ diff --git a/server/ModelFromNVE/utilities/__pycache__/getgts.cpython-39.pyc b/server/ModelFromNVE/utilities/__pycache__/getgts.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..17a02b6a0703d63c8221c48d5042e868204bad69 Binary files /dev/null and b/server/ModelFromNVE/utilities/__pycache__/getgts.cpython-39.pyc differ diff --git a/server/ModelFromNVE/utilities/__pycache__/getmisc.cpython-39.pyc b/server/ModelFromNVE/utilities/__pycache__/getmisc.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7c9643a165b7899338e41ad750446c4990bcc6d3 Binary files /dev/null and b/server/ModelFromNVE/utilities/__pycache__/getmisc.cpython-39.pyc differ diff --git a/server/ModelFromNVE/utilities/__pycache__/getregobsdata.cpython-39.pyc b/server/ModelFromNVE/utilities/__pycache__/getregobsdata.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1770f8560441e86c70a03c24ce75d67569afac51 Binary files /dev/null and b/server/ModelFromNVE/utilities/__pycache__/getregobsdata.cpython-39.pyc differ diff --git a/server/ModelFromNVE/utilities/__pycache__/getwsklima.cpython-39.pyc b/server/ModelFromNVE/utilities/__pycache__/getwsklima.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..25f0717319d5318a150c0c654300616543b9bdb0 Binary files /dev/null and b/server/ModelFromNVE/utilities/__pycache__/getwsklima.cpython-39.pyc differ diff --git a/server/ModelFromNVE/utilities/__pycache__/makefiledata.cpython-39.pyc b/server/ModelFromNVE/utilities/__pycache__/makefiledata.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d0b4d549f7ff42ecb3d4e2f2ac1126265cf51b76 Binary files /dev/null and b/server/ModelFromNVE/utilities/__pycache__/makefiledata.cpython-39.pyc differ diff --git a/server/ModelFromNVE/utilities/__pycache__/makelogs.cpython-39.pyc b/server/ModelFromNVE/utilities/__pycache__/makelogs.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0001d8060666439b75014aa6f1336ec7b067a4fa Binary files /dev/null and b/server/ModelFromNVE/utilities/__pycache__/makelogs.cpython-39.pyc differ diff --git a/server/ModelFromNVE/utilities/__pycache__/makepickle.cpython-39.pyc b/server/ModelFromNVE/utilities/__pycache__/makepickle.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c12eed5fa36455024187f45ade6b7063c6d07a87 Binary files /dev/null and b/server/ModelFromNVE/utilities/__pycache__/makepickle.cpython-39.pyc differ diff --git a/server/ModelFromNVE/utilities/__pycache__/makeplots.cpython-39.pyc b/server/ModelFromNVE/utilities/__pycache__/makeplots.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1ee55321882f03fcdf9b6cde430ae775f2d50aca Binary files /dev/null and b/server/ModelFromNVE/utilities/__pycache__/makeplots.cpython-39.pyc differ diff --git a/server/__pycache__/consts.cpython-39.pyc b/server/__pycache__/consts.cpython-39.pyc index 2196fb987975dc7bdef7f3f1ef0c83c833609df5..4967a725be5d86ed8ef72b1a68534edb2e95151f 100644 Binary files a/server/__pycache__/consts.cpython-39.pyc and b/server/__pycache__/consts.cpython-39.pyc differ diff --git a/server/data_processing/__pycache__/area_processing.cpython-39.pyc b/server/data_processing/__pycache__/area_processing.cpython-39.pyc index 4abd0dbd36d062cf74830855eb5681862f02482b..f3921174b68a2074f61f88637c07a4f7da538ca3 100644 Binary files a/server/data_processing/__pycache__/area_processing.cpython-39.pyc and b/server/data_processing/__pycache__/area_processing.cpython-39.pyc differ diff --git a/server/data_processing/__pycache__/process_lidar_data.cpython-39.pyc b/server/data_processing/__pycache__/process_lidar_data.cpython-39.pyc index b93b7c5d9f28b79f1a102206fd941d7afafe229a..dce1ee4548df9c7e6a0b95f560be42eccf45b74e 100644 Binary files a/server/data_processing/__pycache__/process_lidar_data.cpython-39.pyc and b/server/data_processing/__pycache__/process_lidar_data.cpython-39.pyc differ diff --git a/server/data_processing/area_processing.py b/server/data_processing/area_processing.py index 639d371806aa9ee7a6386a9020ab7c8a29b51567..75af8d227d355286ebbb4e03a8f274c8c4557734 100644 --- a/server/data_processing/area_processing.py +++ b/server/data_processing/area_processing.py @@ -104,7 +104,7 @@ def define_gridareas(lat, lng, area_offset, grid_size): subarea_offset_lat = offset_lat/grid_size group_id = 0 - i=0 + i = 0 # find the center coordinates of each area in grid to find the corner areas for y in (range(grid_size)): relative_size_lat = y / grid_size diff --git a/server/data_processing/process_lidar_data.py b/server/data_processing/process_lidar_data.py index a70d36098b1515dc960e8d247f47dcd5bccd0c35..a06f57d8718f555745fe8ba95d396a0c8401728c 100644 --- a/server/data_processing/process_lidar_data.py +++ b/server/data_processing/process_lidar_data.py @@ -43,7 +43,8 @@ def calculate_area_data(center, body_of_water): map_data = json.load(data) # grid cell offset - cell_x, cell_y = map_data['tile_width'], map_data['tile_height'] + #cell_x, cell_y = map_data['tile_width'], map_data['tile_height'] + cell_x, cell_y = (0.04,0.02) # convert the offset to meter cell_x = 111.320 * cell_x @@ -57,9 +58,11 @@ def calculate_area_data(center, body_of_water): print(map_data[0]['properties']['sub_div_center']) - map_zones = [area_limit[1],area_limit[3]] + map_zones = [area_limit[1], area_limit[3]] + print("zones ", map_zones) + print("zones ", area_limit) - map_data = list(filter(lambda point_position: inArea((point_position['properties']['sub_div_center'][0], point_position['properties']['sub_div_center'][1],0.0), map_zones), map_data)) + map_data = list(filter(lambda point_position: inArea((point_position['properties']['sub_div_center'][0], point_position['properties']['sub_div_center'][1], 0.0), map_zones), map_data)) # Refactor lidar data to a readable format iceOver = laspy.read(lazData_path[0]) @@ -91,9 +94,11 @@ def calculate_area_data(center, body_of_water): ys, xs = start ye, xe = end sub_center = ((xs + xe)/2, (ys + ye)/2) + print("he") if len(map_data) > 0: # check if area is part of water body part_of_subarea_of_waterbody = list(filter(lambda pos: inArea((pos['properties']['sub_div_center'][0], pos['properties']['sub_div_center'][1], 0.0), [start,end])), map_data) + print("heee") if(len(part_of_subarea_of_waterbody) > 0): current_map_zone = closest_points(sub_center, map_data, taken_coords) sub_center = current_map_zone['properties']['sub_div_center'][0] @@ -101,19 +106,22 @@ def calculate_area_data(center, body_of_water): print("nothing here") break taken_coords.append(sub_center) + print("heeee") else: return [0] # return [0] if no data collected from lidar + print("hee") current_zone_id = current_map_zone['properties']['sub_div_id'] # filter data within sub-area zones points_in_area = list(filter(lambda point_position: inArea(point_position, areazone), ice_points)) heights = find_height(points_in_area) + if current_map_zone is not None: area_heights.append((current_zone_id, sub_area[0], sub_center, heights)) return area_heights -print(calculate_area_data((61, 11), 'mjosa')) +#print(calculate_area_data((61, 11), 'mjosa')) diff --git a/server/database/icedb-journal b/server/database/icedb-journal deleted file mode 100644 index eede3c9c9083ed7ac7144f5566f64dd1417883ab..0000000000000000000000000000000000000000 Binary files a/server/database/icedb-journal and /dev/null differ diff --git a/server/main.py b/server/main.py index 7158a57fc97339963bd6fcda87bf0b49b4a9f6c9..08f57fe28155c4bd729688ecde5c131d23686dc5 100644 --- a/server/main.py +++ b/server/main.py @@ -97,7 +97,7 @@ class IceHTTP(BaseHTTPRequestHandler): def do_POST(self): if self.path == '/new_lidar_data': - input_new_Lidar_data(self, self.cursor, 1, 'Mjosa') # hardcoded body of water must change later + input_new_Lidar_data(self, self.cursor, 1, 'mj\u00f8sa') # hardcoded body of water must change later # Start a server on port 8443 using self defined HTTP class diff --git a/server/map_handler/__pycache__/add_new_lake.cpython-39.pyc b/server/map_handler/__pycache__/add_new_lake.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..780567c9714d6b96cd505ab89ce824157750580a Binary files /dev/null and b/server/map_handler/__pycache__/add_new_lake.cpython-39.pyc differ diff --git a/server/map_handler/__pycache__/get_lake_relation.cpython-39.pyc b/server/map_handler/__pycache__/get_lake_relation.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..070180dbaedd2b48960a200b62aba36c64532a44 Binary files /dev/null and b/server/map_handler/__pycache__/get_lake_relation.cpython-39.pyc differ diff --git a/server/map_handler/__pycache__/get_measurements.cpython-39.pyc b/server/map_handler/__pycache__/get_measurements.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..96175633ac3d9fdad4da5c310fe90a26327ae321 Binary files /dev/null and b/server/map_handler/__pycache__/get_measurements.cpython-39.pyc differ diff --git a/server/map_handler/__pycache__/input_new_data.cpython-39.pyc b/server/map_handler/__pycache__/input_new_data.cpython-39.pyc index daa9be368b1ba5cafe21554c567abb21b470cc8e..209e55242678e432a9d84859bf084634a6daa858 100644 Binary files a/server/map_handler/__pycache__/input_new_data.cpython-39.pyc and b/server/map_handler/__pycache__/input_new_data.cpython-39.pyc differ diff --git a/server/map_handler/input_new_data.py b/server/map_handler/input_new_data.py index 4f0024a1806879c69d792756e06d5778e61cf8b4..c92187dacd0832861c821c7c3f1292461ac029ab 100644 --- a/server/map_handler/input_new_data.py +++ b/server/map_handler/input_new_data.py @@ -1,10 +1,12 @@ import json +import os from datetime import datetime from server.data_processing.process_lidar_data import calculate_area_data, about_laz_file # input_new_Lidar_data send new data gathered from the lidar and send it to the database (from the drone, most likely) def input_new_Lidar_data(self, cursor, sensorId, bodyOfWater): try: + print("name=",bodyOfWater) # hard coded coordinates latitude = 60.0 longitude = 10.0 @@ -83,7 +85,7 @@ def input_new_Lidar_data(self, cursor, sensorId, bodyOfWater): self.send_header('Content-type', "application/json") self.end_headers() - file_path = "../lake_relation/newest_lidar_data.json" + file_path = "./lake_relation/newest_lidar_data.json" content = None if len(lidar_json_data) > 0: