diff --git a/overline-tests.R b/overline-tests.R index b87e1bd..014cde3 100644 --- a/overline-tests.R +++ b/overline-tests.R @@ -29,3 +29,10 @@ library(tmap) m1 = tm_shape(routes) + tm_lines(col = "description", palette = "Blues", scale = 9, breaks = 1:5, as.count = TRUE) + tm_layout(scale = 3) m2 = tm_shape(rnet) + tm_lines(col = "description", palette = "Blues", scale = 9, breaks = 1:5, as.count = TRUE) + tm_layout(scale = 3) tmap_arrange(m1, m2, ncol = 2) + +# Test with Rust version: +command = "cargo run --manifest-path rust/Cargo.toml test-data/crossing-routes-minimal-leeds.geojson -o test-data/crossing-routes-minimal-leeds-output-rust.geojson --sum description" +system(command) +rnet_rust = sf::read_sf("test-data/crossing-routes-minimal-leeds-output-rust.geojson") +summary(rnet_rust) +tm_shape(rnet_rust) + tm_lines(col = "description", palette = "Blues", scale = 9, breaks = 1:5, as.count = TRUE) + tm_layout(scale = 3) diff --git a/test-data/crossing-routes-minimal-leeds-output-rust.geojson b/test-data/crossing-routes-minimal-leeds-output-rust.geojson new file mode 100644 index 0000000..ef26200 --- /dev/null +++ b/test-data/crossing-routes-minimal-leeds-output-rust.geojson @@ -0,0 +1 @@ +{"features":[{"geometry":{"coordinates":[[-1.558033900400985,53.80777049991803],[-1.5586702003875674,53.80786559958057],[-1.5586084000750748,53.8079996002985],[-1.5586539002072408,53.808007300290086],[-1.558654900060544,53.80814440007027],[-1.5580040000980424,53.80930370026401],[-1.5580010005381328,53.80931080040809],[-1.5580477001917352,53.80931760017875],[-1.5581299997659,53.80933250013912],[-1.5581446995758863,53.80933519990258],[-1.5582120996719315,53.80934950001544],[-1.558245001047422,53.809355299740474],[-1.5583453993277494,53.80937280053893],[-1.5582356000061517,53.80958480031906],[-1.5581490000039364,53.809701599712625],[-1.5580518992730812,53.809808100075166],[-1.5578970006682211,53.80995459956477]],"type":"LineString"},"properties":{"description":0.0},"type":"Feature"},{"geometry":{"coordinates":[[-1.5578970006682211,53.80995459956477],[-1.5576968000866915,53.81011230010498],[-1.5573934996544865,53.810287201070224],[-1.5571107015092294,53.81041219957888],[-1.5568500998047765,53.81052329997143],[-1.5563710006571354,53.81071019968554]],"type":"LineString"},"properties":{"description":0.0},"type":"Feature"},{"geometry":{"coordinates":[[-1.5563710006571354,53.81071019968554],[-1.5564924003947431,53.81086800005045],[-1.556455100269774,53.81088449990395],[-1.5563387996327491,53.81093810037098],[-1.5562410000634277,53.810918999679394],[-1.5561480999265558,53.81091009999278],[-1.5561903993180417,53.81108600010433],[-1.5562650994020468,53.8113964000573],[-1.5563168996688694,53.811604200005526],[-1.5563242994908957,53.811631201237425],[-1.556137600710553,53.811785700192715],[-1.5560577001792608,53.81177230030079],[-1.5559063003046436,53.81174680003665],[-1.5557954996171053,53.81208170020813],[-1.5558388003745316,53.81211789970141],[-1.5557688000548429,53.812303300246406],[-1.555098800020238,53.81214370033896],[-1.5550271993302092,53.81223789978058],[-1.5548461003334193,53.812361200370034],[-1.5546102998313267,53.812356799989416],[-1.554372599456694,53.81246249995573],[-1.5544025995937036,53.81258569982117],[-1.5543693003945849,53.812735301070994],[-1.5541605004695918,53.81275010030734],[-1.5541312006836856,53.81309249992169],[-1.5541128992841156,53.813388300287706],[-1.5534067003245486,53.81336610053386],[-1.5533976002981156,53.8136517997196],[-1.5533805997666854,53.813817100426704],[-1.55312649937766,53.813907000211714],[-1.5530054006548892,53.81389639990795],[-1.553015299353855,53.81392350006522],[-1.5531734002120328,53.81401699983462],[-1.5532834022270383,53.81405660056222],[-1.553458999761704,53.81413430015033],[-1.5531781014889865,53.814264200861054],[-1.5530037004504824,53.81433680039634]],"type":"LineString"},"properties":{"description":0.0},"type":"Feature"},{"geometry":{"coordinates":[[-1.5565239993894555,53.80706729966995],[-1.5568463000596966,53.807114300015726],[-1.556800001254998,53.80722100002766],[-1.5567606000767182,53.80736350023408],[-1.556794300124741,53.8074251001668],[-1.5567561998146016,53.80755490015351],[-1.5572165997390433,53.807629399955346],[-1.557118500667522,53.80787259989995],[-1.5572389005518266,53.80789529967661],[-1.557190600527884,53.808006900091975],[-1.5571772000734008,53.80803800043175],[-1.5571635999507842,53.808053600064326],[-1.5571555996117208,53.8080678012518],[-1.5572157995538731,53.80811190038607],[-1.557287400243902,53.80820020117727],[-1.557392900650087,53.80836419966669],[-1.5575072999019346,53.80873259956799],[-1.557649000745719,53.80897059963507],[-1.5576550996996053,53.80906799976228],[-1.557601001736614,53.80921290025807],[-1.557449299334522,53.80953989988924],[-1.5574335996712327,53.80957830002249],[-1.557418999695313,53.80960990038508],[-1.5574763997456886,53.80961760037667],[-1.557728899764374,53.80979379996231],[-1.557787800351023,53.80978869990948],[-1.5578251004759929,53.80993620034403],[-1.5578970006682211,53.80995459956477]],"type":"LineString"},"properties":{"description":0.0},"type":"Feature"},{"geometry":{"coordinates":[[-1.5563710006571354,53.81071019968554],[-1.5565659992787415,53.81077689967108],[-1.55666219999036,53.81085450033382],[-1.5573022997220218,53.81134719997088],[-1.5574701011236691,53.81128440034314],[-1.5576249997285292,53.81136910025063],[-1.558561500753339,53.81210349976386],[-1.5591110993910022,53.812526000155],[-1.5596431015181105,53.81291959994702],[-1.5608353002770117,53.81385809959939],[-1.5609238999858333,53.81376650009654],[-1.5609959000121287,53.81350549987939],[-1.5610221004040583,53.813503999810955]],"type":"LineString"},"properties":{"description":0.0},"type":"Feature"}],"type":"FeatureCollection"} \ No newline at end of file