Skip to content

Conversation

@mark-idleman
Copy link

@mark-idleman mark-idleman commented Aug 29, 2025

Background

https://replicahq.slack.com/archives/C02H69K05EJ/p1753902112837709

Several cases have come up over the years where customers have noticed odd speeds in the speeds column of our network link export tables, which is meant to loosely reflect real-world speed limits of network links based on OSM attributes. One of the main issues with the column is that OSM Ways with the maxspeed tag explicitly present - which is supposed to represent an exact marked speed limit on the road - don't have that maxspeed value reflected in the speed column of the street export table (most larger/more important roads - the one customers care about the most - are tagged with maxspeed).

The reason for this discrepancy is the way Graphhopper deals with speeds internally. It parses the maxspeed tag directly, but also calculates an "average" speed for every link, which scales down explicit maxspeed values by a factor of 0.9 and fills in speeds for any links without the tag present using highway-based default speeds. We've been using this average speed to fill in the speed column of the network link export, resulting in confusion as to why most larger roads seem to have strangely-scaled speed values.

Changes

Other (future?) approaches

While looking into fixes for this issue, I also investigated several other approaches we could take to improve the accuracy of the speed column. I decided against implementing any of these approaches in this round of changes, as they each have potential downsides that we might want to consider further:

Testing

charlie

@mark-idleman mark-idleman changed the title Output proper speeds in street export when OSM maxspeed tag is present; introduce km/h speed column Respect speed limits on roads marked with OSM maxspeed tag in street export; introduce km/h speed column Aug 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants