OpenStreetMap logo OpenStreetMap

Simplifying Route Mapping

Posted by WilliamHarrison on 9 August 2025 in English.

Hello!
I’ve been mapping in OpenStreetMap for a few years now, and I believe the current method of mapping routes is quite painful and wastes hours of editors’ times to just upkeep it, So, here is my idea on how we could fix it.


The Idea

In essence, it is to have just one start node and one end node, the router (using the bus profile) then calculates the route deterministically, with additional points in between added only as needed to achieve the desired path.

For example, in the case above, the route can be simplified from 123 ways down to just 5 nodes representing the path. (In reality there would be nodes at every station, so it wouldn’t be as few as 5)

This approach is;

  • Resilient to edits,

  • So many times easier to maintain.

Demonstration image showing 5 nodes representing a bus route. I’ve compiled Valhalla on Linux and created a quick proof of concept program showing this can already be implemented (unofficially) in custom code.

While I won’t be able to design / decide on everything, I can answer some questions about some basic concerns;

Q: How would the server know when to recalculate relations?
A: From the editors, the editor only shows the points to edit, but the underlying data is made up of the calculated ways included in the relation. Since these are the same ways being visualized, if any of them are edited, the server can recalculate the ways from the points, the editor can later validate the changes.

Q: How would existing relations be converted to this format?
A: The minimal set of points required to represent the desired shape can be calculated automatically.

Q: Every relation?
A: No, just those the community decides to convert to this format.


Relations have been annoying me (and probably thousands of others) for years, feel free to discuss other solutions below, this is what I came up with.

If you have any concerns about why this could be a bad idea, let me know and I am open to criticism.

Email icon Bluesky Icon Facebook Icon LinkedIn Icon Mastodon Icon Telegram Icon X Icon

Discussion

Comment from TheSwavu on 10 August 2025 at 00:19

You may want to read: osm.wiki/Proposal:Simpler_public_transport_route_relations and the various push backs on the tagging list https://lists.openstreetmap.org/pipermail/tagging/2020-March/051442.html. Which I would mischievously sum up as “it’s too hard for the data consumer and may not be 100% correct, therefore the mapper should be forced to do all the work”.

Comment from WilliamHarrison on 10 August 2025 at 08:01

@TheSwavu In the system I described, there is no difference for the data consumer as it does not need any more processing, it would be saved in a format like how it is right now (a list of ways materialized from the router). Using a deterministic router (only one, Valhalla for ex.), mappers can easily get accurate routes and nearly all of the time it is much more accurate throughout.

So in the end, it’s just a materializer for the current way of doing relations with ways, except editors only see the nodes (and path) to edit.

Comment from TheSwavu on 10 August 2025 at 11:12

OK, so like OSM Relatify?

Log in to leave a comment