diff --git a/OsmAnd-java/src/net/osmand/data/Building.java b/OsmAnd-java/src/net/osmand/data/Building.java index f036c05ca1..e39eb57b90 100644 --- a/OsmAnd-java/src/net/osmand/data/Building.java +++ b/OsmAnd-java/src/net/osmand/data/Building.java @@ -103,7 +103,7 @@ public class Building extends MapObject { public float interpolation(String hno) { - if(getInterpolationType() != null || getInterpolationInterval() > 0 || super.getName().contains("-")) { + if(getInterpolationType() != null || getInterpolationInterval() > 0 || checkNameAsInterpolation()) { int num = Algorithms.extractFirstIntegerNumber(hno); String fname = super.getName(); int numB = Algorithms.extractFirstIntegerNumber(fname); @@ -139,6 +139,22 @@ public class Building extends MapObject { } return -1; } + private boolean checkNameAsInterpolation() { + String nm = super.getName(); + boolean interpolation = nm.contains("-"); + if(interpolation) { + for(int i = 0; i < nm.length(); i++) { + if(nm.charAt(i) >= '0' && nm.charAt(i) <= '9' || nm.charAt(i) == '-') { + + } else { + interpolation = false; + break; + } + } + } + return interpolation; + } + public boolean belongsToInterpolation(String hno) { return interpolation(hno) >= 0; } diff --git a/OsmAnd-java/src/net/osmand/router/RoutePlannerFrontEnd.java b/OsmAnd-java/src/net/osmand/router/RoutePlannerFrontEnd.java index 71287f84a2..d2779cdfb4 100644 --- a/OsmAnd-java/src/net/osmand/router/RoutePlannerFrontEnd.java +++ b/OsmAnd-java/src/net/osmand/router/RoutePlannerFrontEnd.java @@ -11,7 +11,6 @@ import net.osmand.data.LatLon; import net.osmand.data.QuadPoint; import net.osmand.router.BinaryRoutePlanner.RouteSegment; import net.osmand.router.BinaryRoutePlanner.RouteSegmentPoint; -import net.osmand.router.GeneralRouter.GeneralRouterProfile; import net.osmand.util.MapUtils; import org.apache.commons.logging.Log;