<div dir="ltr"><div><div>Take a look at the way function. This is a callback that is called from OSRM on every way:<br><a href="https://github.com/Project-OSRM/osrm-backend/blob/8f6fc0146ba76d34d20c5b7a87b75249bbb12b82/profiles/car.lua#L220">https://github.com/Project-OSRM/osrm-backend/blob/8f6fc0146ba76d34d20c5b7a87b75249bbb12b82/profiles/car.lua#L220</a><br><br></div>If you follow e.g. the highway variable through the code, you should get a rough sense of how filtering and settings speed values works.<br><br></div>Just in case you want to trace it back to where we dispatch based on the OSM type, this is the exact location where the callbacks are getting invoked:<br><a href="https://github.com/Project-OSRM/osrm-backend/blob/8f6fc0146ba76d34d20c5b7a87b75249bbb12b82/extractor/extractor.cpp#L198-L206">https://github.com/Project-OSRM/osrm-backend/blob/8f6fc0146ba76d34d20c5b7a87b75249bbb12b82/extractor/extractor.cpp#L198-L206</a><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 21, 2015 at 10:37 PM, Luc Van Linden <span dir="ltr"><<a href="mailto:luc.vanlinden@gmail.com" target="_blank">luc.vanlinden@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div>Hi Patrick<br><br></div>Thanks for your input.<br></div>The ambition as such is not to perform railway routing as such, just to get an understanding on how to take a class subset into account for profile.lua file.<br><br></div>In other words, suppose we only want to perform routing using the moterways only explicitly (thus have only the motorways in the graph).<br></div>What are actually the statements in the lua file which will select only those osm ways to be incorporated in the osrm graph?<br><br><br></div><div>tx<span class="HOEnZb"><font color="#888888"><br><br></font></span></div><span class="HOEnZb"><font color="#888888"><div>Luc<br></div><div><br><br><div><br><br><br></div></div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 21, 2015 at 10:20 PM, Patrick Niklaus <span dir="ltr"><<a href="mailto:patrick.niklaus@student.kit.edu" target="_blank">patrick.niklaus@student.kit.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">That profile is very much outdated. Note the year of the post: 2013.<br>
<br>
Try to copy the current car.lua and strip it down. You should be able<br>
to adapt this profile easily. That said: OSRM is _really_ not suited<br>
for railway routing:<br>
<br>
1. We don't support time table based routing (e.g. there is not 'time'<br>
in OSRMs data model)<br>
2. There is nothing stoping OSRM from computing impossible train<br>
connections that require changing the train 10 times<br>
3. For good train routing you would want to integrate multi-modal<br>
routing (e.g. connect train stations by foot paths) which is also<br>
hard with OSRM<br>
<div><div><br>
<br>
<br>
On Mon, Sep 21, 2015 at 6:32 PM, Luc Van Linden <<a href="mailto:luc.vanlinden@gmail.com" target="_blank">luc.vanlinden@gmail.com</a>> wrote:<br>
> Hi<br>
><br>
> We have been trying to test OSRM on the railway lines in Belgium. (on<br>
> windows using the windows binary builds)<br>
><br>
> The full belgian osm file works with the standard profile.lua (car<br>
> profile). We can run extract, prepare and run.<br>
><br>
> When we try to use a railway profile, osrm.extract stops working.<br>
><br>
> We have used the following thread without succes:<br>
><br>
> <a href="https://www.mail-archive.com/osrm-talk@openstreetmap.org/msg00320.html" rel="noreferrer" target="_blank">https://www.mail-archive.com/osrm-talk@openstreetmap.org/msg00320.html</a><br>
><br>
> So not clear if we have sufficient things covered in the lua file for the<br>
> extract.<br>
><br>
> tx<br>
><br>
><br>
> Luc<br>
><br>
</div></div>> _______________________________________________<br>
> OSRM-talk mailing list<br>
> <a href="mailto:OSRM-talk@openstreetmap.org" target="_blank">OSRM-talk@openstreetmap.org</a><br>
> <a href="https://lists.openstreetmap.org/listinfo/osrm-talk" rel="noreferrer" target="_blank">https://lists.openstreetmap.org/listinfo/osrm-talk</a><br>
><br>
<br>
_______________________________________________<br>
OSRM-talk mailing list<br>
<a href="mailto:OSRM-talk@openstreetmap.org" target="_blank">OSRM-talk@openstreetmap.org</a><br>
<a href="https://lists.openstreetmap.org/listinfo/osrm-talk" rel="noreferrer" target="_blank">https://lists.openstreetmap.org/listinfo/osrm-talk</a><br>
</blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
OSRM-talk mailing list<br>
<a href="mailto:OSRM-talk@openstreetmap.org">OSRM-talk@openstreetmap.org</a><br>
<a href="https://lists.openstreetmap.org/listinfo/osrm-talk" rel="noreferrer" target="_blank">https://lists.openstreetmap.org/listinfo/osrm-talk</a><br>
<br></blockquote></div><br></div>