GIScience / openrouteservice

🌍 The open source route planner api with plenty of features.
https://openrouteservice.org
GNU General Public License v3.0
1.43k stars 393 forks source link

Ability to derive osmids and tag information from extra_info (extended storages) #371

Open TimMcCauley opened 5 years ago

rabidllama commented 5 years ago

what do you mean by "tag information"? Storing the osm id can be done easily as there is already the osmid extended storage that just needs a bit of modification to optimise storage size, and then that id could be used by a client to get tag data from osm itself. The issue there however would be if the data is changed on osm after the graph has been built, there will be a difference between osm data and that used in the graph

TimMcCauley commented 5 years ago

The idea was that the user would maybe like to see the osm_id(s) of a tollway and what kind of tollway it is.

rabidllama commented 5 years ago

well the id thing should be relatively straightforward. providing the type of tollway may take a bit longer though as currently it just returns whether it is a tollway or not, and so the return vlaues would need changing to represent the different types. It seems that the info is stored in the extended storage though

nilsnolde commented 5 years ago

Do we really need that extra info of individual attributes? I feel like OSM ID is sufficient to derive all relevant attributes from that segment.

aoles commented 5 years ago

It seems that the info is stored in the extended storage though

That's correct, the different types of tollways are stored according to TollwayType. These values are then matched against the routing request such that only tollway information relevant to a given profile is returned. So in a sense it is not really necessary to return additional tollway type details. @TimMcCauley could you maybe clarify what use case you had in mind?

TimMcCauley commented 5 years ago

@aoles even if they are matched towards the request, a user may want to see what types of tollways they are.

Use case: As a logistics planner using my own maps I want to visualise the toll road according to its toll way type, e.g. https://wiki.openstreetmap.org/wiki/Talk:Key:toll / https://wiki.openstreetmap.org/wiki/DE:Key:toll

aoles commented 5 years ago

Thanks @TimMcCauley! We could then return the TollwayType id instead of a binary tollway flag as it is now. This should be relatively easy to implement both at the backend side, as well as in the app. Feel free to open a dedicated issue if you think this idea makes sense.

TimMcCauley commented 5 years ago

Yup, sounds like a reasonable approach - low priority though.