diff --git a/OsmAnd-java/src/net/osmand/data/Building.java b/OsmAnd-java/src/net/osmand/data/Building.java index e39eb57b90..8f799d944a 100644 --- a/OsmAnd-java/src/net/osmand/data/Building.java +++ b/OsmAnd-java/src/net/osmand/data/Building.java @@ -103,7 +103,9 @@ public class Building extends MapObject { public float interpolation(String hno) { - if(getInterpolationType() != null || getInterpolationInterval() > 0 || checkNameAsInterpolation()) { + if(getInterpolationType() != null || getInterpolationInterval() > 0 + //|| checkNameAsInterpolation() // disable due to situation in NL #4284 + ) { int num = Algorithms.extractFirstIntegerNumber(hno); String fname = super.getName(); int numB = Algorithms.extractFirstIntegerNumber(fname); @@ -139,14 +141,13 @@ public class Building extends MapObject { } return -1; } - private boolean checkNameAsInterpolation() { + + protected 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 { + if(!(nm.charAt(i) >= '0' && nm.charAt(i) <= '9') && nm.charAt(i) != '-') { interpolation = false; break; } diff --git a/OsmAnd/src/net/osmand/plus/AppInitializer.java b/OsmAnd/src/net/osmand/plus/AppInitializer.java index 0b41acbc34..0dc3cc726a 100644 --- a/OsmAnd/src/net/osmand/plus/AppInitializer.java +++ b/OsmAnd/src/net/osmand/plus/AppInitializer.java @@ -288,8 +288,8 @@ public class AppInitializer implements IProgress { } private void indexRegionsBoundaries(List warnings) { + File file = app.getAppPath("regions.ocbf"); try { - File file = app.getAppPath("regions.ocbf"); if (file != null) { if (!file.exists()) { Algorithms.streamCopy(OsmandRegions.class.getResourceAsStream("regions.ocbf"), @@ -300,6 +300,7 @@ public class AppInitializer implements IProgress { } } catch (Exception e) { warnings.add(e.getMessage()); + file.delete(); // recreate file LOG.error(e.getMessage(), e); } }