Merge pull request #9309 from osmandapp/dir_quickfix

quick fix
This commit is contained in:
vshcherb 2020-06-24 12:32:20 +02:00 committed by GitHub
commit bfdfae5777
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -373,13 +373,10 @@ public class GeneralRouter implements VehicleRouter {
@Override @Override
public float defineRoutingObstacle(RouteDataObject road, int point, boolean dir) { public float defineRoutingObstacle(RouteDataObject road, int point, boolean dir) {
int[] pointTypes = road.getPointTypes(point); int[] pointTypes = road.getPointTypes(point);
if (pointTypes != null) {
}
if(pointTypes != null) { if(pointTypes != null) {
Float obst = getCache(RouteDataObjectAttribute.ROUTING_OBSTACLES, road.region, pointTypes, dir); Float obst = getCache(RouteDataObjectAttribute.ROUTING_OBSTACLES, road.region, pointTypes, dir);
if(obst == null) { if(obst == null) {
int[] filteredPointTypes = filterDirectionTags(road, pointTypes, dir ); int[] filteredPointTypes = filterDirectionTags(road, pointTypes, dir);
obst = getObjContext(RouteDataObjectAttribute.ROUTING_OBSTACLES).evaluateFloat(road.region, filteredPointTypes, 0); obst = getObjContext(RouteDataObjectAttribute.ROUTING_OBSTACLES).evaluateFloat(road.region, filteredPointTypes, 0);
putCache(RouteDataObjectAttribute.ROUTING_OBSTACLES, road.region, pointTypes, obst, dir); putCache(RouteDataObjectAttribute.ROUTING_OBSTACLES, road.region, pointTypes, obst, dir);
} }
@ -410,7 +407,7 @@ public class GeneralRouter implements VehicleRouter {
if ((pointTypes[i] == road.region.stopSign || pointTypes[i] == road.region.giveWaySign) if ((pointTypes[i] == road.region.stopSign || pointTypes[i] == road.region.giveWaySign)
&& direction == wayOppositeDirection) { && direction == wayOppositeDirection) {
skip = true; skip = true;
} else if (pointTypes[i] == road.region.trafficSignals && direction == wayOppositeDirection) { } else if (pointTypes[i] == road.region.trafficSignals && tdirection == wayOppositeDirection) {
skip = true; skip = true;
} }
if (!skip) { if (!skip) {