Recently a friend of mine approached me with an interesting idea. Could we develop a directions API that would allow for legal routing of e-scooter journies using OSM data?

Enter the routing egines built on top of openstreetmap data -> openrouteservice, graphhopper, valhalla, etc.

So I settled on trying to modify the bike profiles of openrouteservice for our usecase

Note to future self - removing road from graph

Add the following to to remove primary and primary_link tagged highways from the generated routing graph for bikes.

// setHighwaySpeed("primary", 18);
// setHighwaySpeed("primary_link", 18);        

More to come as I learn more.