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 );
|
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;
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue