Skip to content

Commit

Permalink
addendum refs #6852 (do not load internal pedestrian edges when runni…
Browse files Browse the repository at this point in the history
…ng with --no-internal-links)
  • Loading branch information
namdre committed Apr 17, 2020
1 parent 4532a01 commit 45cd1c6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/netload/NLHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -354,9 +354,15 @@ NLHandler::beginEdgeParsing(const SUMOSAXAttributes& attrs) {
myCurrentIsBroken = true;
return;
}
// parse the function
const SumoXMLEdgeFunc func = attrs.getEdgeFunc(ok);
// omit internal edges if not wished
if (id[0] == ':') {
myHaveSeenInternalEdge = true;
if (!MSGlobals::gUsingInternalLanes && (func == SumoXMLEdgeFunc::CROSSING || func == SumoXMLEdgeFunc::WALKINGAREA)) {
myCurrentIsInternalToSkip = true;
return;
}
std::string junctionID = SUMOXMLDefinitions::getJunctionIDFromInternalEdge(id);
myJunctionGraph[id] = std::make_pair(junctionID, junctionID);
} else {
Expand All @@ -370,8 +376,6 @@ NLHandler::beginEdgeParsing(const SUMOSAXAttributes& attrs) {
}
}
myCurrentIsInternalToSkip = false;
// parse the function
const SumoXMLEdgeFunc func = attrs.getEdgeFunc(ok);
if (!ok) {
WRITE_ERROR("Edge '" + id + "' has an invalid type.");
myCurrentIsBroken = true;
Expand Down

0 comments on commit 45cd1c6

Please sign in to comment.