Fix #2420 (tests included
This commit is contained in:
parent
e1d1289396
commit
ddb9ba266b
2 changed files with 39 additions and 5 deletions
|
@ -60,6 +60,8 @@ public class RouteResultPreparation {
|
|||
TurnType t = result.get(i).getTurnType();
|
||||
// justify turn
|
||||
if (t != null) {
|
||||
boolean turnOnSameStreet = result.get(i).getObject().id == result.get(next).getObject().id;
|
||||
if (turnOnSameStreet) {
|
||||
TurnType jt = justifyUTurn(leftSide, result, i, t);
|
||||
if (jt != null) {
|
||||
result.get(i).setTurnType(jt);
|
||||
|
@ -68,6 +70,7 @@ public class RouteResultPreparation {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void calculateTimeSpeed(RoutingContext ctx, List<RouteSegmentResult> result) throws IOException {
|
||||
for (int i = 0; i < result.size(); i++) {
|
||||
|
|
|
@ -218,7 +218,38 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"testName": "11.Figure 8 TL",
|
||||
"testName": "11.Graaf Lodewijkstraat to Graaf Lodewijkstraat u-turn",
|
||||
"startPoint": {
|
||||
"latitude": 52.076116774796496,
|
||||
"longitude": 4.821222126483946
|
||||
},
|
||||
"endPoint": {
|
||||
"latitude": 52.075488682963716,
|
||||
"longitude": 4.821018278598814
|
||||
},
|
||||
"expectedResults": {
|
||||
"7352195": null,
|
||||
"7352546": "+TL;TR"
|
||||
}
|
||||
},
|
||||
{
|
||||
"testName": "12.Rembrandtlaan to Rubensstraat u-turn",
|
||||
"startPoint": {
|
||||
"latitude": 45.69849708250879,
|
||||
"longitude": 35.64191635632511
|
||||
},
|
||||
"endPoint": {
|
||||
"latitude": 45.699958273396,
|
||||
"longitude": 35.642077288866005
|
||||
},
|
||||
"expectedResults": {
|
||||
"7351364": null,
|
||||
"7351365": "+TL",
|
||||
"7351445": "+TL"
|
||||
}
|
||||
},
|
||||
{
|
||||
"testName": "12.Figure 8 TL",
|
||||
"startPoint": {
|
||||
"latitude": 45.69816447596442,
|
||||
"longitude": 35.74885922431952
|
||||
|
|
Loading…
Reference in a new issue