netbuild stores a representation of the road graph (edges/nodes/...) and offers classes and methods for transferring this representation into loadable sumo networks.
The internal representation is meant to be filled by classes from the Netimport or Netgen modules.
The process of building networks is encapsulated in NBNetBuilder::compute(). Here, the following steps are performed:
- Removing self loops
Removes edges which end at the node they start at using NBNodeCont::removeSelfLoops().
- Joining double connections
Joins edges between same nodes using NBNodeCont::recheckEdges().
- Finding isolated roads (optional)
- Removing empty nodes and geometry nodes (optional)
Removed nodes with no incoming/outgoing edges and nodes which can be transformed into geometry point using NBNodeCont::removeUnwishedNodes().
- Removing unwished edges (optional)
If "keep-edges.postload" and "keep-edges.explicit" are set, the edges not within "keep-edges.explicit" are removed from the network using NBEdgeCont::removeUnwishedEdges().
- Rechecking nodes after edge removal (optional)
If any of the edge removing options was set ("keep-edges.explicit", "remove-edges.explicit", "keep-edges.postload", "keep-edges.by-vclass", "keep-edges.input-file"), the now orphaned nodes are removed using NBNodeCont::removeUnwishedNodes().
- Splitting geometry edges (optional)
If "geometry.split" is set, edge geometries are converted to nodes using NBEdgeCont::splitGeometry().
- Normalising/transposing node positions
If "offset.disable-normalization", "offset.x", and "offset.y" are not set, the road graph's instances are moved to the origin.
- Guessing and setting on-/off-ramps
- Guessing and setting TLs
- Computing turning directions
- Sorting nodes' edges
- Guessing and setting roundabouts
- Computing Approached Edges
- Computing Approaching Lanes
- Dividing of Lanes on Approached Lanes
- Appending Turnarounds (optional)
- Rechecking of lane endings
- Computing node shapes
- Computing edge shapes
- Computing tls logics
- Computing node logics
Computing traffic light logics
- Todo:
Removing unwished edges: Recheck whether this can be done during loading - whether this option/step is really needed.
Finding isolated roads: Describe
- Bug:
- Removing empty nodes and geometry nodes: Ok, empty nodes should be removed, uh? But this is only done if "geometry.remove" is set.