GeoJSON to OpenDRIVE (G2O)¶
The GeoJSON to OpenDRIVE (GeoJSON2ODR / G2O) pipeline converts a supported road-network GeoJSON into an ASAM OpenDRIVE (.xodr) map that can be opened, edited, validated, and exported in RepliMap.
The pipeline accepts road-network GeoJSON containing the road geometry and metadata required to reconstruct an OpenDRIVE road network.
Note
The GeoJSON2ODR pipeline currently converts road geometry only. Road and lane attributes such as speed limits, road markings, road objects, traffic signs, traffic lights, and other road properties are not included in the generated OpenDRIVE map.
How to Run the G2O Conversion Pipeline in RepliMap¶
Follow these steps to convert a supported road-network GeoJSON into an ASAM OpenDRIVE (.xodr) map.
Note
The GeoJSON2ODR pipeline currently supports road-network GeoJSON that uses the WGS 84 (EPSG:4326) Coordinate Reference System (CRS).
-
Open the G2O Import panel: Use either of the following methods:
Option 1 - File → Import → GeoJSON to OpenDRIVE (G2O)
Option 2 - Reference Data → GeoJSON to OpenDRIVE (G2O)
-
Select the input GeoJSON: Browse to and select the road-network GeoJSON to convert.
-
Choose the output folder: Select the folder where the generated files will be saved.
-
Start the conversion: Click Convert.
-
Review the output: After the conversion completes, the output folder contains:
- The generated ASAM OpenDRIVE (
.xodr) file. - A pipeline log file containing conversion details.
- The generated ASAM OpenDRIVE (
Output files
| File | Description |
|---|---|
| odr_map.xodr | The generated ASAM OpenDRIVE map. |
| pipeline.log | Complete conversion record containing the conversion steps, processing messages, warnings, and output information. |
| WarningLog.log | Contains conversion warnings, including roads that were skipped because of geometry or lane-related issues. |
| AtlasDrive_internal.json | An intermediate file generated during the conversion process and used internally to generate the final OpenDRIVE map. |
-
Verify the generated map: The generated OpenDRIVE map and the imported GeoJSON are displayed on the RepliMap canvas.
Use the visibility toggles in the G2O Visualization panel to compare the datasets.
Toggle Description GeoJSON Visibility Shows or hides the imported GeoJSON. XODR Visibility Shows or hides the generated OpenDRIVE map. These toggles help you visually compare the generated OpenDRIVE map with the original GeoJSON.
G2O Visualization panel

G2O Console¶
The G2O section in the Console (bottom panel) displays the complete conversion log, including the conversion steps, processing messages, warnings, errors, and the input/output paths.
The console log can also be exported for future reference or troubleshooting.
Configure the G2O Pipeline for Your Custom GeoJSON¶
Different GeoJSON datasets may use different property names and structures. Before converting your own GeoJSON, you may need to configure the GeoJSON2ODR pipeline so that it can correctly interpret your dataset.
The configuration files are located in:
<RepliMap Installation Folder>
└── RepliMap_Data
└── StreamingAssets
└── geojson2odr
├── geojson2odr.exe
├── config
│ ├── mapping.json
│ ├── settings.json
│ ├── advanced.json
│ └── README.md
└── output
Before making any changes, it is recommended to create a backup of the configuration files.
Configuration files
| Configuration File | Purpose |
|---|---|
| mapping.json | Maps the properties in your GeoJSON to the fields expected by the GeoJSON2ODR pipeline. This is the primary configuration file and the one you will modify most frequently. |
| settings.json | Contains optional pipeline settings that control the conversion behavior. In most cases, the default settings can be used. |
| advanced.json | Contains advanced conversion and geometry settings. Most users do not need to modify this file. |
Configure mapping.json¶
The mapping.json file tells the GeoJSON2ODR pipeline how to interpret the properties in your GeoJSON. When using a new road-network GeoJSON, this is the configuration file you will update most frequently.
Open your GeoJSON in a text editor and compare its property names with those defined in mapping.json. Update the mapping wherever the property names or values do not match your dataset.
The mapping.json file is divided into several sections, each responsible for mapping a specific type of road information.
mapping.json sections
| Section | Purpose |
|---|---|
| how_features_are_typed | Defines which GeoJSON property identifies the feature type (for example, road boundary, reference line, or lane). |
| roads | Maps the road identifier and other road-related properties. |
| boundaries | Maps lane boundaries and the properties that identify the left and right sides of the road. |
| reference_lines | Maps the road reference (center) lines. |
| lanes | Maps lane-related properties, including lane identifiers and lane boundaries. |
| lane_links | Maps lane-to-lane connection information. |
| road_links | Maps road-to-road connection information. |
| road_edges | Maps road edge information, when available. |
| markings | Maps road-marking properties, if present. |
| speed | Maps speed-related properties, if available. |
Warning
When updating mapping.json, make sure that:
- The road identifier matches the property used in your GeoJSON.
- The feature type values match those used in your GeoJSON.
- The left and right lane boundary properties are mapped correctly.
- Any optional lane or connection properties are mapped if they are available in your GeoJSON.
Once the mapping has been updated, save the file and run the GeoJSON2ODR pipeline.
Run the GeoJSON2ODR Pipeline from Command Prompt¶
After updating the mapping.json file, you can run the GeoJSON2ODR pipeline from the Command Prompt.
-
Open the GeoJSON2ODR folder: Navigate to:
<RepliMap Installation Folder> └── RepliMap_Data └── StreamingAssets └── geojson2odr -
Open Command Prompt: Click on the address bar, type
cmd, and press Enter.A Command Prompt window opens in the
geojson2odrdirectory. -
Run the conversion command:
geojson2odr geojson-to-here --config-dir "<Path to your mapping.json file>" --input "<Path to input GeoJSON>" --output "<Output folder>" -
Review the output: After the command completes successfully, the output folder contains:
- The generated ASAM OpenDRIVE (
.xodr) file. - A pipeline log file containing conversion details.
- The generated ASAM OpenDRIVE (
Output files
| File | Description |
|---|---|
| odr_map.xodr | The generated ASAM OpenDRIVE map. |
| pipeline.log | Complete conversion record containing all processing steps, progress, warnings, and output information. |
| WarningLog.log | Contains conversion warnings and roads that were skipped because of geometry or lane-related issues. |
| AtlasDrive_internal.json | Intermediate file generated during the conversion process and used internally to create the final OpenDRIVE map. |
The generated odr_map.xodr can be opened directly in RepliMap for further editing, validation, and export.
Note
Road-network GeoJSON generated by the HERE HD to XODR (H2O) pipeline is an example of a supported input format.
Related¶
- Data sources overview — where the pipeline sits in the reference-data workflow.
- GeoJSON — GeoJSON reference data and import workflows.
- HERE HD to XODR (H2O) — HERE HD Live Maps conversion pipeline.
- Road tool — refining the generated map after import.