Update transport rotues
This commit is contained in:
parent
e5bd6cb065
commit
4873ab04a9
1 changed files with 3 additions and 9 deletions
|
@ -810,6 +810,7 @@ public class TransportRoutePlanner {
|
||||||
long stopId = stop.getId();
|
long stopId = stop.getId();
|
||||||
TransportStop multifileStop = loadedTransportStops.get(stopId);
|
TransportStop multifileStop = loadedTransportStops.get(stopId);
|
||||||
int[] rrs = stop.getReferencesToRoutes();
|
int[] rrs = stop.getReferencesToRoutes();
|
||||||
|
// TODO what is this?
|
||||||
if (multifileStop == stop) {
|
if (multifileStop == stop) {
|
||||||
// clear up so it won't be used as it is multi file stop
|
// clear up so it won't be used as it is multi file stop
|
||||||
stop.setReferencesToRoutes(null);
|
stop.setReferencesToRoutes(null);
|
||||||
|
@ -826,10 +827,7 @@ public class TransportRoutePlanner {
|
||||||
rr, stop));
|
rr, stop));
|
||||||
} else {
|
} else {
|
||||||
TransportRoute combinedRoute = getCombinedRoute(route);
|
TransportRoute combinedRoute = getCombinedRoute(route);
|
||||||
if (combinedRoute == null) {
|
if (multifileStop == stop || (!multifileStop.hasRoute(combinedRoute.getId()) &&
|
||||||
System.err.println(String.format("Something went wrong by loading combined route %d for stop %s", route.getId(), stop));
|
|
||||||
} else if (multifileStop == stop ||
|
|
||||||
(!multifileStop.hasRoute(combinedRoute.getId()) &&
|
|
||||||
!multifileStop.isRouteDeleted(combinedRoute.getId()))) {
|
!multifileStop.isRouteDeleted(combinedRoute.getId()))) {
|
||||||
// duplicates won't be added
|
// duplicates won't be added
|
||||||
multifileStop.addRouteId(combinedRoute.getId());
|
multifileStop.addRouteId(combinedRoute.getId());
|
||||||
|
@ -853,16 +851,12 @@ public class TransportRoutePlanner {
|
||||||
List<TransportStop> stops,
|
List<TransportStop> stops,
|
||||||
TIntObjectHashMap<TransportRoute> localFileRoutes,
|
TIntObjectHashMap<TransportRoute> localFileRoutes,
|
||||||
TIntObjectHashMap<TransportRoute> loadedRoutes
|
TIntObjectHashMap<TransportRoute> loadedRoutes
|
||||||
// boolean processMissingStop
|
|
||||||
) throws IOException {
|
) throws IOException {
|
||||||
TIntArrayList routesToLoad = new TIntArrayList();
|
TIntArrayList routesToLoad = new TIntArrayList();
|
||||||
TIntArrayList localRoutesToLoad = new TIntArrayList();
|
TIntArrayList localRoutesToLoad = new TIntArrayList();
|
||||||
Iterator<TransportStop> it = stops.iterator();
|
Iterator<TransportStop> it = stops.iterator();
|
||||||
while (it.hasNext()) {
|
while (it.hasNext()) {
|
||||||
TransportStop stop = it.next();
|
TransportStop stop = it.next();
|
||||||
// if (stop.isMissingStop() && !processMissingStop) {
|
|
||||||
// continue;
|
|
||||||
// }
|
|
||||||
long stopId = stop.getId();
|
long stopId = stop.getId();
|
||||||
localRoutesToLoad.clear();
|
localRoutesToLoad.clear();
|
||||||
TransportStop multifileStop = loadedTransportStops.get(stopId);
|
TransportStop multifileStop = loadedTransportStops.get(stopId);
|
||||||
|
|
Loading…
Reference in a new issue