-
Notifications
You must be signed in to change notification settings - Fork 86
Description
This has been taken upstream from ipeaGIT/r5r#512
Currently one can adjust road speeds through passing into R5 a table of osm_id and max_speed variables to override the PBF data. However, suppose you had average speed data that differed by direction, which is generally the case when, for instance, there is a signaled junction only at one end of a road. It would be useful in this case to be able to assign a different speed depending on which direction one is traveling down that road.
I can see that implementing this would not be straightforward, as there is no standardised polarity and osm_id is one-to-many. A possible workaround would be to introduce a standardised polarity, for instance by asserting that the southern end is the 'start' (or western if they are on equal latitudes), allowing one to compute the same polarity on the external speed dataset and match accordingly (although the issue of loops would have to be addressed). An alternative would of course be if R5 could read tagged directional average speeds directly from the PBF, as it currently does with maximum speeds, as well as conditional average speeds broken down by time of day.
For reference, I am suggesting this because the UK's national mapping authority Ordnance Survey provides a detailed street network in PBF format that follows the OSM schema which is compatible with R5. This includes both "forward" and "backward" average speeds at different times of day, which I have been extracting from the GeoPackage to feed into R5. I have thus far been using the average of the forward and backward speeds for each street, so the results would be improved if speeds could be assigned directionally.