Algorithem to split ways in street elements

Hello osm community,

I’m really new to osm software development. Since days I try to develop an algorithem, that provides me a new kind of osm element - I call it a “street element”. What I want to have is an element with an ID that contains a poliline between two crossings or a endpoint and a crossing. I assume that somebody else did already developed such an algorithem. Can somebody give me a hint?

Best regards

What you’re describing is commonly called a “routing graph”. A quick Googling will lead you to many implementations of this, such as those used by route-planning software such as OSRM or Graphhopper.