Skip to main content

Hallo guys!

I want to transform/convert an OSM file to an OpenDRIVE file. So my question is if anyone have some informations for me how that's possible and which steps are needed for. I also tried it with "GIP" data. My main problem is i have no idea how to add attributes or to get an OSM data into a structured OpenDRIVE file. Thats my first time with FME so i have no Idea how that should work.

Hi @rolandpilsinger, Unfortunately, I don't believe we have the capability to write out OpenDrive files yet. There had been a few users showing interest in this format, so we have an Idea here, tracking the interests. It would really help us, if you could add your vote to that idea. Thank you very much!


@rolandpilsinger Hi, I may be 2 years late, but I managed to solve this problem 1 year ago during my master study in Germany, basically the OSM data are GPS points while OD are basic shapes like Line, Clothoids, arcs stitched together, the trick is to extract the GPS points from OSM by the means of xml schema (available online) then project these points on an XY plane where, so you convert your coordinate system from lat, long to x,y

 

 

Next Step is to calculate the road heading (some call it curvature), this is a well known mathematical equation to find the heading of a series of xy points, so when you finish you got a curvature for each point on your road.

 

 

Next is to understand that arcs have a constant curvature (constant change in heading) while lines have 0 change in heading, Clothoids have a liner change in heading so by recording the curvatures on each point you can no exactly which segments on the OSM Road are lines, arcs or clothoids.

 

 

Take care that you need to make the points where two roads meet have the same curvature value or you will produce very sharp edges at these points when stitching the roads together (continuity problem).

 

 

after that you just load OD xml schema in your code and the output from last step will populate this schema one by one, in other words, you take the OSM road, scan it for its underlying shapes and then export these shapes to the empty OD schema to populate it, you will use the xy coordinates too as they are required by OD, this method has some limitations, as it cannot produce height profiles, but it should produce acceptable conversion if all what you need is a top view of the map.

 

 

I got some of the code I used in my Github profile so if you want you can take a look.

 

 

I hope I helped a bit 2 years later 😃

Reply