Skip to content
Snippets Groups Projects
Commit eb54d0ce authored by markn92's avatar markn92
Browse files

maybe

parent 1c27d164
No related branches found
No related tags found
No related merge requests found
start_node,target_node,query_time,trip_time,nodes,edges,charging_stations
1821186334,318014972,0.009013287999550812,682.90564704396,2827,5691,4
408478746,1672267842,0.039315930000157095,None,2827,5691,4
1937172853,79952484,0.031822977998672286,786.6179050434032,2827,5691,4
1785922734,318260761,0.0071495520023745485,213.61231120184425,2827,5691,4
7031881624,1827520767,0.010406817000330193,232.23080542731907,2827,5691,4
7182110438,2614897344,0.021435972001199843,762.4569507297746,2827,5691,4
549941568,473666789,0.011378758998034755,367.30286385255664,2827,5691,4
1821291310,1927633975,0.015422149001096841,483.32085861853614,2827,5691,4
600852672,1505992710,0.004126572999666678,80.58952932130123,2827,5691,4
2616470682,318266811,0.003249917001085123,161.72009222922705,2827,5691,4
563194922,2705157131,0.012855336997745326,486.85276511016406,2827,5691,4
1505992712,318015042,0.008642828001029557,268.735406653272,2827,5691,4
17689722,574482765,0.000609202998020919,None,2827,5691,4
2598986198,1497215371,0.005810604001453612,258.5401416329196,2827,5691,4
4955445788,7321975009,0.011849408998386934,571.8333303950812,2827,5691,4
6001541671,1672267530,0.028775151000445476,None,2827,5691,4
1867147174,306636858,0.007110463000572054,277.5834399656516,2827,5691,4
2598986733,1672267718,0.006283087997871917,284.7055079044655,2827,5691,4
1927634134,549941215,0.004337117999966722,202.06918208581084,2827,5691,4
2629995072,90713484,0.0012297359971853439,163.7101122102256,2827,5691,4
7031746254,2625314423,0.0004365659988252446,144.37752834530082,2827,5691,4
1975596490,6001596194,0.003661143000499578,253.5123778142738,2827,5691,4
318014975,2608501646,0.0032993109998642467,191.1099775371624,2827,5691,4
360747548,1672267683,0.0005365819997678045,None,2827,5691,4
1672267862,318014988,0.0012251260013727006,63.91940116848195,2827,5691,4
1828263531,5576939244,0.0037542560021393,163.53527527323305,2827,5691,4
34053456,2598868374,0.01415694400202483,592.1548586770164,2827,5691,4
2639898818,600852666,0.00824750399988261,337.8205509411729,2827,5691,4
306639024,549922865,0.0016627880031592213,270.93187625952095,2827,5691,4
317839012,2639932985,0.023175549998995848,504.3949391890449,2827,5691,4
2632841208,7286181358,0.003936696997698164,81.01710204309393,2827,5691,4
748845461,405229456,0.0007478830011677928,358.41598563017754,2827,5691,4
2611187962,574546129,0.022219071001018165,471.6832017509712,2827,5691,4
549941211,2600724193,0.000601269999606302,46.33927253230455,2827,5691,4
6802168300,4016874207,0.002466150002874201,169.09237073950956,2827,5691,4
292485409,2635713649,0.007294271999853663,262.72949086266624,2827,5691,4
1672267605,2608429637,8.989900015876628e-05,None,2827,5691,4
563194934,360747410,0.02611194500059355,None,2827,5691,4
549941214,360747848,0.02607477600031416,None,2827,5691,4
6802168302,4304042853,0.003406978001294192,356.40647167872237,2827,5691,4
4016874408,7286240211,0.005232859999523498,161.14629454415766,2827,5691,4
563188710,317431299,0.004409905999636976,468.860408058949,2827,5691,4
1830470690,6802168299,0.010397491001640446,487.9500777035472,2827,5691,4
1254599516,2600455712,0.013194899001973681,382.51220871988073,2827,5691,4
1785922734,5155045514,0.0006321250002656598,142.02029172834392,2827,5691,4
317431299,7247195347,0.016834182999446057,369.0146250816516,2827,5691,4
5609333812,2608500903,0.00032147900128620677,54.099869442309334,2827,5691,4
2335713745,317838182,0.01197221999973408,411.3239404320054,2827,5691,4
288943149,2600543671,0.020370669997646473,600.764353807019,2827,5691,4
321209229,2604992692,0.009962830001313705,379.36974793985036,2827,5691,4
2722759194,4226591286,0.00404397799866274,265.52092107390405,2827,5691,4
2705157132,2696567095,0.010638484000082826,523.5322870970765,2827,5691,4
493144386,2618898510,0.008818124999379506,466.05721506064765,2827,5691,4
7042580410,671235257,0.033804087001044536,1024.0268403957596,2827,5691,4
318014986,2616470683,0.014425197001401102,276.2296288794581,2827,5691,4
2608501333,563180637,0.025051197000721004,683.7427888360708,2827,5691,4
639603168,475912312,0.026181530996836955,1442.058995372899,2827,5691,4
574457846,674511697,0.022603813999012345,565.7910804809934,2827,5691,4
360747717,7115183091,0.004977905999112409,837.7316772713085,2827,5691,4
2632841176,408478826,0.022434680999140255,570.8393609489324,2827,5691,4
600858468,317431290,0.006033170000591781,193.78188154299647,2827,5691,4
2598983042,7202546048,0.008498781000525923,310.0451863511219,2827,5691,4
5095519274,549928580,0.005982285998470616,420.73297342075847,2827,5691,4
574465021,2734185679,0.0030824019995634444,140.62630433678459,2827,5691,4
7286181368,7202546040,0.023599398002261296,618.3893222876427,2827,5691,4
2385218593,469733535,0.017678110001725145,624.8342345753116,2827,5691,4
574546136,473666795,0.005264945997623727,232.57788814365236,2827,5691,4
7031881625,360747521,0.025243537998903776,None,2827,5691,4
5023014978,288943150,0.0009423460032849107,227.00679236099052,2827,5691,4
1929118150,7321975019,0.013749825000559213,632.6887712163308,2827,5691,4
317767577,306636853,0.0018654040031833574,133.8710009101637,2827,5691,4
318650171,1672267546,0.0006955930002732202,56.279435308522785,2827,5691,4
2632841173,1672334376,0.024952800002211006,763.8129998126299,2827,5691,4
7259816940,1362941663,0.015158064001298044,442.14658352030256,2827,5691,4
2385218590,549944090,0.001794538002286572,213.88661755576825,2827,5691,4
2605041420,7346826317,0.01744004300053348,558.6118204003669,2827,5691,4
2611606215,292724874,0.025695369000459323,None,2827,5691,4
1979730409,247326139,0.0025152870002784766,233.553448434989,2827,5691,4
473666797,7158827512,0.0021763570002804045,219.3407087788422,2827,5691,4
1672267605,7286181359,6.98670010024216e-05,None,2827,5691,4
317838183,1828418230,0.0035256599985586945,238.56646945636825,2827,5691,4
508824045,317840526,0.0018803169987222645,72.71264762977331,2827,5691,4
4016874619,1768859066,0.012881090999144362,448.35307739556197,2827,5691,4
2701813225,1967932401,0.02022287799991318,796.4078048036179,2827,5691,4
7115183088,574475518,0.012897051001345972,364.66302679022834,2827,5691,4
2621360530,1934189125,0.009414460000698455,457.1320548385416,2827,5691,4
549931434,321209222,0.009149299999990035,332.26392813297844,2827,5691,4
79952506,408478814,0.01716833199679968,416.0688143392705,2827,5691,4
7140363786,1929118248,0.0209651910008688,772.1552468131904,2827,5691,4
6389430281,2600543396,0.019859392999933334,513.8508255621755,2827,5691,4
469720334,1821291268,0.010276427001372213,565.5787316373059,2827,5691,4
1818901127,1505992703,0.0013889590009057429,153.0598922353832,2827,5691,4
574505827,4955446085,0.0239840419999382,789.0477590510294,2827,5691,4
1618977288,318260718,0.01609785899927374,534.7253425088979,2827,5691,4
430534354,687130896,0.00029352199999266304,55.45510331473584,2827,5691,4
316681906,408478820,0.008313784001074964,263.7608041022508,2827,5691,4
6047068260,1672267904,0.025491393000265816,None,2827,5691,4
306639025,7321902560,0.004597874998580664,321.949563838824,2827,5691,4
7286181352,6943345432,0.010741505997430068,424.4782376534168,2827,5691,4
5112831264,2608429635,0.013019704001635546,660.17140165994,2827,5691,4
418009821,3211622686,0.006104560998210218,299.53940761745315,2827,5691,4
687135582,1929118274,0.014193412000167882,309.984257120316,2827,5691,4
440870156,7030625397,0.0061211930005811155,266.8755777965704,2827,5691,4
764105827,360757816,0.022421349000069313,363.03519416670315,2827,5691,4
2604687836,7172883306,0.00964734899753239,235.90323152184388,2827,5691,4
1937178498,2600722212,0.014495750001515262,826.6488628265173,2827,5691,4
7140363811,1362941670,0.002194104999944102,112.06217872199922,2827,5691,4
408478842,549920911,0.024493662000168115,619.5302552884552,2827,5691,4
2618923396,7321870100,0.020439506999537116,344.33164889729017,2827,5691,4
2598983042,2600543396,0.003676929001812823,154.51239134256772,2827,5691,4
6389441585,292992947,0.0046343940011865925,153.9857116374839,2827,5691,4
2635713649,508823988,0.0011040609970223159,53.38509628553214,2827,5691,4
418009801,574465015,0.019862241002556402,527.1319006025898,2827,5691,4
3123285425,418009262,0.019179090999386972,423.7599548271774,2827,5691,4
1672334378,6604102084,0.0005345360004866961,None,2827,5691,4
7322098545,3462099369,0.012186392999865348,288.4592989060882,2827,5691,4
7321870120,687135582,0.01937217000158853,419.35494759758376,2827,5691,4
1362941693,7030617904,0.01267877300051623,237.46407404483605,2827,5691,4
2621386732,574449258,0.009933132998412475,417.7439980535539,2827,5691,4
2608786278,2696560492,0.02037083599861944,517.8714975683342,2827,5691,4
408478834,563194906,0.0016063030016084667,258.9848957044358,2827,5691,4
4321209901,7140363801,0.03440023399889469,566.2186955636021,2827,5691,4
2360479290,2621360525,0.007676676999835763,367.192459628314,2827,5691,4
6603016876,1656016522,0.012310263002291322,792.3742000871882,2827,5691,4
7031746250,7030623427,0.03028190500117489,703.1864446314731,2827,5691,4
318260941,7245276256,0.0011035440002160612,48.451769744859156,2827,5691,4
318266812,574465010,0.002685529998416314,177.57906338443627,2827,5691,4
2734185688,318266811,0.005424671999207931,251.8290305630775,2827,5691,4
370935760,360747915,0.006330265998258255,252.2380450378266,2827,5691,4
1505992709,1253890916,0.0131219399991096,250.9143336993809,2827,5691,4
574482750,318015069,0.00726907799980836,206.1122097057147,2827,5691,4
360747548,469718545,0.000575995996769052,None,2827,5691,4
7286240207,748845418,0.015126278001844184,466.32838207409696,2827,5691,4
7257113601,2621360552,0.006748152001819108,280.2626114105422,2827,5691,4
600855077,426930266,0.01148781899973983,341.5483793234692,2827,5691,4
318014995,3111465597,0.0015463759991689585,114.39171887865092,2827,5691,4
2360384211,318261951,0.029054182003164897,645.4157811529808,2827,5691,4
7031746252,600855671,0.014197254000464454,523.4061339411232,2827,5691,4
360747557,318261953,0.0004935129982186481,None,2827,5691,4
2600543577,2696567095,0.0024848339999152813,110.10425255510617,2827,5691,4
247326136,7286181354,0.0009874740026134532,None,2827,5691,4
2608679794,574588781,0.018018837999989046,398.6061493763712,2827,5691,4
671239369,574505822,0.021361379000154557,504.481438611962,2827,5691,4
549920910,2611494644,0.0023182099976111203,107.9361662137449,2827,5691,4
4321209901,318014996,0.008295280000311323,232.0745739049763,2827,5691,4
574567080,2598986957,0.0010548459977144375,69.05491249038947,2827,5691,4
5023014977,1828269031,0.013065744999039453,591.3147075714494,2827,5691,4
405229450,317839975,0.013558738002757309,389.3299727634748,2827,5691,4
1672267605,288944219,8.001700189197436e-05,None,2827,5691,4
7247195349,360747893,0.03431698900021729,None,2827,5691,4
7257113603,306636853,0.015006112000264693,437.05718284325974,2827,5691,4
6604102084,360747507,0.004187366001133341,225.63308448102424,2827,5691,4
2619060548,5023014976,0.025399616002687253,684.1927186887414,2827,5691,4
3152652408,418009809,0.012287208999623545,356.9359172377983,2827,5691,4
2612700813,1828418194,0.019697299001563806,404.9649358227012,2827,5691,4
600855068,1829747761,0.01874661100009689,321.4304820539351,2827,5691,4
34053441,549931423,0.015394361998914974,330.7515498416791,2827,5691,4
1827499342,2608786068,0.004230339000059757,157.0355576542001,2827,5691,4
7042579827,7165728796,0.01010862399925827,439.48176347319736,2827,5691,4
600852672,294919193,0.00636463099726825,194.60045978800466,2827,5691,4
2604684732,2608394376,0.003939808000723133,225.67874677578376,2827,5691,4
2729892258,3111465599,0.021413187998405192,636.1250774293167,2827,5691,4
7286240209,317839014,0.008988310997665394,215.53051978929957,2827,5691,4
2554184498,318261955,0.010288174002198502,368.4077854834947,2827,5691,4
360747527,4903537220,0.004058121001435211,308.9247309449616,2827,5691,4
665115010,2598982037,0.018486098997527733,375.10086789924367,2827,5691,4
549914986,2604688050,0.01721384700067574,406.62789799724936,2827,5691,4
7321902560,7202546043,0.02634392600157298,647.8841126042021,2827,5691,4
2952146882,7247195349,0.00973741699999664,284.15726187079684,2827,5691,4
7042580419,2608678794,0.016572495002037613,698.3454072097257,2827,5691,4
7286240203,4016874623,0.003301780998299364,165.24731610205183,2827,5691,4
1672334354,600861115,0.023482880998926703,770.4024309119364,2827,5691,4
2614920443,3111465611,0.005223342999670422,177.8696047315475,2827,5691,4
360747578,574485682,0.0003176179998263251,None,2827,5691,4
2734185688,4903549431,0.010346074999688426,439.4930627514446,2827,5691,4
2631500008,1830470676,0.013691763000679202,357.51214838441797,2827,5691,4
1867147170,1828269031,0.009278511999582406,436.3097512530265,2827,5691,4
5113940072,321209222,0.0005723329995817039,84.32254165537744,2827,5691,4
318260732,317839537,0.0014463949992205016,69.7984740636073,2827,5691,4
1574635372,288943146,0.0005371530023694504,None,2827,5691,4
5609333814,3177732288,0.007666186000278685,368.10345899843935,2827,5691,4
294919195,2639898838,0.0027401549996284302,140.21450329712175,2827,5691,4
7042580417,435112933,0.005415321000327822,535.8777439426531,2827,5691,4
1672340374,6448461991,0.006781173000490526,286.2837684453694,2827,5691,4
508823963,1929118187,0.03158039900154108,625.7948384834564,2827,5691,4
1368670342,574449298,0.011055918002966791,289.11487947498966,2827,5691,4
1828400048,1362941672,0.004677607998019084,490.31985636850595,2827,5691,4
4016874408,288944220,0.009151702000963269,235.07185286856708,2827,5691,4
1672267709,473666786,0.017260035001527285,408.9790017628481,2827,5691,4
7286181353,4475742630,0.009001542999612866,335.2071411763051,2827,5691,4
549928583,1820309648,0.008944230001361575,287.5714344469538,2827,5691,4
2701813226,4955446072,0.001467952002712991,270.90837236452404,2827,5691,4
408478826,7286240207,0.020211972001561662,654.9357242070321,2827,5691,4
473666774,292484328,0.031528712999715935,None,2827,5691,4
7165728799,7115183091,0.001273580997803947,88.19239151226196,2827,5691,4
2635713654,4955446028,0.005855952000274556,125.05689399557589,2827,5691,4
5113940036,1293287346,0.006259828998736339,399.1991755729142,2827,5691,4
1672267690,7286135545,0.0001547169995319564,None,2827,5691,4
574457817,1672334393,0.029624519000208238,821.5688985611807,2827,5691,4
3111465608,410486365,0.01118067700008396,389.0809006977434,2827,5691,4
start_node,target_node,query_time,trip_time,nodes,edges,charging_stations
1821186334,318014972,0.006156524999823887,None,2828,5691,4
408478746,1672267842,0.004719599000964081,None,2827,5691,4
1937172853,79952484,0.05043672499959939,None,2828,5691,4
1785922734,318260761,0.004823081999347778,None,2827,5691,4
7031881624,1827520767,0.012629574001039146,None,2828,5691,4
7182110438,2614897344,0.006381406001310097,None,2827,5691,4
549941568,473666789,0.010971015002724016,None,2828,5691,4
1821291310,1927633975,0.019147020997479558,None,2827,5691,4
600852672,1505992710,0.05354009999791742,None,2828,5691,4
2616470682,318266811,0.03264074999970035,None,2827,5691,4
563194922,2705157131,0.009692558000097051,None,2828,5691,4
1505992712,318015042,0.005388030000176514,None,2827,5691,4
17689722,574482765,0.0042948289992637,None,2828,5691,4
2598986198,1497215371,0.027612234000116587,None,2827,5691,4
4955445788,7321975009,0.005401427999458974,None,2828,5691,4
6001541671,1672267530,0.009084206998522859,None,2827,5691,4
1867147174,306636858,0.01565918699998292,None,2828,5691,4
2598986733,1672267718,0.008851291000610217,None,2827,5691,4
1927634134,549941215,0.023182118002296193,None,2828,5691,4
2629995072,90713484,0.005188117997022346,None,2827,5691,4
7031746254,2625314423,0.007008176999079296,144.37752834530082,2828,5691,4
1975596490,6001596194,0.005653166997944936,None,2827,5691,4
318014975,2608501646,0.010785042999486905,None,2828,5691,4
360747548,1672267683,0.00548917500054813,None,2827,5691,4
1672267862,318014988,0.025857173997792415,None,2828,5691,4
1828263531,5576939244,0.006186818001879146,None,2827,5691,4
34053456,2598868374,0.005915582001762232,None,2828,5691,4
2639898818,600852666,0.012002301999018528,None,2827,5691,4
306639024,549922865,0.005517190002137795,None,2828,5691,4
317839012,2639932985,0.07127216499793576,None,2827,5691,4
2632841208,7286181358,0.07404081599815981,None,2828,5691,4
748845461,405229456,0.005994314000417944,None,2827,5691,4
2611187962,574546129,0.06333103100041626,None,2828,5691,4
549941211,2600724193,0.008018451000680216,46.33927253230455,2827,5691,4
6802168300,4016874207,0.006927399997948669,None,2828,5691,4
292485409,2635713649,0.025982438997743884,None,2827,5691,4
1672267605,2608429637,0.004307457998947939,None,2828,5691,4
563194934,360747410,0.01941562299907673,None,2827,5691,4
549941214,360747848,0.012432504001480993,None,2828,5691,4
6802168302,4304042853,0.007483957000658847,None,2827,5691,4
4016874408,7286240211,0.082648005001829,None,2828,5691,4
563188710,317431299,0.005516860997886397,None,2827,5691,4
1830470690,6802168299,0.006088990998250665,None,2828,5691,4
1254599516,2600455712,0.010782777000713395,None,2827,5691,4
1785922734,5155045514,0.004628057002264541,None,2828,5691,4
317431299,7247195347,0.051633564002258936,None,2827,5691,4
5609333812,2608500903,0.02172067900028196,54.099869442309334,2828,5691,4
2335713745,317838182,0.006709757002681727,None,2827,5691,4
288943149,2600543671,0.006234839998796815,None,2828,5691,4
321209229,2604992692,0.009527054000500357,None,2827,5691,4
2722759194,4226591286,0.006574513001396554,None,2828,5691,4
2705157132,2696567095,0.019949956000345992,None,2827,5691,4
493144386,2618898510,0.004825096999411471,None,2828,5691,4
7042580410,671235257,0.004285065002477495,None,2827,5691,4
318014986,2616470683,0.014303541000117548,None,2828,5691,4
2608501333,563180637,0.05242659699797514,None,2827,5691,4
639603168,475912312,0.004379546997370198,None,2828,5691,4
574457846,674511697,0.03213931600112119,None,2827,5691,4
360747717,7115183091,0.005245648997515673,None,2828,5691,4
2632841176,408478826,0.05060195499754627,None,2827,5691,4
600858468,317431290,0.006709490997309331,None,2828,5691,4
2598983042,7202546048,0.021532519996981137,None,2827,5691,4
5095519274,549928580,0.029430922997562448,None,2828,5691,4
574465021,2734185679,0.024040889002208132,None,2827,5691,4
7286181368,7202546040,0.018420881999190897,None,2828,5691,4
2385218593,469733535,0.007373232998361345,None,2827,5691,4
574546136,473666795,0.014425705001485767,None,2828,5691,4
7031881625,360747521,0.02701543700095499,None,2827,5691,4
5023014978,288943150,0.005534732001251541,None,2828,5691,4
1929118150,7321975019,0.007627216997207142,None,2827,5691,4
317767577,306636853,0.011067003997595748,None,2828,5691,4
318650171,1672267546,0.011674108001898276,None,2827,5691,4
2632841173,1672334376,0.04632530699745985,None,2828,5691,4
7259816940,1362941663,0.02978556499874685,None,2827,5691,4
2385218590,549944090,0.008026720999623649,None,2828,5691,4
2605041420,7346826317,0.005347903002984822,None,2827,5691,4
2611606215,292724874,0.012724084997898899,None,2828,5691,4
1979730409,247326139,0.006277774002228398,None,2827,5691,4
473666797,7158827512,0.025513099997624522,None,2828,5691,4
1672267605,7286181359,0.0043993210019834805,None,2827,5691,4
317838183,1828418230,0.004731601999083068,None,2828,5691,4
508824045,317840526,0.01493516200207523,None,2827,5691,4
4016874619,1768859066,0.05181735999940429,None,2828,5691,4
2701813225,1967932401,0.0070209950026765,None,2827,5691,4
7115183088,574475518,0.07550831100161304,None,2828,5691,4
2621360530,1934189125,0.005459757001517573,None,2827,5691,4
549931434,321209222,0.012306248001550557,None,2828,5691,4
79952506,408478814,0.021874865997233428,None,2827,5691,4
7140363786,1929118248,0.00514109899813775,None,2828,5691,4
6389430281,2600543396,0.029427056000713492,None,2827,5691,4
469720334,1821291268,0.005114577998028835,None,2828,5691,4
1818901127,1505992703,0.004665485001169145,None,2827,5691,4
574505827,4955446085,0.011122354997496586,None,2828,5691,4
1618977288,318260718,0.007497147002140991,None,2827,5691,4
430534354,687130896,0.006106297001679195,55.45510331473584,2828,5691,4
316681906,408478820,0.024869416000001365,None,2827,5691,4
6047068260,1672267904,0.021804899999551708,None,2828,5691,4
306639025,7321902560,0.011913924998225411,None,2827,5691,4
7286181352,6943345432,0.033787812000809936,None,2828,5691,4
5112831264,2608429635,0.008725067000341369,None,2827,5691,4
418009821,3211622686,0.007394672000373248,None,2828,5691,4
687135582,1929118274,0.02638536900121835,None,2827,5691,4
440870156,7030625397,0.008711466998647666,None,2828,5691,4
764105827,360757816,0.07090238299861085,None,2827,5691,4
2604687836,7172883306,0.010646309998264769,None,2828,5691,4
1937178498,2600722212,0.005245233998721233,None,2827,5691,4
7140363811,1362941670,0.0079917379989638,None,2828,5691,4
408478842,549920911,0.02801381099925493,None,2827,5691,4
2618923396,7321870100,0.02814459699948202,None,2828,5691,4
2598983042,2600543396,0.05364455999733764,None,2827,5691,4
6389441585,292992947,0.0213540760014439,None,2828,5691,4
2635713649,508823988,0.0789974750005058,None,2827,5691,4
418009801,574465015,0.038303894998534815,None,2828,5691,4
3123285425,418009262,0.008229285998822888,None,2827,5691,4
1672334378,6604102084,0.007330639000429073,None,2828,5691,4
7322098545,3462099369,0.011317095999402227,None,2827,5691,4
7321870120,687135582,0.016365256000426598,None,2828,5691,4
1362941693,7030617904,0.026688974001444876,None,2827,5691,4
2621386732,574449258,0.021823441002197796,None,2828,5691,4
2608786278,2696560492,0.013737029999902006,None,2827,5691,4
408478834,563194906,0.005817397999635432,None,2828,5691,4
4321209901,7140363801,0.015954991002217866,None,2827,5691,4
2360479290,2621360525,0.00667577700005495,None,2828,5691,4
6603016876,1656016522,0.02237141499790596,None,2827,5691,4
7031746250,7030623427,0.00909577299898956,None,2828,5691,4
318260941,7245276256,0.026469780998013448,10154.740275174707,2827,5691,4
318266812,574465010,0.010114702999999281,None,2828,5691,4
2734185688,318266811,0.009515976998955011,None,2827,5691,4
370935760,360747915,0.01755944999968051,None,2828,5691,4
1505992709,1253890916,0.03252277499996126,None,2827,5691,4
574482750,318015069,0.009561489001498558,None,2828,5691,4
360747548,469718545,0.008863475999532966,None,2827,5691,4
7286240207,748845418,0.024607080998976016,None,2828,5691,4
7257113601,2621360552,0.009745751001901226,None,2827,5691,4
600855077,426930266,0.03113081300034537,None,2828,5691,4
318014995,3111465597,0.013242360997537617,None,2827,5691,4
2360384211,318261951,0.008451453999441583,None,2828,5691,4
7031746252,600855671,0.008894483999029035,None,2827,5691,4
360747557,318261953,0.006288471002335427,None,2828,5691,4
2600543577,2696567095,0.014977671002270654,None,2827,5691,4
247326136,7286181354,0.02317222099736682,None,2828,5691,4
2608679794,574588781,0.05112541799826431,None,2827,5691,4
671239369,574505822,0.07076092500210507,None,2828,5691,4
549920910,2611494644,0.017119661999458913,None,2827,5691,4
4321209901,318014996,0.015176381999481237,None,2828,5691,4
574567080,2598986957,0.031472970000322675,None,2827,5691,4
5023014977,1828269031,0.006394316002115374,None,2828,5691,4
405229450,317839975,0.013067836000118405,None,2827,5691,4
1672267605,288944219,0.005070572002296103,None,2828,5691,4
7247195349,360747893,0.00799208199896384,None,2827,5691,4
7257113603,306636853,0.011083639998105355,None,2828,5691,4
6604102084,360747507,0.039834104001784,None,2827,5691,4
2619060548,5023014976,0.013280855000630254,None,2828,5691,4
3152652408,418009809,0.06443841100190184,None,2827,5691,4
2612700813,1828418194,0.017056405999028357,None,2828,5691,4
600855068,1829747761,0.015810199998668395,None,2827,5691,4
34053441,549931423,0.022269271001277957,None,2828,5691,4
1827499342,2608786068,0.012049578999722144,None,2827,5691,4
7042579827,7165728796,0.006933294000191381,None,2828,5691,4
600852672,294919193,0.05663213200023165,None,2827,5691,4
2604684732,2608394376,0.012743196002702462,None,2828,5691,4
2729892258,3111465599,0.023083280000719242,None,2827,5691,4
7286240209,317839014,0.015098163003131049,None,2828,5691,4
2554184498,318261955,0.01033000300230924,None,2827,5691,4
360747527,4903537220,0.006485281999630388,None,2828,5691,4
665115010,2598982037,0.10026579600162222,None,2827,5691,4
549914986,2604688050,0.014653941001597559,None,2828,5691,4
7321902560,7202546043,0.07977296600074624,None,2827,5691,4
2952146882,7247195349,0.013828422001097351,None,2828,5691,4
7042580419,2608678794,0.005124851999426028,None,2827,5691,4
7286240203,4016874623,0.01710126800026046,None,2828,5691,4
1672334354,600861115,0.006956539997190703,None,2827,5691,4
2614920443,3111465611,0.03844647200094187,None,2828,5691,4
360747578,574485682,0.00569783299943083,None,2827,5691,4
2734185688,4903549431,0.009836854002060136,None,2828,5691,4
2631500008,1830470676,0.07079098200119915,None,2827,5691,4
1867147170,1828269031,0.024032836998230778,None,2828,5691,4
5113940072,321209222,0.00842946199918515,None,2827,5691,4
318260732,317839537,0.028799880998121807,None,2828,5691,4
1574635372,288943146,0.005358062997402158,None,2827,5691,4
5609333814,3177732288,0.016075297000497812,None,2828,5691,4
294919195,2639898838,0.009441927999432664,None,2827,5691,4
7042580417,435112933,0.0049728350022633094,None,2828,5691,4
1672340374,6448461991,0.02116352400116739,None,2827,5691,4
508823963,1929118187,0.011777966999943601,None,2828,5691,4
1368670342,574449298,0.006581884001207072,None,2827,5691,4
1828400048,1362941672,0.006938153001101455,None,2828,5691,4
4016874408,288944220,0.07267897600104334,None,2827,5691,4
1672267709,473666786,0.006804332999308826,None,2828,5691,4
7286181353,4475742630,0.03176952099966002,None,2827,5691,4
549928583,1820309648,0.014391001997864805,None,2828,5691,4
2701813226,4955446072,0.008205933998397086,None,2827,5691,4
408478826,7286240207,0.007648313003301155,None,2828,5691,4
473666774,292484328,0.009424661002412904,None,2827,5691,4
7165728799,7115183091,0.032611395999992965,None,2828,5691,4
2635713654,4955446028,0.06316470999809098,None,2827,5691,4
5113940036,1293287346,0.005928680999204516,None,2828,5691,4
1672267690,7286135545,0.0049598719997447915,None,2827,5691,4
574457817,1672334393,0.02312618300129543,None,2828,5691,4
3111465608,410486365,0.031250187999830814,None,2827,5691,4
start_node,target_node,query_time,trip_time,nodes,edges,charging_stations,dijkstra_rank
1821186334,318014972,0.002661193000676576,682.90564704396,2827,5691,4,0
408478746,1672267842,0.007103207000909606,None,2827,5691,4,0
1937172853,79952484,0.005520685997908004,786.6179050434032,2827,5691,4,0
1785922734,318260761,0.001330620998487575,213.61231120184425,2827,5691,4,0
7031881624,1827520767,0.002053444000921445,232.23080542731907,2827,5691,4,0
7182110438,2614897344,0.004425677001563599,762.4569507297746,2827,5691,4,0
549941568,473666789,0.006416308999178,367.30286385255664,2827,5691,4,0
1821291310,1927633975,0.004670496000471758,483.32085861853614,2827,5691,4,0
600852672,1505992710,0.0010336009981983807,80.58952932130123,2827,5691,4,0
2616470682,318266811,0.0011567140027182177,161.72009222922705,2827,5691,4,0
563194922,2705157131,0.003962733000662411,486.85276511016406,2827,5691,4,0
1505992712,318015042,0.0021047159971203655,268.735406653272,2827,5691,4,0
17689722,574482765,0.00010051800200017169,None,2827,5691,4,0
2598986198,1497215371,0.001736397000058787,258.5401416329196,2827,5691,4,0
4955445788,7321975009,0.00302896599896485,571.8333303950812,2827,5691,4,0
6001541671,1672267530,0.0058540179998090025,None,2827,5691,4,0
1867147174,306636858,0.001724575999105582,277.5834399656516,2827,5691,4,0
2598986733,1672267718,0.001530032001028303,284.7055079044655,2827,5691,4,0
1927634134,549941215,0.0011386849982955027,202.06918208581084,2827,5691,4,0
2629995072,90713484,0.0002662900005816482,163.7101122102256,2827,5691,4,0
7031746254,2625314423,9.963100092136301e-05,144.37752834530082,2827,5691,4,0
1975596490,6001596194,0.0011424409967730753,253.5123778142738,2827,5691,4,0
318014975,2608501646,0.0015049219982756767,191.1099775371624,2827,5691,4,0
360747548,1672267683,9.259899889002554e-05,None,2827,5691,4,0
1672267862,318014988,0.00024742800087551586,63.91940116848195,2827,5691,4,0
1828263531,5576939244,0.0015332900002249517,163.53527527323305,2827,5691,4,0
34053456,2598868374,0.004361309998785146,592.1548586770164,2827,5691,4,0
2639898818,600852666,0.0026391680003143847,337.8205509411729,2827,5691,4,0
306639024,549922865,0.0004594790007104166,270.93187625952095,2827,5691,4,0
317839012,2639932985,0.005058998998720199,504.3949391890449,2827,5691,4,0
2632841208,7286181358,0.0009222280023095664,81.01710204309393,2827,5691,4,0
748845461,405229456,0.00017831399964052252,358.41598563017754,2827,5691,4,0
2611187962,574546129,0.004922413998428965,471.6832017509712,2827,5691,4,0
549941211,2600724193,0.00012095500278519467,46.33927253230455,2827,5691,4,0
6802168300,4016874207,0.000473915999464225,169.09237073950956,2827,5691,4,0
292485409,2635713649,0.0029309050005394965,262.72949086266624,2827,5691,4,0
1672267605,2608429637,2.5021003239089623e-05,None,2827,5691,4,0
563194934,360747410,0.005582014000538038,None,2827,5691,4,0
549941214,360747848,0.006068656999559607,None,2827,5691,4,0
6802168302,4304042853,0.0023223169991979375,356.40647167872237,2827,5691,4,0
4016874408,7286240211,0.001421781002136413,161.14629454415766,2827,5691,4,0
563188710,317431299,0.001875265999842668,468.860408058949,2827,5691,4,0
1830470690,6802168299,0.002577506998932222,487.9500777035472,2827,5691,4,0
1254599516,2600455712,0.0035946649986726698,382.51220871988073,2827,5691,4,0
1785922734,5155045514,0.0001361539980280213,142.02029172834392,2827,5691,4,0
317431299,7247195347,0.004115538002224639,369.0146250816516,2827,5691,4,0
5609333812,2608500903,7.190099859144539e-05,54.099869442309334,2827,5691,4,0
2335713745,317838182,0.003231886999856215,411.3239404320054,2827,5691,4,0
288943149,2600543671,0.0048604299990984146,600.764353807019,2827,5691,4,0
321209229,2604992692,0.002259996999782743,379.36974793985036,2827,5691,4,0
2722759194,4226591286,0.0010478910007805098,265.52092107390405,2827,5691,4,0
2705157132,2696567095,0.004506555000261869,523.5322870970765,2827,5691,4,0
493144386,2618898510,0.002310331998160109,466.05721506064765,2827,5691,4,0
7042580410,671235257,0.005477382001117803,1024.0268403957596,2827,5691,4,0
318014986,2616470683,0.0029488379987014923,276.2296288794581,2827,5691,4,0
2608501333,563180637,0.004666038999857847,683.7427888360708,2827,5691,4,0
639603168,475912312,0.005386187000112841,1442.058995372899,2827,5691,4,0
574457846,674511697,0.005233933999988949,565.7910804809934,2827,5691,4,0
360747717,7115183091,0.0030296619988803286,837.7316772713085,2827,5691,4,0
2632841176,408478826,0.0058108890007133596,570.8393609489324,2827,5691,4,0
600858468,317431290,0.0015289580005628522,193.78188154299647,2827,5691,4,0
2598983042,7202546048,0.0023681140010012314,310.0451863511219,2827,5691,4,0
5095519274,549928580,0.0023530120015493594,420.73297342075847,2827,5691,4,0
574465021,2734185679,0.0013952839981357101,140.62630433678459,2827,5691,4,0
7286181368,7202546040,0.0060401699993235525,618.3893222876427,2827,5691,4,0
2385218593,469733535,0.004844442999456078,624.8342345753116,2827,5691,4,0
574546136,473666795,0.0013333790011529345,232.57788814365236,2827,5691,4,0
7031881625,360747521,0.005707038999389624,None,2827,5691,4,0
5023014978,288943150,0.00021835300140082836,227.00679236099052,2827,5691,4,0
1929118150,7321975019,0.0046021819980524015,632.6887712163308,2827,5691,4,0
317767577,306636853,0.0011912789996131323,133.8710009101637,2827,5691,4,0
318650171,1672267546,0.00027286800104775466,56.279435308522785,2827,5691,4,0
2632841173,1672334376,0.005285346000164282,763.8129998126299,2827,5691,4,0
7259816940,1362941663,0.003766318997804774,442.14658352030256,2827,5691,4,0
2385218590,549944090,0.0007788600014464464,213.88661755576825,2827,5691,4,0
2605041420,7346826317,0.004545697000139626,558.6118204003669,2827,5691,4,0
2611606215,292724874,0.005474218996823765,None,2827,5691,4,0
1979730409,247326139,0.0006342180022329558,233.553448434989,2827,5691,4,0
473666797,7158827512,0.0005653939988405909,219.3407087788422,2827,5691,4,0
1672267605,7286181359,2.0746996597154066e-05,None,2827,5691,4,0
317838183,1828418230,0.0009333880007034168,238.56646945636825,2827,5691,4,0
508824045,317840526,0.00043875499977730215,72.71264762977331,2827,5691,4,0
4016874619,1768859066,0.004560929999570362,448.35307739556197,2827,5691,4,0
2701813225,1967932401,0.005104807001771405,796.4078048036179,2827,5691,4,0
7115183088,574475518,0.0037435469967022073,364.66302679022834,2827,5691,4,0
2621360530,1934189125,0.003952518000005512,457.1320548385416,2827,5691,4,0
549931434,321209222,0.003593939996790141,332.26392813297844,2827,5691,4,0
79952506,408478814,0.004447151000931626,416.0688143392705,2827,5691,4,0
7140363786,1929118248,0.005097655001009116,772.1552468131904,2827,5691,4,0
6389430281,2600543396,0.0049044709994632285,513.8508255621755,2827,5691,4,0
469720334,1821291268,0.0022676299995509908,565.5787316373059,2827,5691,4,0
1818901127,1505992703,0.00043393300074967556,153.0598922353832,2827,5691,4,0
574505827,4955446085,0.009278263998567127,789.0477590510294,2827,5691,4,0
1618977288,318260718,0.008121291000861675,534.7253425088979,2827,5691,4,0
430534354,687130896,0.0001283169985981658,55.45510331473584,2827,5691,4,0
316681906,408478820,0.0048303509975085035,263.7608041022508,2827,5691,4,0
6047068260,1672267904,0.00589865199799533,None,2827,5691,4,0
306639025,7321902560,0.001258783999219304,321.949563838824,2827,5691,4,0
7286181352,6943345432,0.0027537519999896176,424.4782376534168,2827,5691,4,0
5112831264,2608429635,0.0034914110001409426,660.17140165994,2827,5691,4,0
418009821,3211622686,0.0013996090019645635,299.53940761745315,2827,5691,4,0
687135582,1929118274,0.0027741980011342093,309.984257120316,2827,5691,4,0
440870156,7030625397,0.0013487069991242606,266.8755777965704,2827,5691,4,0
764105827,360757816,0.004459169002075214,363.03519416670315,2827,5691,4,0
2604687836,7172883306,0.0016282090000458993,235.90323152184388,2827,5691,4,0
1937178498,2600722212,0.0022592390014324337,826.6488628265173,2827,5691,4,0
7140363811,1362941670,0.0006039979998604394,112.06217872199922,2827,5691,4,0
408478842,549920911,0.0038798409987066407,619.5302552884552,2827,5691,4,0
2618923396,7321870100,0.004853054000705015,344.33164889729017,2827,5691,4,0
2598983042,2600543396,0.0021739570001955144,154.51239134256772,2827,5691,4,0
6389441585,292992947,0.0020658209978137165,153.9857116374839,2827,5691,4,0
2635713649,508823988,0.000592380001762649,53.38509628553214,2827,5691,4,0
418009801,574465015,0.006562303002283443,527.1319006025898,2827,5691,4,0
3123285425,418009262,0.005901103999349289,423.7599548271774,2827,5691,4,0
1672334378,6604102084,5.61460001335945e-05,None,2827,5691,4,0
7322098545,3462099369,0.002584097001090413,288.4592989060882,2827,5691,4,0
7321870120,687135582,0.004516453001997434,419.35494759758376,2827,5691,4,0
1362941693,7030617904,0.0023954780008352827,237.46407404483605,2827,5691,4,0
2621386732,574449258,0.0034764320007525384,417.7439980535539,2827,5691,4,0
2608786278,2696560492,0.005055075002019294,517.8714975683342,2827,5691,4,0
408478834,563194906,0.000448023001808906,258.9848957044358,2827,5691,4,0
4321209901,7140363801,0.005401580998295685,566.2186955636021,2827,5691,4,0
2360479290,2621360525,0.002046346002316568,367.192459628314,2827,5691,4,0
6603016876,1656016522,0.0037472309995791875,792.3742000871882,2827,5691,4,0
7031746250,7030623427,0.005528460998903029,703.1864446314731,2827,5691,4,0
318260941,7245276256,0.0003430129982007202,48.451769744859156,2827,5691,4,0
318266812,574465010,0.0011769879965868313,177.57906338443627,2827,5691,4,0
2734185688,318266811,0.001332489999185782,251.8290305630775,2827,5691,4,0
370935760,360747915,0.002013821998843923,252.2380450378266,2827,5691,4,0
1505992709,1253890916,0.002365492000535596,250.9143336993809,2827,5691,4,0
574482750,318015069,0.0013935230017523281,206.1122097057147,2827,5691,4,0
360747548,469718545,8.829500075080432e-05,None,2827,5691,4,0
7286240207,748845418,0.0038438489973486867,466.32838207409696,2827,5691,4,0
7257113601,2621360552,0.001232238002558006,280.2626114105422,2827,5691,4,0
600855077,426930266,0.0034775059975800104,341.5483793234692,2827,5691,4,0
318014995,3111465597,0.00023414699899149127,114.39171887865092,2827,5691,4,0
2360384211,318261951,0.005682368002453586,645.4157811529808,2827,5691,4,0
7031746252,600855671,0.003615891997469589,523.4061339411232,2827,5691,4,0
360747557,318261953,8.017400250537321e-05,None,2827,5691,4,0
2600543577,2696567095,0.0005319150004652329,110.10425255510617,2827,5691,4,0
247326136,7286181354,0.00012853699809056707,None,2827,5691,4,0
2608679794,574588781,0.0050784160011971835,398.6061493763712,2827,5691,4,0
671239369,574505822,0.005494400000316091,504.481438611962,2827,5691,4,0
549920910,2611494644,0.0010300610010745004,107.9361662137449,2827,5691,4,0
4321209901,318014996,0.0019231379992561415,232.0745739049763,2827,5691,4,0
574567080,2598986957,0.0004245489981258288,69.05491249038947,2827,5691,4,0
5023014977,1828269031,0.005051388001447776,591.3147075714494,2827,5691,4,0
405229450,317839975,0.005466245998832164,389.3299727634748,2827,5691,4,0
1672267605,288944219,6.430299981730059e-05,None,2827,5691,4,0
7247195349,360747893,0.01183563700033119,None,2827,5691,4,0
7257113603,306636853,0.004348680999100907,437.05718284325974,2827,5691,4,0
6604102084,360747507,0.003575891998480074,225.63308448102424,2827,5691,4,0
2619060548,5023014976,0.007065489000524394,684.1927186887414,2827,5691,4,0
3152652408,418009809,0.0049040140002034605,356.9359172377983,2827,5691,4,0
2612700813,1828418194,0.00457955099773244,404.9649358227012,2827,5691,4,0
600855068,1829747761,0.0036690670021926053,321.4304820539351,2827,5691,4,0
34053441,549931423,0.0038769790007791016,330.7515498416791,2827,5691,4,0
1827499342,2608786068,0.0013501140019798186,157.0355576542001,2827,5691,4,0
7042579827,7165728796,0.002706269999180222,439.48176347319736,2827,5691,4,0
600852672,294919193,0.002174623998143943,194.60045978800466,2827,5691,4,0
2604684732,2608394376,0.001572477998706745,225.67874677578376,2827,5691,4,0
2729892258,3111465599,0.004529039997578366,636.1250774293167,2827,5691,4,0
7286240209,317839014,0.001606638998055132,215.53051978929957,2827,5691,4,0
2554184498,318261955,0.002612239000882255,368.4077854834947,2827,5691,4,0
360747527,4903537220,0.002028591999987839,308.9247309449616,2827,5691,4,0
665115010,2598982037,0.004761821001011413,375.10086789924367,2827,5691,4,0
549914986,2604688050,0.005148952001036378,406.62789799724936,2827,5691,4,0
7321902560,7202546043,0.005814127998746699,647.8841126042021,2827,5691,4,0
2952146882,7247195349,0.00411353399977088,284.15726187079684,2827,5691,4,0
7042580419,2608678794,0.003958449000492692,698.3454072097257,2827,5691,4,0
7286240203,4016874623,0.00090085400006501,165.24731610205183,2827,5691,4,0
1672334354,600861115,0.005391890001192223,770.4024309119364,2827,5691,4,0
2614920443,3111465611,0.0014134039993223269,177.8696047315475,2827,5691,4,0
360747578,574485682,7.005400038906373e-05,None,2827,5691,4,0
2734185688,4903549431,0.002963183000247227,439.4930627514446,2827,5691,4,0
2631500008,1830470676,0.003986423998867394,357.51214838441797,2827,5691,4,0
1867147170,1828269031,0.0026679650000005495,436.3097512530265,2827,5691,4,0
5113940072,321209222,0.00030585299828089774,84.32254165537744,2827,5691,4,0
318260732,317839537,0.0005251059992588125,69.7984740636073,2827,5691,4,0
1574635372,288943146,9.370200132252648e-05,None,2827,5691,4,0
5609333814,3177732288,0.002770126000541495,368.10345899843935,2827,5691,4,0
294919195,2639898838,0.0006389840018528048,140.21450329712175,2827,5691,4,0
7042580417,435112933,0.0016580880001129117,535.8777439426531,2827,5691,4,0
1672340374,6448461991,0.0018710289987211581,286.2837684453694,2827,5691,4,0
508823963,1929118187,0.005727465002564713,625.7948384834564,2827,5691,4,0
1368670342,574449298,0.004086169999936828,289.11487947498966,2827,5691,4,0
1828400048,1362941672,0.0011229840019950643,490.31985636850595,2827,5691,4,0
4016874408,288944220,0.0020364219999464694,235.07185286856708,2827,5691,4,0
1672267709,473666786,0.004738738000014564,408.9790017628481,2827,5691,4,0
7286181353,4475742630,0.002411451998341363,335.2071411763051,2827,5691,4,0
549928583,1820309648,0.0037011620006524026,287.5714344469538,2827,5691,4,0
2701813226,4955446072,0.0003865350008709356,270.90837236452404,2827,5691,4,0
408478826,7286240207,0.005303846999595407,654.9357242070321,2827,5691,4,0
473666774,292484328,0.00626982600078918,None,2827,5691,4,0
7165728799,7115183091,0.00038769900129409507,88.19239151226196,2827,5691,4,0
2635713654,4955446028,0.0020243799990566913,125.05689399557589,2827,5691,4,0
5113940036,1293287346,0.003832612001133384,399.1991755729142,2827,5691,4,0
1672267690,7286135545,4.598400118993595e-05,None,2827,5691,4,0
574457817,1672334393,0.011462941998615861,821.5688985611807,2827,5691,4,0
3111465608,410486365,0.0036238719985703938,389.0809006977434,2827,5691,4,0
This diff is collapsed.
......@@ -11,11 +11,10 @@ Added :
- distance computation to estimate length of each ways (useful to compute the shortest path)
"""
import copy
import xml.sax
import logging
import itertools
from collections import namedtuple
from collections import namedtuple, defaultdict
import networkx as nx
import rtree
......@@ -155,45 +154,31 @@ def read_osm(osm_xml_data, profile=car) -> OSMGraph:
Node = namedtuple('Node', ['id', 'lon', 'lat', 'tags'])
Way = namedtuple('Way', ['id', 'nds', 'tags'])
class Way(object):
def __init__(self, id):
self.id = id
self.nds = []
self.tags = {}
@staticmethod
def slice_array(waypoints, node_pass_count):
slices = []
start_last_slice = 0
for i in range(1, len(waypoints) - 1):
if node_pass_count[waypoints[i]] > 1:
slices.append(waypoints[start_last_slice: i + 1])
start_last_slice = i
slices.append(waypoints[start_last_slice:])
return slices
def split(self, node_pass_count):
"""
Slice way at every crossing i.e. when a waypoint is passend by
multiple ways.
"""
def slice_array(waypoints, node_pass_count):
slices = []
start_last_slice = 0
for i in range(1, len(waypoints) - 1):
if node_pass_count[waypoints[i]] > 1:
slices.append(waypoints[start_last_slice: i + 1])
start_last_slice = i
slices.append(waypoints[start_last_slice:])
return slices
# slice the node-array using this nifty recursive function
slices = Way.slice_array(self.nds, node_pass_count)
# create a way object for each node-array slice
ret = []
i = 0
for slice in slices:
littleway = copy.copy(self)
littleway.id += "-%d" % i
littleway.nds = slice
ret.append(littleway)
i += 1
def split(way, node_pass_count):
"""
Slice way at every crossing i.e. when a waypoint is passend by
multiple ways.
"""
return ret
# slice the node-array using this nifty recursive function
slices = slice_array(way.nds, node_pass_count)
# create a way object for each node-array slice
return [Way(id=way.id + "-%d" % i, nds=s, tags=way.tags) for i, s in enumerate(slices)]
class OSM(object):
......@@ -227,7 +212,7 @@ class OSM(object):
if name == 'node':
self.currElem = Node(attrs['id'], float(attrs['lon']), float(attrs['lat']), tags={})
elif name == 'way':
self.currElem = Way(attrs['id'])
self.currElem = Way(attrs['id'], [], {})
elif name == 'tag':
self.currElem.tags[attrs['k']] = attrs['v']
elif name == 'nd':
......@@ -237,7 +222,7 @@ class OSM(object):
def endElement(self, name):
if name == 'node':
nodes[self.currElem.id] = self.currElem
elif name == 'way':
elif name == 'way' and len(self.currElem.nds) > 1:
ways[self.currElem.id] = self.currElem
@classmethod
......@@ -247,21 +232,16 @@ class OSM(object):
xml.sax.parse(osm_xml_data, OSMHandler)
self.nodes = nodes
self.ways = ways
# count times each node is used
node_histogram = dict.fromkeys(self.nodes.keys(), 0)
for way in self.ways.values():
if len(way.nds) < 2: # if a way has only one node, delete it out of the osm collection
del self.ways[way.id]
else:
for node in way.nds:
node_histogram[node] += 1
node_histogram = defaultdict(lambda: 0)
for way in ways.values():
for node in way.nds:
node_histogram[node] += 1
# use that histogram to split all ways, replacing the member set of ways
new_ways = {}
for id, way in self.ways.items():
split_ways = way.split(node_histogram)
for split_way in split_ways:
new_ways[split_way.id] = split_way
self.ways = new_ways
self.ways = {
way.id: way for split_ways in [
split(w, node_histogram) for w in ways.values()
] for way in split_ways
}
from evrouting.osm.imports import Way
from evrouting.osm.imports import slice_array
def test_slice():
......@@ -9,7 +9,7 @@ def test_slice():
node_pass_count[6] = 2
node_pass_count[9] = 2
slices = Way.slice_array(way, node_pass_count)
slices = slice_array(way, node_pass_count)
assert slices == [[0, 1, 2, 3, 4], [4, 5, 6], [6, 7, 8, 9]]
......@@ -17,6 +17,6 @@ def test_slice():
def test_slice_short():
way = [0, 1]
node_pass_count = {w: 1 for w in way}
slices = Way.slice_array(way, node_pass_count)
slices = slice_array(way, node_pass_count)
assert slices == [[0, 1]]
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