fix NogoPolygon radius being modified

This commit is contained in:
ntruchsess 2018-02-04 19:24:44 +01:00
parent 05b0b6d362
commit 659bbe8d82
2 changed files with 6 additions and 5 deletions

View file

@ -296,12 +296,14 @@ public final class RoutingContext
radius = Math.sqrt( s1 < s2 ? r12 : r22 ); radius = Math.sqrt( s1 < s2 ? r12 : r22 );
if ( radius > nogo.radius ) continue; // 20m ^ 2 if ( radius > nogo.radius ) continue; // 20m ^ 2
} }
if ( nogo.isNogo if ( nogo.isNogo )
&& (!(nogo instanceof OsmNogoPolygon) {
|| ((OsmNogoPolygon)nogo).intersectsOrIsWithin(lon1, lat1, lon2, lat2))) if (!(nogo instanceof OsmNogoPolygon)
|| ((OsmNogoPolygon)nogo).intersectsOrIsWithin(lon1, lat1, lon2, lat2))
{ {
nogomatch = true; nogomatch = true;
} }
}
else else
{ {
shortestmatch = true; shortestmatch = true;

View file

@ -61,7 +61,6 @@ public class OsmNogoPolygonTest {
@AfterClass @AfterClass
public static void tearDown() throws Exception { public static void tearDown() throws Exception {
polygon.waitForTracker();
} }
@Test @Test