Commit 3c8fd9d1 authored by Tomas Pettersson's avatar Tomas Pettersson 🏸

removed pickle tree

better intersection handling
parent dc0115f0
2017-12-13 08:00 27.0119 60.0031 0.0000
2017-12-13 08:15 27.0113 60.0034 0.0000
2017-12-13 08:30 27.0102 60.0037 0.0000
2017-12-13 08:45 27.0094 60.0040 0.0000
2017-12-13 09:00 27.0084 60.0043 0.0000
2017-12-13 09:15 27.0075 60.0046 0.0000
2017-12-13 09:30 27.0064 60.0052 0.0000
2017-12-13 09:45 27.0059 60.0057 0.0000
2017-12-13 10:00 27.0053 60.0061 0.0000
2017-12-13 10:15 27.0047 60.0066 0.0000
2017-12-13 10:30 27.0040 60.0072 0.0000
2017-12-13 10:45 27.0034 60.0077 0.0000
2017-12-13 11:00 27.0028 60.0082 0.0000
2017-12-13 11:15 27.0025 60.0088 0.0000
2017-12-13 11:30 27.0022 60.0093 0.0000
2017-12-13 11:45 27.6732 59.3385 0.0000
2017-12-13 12:00 32.3728 54.6394 0.0000
2017-12-13 12:15 40.2055 46.8072 0.0000
2017-12-13 12:30 50.2764 36.7366 0.0000
2017-12-13 12:45 58.5570 28.4562 0.0000
2017-12-13 13:00 60.0117 27.0015 0.0000
2017-12-13 13:15 60.0117 27.0015 0.0000
2017-12-13 13:30 60.0117 27.0015 0.0000
2017-12-13 13:45 60.0117 27.0015 0.0000
2017-12-13 14:00 60.0117 27.0015 0.0000
2017-12-13 14:15 60.0117 27.0015 0.0000
2017-12-13 14:30 60.0117 27.0015 0.0000
2017-12-13 14:45 60.0117 27.0015 0.0000
2017-12-13 15:00 60.0117 27.0015 0.0000
2017-12-13 15:15 60.0117 27.0015 0.0000
2017-12-13 15:30 60.0117 27.0015 0.0000
2017-12-13 15:45 60.0117 27.0015 0.0000
2017-12-13 16:00 60.0117 27.0015 0.0000
2017-12-13 16:15 60.0117 27.0015 0.0000
2017-12-13 16:30 60.0117 27.0015 0.0000
2017-12-13 16:45 60.0117 27.0015 0.0000
2017-12-13 17:00 60.0117 27.0015 0.0000
2017-12-13 17:15 60.0117 27.0015 0.0000
2017-12-13 17:30 60.0117 27.0015 0.0000
2017-12-13 17:45 60.0117 27.0015 0.0000
2017-12-13 18:00 60.0117 27.0015 0.0000
2017-12-13 18:15 60.0117 27.0015 0.0000
2017-12-13 18:30 60.0117 27.0015 0.0000
2017-12-13 18:45 60.0117 27.0015 0.0000
2017-12-13 19:00 60.0117 27.0015 0.0000
2017-12-13 19:15 60.0117 27.0015 0.0000
2017-12-13 19:30 60.0117 27.0015 0.0000
2017-12-13 19:45 60.0117 27.0015 0.0000
2017-12-13 20:00 60.0117 27.0015 0.0000
2017-12-14 10:00 26.9879 59.9743 0.0000
2017-12-14 10:15 26.9882 59.9769 0.0000
2017-12-14 10:30 26.9859 59.9794 0.0000
2017-12-14 10:45 26.9845 59.9815 0.0000
2017-12-14 11:00 26.9838 59.9835 0.0000
2017-12-14 11:15 26.9824 59.9856 0.0000
2017-12-14 11:30 26.9817 59.9877 0.0000
2017-12-14 11:45 26.9810 59.9897 0.0000
2017-12-14 12:00 26.9810 59.9921 0.0000
2017-12-14 12:15 26.9810 59.9949 0.0000
2017-12-14 12:30 26.9817 59.9973 0.0000
2017-12-14 12:45 26.9838 59.9993 0.0000
2017-12-14 13:00 26.9865 60.0014 0.0000
2017-12-14 13:15 26.9872 60.0034 0.0000
2017-12-14 13:30 26.9872 60.0059 0.0000
2017-12-14 13:45 26.9859 60.0079 0.0000
2017-12-14 14:00 26.9845 60.0100 0.0000
2017-12-14 14:15 26.9804 60.0107 0.0000
2017-12-14 14:30 26.9756 60.0117 0.0000
2017-12-14 14:45 26.9701 60.0117 0.0000
2017-12-14 15:00 26.9646 60.0117 0.0000
2017-12-14 15:15 26.9584 60.0117 0.0000
2017-12-14 15:30 26.9529 60.0117 0.0000
2017-12-14 15:45 26.9481 60.0117 0.0000
2017-12-14 16:00 26.9440 60.0120 0.0000
2017-12-14 16:15 26.9405 60.0134 0.0000
2017-12-14 16:30 26.9378 60.0155 0.0000
2017-12-14 16:45 26.9378 60.0182 0.0000
2017-12-14 17:00 26.9350 60.0199 0.0000
2017-12-14 17:15 26.9309 60.0213 0.0000
2017-12-14 17:30 26.9282 60.0230 0.0000
2017-12-14 17:45 26.9254 60.0247 0.0000
2017-12-14 18:00 26.9227 60.0268 0.0000
2017-12-14 18:15 26.9213 60.0288 0.0000
2017-12-14 18:30 26.9199 60.0309 0.0000
2017-12-14 18:45 26.9199 60.0333 0.0000
2017-12-14 19:00 26.9206 60.0357 0.0000
2017-12-14 19:15 26.9241 60.0378 0.0000
2017-12-14 19:30 26.9275 60.0395 0.0000
2017-12-14 19:45 26.9316 60.0408 0.0000
2017-12-14 20:00 26.9357 60.0419 0.0000
2017-12-14 20:15 26.9398 60.0432 0.0000
2017-12-14 20:30 26.9447 60.0446 0.0000
2017-12-14 20:45 26.9488 60.0453 0.0000
2017-12-14 21:00 26.9536 60.0460 0.0000
2017-12-14 21:15 26.9577 60.0470 0.0000
2017-12-14 21:30 43.5057 43.5050 0.0000
2017-12-14 21:45 43.5078 43.5053 0.0000
2017-12-14 22:00 43.5102 43.5055 0.0000
......@@ -151,8 +151,11 @@ class Model(object):
if match.intersects(queryline):
intersection = match.intersection(queryline)
if (intersection is not None):
deactive.append([intersection.coords[0][0],intersection.coords[0][1]])
else:
if (intersection.geom_type is 'Point'):
deactive.append([intersection.x,intersection.y])
if (intersection.geom_type is 'MultiPoint'):
deactive.append([intersection.coords[0][0],intersection.coords[0][1]])
else:
active.append(nowpoints[i])
intersectionend = time.time()
......
{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"simulation":{"forwardCalculation":true,"startDate":1513152000000,"stopDate":1513195200000,"oilclass":"Oil classes","substance":"Light oils (0-100 cSt)","fresh":true,"amount":"10","amountUnit":"m3","uncertainty":false,"mode":"Normal"},"primary":"PADM","type":"exercise","subtype":"instant","meanLat":60.00310586337268,"meanLng":27.01194763183594,"observation":[{"id":null,"provider":"USER","providerDataRef":null,"providerImgRef":null,"providerType":null,"type":"MANUAL","date":1513152000000}],"domain":"HELCOM","model":"NEMO"},"geometry":{"type":"Point","coordinates":[27.01194763183594,60.00310586337268]}},{"type":"Feature","properties":{"auxiliary":"exercise","time":[1513152900000,1513153800000,1513154700000,1513155600000,1513156500000,1513157400000,1513158300000,1513159200000,1513160100000,1513161000000,1513161900000,1513162800000,1513163700000,1513164600000,1513165500000,1513166400000,1513167300000,1513168200000,1513169100000,1513170000000,1513170900000,1513171800000,1513172700000,1513173600000,1513174500000,1513175400000,1513176300000,1513177200000,1513178100000,1513179000000,1513179900000,1513180800000,1513181700000,1513182600000,1513183500000,1513184400000,1513185300000,1513186200000,1513187100000,1513188000000,1513188900000,1513189800000,1513190700000,1513191600000,1513192500000,1513193400000,1513194300000,1513195200000]},"geometry":{"type":"LineString","coordinates":[[27.01126098632813,60.00336333025966],[27.01023101806641,60.00362079514246],[27.009372711181644,60.003964078535255],[27.008342742919925,60.004307358365125],[27.007484436035156,60.00465063463208],[27.00645446777344,60.005165542352074],[27.00593948364258,60.00568044205568],[27.00525283813477,60.0061095190184],[27.00473785400391,60.006624404025445],[27.004051208496097,60.007225093068755],[27.003364562988285,60.00765414999103],[27.002849578857425,60.00816901094978],[27.002506256103516,60.00876967193704],[27.00216293334961,60.009284515528016],[27.001819610595703,60.009885156253155],[27.001647949218754,60.01057158943673],[27.0014762878418,60.01117220678301],[27.001304626464847,60.01168701296785],[27.001132965087894,60.01228761005297],[27.001132965087894,60.012973993362905],[27.001132965087894,60.01357456707032],[27.001132965087894,60.014260923663215],[27.001132965087894,60.01486147399353],[27.001132965087894,60.01546201341474],[27.001132965087894,60.016062541926956],[27.001132965087894,60.01683463398483],[27.001132965087894,60.01760670801],[27.001304626464847,60.01837876400275],[27.001304626464847,60.019150801963356],[27.0014762878418,60.019751263466226],[27.001647949218754,60.02060904669113],[27.001819610595703,60.02112370594082],[27.001991271972656,60.021809905807785],[27.001991271972656,60.02241031900469],[27.001991271972656,60.023096492159375],[27.001991271972656,60.02395418856897],[27.001647949218754,60.02472609630581],[27.0014762878418,60.02524069144713],[27.00096130371094,60.02609833220896],[27.000789642333988,60.026612905981985],[27.00044631958008,60.02738475161725],[27.00044631958008,60.02807082149105],[27.00044631958008,60.0286711209454],[27.00044631958008,60.029357164110294],[27.00044631958008,60.030043193030735],[27.00027465820313,60.03055770537328],[26.999931335449222,60.031329458864015],[26.99975967407227,60.031929699115615]]}}]}
\ No newline at end of file
{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"simulation":{"forwardCalculation":true,"startDate":1513245600000,"stopDate":1513288800000,"oilclass":"Oil classes","substance":"Medium oils (100-1000 cSt)","fresh":true,"amount":"10","amountUnit":"m3","uncertainty":false,"mode":"Normal"},"primary":"PADM","type":"exercise","subtype":"instant","meanLat":59.97425688709357,"meanLng":26.987915039062504,"observation":[{"id":null,"provider":"USER","providerDataRef":null,"providerImgRef":null,"providerType":null,"type":"MANUAL","date":1513245600000}],"domain":"HELCOM","model":"NEMO"},"geometry":{"type":"Point","coordinates":[26.987915039062504,59.97425688709357]}},{"type":"Feature","properties":{"auxiliary":"exercise","time":[1513246500000,1513247400000,1513248300000,1513249200000,1513250100000,1513251000000,1513251900000,1513252800000,1513253700000,1513254600000,1513255500000,1513256400000,1513257300000,1513258200000,1513259100000,1513260000000,1513260900000,1513261800000,1513262700000,1513263600000,1513264500000,1513265400000,1513266300000,1513267200000,1513268100000,1513269000000,1513269900000,1513270800000,1513271700000,1513272600000,1513273500000,1513274400000,1513275300000,1513276200000,1513277100000,1513278000000,1513278900000,1513279800000,1513280700000,1513281600000,1513282500000,1513283400000,1513284300000,1513285200000,1513286100000,1513287000000,1513287900000,1513288800000]},"geometry":{"type":"LineString","coordinates":[[26.98722839355469,59.97666192903553],[26.985855102539062,59.979410334504294],[26.98448181152344,59.98147148888771],[26.98379516601563,59.98353251494715],[26.982421875000004,59.985593412687976],[26.98173522949219,59.9876541821155],[26.981048583984375,59.989714823235055],[26.981048583984375,59.992118742381244],[26.981048583984375,59.99486586472143],[26.98173522949219,59.997269409679994],[26.98379516601563,59.99932945209936],[26.986541748046875,60.0013893662409],[26.98722839355469,60.00344915210996],[26.98722839355469,60.00585207350879],[26.985855102539062,60.007911581472406],[26.98448181152344,60.009970961180386],[26.980361938476566,60.01065739258274],[26.975555419921875,60.01168701296785],[26.970062255859375,60.01168701296785],[26.96456909179688,60.01168701296785],[26.958389282226566,60.01168701296785],[26.952896118164066,60.01168701296785],[26.94808959960938,60.01168701296785],[26.9439697265625,60.01203021263809],[26.94053649902344,60.013402975695705],[26.93778991699219,60.01546201341474],[26.93778991699219,60.01820719756272],[26.93504333496094,60.0199228218921],[26.930923461914066,60.021295257243196],[26.928176879882812,60.023010721294156],[26.925430297851566,60.02472609630581],[26.922683715820312,60.02678442879232],[26.92131042480469,60.02884263307204],[26.919937133789066,60.030900709150345],[26.919937133789066,60.03330163588306],[26.92062377929688,60.03570238813511],[26.92405700683594,60.037760036913696],[26.927490234375004,60.039474646314986],[26.93161010742188,60.04084626974892],[26.935729980468754,60.04187494994124],[26.93984985351563,60.04324647368814],[26.944656372070316,60.044617940473216],[26.948776245117188,60.04530365250556],[26.95358276367188,60.04598935029802],[26.957702636718754,60.047017870287405],[26.963882446289066,60.047703532481066],[26.96800231933594,60.048389180435585],[26.97280883789063,60.04873199907319]]}}]}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment