diff --git a/DataExtractionOSM/src/net/osmand/data/preparation/BinaryMapIndexWriter.java b/DataExtractionOSM/src/net/osmand/data/preparation/BinaryMapIndexWriter.java index d492b6ba8c..1e6ea51f6e 100644 --- a/DataExtractionOSM/src/net/osmand/data/preparation/BinaryMapIndexWriter.java +++ b/DataExtractionOSM/src/net/osmand/data/preparation/BinaryMapIndexWriter.java @@ -455,10 +455,10 @@ public class BinaryMapIndexWriter { } private static double orthogonalDistance(int x, int y, int x1, int y1, int x2, int y2) { - int A = (x - x1); - int B = (y - y1); - int C = (x2 - x1); - int D = (y2 - y1); + long A = (x - x1); + long B = (y - y1); + long C = (x2 - x1); + long D = (y2 - y1); return Math.abs(A * D - C * B) / Math.sqrt(C * C + D * D); } diff --git a/DataExtractionOSM/src/net/osmand/data/preparation/IndexCreator.java b/DataExtractionOSM/src/net/osmand/data/preparation/IndexCreator.java index e1f0db29d1..7d428f25d1 100644 --- a/DataExtractionOSM/src/net/osmand/data/preparation/IndexCreator.java +++ b/DataExtractionOSM/src/net/osmand/data/preparation/IndexCreator.java @@ -754,9 +754,7 @@ public class IndexCreator { MapZooms zooms = MapZooms.getDefault(); // MapZooms.parseZooms("15-"); // creator.setNodesDBFile(new File("/home/victor/projects/OsmAnd/data/osm-gen/nodes.tmp.odb")); // creator.setMapFileName("Luxembourg_poi.obf"); -// creator.generateIndexes(new File("/home/victor/projects/OsmAnd/data/osm-maps/luxembourg.osm.pbf"), -// creator.generateIndexes(new File("/home/victor/projects/OsmAnd/data/osm-maps/cuba2.osm.bz2"), - creator.generateIndexes(new File("/home/victor/projects/OsmAnd/temp/slovak.osm"), + creator.generateIndexes(new File("/home/victor/projects/OsmAnd/temp/map.osm"), new ConsoleProgressImplementation(1), null, zooms, rt, log);