GIScience / openrouteservice

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

Include OSM data version in the API response #1192

Open aoles opened 2 years ago

aoles commented 2 years ago

It would be helpful if the metadata section of the geoJSON API response would include, apart from the ORS graph build date in graph_data, also information on the OSM data version on which a given build is actually based on.

image

koebi commented 2 years ago

this seems related to #925 and the corresponding PR #927

aoles commented 2 years ago

Thanks @koebi ! The snapshot date of the OSM file is a different thing than the date on which it is being imported and parsed by ORS and when the graphs are being created. The former one for example is useful to determine whether a given change in OSM is expected to be reflected in ORS, the latter one makes difference when it comes to e.g. seasonal road closures. Only recently questions relating to these tow separate issues came up the forum: https://ask.openrouteservice.org/t/how-can-i-apply-my-paths-to-the-directions-service-with-the-openstreetmap-web-editor/3970 and https://ask.openrouteservice.org/t/disable-winter-restriction/224/14, respectively. Therefore I would argue that we should include both the OSM snapshot date and ORS import/build date.

koebi commented 2 years ago

Apparently, the planet.pbf has a timestamp. This would have to be checked, or the date of the latest change set could be used if it's not in the metadata.

Either way, this seems to be a bit more involved and not something that will happen soon.