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.
Import a file
Section titled “Import a file”- Open the File menu → Import.
- Pick the
.xodrfile. - 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.
Import only specific roads
Section titled “Import only specific roads”Like the Lanelet2 importer, .xodr import runs
through a selection preview rather than dumping the whole file onto the canvas:
- After picking the
.xodrfile, drawtonomy shows a preview of every road. - Click or drag to select the roads you want to edit.
- Click Import selection.
Bringing in only the region you need keeps the editor responsive on large networks — see the performance tips below.
What gets converted
Section titled “What gets converted”| OpenDRIVE feature | On import |
|---|---|
Road reference lines (line, arc, spiral, poly3, paramPoly3) | Evaluated and sampled into polyline geometry |
| Lane sections and lane widths | Become Lane shapes with shared boundary linestrings |
| Lane successor / predecessor links | Preserved as Next / Previous lane connections |
| Junctions | Connecting 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 |
geoReference | Sets 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].
Round-trip back to OpenDRIVE
Section titled “Round-trip back to OpenDRIVE”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).
Performance tips
Section titled “Performance tips”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.
See also
Section titled “See also”- What is OpenDRIVE? — the format and where drawtonomy fits.
- Editing OpenDRIVE maps in the browser — when this fits, and when to reach for RoadRunner instead.
- Import a Lanelet2 (.osm) file — the same workflow for Lanelet2 maps.
- Export to OpenDRIVE / OpenSCENARIO / esmini — write the scene back out.
- Convert between OpenDRIVE and Lanelet2 — use drawtonomy as a bridge.
- Compare: drawtonomy vs RoadRunner · vs odrviewer.io