Exporting to GeoJSON

RoadRunner can export scenes to a GeoJSON file format. This format is meant to complement the OpenDRIVE® file format and fill in some of its missing data, but it can also be used on its own.

GeoJSON Export

From the menu, select File > Export > GeoJSON (.geojson).

Export Options

Set the file destination and click Export.

GeoJSON Details

The MathWorks® version of the GeoJSON format is a collection of lanes, lane boundaries, junctions, gates, crosswalks, and signals.

This code shows a sample GeoJSON file.

'#' are double values compliant with JSON
{
     "features": [{  
         "geometry": {    
             "coordinates": [[#,#,#], ...],    
             "type": "LineString"   
          },
          "properties": {    
              "Id": 1,    
              "LaneType": "Curb",    
              "LeftBoundary": {     
                  "Dir": "Forward",     
                  "Id": 0
              },   
              "Predecessors": [{      
                  "Dir": "Forward",     
                  "Id": 4
              } ],    
              "RightBoundary": {     
                  "Dir": "Forward",     
                  "Id": 5
               },    
              "Successors": [{      
                  "Dir": "Backward",      
                  "Id": 6
              }],    
              "TravelDir": "Undirected",    
              "Type": "Lane"   
          },   
          "type": "Feature"  
      },
      {
         "geometry": { 
             "coordinates": [[#,#,#], ...], 
             "type": "LineString" 
         }, 
         "properties": { 
             "Id": 0, 
             "LeftLane": { 
                 "Dir": "Forward", 
                 "Id": 1
             }, 
             "RightLane": { 
                 "Dir": "Forward", 
                 "Id": 2
             },
             "Type": "LaneBoundary" 
         }, 
        "type": "Feature" 
    },
    {
        "geometry": {
              "coordiantes": [[[[#,#,#], …], …], …],
              "type": "MultiPolygon"
        },
        "properties: {
              "Id": 12,
              "Type": "Junction",
              "Gates": [{"Id": 775}, …],
              "Lanes": [{"Id": 52}, …],
              "Phases": [
                  "Phases": [{
                      "Intervals": [{
                          "BulbStates": [{"Id":0, "On": false, "SignalId": 767}, …],
                          "GateStates": [{"Id": 775, "State": "StopYield"}, …]
                      }]
                  }]
              ]
        },
        "type": "Feature"
    },
    {
        "geometry": {
            "coordinates": [[#,#,#], …],
            "type": "LineString"
        },
        "properties": {
            "Id": 775,
            "Lane": {"Id": 233"},
            "Signals": [{"Id":771}, …],
            "Type": "Gate"
        },
        "type": "Feature"
    },
    {
        "geometry": {
            "coordinates": [[[#,#,#], …], …],
            "type": "Polygon"
        },
        "properties": {
            "Id": 763,
            "Bulbs": [
				{
					"Point": [#,#,#],
					"Name": "LeftTurnRed", 
					"NodeName": "light_red"
				},
				…
			],
            "Name": "PathToFile.fbx",
            "SignalType": "Signal",
            "Type": "Signal"
        },
        "type": "Feature"
    }]
}