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,11 +296,13 @@ 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 )
{
nogomatch = true;
if (!(nogo instanceof OsmNogoPolygon)
|| ((OsmNogoPolygon)nogo).intersectsOrIsWithin(lon1, lat1, lon2, lat2))
{
nogomatch = true;
}
}
else
{