This commit is contained in:
crimean 2019-04-01 18:11:01 +03:00
parent 0077c78a78
commit e7c2bd150b

View file

@ -157,6 +157,9 @@ public class RouteResultPreparation {
}
List<RouteSegmentResult> prepareResult(RoutingContext ctx, List<RouteSegmentResult> result) throws IOException {
for(int i = 0; i < result.size(); i++) {
checkAndInitRouteRegion(ctx, result.get(i).getObject());
}
combineWayPointsForAreaRouting(ctx, result);
validateAllPointsConnected(result);
splitRoadsAndAttachRoadSegments(ctx, result);
@ -290,8 +293,6 @@ public class RouteResultPreparation {
ctx.unloadUnusedTiles(ctx.config.memoryLimitation);
}
RouteSegmentResult rr = result.get(i);
RouteDataObject road = rr.getObject();
checkAndInitRouteRegion(ctx, road);
boolean plus = rr.getStartPointIndex() < rr.getEndPointIndex();
int next;
for (int j = rr.getStartPointIndex(); j != rr.getEndPointIndex(); j = next) {