OSRM Improvements - Building Supply DK
OSRM Improvements - Building Supply DK
OSRM Improvements - Building Supply DK
Transform your PDFs into Flipbooks and boost your revenue!
Leverage SEO-optimized Flipbooks, powerful backlinks, and multimedia content to professionally showcase your products and significantly increase your reach.
<strong>OSRM</strong> <strong>Improvements</strong><br />
Package A:<br />
Tests and Cleanup<br />
Weights<br />
Pushing Bikes<br />
Improved Instructions<br />
Package B:<br />
Multiple Profiles<br />
Roadwork<br />
Hills<br />
Squares<br />
Turn Penalties<br />
Tests and Cleanup<br />
All existing cucumber tests should pass, focus on end-user<br />
functions.<br />
Boost test framework added, 75% code coverage, focus on<br />
low-level functionality.<br />
Boost test framework.<br />
All existing cucumber tests should pass, focus on end-user functions.<br />
Boost test framework added, 75% code coverage, focus on low-level<br />
functionality.<br />
To ensure code quality and increase confidence in <strong>OSRM</strong>, tests are<br />
great.<br />
The existing cucumbers tests should pass and more could be added<br />
to cover more of the <strong>OSRM</strong> API. Things that make cucumber tests<br />
run faster will make it more convenient to run tests often. A way to<br />
reload data without restarting <strong>OSRM</strong>-routed might be one way to<br />
achieve this. Allocating less RAM might be another.<br />
Adding a more low-level C++ test suite based on something like Boost<br />
test framework might be worth investigating.<br />
Moving forward, we suggest a workflow where new revisions are<br />
only pushed to the master branch after verifying that all tests pass.<br />
Adding new features should include adding relevant tests.<br />
A bit of code cleanup will help improve overall quality, and also make<br />
it easier for others to read the code and contribute to the project.<br />
Commented-out code sections should be removed, very long<br />
BILAG 2<br />
25.10.2012<br />
Cykelsekretariatet<br />
Islands Brygge 37<br />
Postboks 450<br />
2300 København S<br />
Telefon<br />
+45 3366 3433<br />
Mobil<br />
+45 2972 3788<br />
E-mail<br />
emil.tin@tmf.kk.dk
functions perhaps split into more manageable sub functions with<br />
descriptive names, etc.<br />
Weights<br />
LUA scripts for parsing tags and computing edge weights,<br />
travel times, way names, mode of travel (walk/bike/ferry),<br />
turn penalties, signal penalties, etc.<br />
Ability to call back to C++ to access data on heights, roadwork,<br />
etc.<br />
Language support in the LUA scripts.<br />
LUA scripts for parsing tags and computing edge weights, travel<br />
times, way names, mode of travel (walk/bike/ferry), etc.<br />
Ability to call back to C++ to access data on heights, roadwords, etc.<br />
Support for different languages in the LUA scripts.<br />
We need a flexible way to adjust the attractiveness (impedance) of<br />
individual ways depending on a variety of OSM tags. The mechanism<br />
should be independent of speeds. For example, paths in parks could<br />
be preferred over streets, even though the speed is the same, or<br />
even a bit slower.<br />
A LUA script extension that allows custom parsing of tags would be a<br />
great way to achieve such flexibility, as long as it doesn’t cause<br />
processing of OSM data to be too slow.<br />
A script solution would also make it possible to lift some of the<br />
profile-specific code out of <strong>OSRM</strong> itself and into the relevant profiles.<br />
Examples uses:<br />
prefer streets with bike lanes or tracks<br />
Prefer streets that are part of green cycle routes or cycle<br />
super-paths.<br />
prefer streets with asphalt over cobblestones<br />
Prefer ways in parks (how – the info is not in the ways itself?)<br />
prefer intersections with green waves for bicycles (we can tag<br />
those in OSM)<br />
for a 'kids friendly' profile: prefer crossing big roads at<br />
intersections with signal lights.<br />
Up-vote or down-vote specific locations depending on purely<br />
subjective criteria – just a nice place for biking!<br />
Pushing Bikes<br />
Ability to handle pushing of bikes in the LUA scripts.<br />
Side 2 af 5
Clear indication of pushing of bikes on the map (different<br />
color) and in the instructions.<br />
We want the route planner to suggest routes that include stretches<br />
of pushing the bike, when it offers a significant shortcut.<br />
Pushing of bikes can occur both on paths where bicycling is not allow,<br />
like pedestrian streets, and against one-ways.<br />
Pushing of bikes should occur at a customizable speed (typically at<br />
pedestrian speed). In the case of one-ways, there would be different<br />
speeds when passing the same streets in opposite directions (biking<br />
and pushing).<br />
We need to clearly indicate on the map the parts of the route where<br />
you need to push your bike (perhaps with a different colour on the<br />
map), and show a notice in the route description.<br />
Perhaps the route instructions could indicate the transport mode of<br />
each section (bike/push/ferry)? The information could be set for each<br />
edge when pre-processing the data.<br />
Improved Instructions<br />
<strong>OSRM</strong> should provide even better instructions, especially in areas<br />
with many unnamed ways.<br />
When there is no name, the way type should be used to provide a<br />
more meaningful description, for example ”turn left on footpath”,<br />
instead of just ”turn left”.<br />
Multiple stretches of the same type should be combined when<br />
relevant, so the user don’t get a string of plain 'continue' instructions.<br />
Different wording could perhaps be used when you need to 'cross the<br />
bridge', 'pass through the tunnel' or 'cross the square.<br />
If a script-based tag parsing system is implemented, would it make<br />
sense that the script could also be used to customize the<br />
instructions? That way instruction could be modified different for<br />
each transport mode. This is just an idea.<br />
Multiple Profiles<br />
<strong>OSRM</strong> should provide a way of handling multiple profiles. We need to<br />
offer the user different modes, for example:<br />
Side 3 af 5
icycle: normal bicycle mode<br />
cargo bike: avoid narrow passages, steps, steep ramps/hills<br />
night: avoid parks and unlit streets, closed gates<br />
We can help develop the details of the profiles, but need <strong>OSRM</strong> to<br />
support multiple profiles in a practical way, without having to run<br />
multiple instances of osrm-routed.<br />
It should also be easy to reprocess the data for all profiles at the<br />
same time.<br />
Roadwork<br />
Some short-lived data doesn’t fit well in OSM, but could be very<br />
useful in routing. Roadwork is a good example. Events like<br />
marathons, street parties are also relevant.<br />
Data would include start and end date/time, and probably some<br />
information about how it affects various traffic modes, like delay,<br />
detour, danger, etc.<br />
We can generate a data file with information about ongoing<br />
roadwork. Such data would probably be oriented towards day, rather<br />
than hours or real-time. The data will probably be located using<br />
street addresses.<br />
<strong>OSRM</strong> should be able to load this data and use it to adjust routing.<br />
We need to figure out suitable data formats etc.<br />
Perhaps some pre-processor could load the roadwork/events data,<br />
and add tags to the OSM data. For example, a way might be tagged<br />
with ’roadwork=yes, delay=20s’. The extractor could then handle<br />
those tags as needed.<br />
Another option might be that the tag parser would load the data and<br />
use it directly.<br />
Hills<br />
We have a detailed height model that we would like to be able to<br />
load into <strong>OSRM</strong>.<br />
How to use information about hills should be up to the new tag<br />
parser. For example, it might be more important for cargo bikes than<br />
for normal bikes, and only have a small effect on electric bikes (or<br />
cars).<br />
Side 4 af 5
Height data, roadwork, events, etc are all examples of non-osm data.<br />
It might be useful to consider some common infrastructure for<br />
handling such data.<br />
Squares<br />
Crossing squared could be more elegant. The current solution simply<br />
follows the edge of the square. It would be cool if <strong>OSRM</strong> was able to<br />
cut across squares in a more realistic fashion.<br />
This would probably require adding some number of artificial paths<br />
criss-crossing the square. Perhaps it would be possible to use<br />
standard geometric sub-division algorithms to find a good balance<br />
between number of paths added, and distance saved.<br />
Turn Penalties<br />
<strong>OSRM</strong> should be intelligent about turns. People prefer a route with<br />
fewer turns, and also prefer right turns over left turns (in countries<br />
with right-side driving). The sharper a turn is, the less attractive it is.<br />
Winding roads are slower than straight roads, even if they’re at the<br />
same length. Overall routes with fewer turns are easier to remember<br />
and follow, and are often faster.<br />
Hopefully we can get Copenhagen University involved in establishing<br />
a good model for this, but it still needs to be implemented into<br />
<strong>OSRM</strong>.<br />
We implemented a simple turn penalty formula, which seems to<br />
work quite well. We need to either have this merge into the master,<br />
or come up with something better.<br />
Side 5 af 5