3

I'm trying to use OSRM on my own map data (in OSM format)

I'm wondering which of the ~66k OSM attributes are relevant for this, and which are ignored by OSRM.

Is there a reference someone can point me to?

1

2 Answers 2

8

They all are.

OSRM's routing decisions are made by small scripts ("profiles") written in the Lua scripting language. These scripts take the OSM tags for a given way, and from that, calculate the speed and/or weighting for that way.

So, for example, you could write a script/profile that gave a better weighting to any way whose name included the word "Street", but penalised any which included "Road". It would be a bit arbitrary, but you could do it. :)

The OSRM repository comes with several such scripts/profiles out of the box, for car, foot, and bike use. The car profile prefers high-speed roads, while the foot profile is able to use footpaths and dislikes high-speed roads. These decisions are made by looking at OSM tags such as the highway tag.

But you're not limited to these three profiles. You can write your own. For example, I run https://cycle.travel/map, a bike routing service which uses many, many OSM tags to give what I hope are the best bike routes available. It doesn't use 66k tags, but it probably uses 66.

If you want to explore this more, I'd suggest starting off with one of the out-of-the-box profiles, then tweaking it little by little to get the results you need. For full details, see https://github.com/Project-OSRM/osrm-backend/blob/master/docs/profiles.md which explains how a Lua script interacts with OSRM to set these priorities.

3

If you're just interested in an overview of tags used by existing OSRM profiles, you can consult the Taginfo page for OSRM.

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.