Skip to content

Commit

Permalink
marking node refs #14512
Browse files Browse the repository at this point in the history
  • Loading branch information
namdre committed Mar 15, 2024
1 parent 0505fec commit 2ee619a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/netimport/NIImporter_OpenStreetMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,13 @@ NIImporter_OpenStreetMap::insertNodeChecking(long long int id, NBNodeCont& nc, N
node->setParameter("buffer_stop", "true");
node->setFringeType(FringeType::INNER);
}
if (n->railwaySignal) {
if (n->myRailDirection == WAY_FORWARD) {
node->setParameter("railway:signal:direction", "forward");
} else if (n->myRailDirection == WAY_BACKWARD) {
node->setParameter("railway:signal:direction", "backward");
}
}
node->updateParameters(n->getParametersMap());
}
return node;
Expand Down Expand Up @@ -540,7 +547,8 @@ NIImporter_OpenStreetMap::insertEdge(Edge* e, int index, NBNode* from, NBNode* t
Position pos(n->lon, n->lat, n->ele);
shape.push_back(pos);
}
if (e->myRailDirection == WAY_UNKNOWN && nodeDirection != WAY_UNKNOWN && nodeDirection != WAY_FORWARD) {
if (e->myRailDirection == WAY_UNKNOWN && nodeDirection != WAY_UNKNOWN && nodeDirection != WAY_FORWARD
&& nodeDirection != (WAY_FORWARD | WAY_UNKNOWN)) {
//std::cout << "way " << e->id << " nodeDirection=" << nodeDirection << " origDirection=" << e->myRailDirection << "\n";
// heuristc: assume that the mapped way direction indicates
// potential driving direction
Expand Down

0 comments on commit 2ee619a

Please sign in to comment.