Skip to content

Import an OpenDRIVE (.xodr) file

drawtonomy reads ASAM OpenDRIVE .xodr road networks. It evaluates the analytical geometry (lines, arcs, spirals, and polynomials), samples each lane into editable Lane shapes, and preserves lane connectivity so you can edit a road network visually and export it back to OpenDRIVE.

Importing an OpenDRIVE .xodr file, then editing and re-exporting it.
  1. Open the File menu → Import.
  2. Pick the .xodr file.
  3. drawtonomy parses the road network and shows a preview map so you can choose which roads to bring in.

The importer accepts OpenDRIVE up to 1.8 and reads the geoReference header when present, so imported roads line up with the map background at their real-world location.

Like the Lanelet2 importer, .xodr import runs through a selection preview rather than dumping the whole file onto the canvas:

  1. After picking the .xodr file, drawtonomy shows a preview of every road.
  2. Click or drag to select the roads you want to edit.
  3. Click Import selection.

Bringing in only the region you need keeps the editor responsive on large networks — see the performance tips below.

OpenDRIVE featureOn import
Road reference lines (line, arc, spiral, poly3, paramPoly3)Evaluated and sampled into polyline geometry
Lane sections and lane widthsBecome Lane shapes with shared boundary linestrings
Lane successor / predecessor linksPreserved as Next / Previous lane connections
JunctionsConnecting roads import as lanes; junction areas render as intersection polygons
Dynamic <signal> (traffic lights)Become editable traffic-light shapes linked to the lanes the <validity> covers
Static <signal> (traffic signs, speed limits)Become editable sign records linked to the lanes they govern; the full attribute set is preserved in user data
geoReferenceSets the scene origin so the map background aligns

3D detail (elevation, banking) is flattened on import — drawtonomy’s canvas is 2D — but the original .xodr is retained for round-trip, so untouched 3D information is re-emitted verbatim on export. Any flattened or ignored features are logged to the browser console under [OpenDRIVE import].

drawtonomy keeps the original .xodr XML as a sidecar when you import. On export, roads you didn’t touch are re-emitted from that source verbatim, so their analytical geometry (clothoids, polynomials) is preserved exactly rather than re-fitted from sampled points. Roads you edited are re-fitted to OpenDRIVE geometry. This carry-through is what makes the import → edit → export loop a high-fidelity round-trip (verified in esmini 3.3.0).

drawtonomy handles large road networks, so you can import a whole .xodr when you need to. When you only care about a section, though, importing just the roads you need keeps the editor snappiest and avoids loading geometry you won’t edit.