Fix douglas peuker
This commit is contained in:
parent
dfd17b2f4a
commit
a533d480b9
2 changed files with 5 additions and 7 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue