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:
Roman Inflianskas 2016-04-06 09:30:51 +03:00
parent b9fcd1b7d2
commit 75b5f23938
2 changed files with 27 additions and 12 deletions

View file

@ -60,8 +60,6 @@ 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);
@ -70,7 +68,6 @@ public class RouteResultPreparation {
}
}
}
}
private void calculateTimeSpeed(RoutingContext ctx, List<RouteSegmentResult> result) throws IOException {
for (int i = 0; i < result.size(); i++) {

View file

@ -235,12 +235,12 @@
{
"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,
@ -249,7 +249,25 @@
}
},
{
"testName": "12.Figure 8 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": "14.Figure 8 TL",
"startPoint": {
"latitude": 45.69816447596442,
"longitude": 35.74885922431952