Skip to content

Commit

Permalink
addendum refs #14512
Browse files Browse the repository at this point in the history
  • Loading branch information
namdre committed Mar 18, 2024
1 parent f76e103 commit 6e446ac
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/netimport/NIImporter_OpenStreetMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
#define KM_PER_MILE 1.609344

//#define DEBUG_LAYER_ELEVATION
//#define DEBUG_RAIL_DIRECTION

// ---------------------------------------------------------------------------
// static members
Expand Down Expand Up @@ -543,10 +544,22 @@ NIImporter_OpenStreetMap::insertEdge(Edge* e, int index, NBNode* from, NBNode* t
sc.insert(ptStops.back());
}
}
nodeDirection = n->myRailDirection;
if (n->railwaySignal) {
nodeDirection |= n->myRailDirection;
}
Position pos(n->lon, n->lat, n->ele);
shape.push_back(pos);
}
#ifdef DEBUG_LAYER_ELEVATION
if (e->id == "DEBUGID") {
std::cout
<< " id=" << id << " from=" << from->getID() << " fromRailDirection=" << myOSMNodes.find(StringUtils::toLong(from->getID()))->second->myRailDirection
<< " to=" << to->getID() << " toRailDirection=" << myOSMNodes.find(StringUtils::toLong(to->getID()))->second->myRailDirection
<< " origRailDirection=" << e->myRailDirection
<< " nodeDirection=" << nodeDirection
<< "\n";
}
#endif
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";
Expand Down

0 comments on commit 6e446ac

Please sign in to comment.