From c2a959f6e0b48cea547568c9bb34ff7a1de77396 Mon Sep 17 00:00:00 2001 From: "Daniel J. Hofmann" Date: Tue, 21 Mar 2017 11:49:29 +0100 Subject: [PATCH] Back to Monaco for examples and benchmarks --- .travis.yml | 4 +- appveyor-build.bat | 10 +- docs/{bindings/node => nodejs}/api.md | 0 docs/{bindings/node => nodejs}/releasing.md | 0 example/example.cpp | 8 +- example/example.js | 2 +- src/benchmarks/match.cpp | 169 +++++++++++++------- 7 files changed, 119 insertions(+), 74 deletions(-) rename docs/{bindings/node => nodejs}/api.md (100%) rename docs/{bindings/node => nodejs}/releasing.md (100%) diff --git a/.travis.yml b/.travis.yml index e16d16ac1ed..eb8fc66408a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -42,9 +42,7 @@ matrix: apt: sources: ['ubuntu-toolchain-r-test'] packages: ['g++-6', 'libbz2-dev', 'libstxxl-dev', 'libstxxl1', 'libxml2-dev', 'libzip-dev', 'lua5.1', 'liblua5.1-0-dev', 'libtbb-dev', 'libgdal-dev', 'libluabind-dev', 'libboost-all-dev'] - # Disabled sanitizer since the build was too slow. We need to downgrade our tets dataset from Berlin to Monaco again. - #env: CCOMPILER='gcc-6' CXXCOMPILER='g++-6' BUILD_TYPE='Debug' TARGET_ARCH='x86_64-asan' ENABLE_COVERAGE=ON ENABLE_SANITIZER=ON - env: CCOMPILER='gcc-6' CXXCOMPILER='g++-6' BUILD_TYPE='Debug' TARGET_ARCH='x86_64-asan' ENABLE_COVERAGE=ON ENABLE_SANITIZER=OFF + env: CCOMPILER='gcc-6' CXXCOMPILER='g++-6' BUILD_TYPE='Debug' TARGET_ARCH='x86_64-asan' ENABLE_COVERAGE=ON ENABLE_SANITIZER=ON - os: linux compiler: "clang-4.0-debug" diff --git a/appveyor-build.bat b/appveyor-build.bat index 5cb9a03b7b3..597c538e21d 100644 --- a/appveyor-build.bat +++ b/appveyor-build.bat @@ -133,12 +133,12 @@ unit_tests\%Configuration%\server-tests.exe IF %ERRORLEVEL% NEQ 0 GOTO ERROR ECHO running library-tests.exe ... -SET test_region=berlin -SET test_region_ch=ch\berlin -SET test_region_corech=corech\berlin -SET test_region_mld=mld\berlin +SET test_region=monaco +SET test_region_ch=ch\monaco +SET test_region_corech=corech\monaco +SET test_region_mld=mld\monaco SET test_osm=%test_region%.osm.pbf -IF NOT EXIST %test_osm% powershell Invoke-WebRequest https://s3.amazonaws.com/mapbox/osrm/testing/berlin.osm.pbf -OutFile %test_osm% +IF NOT EXIST %test_osm% powershell Invoke-WebRequest https://s3.amazonaws.com/mapbox/osrm/testing/monaco.osm.pbf -OutFile %test_osm% %Configuration%\osrm-extract.exe -p ../profiles/car.lua %test_osm% MKDIR ch XCOPY %test_region%.osrm %test_region%.osrm.* ch\ diff --git a/docs/bindings/node/api.md b/docs/nodejs/api.md similarity index 100% rename from docs/bindings/node/api.md rename to docs/nodejs/api.md diff --git a/docs/bindings/node/releasing.md b/docs/nodejs/releasing.md similarity index 100% rename from docs/bindings/node/releasing.md rename to docs/nodejs/releasing.md diff --git a/example/example.cpp b/example/example.cpp index 711ae317ac3..edce8d17a03 100644 --- a/example/example.cpp +++ b/example/example.cpp @@ -39,9 +39,9 @@ int main(int argc, const char *argv[]) // The following shows how to use the Route service; configure this service RouteParameters params; - // Route in Berlin: Alexanderplatz to Hackescher Markt - params.coordinates.push_back({util::FloatLongitude{13.414307}, util::FloatLatitude{52.521835}}); - params.coordinates.push_back({util::FloatLongitude{13.402290}, util::FloatLatitude{52.523728}}); + // Route in monaco + params.coordinates.push_back({util::FloatLongitude{7.419758}, util::FloatLatitude{43.731142}}); + params.coordinates.push_back({util::FloatLongitude{7.419505}, util::FloatLatitude{43.736825}}); // Response is in JSON format json::Object result; @@ -58,7 +58,7 @@ int main(int argc, const char *argv[]) const auto distance = route.values["distance"].get().value; const auto duration = route.values["duration"].get().value; - // Warn users if extract does not contain the default Berlin coordinates from above + // Warn users if extract does not contain the default coordinates from above if (distance == 0 || duration == 0) { std::cout << "Note: distance or duration is zero. "; diff --git a/example/example.js b/example/example.js index 516f02a766f..fbb02f884c8 100644 --- a/example/example.js +++ b/example/example.js @@ -5,7 +5,7 @@ var OSRM = require('..'); var path = require('path'); var app = express(); -var osrm = new OSRM(path.join(__dirname,"../test/data/berlin_CH.osrm")); +var osrm = new OSRM(path.join(__dirname,"../test/data/ch/monaco.osrm")); // Accepts a query like: // http://localhost:8888?start=13.414307,52.521835&end=13.402290,52.523728 diff --git a/src/benchmarks/match.cpp b/src/benchmarks/match.cpp index 09b0739b962..788ab2f0bc0 100644 --- a/src/benchmarks/match.cpp +++ b/src/benchmarks/match.cpp @@ -36,7 +36,7 @@ int main(int argc, const char *argv[]) try // Routing machine with several services (such as Route, Table, Nearest, Trip, Match) OSRM osrm{config}; - // Match traces to the road network in our Berlin test dataset + // Route in monaco MatchParameters params; params.overview = RouteParameters::OverviewType::False; params.steps = false; @@ -45,123 +45,170 @@ int main(int argc, const char *argv[]) try using osrm::util::FloatLatitude; using osrm::util::FloatLongitude; - // Grab trace, or: go to geojson.io, create linestring. - // Extract coordinates: jq '.features[].geometry.coordinates[]' coordinates.json - params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.410401344299316}, FloatLatitude{52.522749270442254}}); + FloatCoordinate{FloatLongitude{7.422176599502563}, FloatLatitude{43.73754595167546}}); + params.coordinates.push_back( + FloatCoordinate{FloatLongitude{7.421715259552002}, FloatLatitude{43.73744517900973}}); + params.coordinates.push_back( + FloatCoordinate{FloatLongitude{7.421489953994752}, FloatLatitude{43.73738316497729}}); + params.coordinates.push_back( + FloatCoordinate{FloatLongitude{7.421286106109619}, FloatLatitude{43.737274640266}}); + params.coordinates.push_back( + FloatCoordinate{FloatLongitude{7.420910596847533}, FloatLatitude{43.73714285999499}}); + params.coordinates.push_back( + FloatCoordinate{FloatLongitude{7.420696020126342}, FloatLatitude{43.73699557581948}}); + params.coordinates.push_back( + FloatCoordinate{FloatLongitude{7.42049217224121}, FloatLatitude{43.73690255404829}}); + params.coordinates.push_back( + FloatCoordinate{FloatLongitude{7.420309782028198}, FloatLatitude{43.73672426191624}}); + params.coordinates.push_back( + FloatCoordinate{FloatLongitude{7.420159578323363}, FloatLatitude{43.7366622471372}}); + params.coordinates.push_back( + FloatCoordinate{FloatLongitude{7.420148849487305}, FloatLatitude{43.736623487867654}}); + params.coordinates.push_back( + FloatCoordinate{FloatLongitude{7.419934272766113}, FloatLatitude{43.73647620241466}}); + params.coordinates.push_back( + FloatCoordinate{FloatLongitude{7.419805526733398}, FloatLatitude{43.736228141885455}}); + params.coordinates.push_back( + FloatCoordinate{FloatLongitude{7.419601678848267}, FloatLatitude{43.736142870841206}}); + params.coordinates.push_back( + FloatCoordinate{FloatLongitude{7.419376373291015}, FloatLatitude{43.735956824504974}}); + params.coordinates.push_back( + FloatCoordinate{FloatLongitude{7.419247627258301}, FloatLatitude{43.73574752168583}}); + params.coordinates.push_back( + FloatCoordinate{FloatLongitude{7.419043779373169}, FloatLatitude{43.73566224995717}}); + params.coordinates.push_back( + FloatCoordinate{FloatLongitude{7.418732643127442}, FloatLatitude{43.735406434042645}}); + params.coordinates.push_back( + FloatCoordinate{FloatLongitude{7.418657541275024}, FloatLatitude{43.735321161828274}}); + params.coordinates.push_back( + FloatCoordinate{FloatLongitude{7.418593168258667}, FloatLatitude{43.73521263337983}}); + params.coordinates.push_back( + FloatCoordinate{FloatLongitude{7.418367862701416}, FloatLatitude{43.73508084857086}}); + params.coordinates.push_back( + FloatCoordinate{FloatLongitude{7.418346405029297}, FloatLatitude{43.73484828643578}}); + params.coordinates.push_back( + FloatCoordinate{FloatLongitude{7.4180567264556885}, FloatLatitude{43.734437424456566}}); + params.coordinates.push_back( + FloatCoordinate{FloatLongitude{7.417809963226318}, FloatLatitude{43.73414284243448}}); + params.coordinates.push_back( + FloatCoordinate{FloatLongitude{7.417863607406615}, FloatLatitude{43.73375523230292}}); + params.coordinates.push_back( + FloatCoordinate{FloatLongitude{7.417809963226318}, FloatLatitude{43.73386376339265}}); + params.coordinates.push_back( + FloatCoordinate{FloatLongitude{7.417895793914795}, FloatLatitude{43.73365445325776}}); params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.410615921020508}, FloatLatitude{52.52284066124772}}); + FloatCoordinate{FloatLongitude{7.418067455291747}, FloatLatitude{43.73343739012297}}); params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.410787582397461}, FloatLatitude{52.522932051863044}}); + FloatCoordinate{FloatLongitude{7.41803526878357}, FloatLatitude{43.73319706930599}}); params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.411259651184082}, FloatLatitude{52.52333677944541}}); + FloatCoordinate{FloatLongitude{7.418024539947509}, FloatLatitude{43.73295674752463}}); params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.411538600921629}, FloatLatitude{52.52341511338546}}); + FloatCoordinate{FloatLongitude{7.417906522750854}, FloatLatitude{43.73284821479115}}); params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.411903381347656}, FloatLatitude{52.52374150329884}}); + FloatCoordinate{FloatLongitude{7.417917251586914}, FloatLatitude{43.7327551865773}}); params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.412246704101562}, FloatLatitude{52.523950391570665}}); + FloatCoordinate{FloatLongitude{7.417434453964233}, FloatLatitude{43.73281720540258}}); params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.410637378692625}, FloatLatitude{52.52398955801103}}); + FloatCoordinate{FloatLongitude{7.4173808097839355}, FloatLatitude{43.73307303237796}}); params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.409242630004881}, FloatLatitude{52.52413316799366}}); + FloatCoordinate{FloatLongitude{7.41750955581665}, FloatLatitude{43.73328234454499}}); params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.407998085021973}, FloatLatitude{52.52448566323317}}); + FloatCoordinate{FloatLongitude{7.417563199996948}, FloatLatitude{43.73352266501975}}); params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.40705394744873}, FloatLatitude{52.52474676899426}}); + FloatCoordinate{FloatLongitude{7.41750955581665}, FloatLatitude{43.733770736756355}}); params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.406410217285156}, FloatLatitude{52.5249948180297}}); + FloatCoordinate{FloatLongitude{7.417466640472412}, FloatLatitude{43.73409632935116}}); params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.406989574432373}, FloatLatitude{52.525686736883024}}); + FloatCoordinate{FloatLongitude{7.417230606079102}, FloatLatitude{43.73428238146768}}); params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.407375812530518}, FloatLatitude{52.52628726139225}}); + FloatCoordinate{FloatLongitude{7.41724133491516}, FloatLatitude{43.73405756842078}}); params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.406217098236084}, FloatLatitude{52.52663973934549}}); + FloatCoordinate{FloatLongitude{7.4169838428497314}, FloatLatitude{43.73449168940785}}); params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.405036926269531}, FloatLatitude{52.52696610529863}}); + FloatCoordinate{FloatLongitude{7.41701602935791}, FloatLatitude{43.734615723397525}}); params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.404350280761717}, FloatLatitude{52.52717497823596}}); + FloatCoordinate{FloatLongitude{7.41704821586609}, FloatLatitude{43.73487929477265}}); params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.404221534729004}, FloatLatitude{52.5265222470087}}); + FloatCoordinate{FloatLongitude{7.41725206375122}, FloatLatitude{43.734949063471895}}); params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.40383529663086}, FloatLatitude{52.526039219655445}}); + FloatCoordinate{FloatLongitude{7.4173808097839355}, FloatLatitude{43.73533666587628}}); params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.402740955352783}, FloatLatitude{52.526300316181675}}); + FloatCoordinate{FloatLongitude{7.41750955581665}, FloatLatitude{43.735623490040375}}); params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.401474952697754}, FloatLatitude{52.52666584871098}}); + FloatCoordinate{FloatLongitude{7.417799234390259}, FloatLatitude{43.73577852955704}}); params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.400874137878418}, FloatLatitude{52.527370795712564}}); + FloatCoordinate{FloatLongitude{7.4180781841278085}, FloatLatitude{43.735972328388435}}); params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.400616645812988}, FloatLatitude{52.52780159108807}}); + FloatCoordinate{FloatLongitude{7.41850733757019}, FloatLatitude{43.73608860738618}}); params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.399865627288817}, FloatLatitude{52.52756661231615}}); + FloatCoordinate{FloatLongitude{7.418850660324096}, FloatLatitude{43.736228141885455}}); params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.399114608764648}, FloatLatitude{52.52744912245876}}); + FloatCoordinate{FloatLongitude{7.419086694717407}, FloatLatitude{43.73636767605958}}); params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.39802026748657}, FloatLatitude{52.527266359833675}}); + FloatCoordinate{FloatLongitude{7.419333457946777}, FloatLatitude{43.73664674343239}}); params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.398470878601072}, FloatLatitude{52.52648308282661}}); + FloatCoordinate{FloatLongitude{7.419633865356444}, FloatLatitude{43.73676302112054}}); params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.398964405059813}, FloatLatitude{52.52538647154948}}); + FloatCoordinate{FloatLongitude{7.419784069061279}, FloatLatitude{43.737096349241845}}); params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.398363590240479}, FloatLatitude{52.52542563670941}}); + FloatCoordinate{FloatLongitude{7.420030832290649}, FloatLatitude{43.73720487427631}}); params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.39780569076538}, FloatLatitude{52.525347306354654}}); + FloatCoordinate{FloatLongitude{7.419601678848267}, FloatLatitude{43.73708084564945}}); params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.397247791290283}, FloatLatitude{52.525190645226104}}); + FloatCoordinate{FloatLongitude{7.419333457946777}, FloatLatitude{43.73708084564945}}); params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.396217823028564}, FloatLatitude{52.52494259729653}}); + FloatCoordinate{FloatLongitude{7.419043779373169}, FloatLatitude{43.737158363571325}}); params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.395531177520752}, FloatLatitude{52.52452482919627}}); + FloatCoordinate{FloatLongitude{7.418915033340454}, FloatLatitude{43.737305647346446}}); params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.39482307434082}, FloatLatitude{52.524472607904364}}); + FloatCoordinate{FloatLongitude{7.41848587989807}, FloatLatitude{43.7374916894919}}); params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.39359998703003}, FloatLatitude{52.5246814926995}}); + FloatCoordinate{FloatLongitude{7.418271303176879}, FloatLatitude{43.73746843425534}}); params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.392891883850098}, FloatLatitude{52.52490343170594}}); + FloatCoordinate{FloatLongitude{7.417960166931152}, FloatLatitude{43.73744517900973}}); params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.392398357391357}, FloatLatitude{52.5239765025348}}); + FloatCoordinate{FloatLongitude{7.417885065078735}, FloatLatitude{43.737212626056944}}); params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.391926288604736}, FloatLatitude{52.52310177678706}}); + FloatCoordinate{FloatLongitude{7.417563199996948}, FloatLatitude{43.73703433484817}}); params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.39184045791626}, FloatLatitude{52.52222703362077}}); + FloatCoordinate{FloatLongitude{7.4173057079315186}, FloatLatitude{43.73692580950463}}); params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.39184045791626}, FloatLatitude{52.521169485041774}}); + FloatCoordinate{FloatLongitude{7.417144775390625}, FloatLatitude{43.7367707729584}}); params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.39184045791626}, FloatLatitude{52.52039915585348}}); + FloatCoordinate{FloatLongitude{7.416973114013672}, FloatLatitude{43.73653821738638}}); params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.39205503463745}, FloatLatitude{52.519681040207885}}); + FloatCoordinate{FloatLongitude{7.416855096817017}, FloatLatitude{43.73639868360965}}); params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.392269611358643}, FloatLatitude{52.51900208371135}}); + FloatCoordinate{FloatLongitude{7.4167799949646}, FloatLatitude{43.736142870841206}}); params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.392527103424072}, FloatLatitude{52.51812725890996}}); + FloatCoordinate{FloatLongitude{7.41675853729248}, FloatLatitude{43.735848297208605}}); params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.392677307128904}, FloatLatitude{52.51750050804369}}); + FloatCoordinate{FloatLongitude{7.416619062423706}, FloatLatitude{43.73567000193752}}); params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.393385410308838}, FloatLatitude{52.51735687637764}}); + FloatCoordinate{FloatLongitude{7.416543960571288}, FloatLatitude{43.735406434042645}}); params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.394951820373535}, FloatLatitude{52.517474393230245}}); + FloatCoordinate{FloatLongitude{7.416479587554932}, FloatLatitude{43.73529790574875}}); params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.396711349487305}, FloatLatitude{52.51735687637764}}); + FloatCoordinate{FloatLongitude{7.416415214538574}, FloatLatitude{43.73515061703527}}); params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.398127555847168}, FloatLatitude{52.517696368649815}}); + FloatCoordinate{FloatLongitude{7.416350841522218}, FloatLatitude{43.73490255101476}}); params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.399629592895508}, FloatLatitude{52.51773554066627}}); + FloatCoordinate{FloatLongitude{7.416340112686156}, FloatLatitude{43.73475526132885}}); params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.400981426239014}, FloatLatitude{52.51829700239765}}); + FloatCoordinate{FloatLongitude{7.416222095489501}, FloatLatitude{43.73446068087028}}); params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.403105735778809}, FloatLatitude{52.51887151395141}}); + FloatCoordinate{FloatLongitude{7.416243553161621}, FloatLatitude{43.73430563794159}}); params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.40355634689331}, FloatLatitude{52.51966798345114}}); + FloatCoordinate{FloatLongitude{7.416050434112548}, FloatLatitude{43.73403431185051}}); params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.404908180236816}, FloatLatitude{52.52007274110608}}); + FloatCoordinate{FloatLongitude{7.415814399719239}, FloatLatitude{43.73382500231174}}); params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.40555191040039}, FloatLatitude{52.520529721073366}}); + FloatCoordinate{FloatLongitude{7.415750026702881}, FloatLatitude{43.73354592178871}}); params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.407869338989258}, FloatLatitude{52.52144366674759}}); + FloatCoordinate{FloatLongitude{7.415513992309569}, FloatLatitude{43.73347615145474}}); params.coordinates.push_back( - FloatCoordinate{FloatLongitude{13.408942222595215}, FloatLatitude{52.52203119321206}}); + FloatCoordinate{FloatLongitude{7.415342330932617}, FloatLatitude{43.733251335381205}}); TIMER_START(routes); auto NUM = 100;