Work on #2420 (tests included): revert.
Reverting ddb9ba266b
because this solution
breaks adjacent segments which form u-turn. See #2420 for more details.
Added more tests though.
This commit is contained in:
parent
b9fcd1b7d2
commit
75b5f23938
2 changed files with 27 additions and 12 deletions
|
@ -60,13 +60,10 @@ 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);
|
||||
next = i + 2;
|
||||
}
|
||||
TurnType jt = justifyUTurn(leftSide, result, i, t);
|
||||
if (jt != null) {
|
||||
result.get(i).setTurnType(jt);
|
||||
next = i + 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -235,21 +235,39 @@
|
|||
{
|
||||
"testName": "12.Rembrandtlaan to Rubensstraat u-turn",
|
||||
"startPoint": {
|
||||
"latitude": 45.69849708250879,
|
||||
"longitude": 35.64191635632511
|
||||
"latitude": 45.698570524678956,
|
||||
"longitude": 35.64198324084282
|
||||
},
|
||||
"endPoint": {
|
||||
"latitude": 45.699958273396,
|
||||
"longitude": 35.642077288866005
|
||||
"latitude": 45.699327350398576,
|
||||
"longitude": 35.64244994521141
|
||||
},
|
||||
"expectedResults": {
|
||||
"7351364": null,
|
||||
"7351365": "+TL",
|
||||
"7351445": "+TL"
|
||||
}
|
||||
},
|
||||
{
|
||||
"testName": "13.Ira Lee Henderson Memorial Highway (US 75)",
|
||||
"startPoint": {
|
||||
"latitude": 45.691518814511134,
|
||||
"longitude": 35.66402764618397
|
||||
},
|
||||
"endPoint": {
|
||||
"latitude": 45.69157314830206,
|
||||
"longitude": 35.66372522711754
|
||||
},
|
||||
"expectedResults": {
|
||||
"309115848": null,
|
||||
"309115858": "+TU, C",
|
||||
"309115891": null,
|
||||
"309115871": null,
|
||||
"309115849": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"testName": "12.Figure 8 TL",
|
||||
"testName": "14.Figure 8 TL",
|
||||
"startPoint": {
|
||||
"latitude": 45.69816447596442,
|
||||
"longitude": 35.74885922431952
|
||||
|
|
Loading…
Reference in a new issue