From 92e6987529832f328196019cadbce0815d6fd4eb Mon Sep 17 00:00:00 2001 From: Sara <sarasdj@stud.ntnu.no> Date: Fri, 10 May 2024 15:03:29 +0200 Subject: [PATCH] =?UTF-8?q?update:=20overwrite=20mj=C3=B8sa=5Flidar=5Fdata?= =?UTF-8?q?.json=20with=20test=20data?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../setenvironment.cpython-311.pyc | Bin 4922 -> 4922 bytes .../__pycache__/constants.cpython-311.pyc | Bin 2702 -> 2702 bytes .../__pycache__/ice.cpython-311.pyc | Bin 39714 -> 39714 bytes .../__pycache__/icethickness.cpython-311.pyc | Bin 18666 -> 18666 bytes .../parameterization.cpython-311.pyc | Bin 20678 -> 20678 bytes .../weatherelement.cpython-311.pyc | Bin 27816 -> 27816 bytes .../getIceThicknessLakes.cpython-311.pyc | Bin 12833 -> 12833 bytes .../__pycache__/doconversions.cpython-311.pyc | Bin 4302 -> 4302 bytes .../__pycache__/getfiledata.cpython-311.pyc | Bin 8956 -> 8956 bytes .../__pycache__/getgts.cpython-311.pyc | Bin 5691 -> 5691 bytes .../__pycache__/getmisc.cpython-311.pyc | Bin 8504 -> 8504 bytes .../__pycache__/getregobsdata.cpython-311.pyc | Bin 53274 -> 53274 bytes .../__pycache__/getwsklima.cpython-311.pyc | Bin 21356 -> 21356 bytes .../__pycache__/makefiledata.cpython-311.pyc | Bin 12041 -> 12041 bytes .../__pycache__/makelogs.cpython-311.pyc | Bin 1933 -> 1933 bytes .../__pycache__/makepickle.cpython-311.pyc | Bin 1665 -> 1665 bytes .../__pycache__/makeplots.cpython-311.pyc | Bin 68233 -> 68233 bytes server/__pycache__/consts.cpython-311.pyc | Bin 445 -> 445 bytes server/__pycache__/scheduler.cpython-311.pyc | Bin 1744 -> 1744 bytes .../area_processing.cpython-311.pyc | Bin 8348 -> 8348 bytes .../process_lidar_data.cpython-311.pyc | Bin 7576 -> 7576 bytes server/main.py | 10 +- .../__pycache__/add_new_lake.cpython-311.pyc | Bin 10702 -> 10702 bytes .../get_lake_relation.cpython-311.pyc | Bin 2213 -> 2213 bytes .../input_new_data.cpython-311.pyc | Bin 5157 -> 5157 bytes .../update_measurements.cpython-311.pyc | Bin 8431 -> 12059 bytes .../mj\303\270sa_lidar_data.json" | 966 ++++++++++++++++-- server/map_handler/update_measurements.py | 77 +- 28 files changed, 950 insertions(+), 103 deletions(-) diff --git a/server/ModelFromNVE/__pycache__/setenvironment.cpython-311.pyc b/server/ModelFromNVE/__pycache__/setenvironment.cpython-311.pyc index 1fce7f7eb0501adbcb8e999f32d25cdd74eababf..dcdbab4c97b76e92ee9fe089e439174b9cafe80c 100644 GIT binary patch delta 20 acmdm`wo8qBIWI340}xygwB5+9FAM-T^#rp3 delta 20 acmdm`wo8qBIWI340}#C4BEFGZUl;&8#sy0N diff --git a/server/ModelFromNVE/icemodelling/__pycache__/constants.cpython-311.pyc b/server/ModelFromNVE/icemodelling/__pycache__/constants.cpython-311.pyc index 913972aefad8fad3dc909be26e7feaf98faa8ab4..bdb7f5d50612b5b6fb4d5bfdc1b3b840f7503c05 100644 GIT binary patch delta 20 acmeAZ?Gxo*&dbZi00id+Z8vf^a{&M^p#*~f delta 20 acmeAZ?Gxo*&dbZi00b|#h;QU><^ljSWCa-j diff --git a/server/ModelFromNVE/icemodelling/__pycache__/ice.cpython-311.pyc b/server/ModelFromNVE/icemodelling/__pycache__/ice.cpython-311.pyc index 666c71f624fccdd01dc506c918a2d49173f82b60..d5ba50d98c5fb3cd9e168aa99d9e7436f207a60b 100644 GIT binary patch delta 22 ccmZ3qjcL&~Chq0Dyj%=Ga9+@MBe(c$08L5;761SM delta 22 ccmZ3qjcL&~Chq0Dyj%=G@M4SjMsD%h08tGFtN;K2 diff --git a/server/ModelFromNVE/icemodelling/__pycache__/icethickness.cpython-311.pyc b/server/ModelFromNVE/icemodelling/__pycache__/icethickness.cpython-311.pyc index 140becda4e843539aa0433353569690d255c88b2..9f30eb965bf3561c94e10789793ed6f57fc40558 100644 GIT binary patch delta 22 ccmaDgk@3|;M(*Xjyj%=Ga9+@MBlmp|08~c?&j0`b delta 22 ccmaDgk@3|;M(*Xjyj%=G@M4SjM(+C_09XnKWdHyG diff --git a/server/ModelFromNVE/icemodelling/__pycache__/parameterization.cpython-311.pyc b/server/ModelFromNVE/icemodelling/__pycache__/parameterization.cpython-311.pyc index 1a50eab3931fde0055999076f6df42e4a69b9779..236f85f93879b51c39b657198d696e695fe176c7 100644 GIT binary patch delta 22 ccmX@Mknz|;M(*Xjyj%=Ga9+@MBlqqA08q0AivR!s delta 22 ccmX@Mknz|;M(*Xjyj%=G@M4SjM(*7K091AdApigX diff --git a/server/ModelFromNVE/icemodelling/__pycache__/weatherelement.cpython-311.pyc b/server/ModelFromNVE/icemodelling/__pycache__/weatherelement.cpython-311.pyc index 2c25ae5432cf36b9db76f647f1943321adbd4730..cd9dd527efcc2115dd9db6be96521cc98230a677 100644 GIT binary patch delta 22 ccmZ2+lX1mOM(*Xjyj%=Ga9+@MBlp}K08~u|y#N3J delta 22 ccmZ2+lX1mOM(*Xjyj%=G@M4SjM((*e09X(QQvd(} diff --git a/server/ModelFromNVE/icemodellingscripts/__pycache__/getIceThicknessLakes.cpython-311.pyc b/server/ModelFromNVE/icemodellingscripts/__pycache__/getIceThicknessLakes.cpython-311.pyc index 2f57de4685f6e2c47b98810742e653f7b0721ed5..ad6950db32d88093c4bacc11ed0c5e0a45c7e7db 100644 GIT binary patch delta 20 acmZ3OvM_~vIWI340}z}SwB5)pW&{8{-30;w delta 20 acmZ3OvM_~vIWI340}#k^%WmWrGXelNI|M2K diff --git a/server/ModelFromNVE/utilities/__pycache__/doconversions.cpython-311.pyc b/server/ModelFromNVE/utilities/__pycache__/doconversions.cpython-311.pyc index 62bce09243373230e73e50fa9e5f9bed55c10d6d..830ede315aca19c282788c0378780ce855f32f5c 100644 GIT binary patch delta 20 acmX@7cutXfIWI340}xygwB5*kSO5S!UIk(R delta 20 acmX@7cutXfIWI340}#C4BEFIPumAu*F9rGl diff --git a/server/ModelFromNVE/utilities/__pycache__/getfiledata.cpython-311.pyc b/server/ModelFromNVE/utilities/__pycache__/getfiledata.cpython-311.pyc index 893fe62ec1045139a8ede88f8d521ff43874a358..5f72847a3a8bf922e9d346328260b7e6b063cda3 100644 GIT binary patch delta 20 acmez4`p1=fIWI340}xygwB5-4Q3(J?um(l| delta 20 acmez4`p1=fIWI340}#C4BEFIPqY?m1fd<|H diff --git a/server/ModelFromNVE/utilities/__pycache__/getgts.cpython-311.pyc b/server/ModelFromNVE/utilities/__pycache__/getgts.cpython-311.pyc index 3a9a15321c2b05de22e541efe4b1c331e9584968..77cbc0ad06047c512003a0ae231d68306959bb50 100644 GIT binary patch delta 20 acmdn3vs;IIIWI340}xygwB5*UAO-+9_yolO delta 20 acmdn3vs;IIIWI340}#C4BEFH^Knwsp$pu{i diff --git a/server/ModelFromNVE/utilities/__pycache__/getmisc.cpython-311.pyc b/server/ModelFromNVE/utilities/__pycache__/getmisc.cpython-311.pyc index 05af15e65a8fcb0cb60913f5e850434518672a38..313db811d4e61be43c70d6a3cf9a8c931f940953 100644 GIT binary patch delta 20 acmdntw8M#eIWI340}xygwB5+9s|Wx)qXhE+ delta 20 acmdntw8M#eIWI340}#C4BEFGZR}la|bOnn5 diff --git a/server/ModelFromNVE/utilities/__pycache__/getregobsdata.cpython-311.pyc b/server/ModelFromNVE/utilities/__pycache__/getregobsdata.cpython-311.pyc index 5ab6e9e79da8792dee82004f7c05892ce5e61233..a1767c6b65c8a32d3318ca81cdc09d70184ab5b2 100644 GIT binary patch delta 22 ccmbQWfO*yeX71&@yj%=Ga6!;^BRBsA07&@;3IG5A delta 22 ccmbQWfO*yeX71&@yj%=G@Oq2*MsEHK08GjTq5uE@ diff --git a/server/ModelFromNVE/utilities/__pycache__/getwsklima.cpython-311.pyc b/server/ModelFromNVE/utilities/__pycache__/getwsklima.cpython-311.pyc index ad346e676bc0e6b5944e57c8cef4f3b4b21d20cd..fdd7615d10d5cf16e925c846cc8640060b9adb56 100644 GIT binary patch delta 22 ccmaE}jPcDfM(*Xjyj%=Ga6!;^BX?pj09N7#ivR!s delta 22 ccmaE}jPcDfM(*Xjyj%=G@Oq2*M()I509vyLBLDyZ diff --git a/server/ModelFromNVE/utilities/__pycache__/makefiledata.cpython-311.pyc b/server/ModelFromNVE/utilities/__pycache__/makefiledata.cpython-311.pyc index 9f02b39a7d84d86fc7b482c8c73b558802b9ed87..e159ba40678450ab77b49c5c4cb95a6e36c09cd1 100644 GIT binary patch delta 20 acmeB->x|=G&dbZi00b8VZ8viN(*poHNCm3^ delta 20 acmeB->x|=G&dbZi00ghMh;QWnrw0H&83scD diff --git a/server/ModelFromNVE/utilities/__pycache__/makelogs.cpython-311.pyc b/server/ModelFromNVE/utilities/__pycache__/makelogs.cpython-311.pyc index fa2ce0ed63056fa22020536111271c57befa76e3..0cb9c7a94c6ef87e10fc69ec8957c97e360085c8 100644 GIT binary patch delta 20 acmeC>@8#!S&dbZi00b8VZ8vf^u>$}ur37*S delta 20 acmeC>@8#!S&dbZi00ghMh;QU>Vg~>+b_EIm diff --git a/server/ModelFromNVE/utilities/__pycache__/makepickle.cpython-311.pyc b/server/ModelFromNVE/utilities/__pycache__/makepickle.cpython-311.pyc index 777f7160c68de582f078dec0ccb4b3548950fea1..afbd878997cae0280226120b45590abd7a85194c 100644 GIT binary patch delta 20 acmZqVZRF)%&dbZi00b8VZ8vh4u>k-qd<01V delta 20 acmZqVZRF)%&dbZi00ghMh;QUBV*>y%O$6Zp diff --git a/server/ModelFromNVE/utilities/__pycache__/makeplots.cpython-311.pyc b/server/ModelFromNVE/utilities/__pycache__/makeplots.cpython-311.pyc index 94dcb504eb83b2ed49419acd1bb27261b7d0a8f0..6bd8e8f3a62c72de5ade1ee6f6f7f7562cbf35c9 100644 GIT binary patch delta 25 fcmeC2%F;QNg?l+KFBbz4ToANv<lf57SjPnbRu={i delta 25 fcmeC2%F;QNg?l+KFBbz4yxt<-$i0=Dv5pG>Td)SE diff --git a/server/__pycache__/consts.cpython-311.pyc b/server/__pycache__/consts.cpython-311.pyc index 665ab22882bf6b2546aaf16a76e6084d5d314cc3..bb38aa0189f45c62dc5b19e249a301babbd4ce76 100644 GIT binary patch delta 20 acmdnXyqB4KIWI340}xygwB5+Pi4g!aZv^B3 delta 20 acmdnXyqB4KIWI340}yl{7vIRei4g!c5(O^+ diff --git a/server/__pycache__/scheduler.cpython-311.pyc b/server/__pycache__/scheduler.cpython-311.pyc index 94d74ff114126ce388a150017616b31af628fd8b..74a62b5897f29bb42fb13b258ec113975c6a8701 100644 GIT binary patch delta 20 acmcb>dx4jGIWI340}xygwB5*klnnql)CD#G delta 20 acmcb>dx4jGIWI340}yQBx7x^klnnqk*#!{* diff --git a/server/data_processing/__pycache__/area_processing.cpython-311.pyc b/server/data_processing/__pycache__/area_processing.cpython-311.pyc index f7b759689df890a0976e8f89452024daae5cad01..00b18afedf97f6f5920c7a8309db156ee9627def 100644 GIT binary patch delta 20 acmbQ^ILDEDIWI340}xygwB5)(Q2_ur9t9i# delta 20 acmbQ^ILDEDIWI340}$v5Xl~@5r~m*nMg(O5 diff --git a/server/data_processing/__pycache__/process_lidar_data.cpython-311.pyc b/server/data_processing/__pycache__/process_lidar_data.cpython-311.pyc index b0872016960158d01bc8de5b6b688b9653967188..5625e3f88e56fd7cdf67f5f945edc2b9bbc2cbc8 100644 GIT binary patch delta 20 acmbPXJ;R!NIWI340}xygwB5+vD+>TNqXhu~ delta 20 acmbPXJ;R!NIWI340}ya3X>H{0l?4DXIRrQW diff --git a/server/main.py b/server/main.py index 7d3fe3b8..8bb9b75f 100644 --- a/server/main.py +++ b/server/main.py @@ -10,8 +10,8 @@ from map_handler.add_new_lake import cut_map from server.scheduler import update_scheduler from server.consts import LAKE_RELATIONS_PATH from map_handler.get_lake_relation import get_map_data -from map_handler.update_measurements import update_measurements from map_handler.input_new_data import input_new_Lidar_data +from map_handler.update_measurements import update_measurements, addTestData app = Flask(__name__) terminate_server = 0 @@ -117,6 +117,14 @@ class IceHTTP(BaseHTTPRequestHandler): self.send_response(400) self.send_header('Content-type', 'application/json') self.end_headers() + elif self.path.startswith('/add_test_data'): + parsed_path = urlparse(self.path) + query_params = parse_qs(parsed_path.query) + + lake_name_param = query_params.get('lake', [''])[0] + lake_name = unquote(lake_name_param) # Decode url param + + addTestData(self, lake_name) def do_POST(self): if self.path == '/new_lidar_data': diff --git a/server/map_handler/__pycache__/add_new_lake.cpython-311.pyc b/server/map_handler/__pycache__/add_new_lake.cpython-311.pyc index a2f322da4b53723c391fe39b2dd41dda48c08e24..81c01a0d2a1ed6280170469377f8d5e64cf60724 100644 GIT binary patch delta 19 ZcmX>Xd@h)4IWI340}xyg+{krA697F#1)%@{ delta 19 ZcmX>Xd@h)4IWI340}%XT-pF-C697H>1-$?O diff --git a/server/map_handler/__pycache__/get_lake_relation.cpython-311.pyc b/server/map_handler/__pycache__/get_lake_relation.cpython-311.pyc index a3248d045ed94e17ca7b95054706be2f811adaf5..0fd58c6d138d4c59f692b857fd1258738781ea3b 100644 GIT binary patch delta 20 acmZ1~xKxmPIWI340}xygwB5)(ivs{Mt^~gT delta 20 acmZ1~xKxmPIWI340}xDop}vuO76$+|tp!B@ diff --git a/server/map_handler/__pycache__/input_new_data.cpython-311.pyc b/server/map_handler/__pycache__/input_new_data.cpython-311.pyc index 5aa41fdfa2b6a2b6d8e925c683c73b812aa7f08a..fa205a0b9fcc05bf10d5dd3613aaff1dab9a4a65 100644 GIT binary patch delta 20 acmZ3gu~dV5IWI340}xygwB5)pB?166_5^tV delta 20 acmZ3gu~dV5IWI340}ya3X>H_|5&-}&j03O$ diff --git a/server/map_handler/__pycache__/update_measurements.cpython-311.pyc b/server/map_handler/__pycache__/update_measurements.cpython-311.pyc index 92ac977e4cdc09c13f9cd16db2a2af1f2d983f49..97bc7256cf980f3ac16c9db90bbb07a4c9efdd96 100644 GIT binary patch delta 3863 zcmchaYfK#16@c&Tb7o&GkHx#oYk1gZvB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p{o%R4QvPh-gM9ye z%!7~zpA>%v>n{@TgU3R!(V`oyQeDFFg&VfGX;Cg26}(qHOeROVp@W}5dXOZNLej_p zaNr$01CgUXB#*=U{+1lhoyKwtGKP!;u8$d#pT!{@P2&ON98yphQr-DU2;KHMR-=oi zoHK2sGRwKi`DJXG2eJv?it#$Kpte()YA=RM$TG5mTtlt{Zl^S*URz~lx+-t6@*RT; z!Ea#sDzXX){1^KEx%e8E&;R97J>E-wq+8kPV#<Q7AVA-rt^#%;dul)ZG?tC?JZ8L8 zGsQ>f%o!ZxXLVa@Oh|8C*I%ufy7VS;i48Wg2K)+6ZkQFjMyI#~L)=PyQhhmn@Gc?C b<W*-w^Me21Hq~x!N`1}wLt2=myj6b#N8iP? diff --git "a/server/map_handler/lake_relations/mj\303\270sa_lidar_data.json" "b/server/map_handler/lake_relations/mj\303\270sa_lidar_data.json" index c8bb5a23..fdc3661f 100644 --- "a/server/map_handler/lake_relations/mj\303\270sa_lidar_data.json" +++ "b/server/map_handler/lake_relations/mj\303\270sa_lidar_data.json" @@ -1,103 +1,867 @@ [ - { - "MeasurementID": 7, - "TimeMeasured": "2024-04-15 16:23:28.620516", - "CenterLat": 60.841532, - "CenterLon": 10.717878, - "Sensor": { - "SensorID": 2, - "SensorType": "LiDar", - "Active": true + { + "MeasurementID": 0, + "TimeMeasured": "2024-05-10T15:02:46.460082", + "CenterLat": 60.15661244649667, + "CenterLon": 10.420511075277538, + "Sensor": { + "SensorID": 5, + "SensorType": "GPS", + "Active": false + }, + "Subdivisions": [ + { + "SubdivID": 0, + "MinThickness": 6.3, + "AvgThickness": 1.3, + "CenLatitude": 60.10777285526284, + "CenLongitude": 10.107184032206563, + "Accuracy": 0 + }, + { + "SubdivID": 1, + "MinThickness": 9.5, + "AvgThickness": 14.3, + "CenLatitude": 60.853083528205836, + "CenLongitude": 10.454081488525961, + "Accuracy": 0 + }, + { + "SubdivID": 2, + "MinThickness": 9.0, + "AvgThickness": 1.9, + "CenLatitude": 60.54872672925765, + "CenLongitude": 10.382926574822571, + "Accuracy": 0 + }, + { + "SubdivID": 3, + "MinThickness": 13.4, + "AvgThickness": 13.7, + "CenLatitude": 60.38569354244932, + "CenLongitude": 10.297495220530292, + "Accuracy": 0 + }, + { + "SubdivID": 4, + "MinThickness": 9.5, + "AvgThickness": 5.6, + "CenLatitude": 60.86421008197863, + "CenLongitude": 10.122669100568674, + "Accuracy": 0 + }, + { + "SubdivID": 5, + "MinThickness": 7.6, + "AvgThickness": 6.8, + "CenLatitude": 60.456131801761366, + "CenLongitude": 10.006303432332329, + "Accuracy": 0 + }, + { + "SubdivID": 6, + "MinThickness": 15.7, + "AvgThickness": 11.5, + "CenLatitude": 60.68101519515003, + "CenLongitude": 10.333604874760804, + "Accuracy": 0 + }, + { + "SubdivID": 7, + "MinThickness": 16.0, + "AvgThickness": 5.5, + "CenLatitude": 60.10078926409104, + "CenLongitude": 10.249102097687345, + "Accuracy": 0 + }, + { + "SubdivID": 8, + "MinThickness": 6.2, + "AvgThickness": 12.0, + "CenLatitude": 60.13377192592753, + "CenLongitude": 10.13541332578462, + "Accuracy": 0 + }, + { + "SubdivID": 9, + "MinThickness": 6.2, + "AvgThickness": 11.5, + "CenLatitude": 60.9949790817237, + "CenLongitude": 10.9026980103584, + "Accuracy": 0 + }, + { + "SubdivID": 10, + "MinThickness": 15.5, + "AvgThickness": 12.8, + "CenLatitude": 60.63526896963899, + "CenLongitude": 10.121208041246181, + "Accuracy": 0 + }, + { + "SubdivID": 11, + "MinThickness": 18.0, + "AvgThickness": 1.5, + "CenLatitude": 60.648961504922354, + "CenLongitude": 10.537971288746602, + "Accuracy": 0 + }, + { + "SubdivID": 12, + "MinThickness": 1.2, + "AvgThickness": 1.0, + "CenLatitude": 60.97278225584855, + "CenLongitude": 10.196135498923473, + "Accuracy": 0 + }, + { + "SubdivID": 13, + "MinThickness": 10.7, + "AvgThickness": 1.0, + "CenLatitude": 60.08679615505433, + "CenLongitude": 10.900354566508327, + "Accuracy": 0 + }, + { + "SubdivID": 14, + "MinThickness": 2.1, + "AvgThickness": 1.3, + "CenLatitude": 60.06556038224187, + "CenLongitude": 10.188638913024288, + "Accuracy": 0 + }, + { + "SubdivID": 15, + "MinThickness": 19.2, + "AvgThickness": 9.0, + "CenLatitude": 60.155433044458846, + "CenLongitude": 10.820695300396666, + "Accuracy": 0 + }, + { + "SubdivID": 16, + "MinThickness": 14.6, + "AvgThickness": 11.8, + "CenLatitude": 60.77463099352181, + "CenLongitude": 10.12613288095761, + "Accuracy": 0 + }, + { + "SubdivID": 17, + "MinThickness": 12.9, + "AvgThickness": 0.1, + "CenLatitude": 60.017228525704375, + "CenLongitude": 10.078769807593655, + "Accuracy": 0 + }, + { + "SubdivID": 18, + "MinThickness": 6.3, + "AvgThickness": 3.9, + "CenLatitude": 60.2191917263786, + "CenLongitude": 10.570859084782635, + "Accuracy": 0 + }, + { + "SubdivID": 19, + "MinThickness": 13.7, + "AvgThickness": 0.8, + "CenLatitude": 60.471624836165226, + "CenLongitude": 10.383205986681352, + "Accuracy": 0 + } + ] + }, + { + "MeasurementID": 1, + "TimeMeasured": "2024-05-10T15:02:46.460082", + "CenterLat": 60.16540559598258, + "CenterLon": 10.626910178879758, + "Sensor": { + "SensorID": 5, + "SensorType": "Camera", + "Active": true + }, + "Subdivisions": [ + { + "SubdivID": 10, + "MinThickness": 11.3, + "AvgThickness": 13.9, + "CenLatitude": 60.78364109669106, + "CenLongitude": 10.184999455942902, + "Accuracy": 0 + }, + { + "SubdivID": 11, + "MinThickness": 5.0, + "AvgThickness": 13.9, + "CenLatitude": 60.05456396205553, + "CenLongitude": 10.683888102335269, + "Accuracy": 0 + }, + { + "SubdivID": 12, + "MinThickness": 2.8, + "AvgThickness": 9.7, + "CenLatitude": 60.08881772458744, + "CenLongitude": 10.073329965308726, + "Accuracy": 0 + }, + { + "SubdivID": 13, + "MinThickness": 1.1, + "AvgThickness": 11.0, + "CenLatitude": 60.78848605867206, + "CenLongitude": 10.678920486571466, + "Accuracy": 0 + }, + { + "SubdivID": 14, + "MinThickness": 5.3, + "AvgThickness": 0.5, + "CenLatitude": 60.79969381515751, + "CenLongitude": 10.133330475163648, + "Accuracy": 0 + }, + { + "SubdivID": 15, + "MinThickness": 17.2, + "AvgThickness": 3.9, + "CenLatitude": 60.40595283505395, + "CenLongitude": 10.79896558578825, + "Accuracy": 0 + }, + { + "SubdivID": 16, + "MinThickness": 17.5, + "AvgThickness": 12.2, + "CenLatitude": 60.58738248071579, + "CenLongitude": 10.978131161653831, + "Accuracy": 0 + }, + { + "SubdivID": 17, + "MinThickness": 5.3, + "AvgThickness": 13.9, + "CenLatitude": 60.122874736333664, + "CenLongitude": 10.811093717481867, + "Accuracy": 0 + }, + { + "SubdivID": 18, + "MinThickness": 14.9, + "AvgThickness": 0.2, + "CenLatitude": 60.163023913553026, + "CenLongitude": 10.773500505625373, + "Accuracy": 0 + }, + { + "SubdivID": 19, + "MinThickness": 15.5, + "AvgThickness": 13.7, + "CenLatitude": 60.54179252090321, + "CenLongitude": 10.034882979313105, + "Accuracy": 0 + }, + { + "SubdivID": 20, + "MinThickness": 6.7, + "AvgThickness": 6.8, + "CenLatitude": 60.12390293751239, + "CenLongitude": 10.182745457038667, + "Accuracy": 0 + }, + { + "SubdivID": 21, + "MinThickness": 15.7, + "AvgThickness": 10.2, + "CenLatitude": 60.82517465722746, + "CenLongitude": 10.257841867739222, + "Accuracy": 0 + }, + { + "SubdivID": 22, + "MinThickness": 5.1, + "AvgThickness": 3.0, + "CenLatitude": 60.124690132476594, + "CenLongitude": 10.892391249595482, + "Accuracy": 0 + }, + { + "SubdivID": 23, + "MinThickness": 2.1, + "AvgThickness": 11.5, + "CenLatitude": 60.71794497422589, + "CenLongitude": 10.233730086028784, + "Accuracy": 0 + }, + { + "SubdivID": 24, + "MinThickness": 11.0, + "AvgThickness": 11.8, + "CenLatitude": 60.95169294822347, + "CenLongitude": 10.959931293998881, + "Accuracy": 0 + }, + { + "SubdivID": 25, + "MinThickness": 16.4, + "AvgThickness": 6.9, + "CenLatitude": 60.524777464795854, + "CenLongitude": 10.790616392907094, + "Accuracy": 0 + }, + { + "SubdivID": 26, + "MinThickness": 9.9, + "AvgThickness": 9.2, + "CenLatitude": 60.03338785202388, + "CenLongitude": 10.606814190467277, + "Accuracy": 0 + }, + { + "SubdivID": 27, + "MinThickness": 19.8, + "AvgThickness": 0.8, + "CenLatitude": 60.49333364774132, + "CenLongitude": 10.929502485214705, + "Accuracy": 0 + }, + { + "SubdivID": 28, + "MinThickness": 9.4, + "AvgThickness": 8.5, + "CenLatitude": 60.66236286336947, + "CenLongitude": 10.598304840489329, + "Accuracy": 0 + }, + { + "SubdivID": 29, + "MinThickness": 3.8, + "AvgThickness": 3.8, + "CenLatitude": 60.66236851405837, + "CenLongitude": 10.543851690528818, + "Accuracy": 0 + } + ] }, - "Subdivisions": [ - { - "SubdivID": 36, - "MinThickness": 0.4, - "AvgThickness": 1.0, - "CenLatitude": 60.841532, - "CenLongitude": 10.717878, - "Accuracy": 2 - }, - { - "SubdivID": 83, - "MinThickness": 5.5, - "AvgThickness": 14.0, - "CenLatitude": 60.828326, - "CenLongitude": 10.982563, - "Accuracy": 2 - }, - { - "SubdivID": 33, - "MinThickness": 0.0, - "AvgThickness": 1.0, - "CenLatitude": 60.771059, - "CenLongitude": 10.698341, - "Accuracy": 2 - }, - { - "SubdivID": 136, - "MinThickness": 5.5, - "AvgThickness": 9.0, - "CenLatitude": 60.396856, - "CenLongitude": 11.220933, - "Accuracy": 2 - }, - { - "SubdivID": 0, - "MinThickness": 7.0, - "AvgThickness": 8.2, - "CenLatitude": 60.396856, - "CenLongitude": 11.220933, - "Accuracy": 2 - }, - { - "SubdivID": 1, - "MinThickness": 0.4, - "AvgThickness": 5.0, - "CenLatitude": 60.396856, - "CenLongitude": 11.220933, - "Accuracy": 2 - }, - { - "SubdivID": 3, - "MinThickness": 1.0, - "AvgThickness": 4.0, - "CenLatitude": 60.345355, - "CenLongitude": 11.220933, - "Accuracy": 2 - }, - { - "SubdivID": 4, - "MinThickness": 2.0, - "AvgThickness": 4.0, - "CenLatitude": 60.202034, - "CenLongitude": 11.890890, - "Accuracy": 2 - }, - { - "SubdivID": 5, - "MinThickness": 2.3, - "AvgThickness": 7.3, - "CenLatitude": 60.45367, - "CenLongitude": 11.43533, - "Accuracy": 2 - }, - { - "SubdivID": 6, - "MinThickness": 1.0, - "AvgThickness": 2.2, - "CenLatitude": 60.45367, - "CenLongitude": 11.43533, - "Accuracy": 2 - }, - { - "SubdivID": 7, - "MinThickness": 4.0, - "AvgThickness": 8.2, - "CenLatitude": 60.45367, - "CenLongitude": 11.43533, - "Accuracy": 2 - } - ] - } -] + { + "MeasurementID": 2, + "TimeMeasured": "2024-05-10T15:02:46.460082", + "CenterLat": 60.13136099457402, + "CenterLon": 10.829562428666081, + "Sensor": { + "SensorID": 7, + "SensorType": "LiDar", + "Active": true + }, + "Subdivisions": [ + { + "SubdivID": 20, + "MinThickness": 7.1, + "AvgThickness": 4.6, + "CenLatitude": 60.36508681519598, + "CenLongitude": 10.019782624904348, + "Accuracy": 0 + }, + { + "SubdivID": 21, + "MinThickness": 17.1, + "AvgThickness": 9.9, + "CenLatitude": 60.65128757232182, + "CenLongitude": 10.378290483491341, + "Accuracy": 0 + }, + { + "SubdivID": 22, + "MinThickness": 16.6, + "AvgThickness": 13.9, + "CenLatitude": 60.16979322377188, + "CenLongitude": 10.695434267051004, + "Accuracy": 0 + }, + { + "SubdivID": 23, + "MinThickness": 16.4, + "AvgThickness": 6.7, + "CenLatitude": 60.39261468436118, + "CenLongitude": 10.780962371006868, + "Accuracy": 0 + }, + { + "SubdivID": 24, + "MinThickness": 4.5, + "AvgThickness": 7.3, + "CenLatitude": 60.0583811972531, + "CenLongitude": 10.491436511180353, + "Accuracy": 0 + }, + { + "SubdivID": 25, + "MinThickness": 2.9, + "AvgThickness": 1.3, + "CenLatitude": 60.32336574285142, + "CenLongitude": 10.330267774196788, + "Accuracy": 0 + }, + { + "SubdivID": 26, + "MinThickness": 19.2, + "AvgThickness": 9.7, + "CenLatitude": 60.26665856127483, + "CenLongitude": 10.649291939441639, + "Accuracy": 0 + }, + { + "SubdivID": 27, + "MinThickness": 6.8, + "AvgThickness": 8.9, + "CenLatitude": 60.77805618088535, + "CenLongitude": 10.356365704014932, + "Accuracy": 0 + }, + { + "SubdivID": 28, + "MinThickness": 16.6, + "AvgThickness": 3.0, + "CenLatitude": 60.43389461243752, + "CenLongitude": 10.156740324403113, + "Accuracy": 0 + }, + { + "SubdivID": 29, + "MinThickness": 16.1, + "AvgThickness": 12.5, + "CenLatitude": 60.17277507705081, + "CenLongitude": 10.366393018987718, + "Accuracy": 0 + }, + { + "SubdivID": 30, + "MinThickness": 7.9, + "AvgThickness": 5.0, + "CenLatitude": 60.85971815104427, + "CenLongitude": 10.14729452449491, + "Accuracy": 0 + }, + { + "SubdivID": 31, + "MinThickness": 5.0, + "AvgThickness": 2.3, + "CenLatitude": 60.249531455309025, + "CenLongitude": 10.597875212906851, + "Accuracy": 0 + }, + { + "SubdivID": 32, + "MinThickness": 2.3, + "AvgThickness": 14.5, + "CenLatitude": 60.80468360877115, + "CenLongitude": 10.523419626839916, + "Accuracy": 0 + }, + { + "SubdivID": 33, + "MinThickness": 14.4, + "AvgThickness": 6.3, + "CenLatitude": 60.243518826313974, + "CenLongitude": 10.956197724243227, + "Accuracy": 0 + }, + { + "SubdivID": 34, + "MinThickness": 18.5, + "AvgThickness": 4.0, + "CenLatitude": 60.258949953727544, + "CenLongitude": 10.09511859010727, + "Accuracy": 0 + }, + { + "SubdivID": 35, + "MinThickness": 15.5, + "AvgThickness": 4.5, + "CenLatitude": 60.191630494314, + "CenLongitude": 10.586821317328878, + "Accuracy": 0 + }, + { + "SubdivID": 36, + "MinThickness": 17.6, + "AvgThickness": 5.8, + "CenLatitude": 60.28966926297759, + "CenLongitude": 10.700171908023934, + "Accuracy": 0 + }, + { + "SubdivID": 37, + "MinThickness": 7.2, + "AvgThickness": 5.9, + "CenLatitude": 60.823832923247686, + "CenLongitude": 10.679123770494535, + "Accuracy": 0 + }, + { + "SubdivID": 38, + "MinThickness": 14.5, + "AvgThickness": 0.5, + "CenLatitude": 60.83219721825974, + "CenLongitude": 10.604718318709981, + "Accuracy": 0 + }, + { + "SubdivID": 39, + "MinThickness": 7.4, + "AvgThickness": 14.5, + "CenLatitude": 60.224396062525436, + "CenLongitude": 10.860546274602717, + "Accuracy": 0 + } + ] + }, + { + "MeasurementID": 3, + "TimeMeasured": "2024-05-10T15:02:46.460082", + "CenterLat": 60.77186454689546, + "CenterLon": 10.076197037042594, + "Sensor": { + "SensorID": 3, + "SensorType": "LiDar", + "Active": false + }, + "Subdivisions": [ + { + "SubdivID": 30, + "MinThickness": 7.2, + "AvgThickness": 0.2, + "CenLatitude": 60.1211831220723, + "CenLongitude": 10.433492128434347, + "Accuracy": 0 + }, + { + "SubdivID": 31, + "MinThickness": 12.5, + "AvgThickness": 4.7, + "CenLatitude": 60.09446534879696, + "CenLongitude": 10.169182809885928, + "Accuracy": 0 + }, + { + "SubdivID": 32, + "MinThickness": 9.2, + "AvgThickness": 7.6, + "CenLatitude": 60.47699863009332, + "CenLongitude": 10.169779594164975, + "Accuracy": 0 + }, + { + "SubdivID": 33, + "MinThickness": 17.3, + "AvgThickness": 12.7, + "CenLatitude": 60.61449215563532, + "CenLongitude": 10.286301125841847, + "Accuracy": 0 + }, + { + "SubdivID": 34, + "MinThickness": 17.1, + "AvgThickness": 14.7, + "CenLatitude": 60.88865731623264, + "CenLongitude": 10.90119711896059, + "Accuracy": 0 + }, + { + "SubdivID": 35, + "MinThickness": 18.9, + "AvgThickness": 4.3, + "CenLatitude": 60.50578045085538, + "CenLongitude": 10.326163707164262, + "Accuracy": 0 + }, + { + "SubdivID": 36, + "MinThickness": 13.5, + "AvgThickness": 8.7, + "CenLatitude": 60.94398135151113, + "CenLongitude": 10.49695134340046, + "Accuracy": 0 + }, + { + "SubdivID": 37, + "MinThickness": 7.0, + "AvgThickness": 5.6, + "CenLatitude": 60.28638660998567, + "CenLongitude": 10.691290423454342, + "Accuracy": 0 + }, + { + "SubdivID": 38, + "MinThickness": 10.5, + "AvgThickness": 9.4, + "CenLatitude": 60.68446952324046, + "CenLongitude": 10.37295446759194, + "Accuracy": 0 + }, + { + "SubdivID": 39, + "MinThickness": 14.6, + "AvgThickness": 13.8, + "CenLatitude": 60.81410567704638, + "CenLongitude": 10.06894440143231, + "Accuracy": 0 + }, + { + "SubdivID": 40, + "MinThickness": 4.7, + "AvgThickness": 5.5, + "CenLatitude": 60.04456600584487, + "CenLongitude": 10.19344146599138, + "Accuracy": 0 + }, + { + "SubdivID": 41, + "MinThickness": 2.6, + "AvgThickness": 4.5, + "CenLatitude": 60.80515866050682, + "CenLongitude": 10.398889501642444, + "Accuracy": 0 + }, + { + "SubdivID": 42, + "MinThickness": 7.2, + "AvgThickness": 8.4, + "CenLatitude": 60.45792719388867, + "CenLongitude": 10.777745165230948, + "Accuracy": 0 + }, + { + "SubdivID": 43, + "MinThickness": 6.4, + "AvgThickness": 8.6, + "CenLatitude": 60.354007093976705, + "CenLongitude": 10.15488230395325, + "Accuracy": 0 + }, + { + "SubdivID": 44, + "MinThickness": 6.4, + "AvgThickness": 0.3, + "CenLatitude": 60.604294365856255, + "CenLongitude": 10.106545184428361, + "Accuracy": 0 + }, + { + "SubdivID": 45, + "MinThickness": 15.2, + "AvgThickness": 11.0, + "CenLatitude": 60.03266432676924, + "CenLongitude": 10.411568101780958, + "Accuracy": 0 + }, + { + "SubdivID": 46, + "MinThickness": 3.2, + "AvgThickness": 3.6, + "CenLatitude": 60.59429202516463, + "CenLongitude": 10.60613990222163, + "Accuracy": 0 + }, + { + "SubdivID": 47, + "MinThickness": 18.2, + "AvgThickness": 12.7, + "CenLatitude": 60.1259788650051, + "CenLongitude": 10.193901032812866, + "Accuracy": 0 + }, + { + "SubdivID": 48, + "MinThickness": 8.2, + "AvgThickness": 0.0, + "CenLatitude": 60.299978804849474, + "CenLongitude": 10.654974654026363, + "Accuracy": 0 + }, + { + "SubdivID": 49, + "MinThickness": 3.0, + "AvgThickness": 8.3, + "CenLatitude": 60.30758635749686, + "CenLongitude": 10.277177149775996, + "Accuracy": 0 + } + ] + }, + { + "MeasurementID": 4, + "TimeMeasured": "2024-05-10T15:02:46.460082", + "CenterLat": 60.69397624263921, + "CenterLon": 10.53677766841655, + "Sensor": { + "SensorID": 3, + "SensorType": "LiDar", + "Active": true + }, + "Subdivisions": [ + { + "SubdivID": 40, + "MinThickness": 15.6, + "AvgThickness": 10.8, + "CenLatitude": 60.012237584546995, + "CenLongitude": 10.528577013579792, + "Accuracy": 0 + }, + { + "SubdivID": 41, + "MinThickness": 6.2, + "AvgThickness": 1.7, + "CenLatitude": 60.32707003791916, + "CenLongitude": 10.452225809919659, + "Accuracy": 0 + }, + { + "SubdivID": 42, + "MinThickness": 15.5, + "AvgThickness": 10.6, + "CenLatitude": 60.25936467500736, + "CenLongitude": 10.636169739855005, + "Accuracy": 0 + }, + { + "SubdivID": 43, + "MinThickness": 15.8, + "AvgThickness": 1.8, + "CenLatitude": 60.04760052813683, + "CenLongitude": 10.437946419369059, + "Accuracy": 0 + }, + { + "SubdivID": 44, + "MinThickness": 10.1, + "AvgThickness": 13.7, + "CenLatitude": 60.43922947945418, + "CenLongitude": 10.519892774467298, + "Accuracy": 0 + }, + { + "SubdivID": 45, + "MinThickness": 13.1, + "AvgThickness": 5.7, + "CenLatitude": 60.62611653075089, + "CenLongitude": 10.439500418360161, + "Accuracy": 0 + }, + { + "SubdivID": 46, + "MinThickness": 8.7, + "AvgThickness": 1.5, + "CenLatitude": 60.47068261991555, + "CenLongitude": 10.627923628810612, + "Accuracy": 0 + }, + { + "SubdivID": 47, + "MinThickness": 18.7, + "AvgThickness": 1.8, + "CenLatitude": 60.811959353721655, + "CenLongitude": 10.406898796167154, + "Accuracy": 0 + }, + { + "SubdivID": 48, + "MinThickness": 11.6, + "AvgThickness": 13.7, + "CenLatitude": 60.58087272165566, + "CenLongitude": 10.996232565263595, + "Accuracy": 0 + }, + { + "SubdivID": 49, + "MinThickness": 13.4, + "AvgThickness": 6.1, + "CenLatitude": 60.5922606370579, + "CenLongitude": 10.525011726524069, + "Accuracy": 0 + }, + { + "SubdivID": 50, + "MinThickness": 2.6, + "AvgThickness": 11.2, + "CenLatitude": 60.53358386747606, + "CenLongitude": 10.431315127218754, + "Accuracy": 0 + }, + { + "SubdivID": 51, + "MinThickness": 2.2, + "AvgThickness": 3.7, + "CenLatitude": 60.65530778907371, + "CenLongitude": 10.299210345167063, + "Accuracy": 0 + }, + { + "SubdivID": 52, + "MinThickness": 13.0, + "AvgThickness": 1.0, + "CenLatitude": 60.30523564656654, + "CenLongitude": 10.15425546783548, + "Accuracy": 0 + }, + { + "SubdivID": 53, + "MinThickness": 0.4, + "AvgThickness": 0.9, + "CenLatitude": 60.177449051925514, + "CenLongitude": 10.966835761357597, + "Accuracy": 0 + }, + { + "SubdivID": 54, + "MinThickness": 14.1, + "AvgThickness": 7.6, + "CenLatitude": 60.98549088551478, + "CenLongitude": 10.912826141042324, + "Accuracy": 0 + }, + { + "SubdivID": 55, + "MinThickness": 11.8, + "AvgThickness": 8.7, + "CenLatitude": 60.144834322206734, + "CenLongitude": 10.015683997049512, + "Accuracy": 0 + }, + { + "SubdivID": 56, + "MinThickness": 15.4, + "AvgThickness": 12.9, + "CenLatitude": 60.58665627295193, + "CenLongitude": 10.950398607664738, + "Accuracy": 0 + }, + { + "SubdivID": 57, + "MinThickness": 2.9, + "AvgThickness": 5.0, + "CenLatitude": 60.087725471418345, + "CenLongitude": 10.843027941049378, + "Accuracy": 0 + }, + { + "SubdivID": 58, + "MinThickness": 16.1, + "AvgThickness": 12.2, + "CenLatitude": 60.00154501887719, + "CenLongitude": 10.100649677370782, + "Accuracy": 0 + }, + { + "SubdivID": 59, + "MinThickness": 15.5, + "AvgThickness": 3.4, + "CenLatitude": 60.991064449225384, + "CenLongitude": 10.442251536571451, + "Accuracy": 0 + } + ] + } +] \ No newline at end of file diff --git a/server/map_handler/update_measurements.py b/server/map_handler/update_measurements.py index 8b4756b4..dd788030 100644 --- a/server/map_handler/update_measurements.py +++ b/server/map_handler/update_measurements.py @@ -57,7 +57,8 @@ def update_measurements(self, lake_name: str): temp_to_date = "2024-10-12" temp_from_date = "2024-10-19" ice_stats = get_raw_dates(ice_prognosis_raw_data( - sub_div_id=subdiv_id, x=center_lat, y=center_lng), to_date=temp_to_date, from_date=temp_from_date) + sub_div_id=subdiv_id, x=center_lat, y=center_lng), to_date=temp_to_date, + from_date=temp_from_date) # Ice statistics were retrieved successfully if len(ice_stats) > 0 and len(ice_stats[0]) > 0: @@ -206,3 +207,77 @@ def calculateColor(thickness: float): # NB neither final colors nor ranges return 0xFF00d6ff # Blue else: return 0xFF8C8C8C # Grey + + +def addTestData(self, lake_name: str): + """ + Adds random test data to lake_name_lidar_data.json. This function is purly for testing, not production. + The function overwrites the lidar data for the selected lake. + + Parameters: + self (BaseHTTPRequestHandler): A instance of a BaseHTTPRequestHandler + lake_name (str): The name of the file/lake for the test data + """ + try: + test_data = [] + + for measurement_id in range(5): + measurement = { + "MeasurementID": measurement_id, + "TimeMeasured": datetime.now().isoformat(), + "CenterLat": random.uniform(60, 61), + "CenterLon": random.uniform(10, 11), + "Sensor": { + "SensorID": random.randint(1, 10), + "SensorType": random.choice(["LiDar", "GPS", "Camera"]), + "Active": random.choice([True, False]) + }, + "Subdivisions": [] + } + + # Create 10 subdivisions for each measurement, with randomized coordinates and thicknesses + for subdiv_id in range(20): + + subdivision = { + "SubdivID": subdiv_id + 10*measurement_id, + "MinThickness": round(random.uniform(0, 20), 1), + "AvgThickness": round(random.uniform(0, 15), 1), + "CenLatitude": random.uniform(60, 61), + "CenLongitude": random.uniform(10, 11), + "Accuracy": 0 + } + measurement["Subdivisions"].append(subdivision) + + test_data.append(measurement) + + # Overwrite the lidar data file + with open(LAKE_RELATIONS_PATH + lake_name + '_lidar_data.json', 'w') as f: + json.dump(test_data, f, indent=4) + + # Convert list of dictionaries to JSON + response_data = json.dumps(test_data, indent=4) + # Set headers + self.send_response(200) + self.send_header("Content-type", "application/json") + self.end_headers() + + # Write processed data to response object + self.wfile.write(response_data.encode('utf-8')) + + except FileNotFoundError as e: + print("Failed to find relation file: ", e) + + # Set headers + self.send_response(500) + self.send_header("Content-type", "application/json") + self.end_headers() + + self.wfile.write("File not found") + except Exception as e: + print("Failed to add remaining subdivisions: ", e) + # Set headers + self.send_response(500) + self.send_header("Content-type", "application/json") + self.end_headers() + + self.wfile.write(f"Error in adding test data: {e}".encode('utf-8')) -- GitLab