Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
dd88ed0b27
4 changed files with 9 additions and 6 deletions
|
@ -554,8 +554,9 @@ public class BinaryRoutePlanner {
|
|||
RouteSegment from = !reverseWaySearch ? getParentDiffId(segment) : getParentDiffId(opposite);
|
||||
if (checkViaRestrictions(from, to)) {
|
||||
FinalRouteSegment frs = new FinalRouteSegment(road, segmentPoint);
|
||||
// obstacles already count on backward calculation (so don't include obstaclesTime)
|
||||
float distStartObstacles = segment.distanceFromStart
|
||||
+ calculateTimeWithObstacles(ctx, road, segmentDist, obstaclesTime);
|
||||
+ calculateTimeWithObstacles(ctx, road, segmentDist, 0);
|
||||
frs.setParentRoute(segment);
|
||||
frs.setParentSegmentEnd(segmentPoint);
|
||||
frs.reverseWaySearch = reverseWaySearch;
|
||||
|
@ -781,7 +782,7 @@ public class BinaryRoutePlanner {
|
|||
segment, segmentPoint);
|
||||
distFromStart += obstaclesTime;
|
||||
if (TEST_SPECIFIC && next.road.getId() >> 6 == TEST_ID) {
|
||||
printRoad(" !? distFromStart=" + +distFromStart + " from " + segment.getRoad().getId() +
|
||||
printRoad(" !? distFromStart=" +distFromStart + " from " + segment.getRoad().getId() +
|
||||
" dir=" + segment.getDirectionAssigned() +
|
||||
" distToEnd=" + distanceToEnd +
|
||||
" segmentPoint=" + segmentPoint + " -- ", next, true);
|
||||
|
@ -793,7 +794,7 @@ public class BinaryRoutePlanner {
|
|||
next.distanceFromStart = distFromStart;
|
||||
next.distanceToEnd = distanceToEnd;
|
||||
if (TRACE_ROUTING) {
|
||||
printRoad(" >>", next, null);
|
||||
printRoad(" "+segmentPoint+">>" , next, null);
|
||||
}
|
||||
// put additional information to recover whole route after
|
||||
next.setParentRoute(segment);
|
||||
|
|
|
@ -572,7 +572,7 @@ public class MapUtils {
|
|||
rect.bottom = MapUtils.get31LatitudeY((int) rect.bottom);
|
||||
return rect;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
{
|
||||
"testName": "5.Route depends on the distance to a junction, if routing engine takes the longer way https://github.com/osmandapp/Osmand/issues/1200",
|
||||
"description": "Подтверждается только неверный маршрут. От дистанции не зависит, но зависит от planRoadDirection. При -1 маршрут верный, при 0 - нет",
|
||||
"ignore" : "true",
|
||||
"ignore" : "false",
|
||||
"params": {
|
||||
"vehicle": "car",
|
||||
"short_way": "true",
|
||||
|
|
|
@ -1041,7 +1041,9 @@ public class ResourceManager {
|
|||
indexFileNames.remove(fileName);
|
||||
renderer.closeConnection(fileName);
|
||||
BinaryMapReaderResource resource = fileReaders.remove(fileName);
|
||||
resource.close();
|
||||
if(resource != null) {
|
||||
resource.close();
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized void close(){
|
||||
|
|
Loading…
Reference in a new issue