Crossing a nogo polyline with weight should translate into a constant cost.
This commit is contained in:
parent
828227f59d
commit
fc97754c90
@ -359,7 +359,11 @@ public final class RoutingContext
|
||||
else if (((OsmNogoPolygon)nogo).intersects(lon1, lat1, lon2, lat2))
|
||||
{
|
||||
// nogo is a polygon, compute distance within the polygon
|
||||
if (((OsmNogoPolygon)nogo).isClosed) {
|
||||
nogoCost = ((OsmNogoPolygon)nogo).distanceWithinPolygon(lon1, lat1, lon2, lat2) * nogo.nogoWeight;
|
||||
} else {
|
||||
nogoCost = nogo.nogoWeight;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user