SUMO Road Networks and Patching

netconvert allows a round-trip reimport of generated SUMO road networks. Use the option --sumo-net-file <FILE> for reading a SUMO road network, the shorter options --sumo-net <FILE> and --sumo <FILE> are synonymes. An example call:

netconvert --sumo-net-file -o

If your original network has been generated with the same SUMO version, both the read network ("") and the generated one ("") should be same besides the meta-information in the XML header. Please note that this is also a simple way to update your SUMO network from an earlier version although it is usually more advisable to regenerate the network from the original data.


Re-importing SUMO networks allows you to apply changes to an existing road network using additional XML-files. An example would be patching the type of a node.

prepare a file like this: patch.nod.xml :

    <node id="id_of_the_node_you_want_to_modify" type="right_before_left"/>

and patch the network like this:

netconvert --sumo-net-file --node-files patch.nod.xml -o

Patching in stages#

Most of the time you will want to modify your SUMO network after the initial import. To do so you can of course edit the file directly with netedit and store the changed network. If you want to track your changes however and maybe reapply them when your input changes (for instance an update from OpenStreetMap) you should save them as patch files.

Those patches can be genereated automatically with

Since you might have enabled settings like junction joining or removal of geometry nodes, those patch files may not be applicable directly on the import of the raw data but will need a second call to netconvert. You can sometimes to avoid this second step (see the linked explanations to netdiff) but in the following situations it is probably unavoidable:

  • correction of merged tram and road edges together with analysis of railway topology (ptline-output)