fix NogoPolygon radius being modified
This commit is contained in:
parent
05b0b6d362
commit
659bbe8d82
2 changed files with 6 additions and 5 deletions
|
@ -296,12 +296,14 @@ public final class RoutingContext
|
|||
radius = Math.sqrt( s1 < s2 ? r12 : r22 );
|
||||
if ( radius > nogo.radius ) continue; // 20m ^ 2
|
||||
}
|
||||
if ( nogo.isNogo
|
||||
&& (!(nogo instanceof OsmNogoPolygon)
|
||||
|| ((OsmNogoPolygon)nogo).intersectsOrIsWithin(lon1, lat1, lon2, lat2)))
|
||||
if ( nogo.isNogo )
|
||||
{
|
||||
if (!(nogo instanceof OsmNogoPolygon)
|
||||
|| ((OsmNogoPolygon)nogo).intersectsOrIsWithin(lon1, lat1, lon2, lat2))
|
||||
{
|
||||
nogomatch = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
shortestmatch = true;
|
||||
|
|
|
@ -61,7 +61,6 @@ public class OsmNogoPolygonTest {
|
|||
|
||||
@AfterClass
|
||||
public static void tearDown() throws Exception {
|
||||
polygon.waitForTracker();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in a new issue