Urgent fix for localization
This commit is contained in:
parent
80028ec87a
commit
c1bd234931
5 changed files with 17 additions and 34 deletions
|
@ -15,6 +15,7 @@ public class ToDoConstants {
|
|||
|
||||
|
||||
// === Common issues ===
|
||||
// || 124 || Animated transition using only raster images (?) - skip animations (!) - don not render vectoring for animations ||
|
||||
// || 123 || Improve gpx file showing (very slow for big files) ||
|
||||
// || 122 || Frozen sqlite db images (bug?). When images are loaded into sqlite the whole map is frozen ||
|
||||
// || 121 || Filter network location from GPS location (wait for 10 seconds before start using network location) ||
|
||||
|
|
|
@ -1046,7 +1046,7 @@ public class BinaryMapIndexReader {
|
|||
|
||||
|
||||
public static void main(String[] args) throws IOException {
|
||||
RandomAccessFile raf = new RandomAccessFile(new File("/home/victor/projects/OsmAnd/download/384/Spain_europe_1.obf"), "r");
|
||||
RandomAccessFile raf = new RandomAccessFile(new File("/home/victor/projects/OsmAnd/download/384/La_coruna.obf"), "r");
|
||||
BinaryMapIndexReader reader = new BinaryMapIndexReader(raf);
|
||||
System.out.println("VERSION " + reader.getVersion()); //$NON-NLS-1$
|
||||
long time = System.currentTimeMillis();
|
||||
|
@ -1067,17 +1067,17 @@ public class BinaryMapIndexReader {
|
|||
// }
|
||||
|
||||
// test address index search
|
||||
// String reg = reader.getRegionNames().get(0);
|
||||
// List<City> cs = reader.getCities(reg);
|
||||
// for(City c : cs){
|
||||
String reg = reader.getRegionNames().get(0);
|
||||
List<City> cs = reader.getCities(reg);
|
||||
for(City c : cs){
|
||||
int buildings = 0;
|
||||
// reader.preloadStreets(c);
|
||||
// int buildings = 0;
|
||||
// for(Street s : c.getStreets()){
|
||||
// reader.preloadBuildings(s);
|
||||
// buildings += s.getBuildings().size();
|
||||
// }
|
||||
// System.out.println(c.getName() + " " + c.getLocation() + " " + c.getStreets().size() + " " + buildings + " " + c.getEnName());
|
||||
// }
|
||||
System.out.println(c.getName() + " " + c.getLocation() + " " + c.getStreets().size() + " " + buildings + " " + c.getEnName());
|
||||
}
|
||||
// List<PostCode> postcodes = reader.getPostcodes(reg);
|
||||
// for(PostCode c : postcodes){
|
||||
// reader.preloadStreets(c);
|
||||
|
|
|
@ -2963,48 +2963,25 @@ public class IndexCreator {
|
|||
|
||||
|
||||
long time = System.currentTimeMillis();
|
||||
IndexCreator creator = new IndexCreator(new File("/home/victor/Projects/OsmAnd/data/osmand/")); //$NON-NLS-1$
|
||||
IndexCreator creator = new IndexCreator(new File("/home/victor/projects/OsmAnd/download/384/")); //$NON-NLS-1$
|
||||
creator.setIndexMap(true);
|
||||
creator.setIndexAddress(true);
|
||||
creator.setIndexPOI(true);
|
||||
creator.setIndexTransport(true);
|
||||
// for NL
|
||||
creator.setCityAdminLevel("10");
|
||||
// creator.setCityAdminLevel("10");
|
||||
|
||||
creator.recreateOnlyBinaryFile = false;
|
||||
creator.deleteDatabaseIndexes = true;
|
||||
|
||||
// creator.generateIndexes(new File("/home/victor/Projects/OsmAnd/data/osm-maps/amsteelven_part.osm"),
|
||||
// new ConsoleProgressImplementation(3), null, MapZooms.getDefault(), null);
|
||||
// creator.generateIndexes(new File("/home/victor/Projects/OsmAnd/data/osm-maps/schiphol-rijk.osm"),
|
||||
// new ConsoleProgressImplementation(3), null, MapZooms.getDefault(), null);
|
||||
creator.setNodesDBFile(new File("e:/Information/OSM maps/osmand/netherlands.tmp.odb"));
|
||||
creator.generateIndexes(new File("/home/victor/Projects/OsmAnd/data/osm-maps/netherlands.osm.pbf"),
|
||||
creator.generateIndexes(new File("/home/victor/projects/OsmAnd/download/384/spain.osm.pbf"),
|
||||
new ConsoleProgressImplementation(1), null, MapZooms.getDefault(), null);
|
||||
|
||||
|
||||
// creator.setNodesDBFile(new File("e:/Information/OSM maps/osmand/minsk.tmp.odb"));
|
||||
// creator.generateIndexes(new File("e:/Information/OSM maps/belarus osm/minsk.osm"), new ConsoleProgressImplementation(3), null, MapZooms.getDefault(), null);
|
||||
|
||||
// creator.setNodesDBFile(new File("e:/Information/OSM maps/osmand/belarus_nodes.tmp.odb")); //$NON-NLS-1$
|
||||
// creator.generateIndexes(new File("e:/Information/OSM maps/belarus osm/belarus.osm.pbf"), new ConsoleProgressImplementation(3), null); //$NON-NLS-1$
|
||||
|
||||
// creator.setNodesDBFile(new File("e:/Information/OSM maps/osmand/ams.tmp.odb"));
|
||||
// creator.generateIndexes(new File("e:/Information/OSM maps/osm_map/ams_part_map.osm"), new ConsoleProgressImplementation(3), null);
|
||||
|
||||
// creator.setNodesDBFile(new File("e:/Information/OSM maps/osmand/den_haag.tmp.odb"));
|
||||
// creator.generateIndexes(new File("e:/Information/OSM maps/osm_map/den_haag.osm"), new ConsoleProgressImplementation(3), null);
|
||||
|
||||
|
||||
// creator.generateIndexes(new File("e:/Information/OSM maps/osm_map/forest_complex.osm"), new ConsoleProgressImplementation(25), null);
|
||||
|
||||
// creator.setNodesDBFile(new File("e:/Information/OSM maps/osmand/luxembourg.tmp.odb"));
|
||||
// creator.generateIndexes(new File("e:/Information/OSM maps/osm_map/luxembourg.osm.pbf"), new ConsoleProgressImplementation(15), null);
|
||||
|
||||
// creator.generateIndexes(new File("e:/Information/OSM maps/osm_map/new_zealand.osm.bz2"), new ConsoleProgressImplementation(3), null);
|
||||
|
||||
// creator.generateIndexes(new File("e:/Information/OSM maps/osm_map/map.osm"), new ConsoleProgressImplementation(15), null);
|
||||
// creator.generateIndexes(new File("e:/Information/OSM maps/osm_map/bayarea.osm"), new ConsoleProgressImplementation(15), null);
|
||||
|
||||
System.out.println("WHOLE GENERATION TIME : " + (System.currentTimeMillis() - time)); //$NON-NLS-1$
|
||||
System.out.println("COORDINATES_SIZE " + BinaryMapIndexWriter.COORDINATES_SIZE + " count " + BinaryMapIndexWriter.COORDINATES_COUNT); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
|
|
|
@ -5,11 +5,13 @@ import java.io.FileInputStream;
|
|||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.DecimalFormatSymbols;
|
||||
import java.text.NumberFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.TimeZone;
|
||||
|
||||
|
@ -31,7 +33,7 @@ public class GPXUtilities {
|
|||
|
||||
private final static String GPX_TIME_FORMAT = "yyyy-MM-dd'T'HH:mm:ss'Z'"; //$NON-NLS-1$
|
||||
|
||||
private final static NumberFormat latLonFormat = new DecimalFormat("0.00#####");
|
||||
private final static NumberFormat latLonFormat = new DecimalFormat("0.00#####", new DecimalFormatSymbols(Locale.US));
|
||||
|
||||
public static class TrkPt {
|
||||
public double lat;
|
||||
|
|
|
@ -80,6 +80,9 @@ public class NavigationService extends Service implements LocationListener {
|
|||
serviceOffInterval = OsmandSettings.getServiceOffInterval(settings);
|
||||
serviceOffProvider = OsmandSettings.getServiceOffProvider(settings);
|
||||
serviceError = OsmandSettings.getServiceOffWaitInterval(settings);
|
||||
// TODO Test values
|
||||
// serviceOffInterval = 20 * 1000;
|
||||
// serviceError = 15 * 1000;
|
||||
savingTrackHelper = new SavingTrackHelper(this);
|
||||
delayedAction(true, 500);
|
||||
routingHelper = ((OsmandApplication)getApplication()).getRoutingHelper();
|
||||
|
|
Loading…
Reference in a new issue