Skip to content

Commit

Permalink
including bus lane in total width. refs #4392
Browse files Browse the repository at this point in the history
  • Loading branch information
namdre committed Feb 22, 2024
1 parent b27b66f commit d6904e5
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/netimport/NIImporter_OpenStreetMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -629,6 +629,17 @@ NIImporter_OpenStreetMap::insertEdge(Edge* e, int index, NBNode* from, NBNode* t
numLanesBackward = -e->myNoLanesForward;
}
}
// deal with busways that run in the opposite direction of a one-way street
if (!addForward && (e->myBuswayType & WAY_FORWARD) != 0) {
addForward = true;
forwardPermissions = SVC_BUS;
numLanesForward = 1;
}
if (!addBackward && (e->myBuswayType & WAY_BACKWARD) != 0) {
addBackward = true;
backwardPermissions = SVC_BUS;
numLanesBackward = 1;
}
// with is meant for raw lane count before adding sidewalks or cycleways
const int taggedLanes = (addForward ? numLanesForward : 0) + (addBackward ? numLanesBackward : 0);
if (e->myWidth > 0 && e->myWidthLanesForward.size() == 0 && e->myWidthLanesBackward.size() == 0 && taggedLanes != 0
Expand Down Expand Up @@ -708,17 +719,6 @@ NIImporter_OpenStreetMap::insertEdge(Edge* e, int index, NBNode* from, NBNode* t
backwardPermissions |= SVC_PEDESTRIAN;
}
}
// deal with busways that run in the opposite direction of a one-way street
if (!addForward && (e->myBuswayType & WAY_FORWARD) != 0) {
addForward = true;
forwardPermissions = SVC_BUS;
numLanesForward = 1;
}
if (!addBackward && (e->myBuswayType & WAY_BACKWARD) != 0) {
addBackward = true;
backwardPermissions = SVC_BUS;
numLanesBackward = 1;
}

const std::string origID = OptionsCont::getOptions().getBool("output.original-names") ? toString(e->id) : "";
if (ok) {
Expand Down

0 comments on commit d6904e5

Please sign in to comment.