Add minor stop 10281
This commit is contained in:
parent
368b2ff8f9
commit
9a44cd70e6
1 changed files with 18 additions and 13 deletions
|
@ -185,6 +185,7 @@ public class RouteResultPreparation {
|
|||
}
|
||||
|
||||
public RouteSegmentResult filterMinorStops(RouteSegmentResult seg) {
|
||||
List<Integer> stops = null;
|
||||
int startPoint = seg.getStartPointIndex();
|
||||
int endPoint = seg.getEndPointIndex();
|
||||
int start;
|
||||
|
@ -198,19 +199,22 @@ public class RouteResultPreparation {
|
|||
end = startPoint;
|
||||
}
|
||||
|
||||
List<Integer> stops = new ArrayList<>();
|
||||
|
||||
for (int i = start; i < end; i++) {
|
||||
int[] pointTypes = seg.getObject().getPointTypes(i);
|
||||
while (start <= end) {
|
||||
int[] pointTypes = seg.getObject().getPointTypes(start);
|
||||
if (pointTypes != null) {
|
||||
for (int j = 0; j < pointTypes.length; j++) {
|
||||
if (pointTypes[j] == seg.getObject().region.stopMinor) {
|
||||
stops.add(i);
|
||||
if (stops == null) {
|
||||
stops = new ArrayList<>();
|
||||
}
|
||||
stops.add(start);
|
||||
}
|
||||
}
|
||||
}
|
||||
start++;
|
||||
}
|
||||
|
||||
if (stops != null) {
|
||||
for (int stop : stops) {
|
||||
List<RouteSegmentResult> attachedRoutes = seg.getAttachedRoutes(stop);
|
||||
for (RouteSegmentResult attached : attachedRoutes) {
|
||||
|
@ -222,6 +226,7 @@ public class RouteResultPreparation {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return seg;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue