109 NBEdge*
retrieve(
const std::string&
id,
bool retrieveExtracted =
false)
const;
171 std::map<std::string, NBEdge*>::const_iterator
begin()
const {
178 std::map<std::string, NBEdge*>::const_iterator
end()
const {
256 const std::string& firstEdgeName,
const std::string& secondEdgeName,
257 int noLanesFirstEdge,
int noLanesSecondEdge,
258 const double speed = -1.,
const double friction = 1.,
const int changedLeft = 0);
276 const std::string& firstEdgeName,
const std::string& secondEdgeName,
277 int noLanesFirstEdge,
int noLanesSecondEdge,
278 const double speed = -1.,
const double friction = 1.,
const int changedLeft = 0);
300 const std::pair<NBEdge*, NBEdge*>*
getSplit(
const NBEdge*
const origEdge)
const {
305 return &
split->second;
348 void checkGeometries(
const double maxAngle,
bool fixAngle,
const double minRadius,
bool fix,
bool fixRailways,
bool silent =
false);
402 void appendTurnarounds(
bool noTLSControlled,
bool noFringe,
bool onlyDeadends,
bool onlyTurnlane,
bool noGeometryLike);
515 void addPostProcessConnection(
const std::string& from,
int fromLane,
const std::string& to,
int toLane,
bool mayDefinitelyPass,
516 KeepClear keepClear,
double contPos,
double visibility,
517 double speed,
double friction,
double length,
522 bool indirectLeft =
false,
523 const std::string& edgeType =
"",
572 void checkOverlap(
double threshold,
double zThreshold)
const;
604 void addPrefix(
const std::string& prefix);
644 bool mayDefinitelyPass_,
KeepClear keepClear_,
double contPos_,
double visibility_,
double speed_,
645 double friction_,
double length_,
651 const std::string& edgeType_,
728 bool operator()(
const std::pair<NBEdge*, int>& a,
const std::pair<NBEdge*, int>& b)
const;
std::vector< std::string > & split(const std::string &s, char delim, std::vector< std::string > &elems)
std::set< NBEdge * > EdgeSet
container for unique edges
std::vector< NBEdge * > EdgeVector
container for (sorted) edges
KeepClear
keepClear status of connections
std::vector< NBRouterEdge * > RouterEdgeVector
const SVCPermissions SVC_UNSPECIFIED
permissions not specified
long long int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
const double INVALID_DOUBLE
invalid double
A container for districts.
Sorts splits by their position (increasing)
int operator()(const Split &e1, const Split &e2) const
Comparing operator.
split_sorter()
Constructor.
Storage for edges, including some functionality operating on multiple edges.
void patchRoundabouts(NBEdge *orig, NBEdge *part1, NBEdge *part2, std::set< EdgeSet > &roundabouts)
fix roundabout information after splitting an edge
void computeEdgeShapes(double smoothElevationThreshold=-1)
Computes the shapes of all edges stored in the container.
NBEdge * getByID(const std::string &edgeID) const
Returns the edge with id if it exists.
const std::pair< NBEdge *, NBEdge * > * getSplit(const NBEdge *const origEdge) const
Returns the edge split if the edge has been split, nullptr otherwise.
const std::set< EdgeSet > getRoundabouts() const
Returns the determined roundabouts.
void computeEdge2Edges(bool noLeftMovers)
Computes for each edge the approached edges.
int guessRoundabouts()
Determines which edges belong to roundabouts and increases their priority.
bool myNeedGeoTransformedPruningBoundary
whether a geo transform has been applied to the pruning boundary
int size() const
Returns the number of edges.
void sortOutgoingLanesConnections()
Sorts all lanes of all edges within the container by their direction.
void addRoundabout(const EdgeSet &roundabout)
add user specified roundabout
std::set< EdgeSet > myRoundabouts
Edges marked as belonging to a roundabout by the user (each EdgeVector is a roundabout)
void appendRailwayTurnarounds(const NBPTStopCont &sc)
Appends turnarounds to all bidiRail edges with stops.
std::set< std::string > myEdges2Remove
Set of ids of edges which shall explicitly be removed.
std::set< std::string > myIgnoredEdges
The ids of ignored edges.
std::map< std::string, NBEdge * >::const_iterator begin() const
Returns the pointer to the begin of the stored edges.
void updateAllChangeRestrictions(SVCPermissions ignoring)
modify all restrictions on lane changing for edges and connections
double myEdgesMinSpeed
The minimum speed an edge may have in order to be kept (default: -1)
void recheckPostProcessConnections()
Try to set any stored connections.
void extract(NBDistrictCont &dc, NBEdge *edge, bool remember=false)
Removes the given edge from the container like erase but does not delete it.
void processSplits(NBEdge *e, std::vector< Split > splits, NBNodeCont &nc, NBDistrictCont &dc, NBTrafficLightLogicCont &tlc)
process splits
EdgeVector getAllEdges() const
return all edges
void erase(NBDistrictCont &dc, NBEdge *edge)
Removes the given edge from the container (deleting it)
NBEdge * retrieve(const std::string &id, bool retrieveExtracted=false) const
Returns the edge that has the given id.
NBEdgeCont(const NBEdgeCont &s)=delete
invalidated copy constructor
std::set< std::string > myTypes2Keep
Set of edges types which shall be kept.
NBEdgeCont & operator=(const NBEdgeCont &s)=delete
invalidated assignment operator
void recheckLanes()
Rechecks whether all lanes have a successor for each of the stored edges.
NBEdge * getOppositeByID(const std::string &edgeID) const
Returns the edge with negated id if it exists.
void checkGeometries(const double maxAngle, bool fixAngle, const double minRadius, bool fix, bool fixRailways, bool silent=false)
EdgeCont myExtractedEdges
The extracted edges which are kept for reference.
void reduceGeometries(const double minDist)
void recheckLaneSpread()
Rechecks whether the lane spread is proper.
bool ignoreFilterMatch(NBEdge *edge)
Returns true if this edge matches one of the removal criteria.
void removeRoundabout(const NBNode *node)
remove roundabout that contains the given node
void cleanupRoundabouts()
std::map< std::string, NBEdge * >::const_iterator end() const
Returns the pointer to the end of the stored edges.
void splitGeometry(NBDistrictCont &dc, NBNodeCont &nc)
Splits edges into multiple if they have a complex geometry.
void addPostProcessConnection(const std::string &from, int fromLane, const std::string &to, int toLane, bool mayDefinitelyPass, KeepClear keepClear, double contPos, double visibility, double speed, double friction, double length, const PositionVector &customShape, bool uncontrolled, bool warnOnly, SVCPermissions permissions=SVC_UNSPECIFIED, bool indirectLeft=false, const std::string &edgeType="", SVCPermissions changeLeft=SVC_UNSPECIFIED, SVCPermissions changeRight=SVC_UNSPECIFIED)
Adds a connection which could not be set during loading.
std::set< std::string > getUsedTypes() const
return all edge types in used
void computeLanes2Edges()
Computes for each edge which lanes approach the next edges.
int extractRoundabouts()
Determines which edges have been marked as roundabouts and stores them internally.
NBEdge * retrievePossiblySplit(const std::string &id, bool downstream) const
Tries to retrieve an edge, even if it is splitted.
RouterEdgeVector getAllRouterEdges() const
return all router edges
std::set< const NBEdge * > myWasSplit
the edges that were created as result of splitting
int getNumEdgeSplits() const
Returns the number of edge splits.
void rename(NBEdge *edge, const std::string &newID)
Renames the edge. Throws exception if newID already exists.
void ignore(std::string id)
mark the given edge id as ignored
int joinTramEdges(NBDistrictCont &dc, NBPTStopCont &sc, NBPTLineCont &lc, double maxDist)
join tram edges into adjacent lanes
bool hasPostProcessConnection(const std::string &from, const std::string &to="")
add post process connections
EdgeCont myEdges
The instance of the dictionary (id->edge)
int removeUnwishedEdges(NBDistrictCont &dc)
Removes unwished edges (not in keep-edges)
std::set< std::string > myEdges2Keep
Set of ids of edges which shall explicitly be kept.
NBTypeCont & myTypeCont
The network builder; used to obtain type information.
bool wasIgnored(std::string id) const
Returns whether the edge with the id was ignored during parsing.
void generateStreetSigns()
assigns street signs to edges based on toNode types
void clearControllingTLInformation() const
Clears information about controlling traffic lights for all connenections of all edges.
std::set< EdgeSet > myGuessedRoundabouts
Edges marked as belonging to a roundabout after guessing.
bool hasGuessedRoundabouts() const
check if there is guessed roundabouts
void computeAngles()
compute all edge angles
void clear()
Deletes all edges.
void guessOpposites()
Sets opposite lane information for geometrically close edges.
void markRoundabouts()
mark edge priorities and prohibit turn-arounds for all roundabout edges
std::set< std::string > myTypes2Remove
Set of edges types which shall be removed.
void applyOptions(OptionsCont &oc)
Initialises the storage by applying given options.
void removeRoundaboutEdges(const EdgeSet &toRemove)
remove edges from all stored roundabouts
PositionVector myPruningBoundary
Boundary within which an edge must be located in order to be kept.
int joinLanes(SVCPermissions perms)
join adjacent lanes with the given permissions
void checkOverlap(double threshold, double zThreshold) const
check whether edges overlap
SVCPermissions myVehicleClasses2Remove
Set of vehicle types which need not be supported (edges which allow ONLY these are removed)
int guessSpecialLanes(SUMOVehicleClass svc, double width, double minSpeed, double maxSpeed, bool fromPermissions, const std::string &excludeOpt, NBTrafficLightLogicCont &tlc)
add sidwalks to edges within the given limits or permissions and return the number of edges affected
bool wasRemoved(std::string id) const
Returns whether the edge with the id was deleted explicitly.
EdgeVector getGeneratedFrom(const std::string &id) const
Returns the edges which have been built by splitting the edge of the given id.
void appendTurnarounds(bool noTLSControlled, bool noFringe, bool onlyDeadends, bool onlyTurnlane, bool noGeometryLike)
Appends turnarounds to all edges stored in the container.
SVCPermissions myVehicleClasses2Keep
Set of vehicle types which must be allowed on edges in order to keep them.
void computeLaneShapes()
Computes the shapes of all lanes of all edges stored in the container.
void joinSameNodeConnectingEdges(NBDistrictCont &dc, NBTrafficLightLogicCont &tlc, EdgeVector edges)
Joins the given edges because they connect the same nodes.
std::map< std::string, NBEdge * > EdgeCont
The type of the dictionary where an edge may be found by its id.
void addPrefix(const std::string &prefix)
add prefix to all edges
void fixSplitCustomLength()
adapt custom lengths of split edges to account for intersection size
std::map< const NBEdge *, std::pair< NBEdge *, NBEdge * > > myEdgesSplit
the number of splits of edges during the building
std::map< std::string, std::vector< PostProcessConnection > > myConnections
The list of connections to recheck.
bool insert(NBEdge *edge, bool ignorePrunning=false)
Adds an edge to the dictionary.
std::set< NBEdge * > myEdgeCemetery
The edges which got extracted twice but may still be referenced somewhere TODO smart_ptr?
int remapIDs(bool numericaIDs, bool reservedIDs, const std::string &prefix, NBPTStopCont &sc)
remap node IDs accoring to options –numerical-ids and –reserved-ids
bool checkConsistency(const NBNodeCont &nc)
ensure that all edges have valid nodes
static double formFactor(const EdgeVector &loopEdges)
compute the form factor for a loop of edges
int removeLanesByWidth(NBDistrictCont &dc, const double minWidth)
bool splitAt(NBDistrictCont &dc, NBEdge *edge, NBNode *node)
Splits the edge at the position nearest to the given node.
std::vector< std::string > getAllNames() const
Returns all ids of known edges.
int removeEdgesBySpeed(NBDistrictCont &dc)
return number of edges removed
void checkGrade(double threshold) const
check whether edges are to steep
int removeEdgesByPermissions(NBDistrictCont &dc)
bool myRemoveEdgesAfterLoading
Whether edges shall be joined and patched first, then removed.
The representation of a single edge during network building.
Container for nodes during the netbuilding process.
Represents a single node (junction) during network building.
Container for public transport stops during the net building process.
A container for traffic light definitions and built programs.
A storage for available edgeTypes of edges.
A storage for options typed value containers)
Static storage of an output device and its base (abstract) implementation.
bool operator()(const std::pair< NBEdge *, int > &a, const std::pair< NBEdge *, int > &b) const
A structure representing a connection between two lanes.
double customLength
custom length for connection
bool warnOnly
whether a failure to set this connection is a warning or an error
bool uncontrolled
whether this connection shall not be controlled by a traffic light
SVCPermissions changeRight
custom lane changing permissions for connection
double visibility
custom foe visiblity for connection
int toLane
The number of the lane the connection ends at.
PositionVector customShape
custom shape for connection
KeepClear keepClear
Whether the connection may be passed without braking.
double speed
custom speed for connection
bool mayDefinitelyPass
Whether the connection may be passed without braking.
SVCPermissions changeLeft
custom lane changing permissions for connection
double contPos
custom position for internal junction on this connection
std::string from
The id of the edge the connection starts at.
double friction
custom friction for connection
std::string edgeType
custom edge type
SVCPermissions permissions
custom permissions for connection
std::string to
The id of the edge the connection ends at.
PostProcessConnection(const std::string &from_, int fromLane_, const std::string &to_, int toLane_, bool mayDefinitelyPass_, KeepClear keepClear_, double contPos_, double visibility_, double speed_, double friction_, double length_, const PositionVector &customShape_, bool uncontrolled_, bool warnOnly_, SVCPermissions permissions_, bool indirectLeft_, const std::string &edgeType_, SVCPermissions changeLeft_, SVCPermissions changeRight_)
Constructor.
int fromLane
The number of the lane the connection starts at.
bool indirectLeft
whether this connection is an indirect left turn
A structure which describes changes of lane number or speed along the road.
int offsetFactor
direction in which to apply the offset (used by netgenerate for lefthand networks)
double speed
The speed after this change.
double offset
lateral offset to edge geometry
double friction
The friction after this change.
std::string nameID
the default node id
std::string idBefore
The id for the edge before the split.
double pos
The position of this change.
std::vector< int > lanes
The lanes after this change.
std::string idAfter
The id for the edge after the split.
NBNode * node
The new node that is created for this split.