[OSRM-talk] osrm rail extract & lua content

Daniel Hofmann hofmann at mapbox.com
Wed Sep 23 14:55:20 UTC 2015


Take a look at the way function. This is a callback that is called from
OSRM on every way:
https://github.com/Project-OSRM/osrm-backend/blob/8f6fc0146ba76d34d20c5b7a87b75249bbb12b82/profiles/car.lua#L220

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.

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:
https://github.com/Project-OSRM/osrm-backend/blob/8f6fc0146ba76d34d20c5b7a87b75249bbb12b82/extractor/extractor.cpp#L198-L206

On Mon, Sep 21, 2015 at 10:37 PM, Luc Van Linden <luc.vanlinden at gmail.com>
wrote:

> Hi Patrick
>
> Thanks for your input.
> 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.
>
> In other words, suppose we only want to perform routing using the
> moterways only explicitly (thus have only the motorways in the graph).
> What are actually the statements in the lua file which will select only
> those osm ways to be incorporated in the osrm graph?
>
>
> tx
>
> Luc
>
>
>
>
>
>
> On Mon, Sep 21, 2015 at 10:20 PM, Patrick Niklaus <
> patrick.niklaus at student.kit.edu> wrote:
>
>> That profile is very much outdated. Note the year of the post: 2013.
>>
>> Try to copy the current car.lua and strip it down. You should be able
>> to adapt this profile easily. That said: OSRM is _really_ not suited
>> for railway routing:
>>
>> 1. We don't support time table based routing (e.g. there is not 'time'
>> in OSRMs data model)
>> 2. There is nothing stoping OSRM from computing impossible train
>> connections that require changing the train 10 times
>> 3. For good train routing you would want to integrate multi-modal
>> routing (e.g. connect  train stations by foot paths) which is also
>> hard with OSRM
>>
>>
>>
>> On Mon, Sep 21, 2015 at 6:32 PM, Luc Van Linden <luc.vanlinden at gmail.com>
>> wrote:
>> > Hi
>> >
>> > We have been trying to test OSRM on the railway lines in Belgium. (on
>> > windows using the windows binary builds)
>> >
>> > The full belgian osm file works with the standard profile.lua  (car
>> > profile). We can run extract, prepare and run.
>> >
>> > When we try to use a railway profile, osrm.extract stops working.
>> >
>> > We have used the following thread without succes:
>> >
>> > https://www.mail-archive.com/osrm-talk@openstreetmap.org/msg00320.html
>> >
>> > So not clear if we have sufficient things covered in the lua file for
>> the
>> > extract.
>> >
>> > tx
>> >
>> >
>> > Luc
>> >
>> > _______________________________________________
>> > OSRM-talk mailing list
>> > OSRM-talk at openstreetmap.org
>> > https://lists.openstreetmap.org/listinfo/osrm-talk
>> >
>>
>> _______________________________________________
>> OSRM-talk mailing list
>> OSRM-talk at openstreetmap.org
>> https://lists.openstreetmap.org/listinfo/osrm-talk
>>
>
>
> _______________________________________________
> OSRM-talk mailing list
> OSRM-talk at openstreetmap.org
> https://lists.openstreetmap.org/listinfo/osrm-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/osrm-talk/attachments/20150923/5d84a629/attachment.html>


More information about the OSRM-talk mailing list