Is there any tag to find out the road / highway / route type in the RouteStep OSRM object?

Context : I am asking OSRM to return a route between two coordinates. It returns me the requested route along with parts (steps) with route instructions (Array of RouteStep bjects in version 5).

http://project-osrm.org/docs/v5.6.4/api/#route-object

I want to . I want to know if there is a way to find out the type of road for any particular route, be it a motorway, highway, one track, etc.

Any advantage is appreciated.

+3


source to share


2 answers


This information is not stored outside the initial preprocessing stage. The hack I've seen for this is some people use to encode additional information in the street name.

To do this, you will need to change profiles/car.lua

(for example) and something like:



result.name = "{highway: \"" .. data.highway .. "\", name:\"" .. result.name .. "\"}"

(disclaimer: I didn't execute this line in lua).

0


source


The object Annotation

has OSM node IDs, but unfortunately no path IDs. You can get these nodes and determine what identifiers they belong to. This method contains the tags that interest you. Unfortunately, this is not very possible as it will require many individual requests.



0


source







All Articles