diff --git a/DataExtractionOSM/src/net/osmand/data/preparation/IndexCreator.java b/DataExtractionOSM/src/net/osmand/data/preparation/IndexCreator.java index 26670447a3..b8f0ac9e29 100644 --- a/DataExtractionOSM/src/net/osmand/data/preparation/IndexCreator.java +++ b/DataExtractionOSM/src/net/osmand/data/preparation/IndexCreator.java @@ -56,6 +56,7 @@ import net.osmand.osm.OSMSettings.OSMTagKey; import net.osmand.osm.io.IOsmStorageFilter; import net.osmand.osm.io.OsmBaseStorage; import net.osmand.swing.DataExtractionSettings; +import net.osmand.swing.Messages; import net.sf.junidecode.Junidecode; import org.apache.commons.logging.Log; @@ -265,55 +266,55 @@ public class IndexCreator { Statement stat = dbConn.createStatement(); if (usingDerby()) { try { - stat.executeUpdate("drop table node"); + stat.executeUpdate("drop table node"); //$NON-NLS-1$ } catch (SQLException e) { // ignore it } } else { - stat.executeUpdate("drop table if exists node"); + stat.executeUpdate("drop table if exists node"); //$NON-NLS-1$ } - stat.executeUpdate("create table node (id bigint primary key, latitude double, longitude double)"); - stat.executeUpdate("create index IdIndex ON node (id)"); + stat.executeUpdate("create table node (id bigint primary key, latitude double, longitude double)"); //$NON-NLS-1$ + stat.executeUpdate("create index IdIndex ON node (id)"); //$NON-NLS-1$ if (usingDerby()) { try { - stat.executeUpdate("drop table ways"); + stat.executeUpdate("drop table ways"); //$NON-NLS-1$ } catch (SQLException e) { // ignore it } } else { - stat.executeUpdate("drop table if exists ways"); + stat.executeUpdate("drop table if exists ways"); //$NON-NLS-1$ } - stat.executeUpdate("create table ways (id bigint, node bigint, ord smallint, primary key (id, ord))"); - stat.executeUpdate("create index IdWIndex ON ways (id)"); + stat.executeUpdate("create table ways (id bigint, node bigint, ord smallint, primary key (id, ord))"); //$NON-NLS-1$ + stat.executeUpdate("create index IdWIndex ON ways (id)"); //$NON-NLS-1$ if (usingDerby()) { try { - stat.executeUpdate("drop table relations"); + stat.executeUpdate("drop table relations"); //$NON-NLS-1$ } catch (SQLException e) { // ignore it } } else { - stat.executeUpdate("drop table if exists relations"); + stat.executeUpdate("drop table if exists relations"); //$NON-NLS-1$ } stat - .executeUpdate("create table relations (id bigint, member bigint, type smallint, role varchar(255), ord smallint, primary key (id, ord))"); - stat.executeUpdate("create index IdRIndex ON relations (id)"); + .executeUpdate("create table relations (id bigint, member bigint, type smallint, role varchar(255), ord smallint, primary key (id, ord))"); //$NON-NLS-1$ + stat.executeUpdate("create index IdRIndex ON relations (id)"); //$NON-NLS-1$ if (usingDerby()) { try { - stat.executeUpdate("drop table tags"); + stat.executeUpdate("drop table tags"); //$NON-NLS-1$ } catch (SQLException e) { // ignore it } } else { - stat.executeUpdate("drop table if exists tags"); + stat.executeUpdate("drop table if exists tags"); //$NON-NLS-1$ } - stat.executeUpdate("create table tags (id bigint, type smallint, skeys varchar(255), value varchar(255), primary key (id, type, skeys))"); - stat.executeUpdate("create index IdTIndex ON tags (id, type)"); + stat.executeUpdate("create table tags (id bigint, type smallint, skeys varchar(255), value varchar(255), primary key (id, type, skeys))"); //$NON-NLS-1$ + stat.executeUpdate("create index IdTIndex ON tags (id, type)"); //$NON-NLS-1$ stat.close(); - prepNode = dbConn.prepareStatement("insert into node values (?, ?, ?)"); - prepWays = dbConn.prepareStatement("insert into ways values (?, ?, ?)"); - prepRelations = dbConn.prepareStatement("insert into relations values (?, ?, ?, ?, ?)"); - prepTags = dbConn.prepareStatement("insert into tags values (?, ?, ?, ?)"); + prepNode = dbConn.prepareStatement("insert into node values (?, ?, ?)"); //$NON-NLS-1$ + prepWays = dbConn.prepareStatement("insert into ways values (?, ?, ?)"); //$NON-NLS-1$ + prepRelations = dbConn.prepareStatement("insert into relations values (?, ?, ?, ?, ?)"); //$NON-NLS-1$ + prepTags = dbConn.prepareStatement("insert into tags values (?, ?, ?, ?)"); //$NON-NLS-1$ dbConn.setAutoCommit(false); } @@ -403,7 +404,7 @@ public class IndexCreator { currentTagsCount = 0; } } catch (SQLException ex) { - log.error("Could not save in db", ex); + log.error("Could not save in db", ex); //$NON-NLS-1$ } // do not add to storage return false; @@ -424,7 +425,7 @@ public class IndexCreator { public String getRegionName() { if (regionName == null) { - return "Region"; + return "Region"; //$NON-NLS-1$ } return regionName; } @@ -453,7 +454,7 @@ public class IndexCreator { public static boolean databaseFileExists(File dbFile) { if (usingH2()) { - return new File(dbFile.getAbsolutePath() + ".h2.db").exists(); + return new File(dbFile.getAbsolutePath() + ".h2.db").exists(); //$NON-NLS-1$ } else { return dbFile.exists(); } @@ -623,7 +624,7 @@ public class IndexCreator { } public String getTempMapDBFileName() { - return getMapFileName() + ".tmp"; + return getMapFileName() + ".tmp"; //$NON-NLS-1$ } public Long getLastModifiedDate() { @@ -651,13 +652,13 @@ public class IndexCreator { // stat.executeUpdate("create table relations (id "+longType+", member "+longType+", type smallint, role varchar(255), ord smallint)"); if (type == EntityType.NODE) { // filter out all nodes without tags - select = "select n.id, n.latitude, n.longitude, t.skeys, t.value from node n inner join tags t on n.id = t.id and t.type = 0 order by n.id"; + select = "select n.id, n.latitude, n.longitude, t.skeys, t.value from node n inner join tags t on n.id = t.id and t.type = 0 order by n.id"; //$NON-NLS-1$ } else if (type == EntityType.WAY) { - select = "select w.id, w.node, w.ord, t.skeys, t.value, n.latitude, n.longitude " + - "from ways w left join tags t on w.id = t.id and t.type = 1 and w.ord = 0 inner join node n on w.node = n.id " + - "order by w.id, w.ord"; + select = "select w.id, w.node, w.ord, t.skeys, t.value, n.latitude, n.longitude " + //$NON-NLS-1$ + "from ways w left join tags t on w.id = t.id and t.type = 1 and w.ord = 0 inner join node n on w.node = n.id " + //$NON-NLS-1$ + "order by w.id, w.ord"; //$NON-NLS-1$ } else { - select = "select r.id, t.skeys, t.value from relations r inner join tags t on t.id = r.id and t.type = 2 and r.ord = 0"; + select = "select r.id, t.skeys, t.value from relations r inner join tags t on t.id = r.id and t.type = 2 and r.ord = 0"; //$NON-NLS-1$ } ResultSet rs = statement.executeQuery(select); @@ -722,16 +723,16 @@ public class IndexCreator { private static Set acceptedRoutes = new HashSet(); static { - acceptedRoutes.add("bus"); - acceptedRoutes.add("trolleybus"); - acceptedRoutes.add("share_taxi"); + acceptedRoutes.add("bus"); //$NON-NLS-1$ + acceptedRoutes.add("trolleybus"); //$NON-NLS-1$ + acceptedRoutes.add("share_taxi"); //$NON-NLS-1$ - acceptedRoutes.add("subway"); - acceptedRoutes.add("train"); + acceptedRoutes.add("subway"); //$NON-NLS-1$ + acceptedRoutes.add("train"); //$NON-NLS-1$ - acceptedRoutes.add("tram"); + acceptedRoutes.add("tram"); //$NON-NLS-1$ - acceptedRoutes.add("ferry"); + acceptedRoutes.add("ferry"); //$NON-NLS-1$ } private TransportRoute indexTransportRoute(Relation rel) { @@ -749,7 +750,7 @@ public class IndexCreator { r.setType(route); if (operator != null) { - route = operator + " : " + route; + route = operator + " : " + route; //$NON-NLS-1$ } final Map forwardStops = new LinkedHashMap(); @@ -758,11 +759,11 @@ public class IndexCreator { int forwardStop = 0; int backwardStop = 0; for (Entry e : rel.getMemberEntities().entrySet()) { - if (e.getValue().contains("stop")) { + if (e.getValue().contains("stop")) { //$NON-NLS-1$ if (e.getKey() instanceof Node) { TransportStop stop = new TransportStop(e.getKey()); - boolean forward = e.getValue().contains("forward"); - boolean backward = e.getValue().contains("backward"); + boolean forward = e.getValue().contains("forward"); //$NON-NLS-1$ + boolean backward = e.getValue().contains("backward"); //$NON-NLS-1$ currentStop++; if (forward || !backward) { forwardStop++; @@ -834,15 +835,15 @@ public class IndexCreator { public void indexAddressRelation(Relation i) throws SQLException { String type = i.getTag(OSMTagKey.ADDRESS_TYPE); - boolean house = "house".equals(type); - boolean street = "a6".equals(type); + boolean house = "house".equals(type); //$NON-NLS-1$ + boolean street = "a6".equals(type); //$NON-NLS-1$ if (house || street) { // try to find appropriate city/street City c = null; // load with member ways with their nodes and tags ! loadEntityData(i, true); - Collection members = i.getMembers("is_in"); + Collection members = i.getMembers("is_in"); //$NON-NLS-1$ Relation a3 = null; Relation a6 = null; if (!members.isEmpty()) { @@ -855,7 +856,7 @@ public class IndexCreator { // go one level up for house if (house) { a6 = (Relation) in; - members = ((Relation) in).getMembers("is_in"); + members = ((Relation) in).getMembers("is_in"); //$NON-NLS-1$ if (!members.isEmpty()) { in = members.iterator().next(); loadEntityData(in, true); @@ -871,7 +872,7 @@ public class IndexCreator { } if (a3 != null) { - Collection memberIds = a3.getMemberIds("label"); + Collection memberIds = a3.getMemberIds("label"); //$NON-NLS-1$ if (!memberIds.isEmpty()) { c = cities.get(memberIds.iterator().next()); } @@ -897,7 +898,7 @@ public class IndexCreator { } if (street) { for (Map.Entry r : i.getMemberEntities().entrySet()) { - if ("street".equals(r.getValue())) { + if ("street".equals(r.getValue())) { //$NON-NLS-1$ if (r.getKey() instanceof Way && saveAddressWays) { DataIndexWriter.writeStreetWayNodes(addressStreetNodeStat, pStatements, streetId, (Way) r.getKey(), BATCH_SIZE); @@ -905,7 +906,7 @@ public class IndexCreator { addressStreetNodeLocalSet.add(r.getKey().getId()); } } - } else if ("house".equals(r.getValue())) { + } else if ("house".equals(r.getValue())) { //$NON-NLS-1$ // will be registered further in other case if (!(r.getKey() instanceof Relation)) { String hno = r.getKey().getTag(OSMTagKey.ADDR_HOUSE_NUMBER); @@ -929,7 +930,7 @@ public class IndexCreator { if (hno == null) { hno = i.getTag(OSMTagKey.NAME); } - members = i.getMembers("border"); + members = i.getMembers("border"); //$NON-NLS-1$ if (!members.isEmpty()) { Entity border = members.iterator().next(); if (border != null) { @@ -946,7 +947,7 @@ public class IndexCreator { } } } else { - log.info("For relation " + i.getId() + " border not found"); + log.info("For relation " + i.getId() + " border not found"); //$NON-NLS-1$ //$NON-NLS-2$ } } @@ -1067,7 +1068,7 @@ public class IndexCreator { name = normalizeStreetName(name); if (loadInMemory) { - foundId = addressStreetLocalMap.get(name + "_" + city.getId()); + foundId = addressStreetLocalMap.get(name + "_" + city.getId()); //$NON-NLS-1$ } else { addressSearchStreetStat.setLong(1, city.getId()); addressSearchStreetStat.setString(2, name); @@ -1083,7 +1084,7 @@ public class IndexCreator { location.getLatitude(), location.getLongitude(), city.getId()); if (loadInMemory) { DataIndexWriter.addBatch(pStatements, addressStreetStat, BATCH_SIZE); - addressStreetLocalMap.put(name + "_" + city.getId(), initId); + addressStreetLocalMap.put(name + "_" + city.getId(), initId); //$NON-NLS-1$ } else { addressStreetStat.execute(); // commit immediately to search after @@ -1128,7 +1129,7 @@ public class IndexCreator { if (indexMap && (e instanceof Way || e instanceof Node)) { // manipulate what kind of way to load loadEntityData(e, false); - boolean inverse = "-1".equals(e.getTag(OSMTagKey.ONEWAY)); + boolean inverse = "-1".equals(e.getTag(OSMTagKey.ONEWAY)); //$NON-NLS-1$ for (int i = 0; i < MAP_ZOOMS.length - 1; i++) { writeBinaryEntityToMapDatabase(e, e.getId(), i == 0 ? inverse : false, i); } @@ -1199,33 +1200,33 @@ public class IndexCreator { } } else if (step == STEP_ADDRESS_RELATIONS_AND_MULTYPOLYGONS) { if (indexAddress) { - if (e instanceof Relation && "address".equals(e.getTag(OSMTagKey.TYPE))) { + if (e instanceof Relation && "address".equals(e.getTag(OSMTagKey.TYPE))) { //$NON-NLS-1$ indexAddressRelation((Relation) e); } } - if (indexMap && e instanceof Relation && "restriction".equals(e.getTag(OSMTagKey.TYPE))) { - String val = e.getTag("restriction"); + if (indexMap && e instanceof Relation && "restriction".equals(e.getTag(OSMTagKey.TYPE))) { //$NON-NLS-1$ + String val = e.getTag("restriction"); //$NON-NLS-1$ if (val != null) { byte type = -1; - if ("no_right_turn".equalsIgnoreCase(val)) { + if ("no_right_turn".equalsIgnoreCase(val)) { //$NON-NLS-1$ type = MapRenderingTypes.RESTRICTION_NO_RIGHT_TURN; - } else if ("no_left_turn".equalsIgnoreCase(val)) { + } else if ("no_left_turn".equalsIgnoreCase(val)) { //$NON-NLS-1$ type = MapRenderingTypes.RESTRICTION_NO_LEFT_TURN; - } else if ("no_u_turn".equalsIgnoreCase(val)) { + } else if ("no_u_turn".equalsIgnoreCase(val)) { //$NON-NLS-1$ type = MapRenderingTypes.RESTRICTION_NO_U_TURN; - } else if ("no_straight_on".equalsIgnoreCase(val)) { + } else if ("no_straight_on".equalsIgnoreCase(val)) { //$NON-NLS-1$ type = MapRenderingTypes.RESTRICTION_NO_STRAIGHT_ON; - } else if ("only_right_turn".equalsIgnoreCase(val)) { + } else if ("only_right_turn".equalsIgnoreCase(val)) { //$NON-NLS-1$ type = MapRenderingTypes.RESTRICTION_ONLY_RIGHT_TURN; - } else if ("only_left_turn".equalsIgnoreCase(val)) { + } else if ("only_left_turn".equalsIgnoreCase(val)) { //$NON-NLS-1$ type = MapRenderingTypes.RESTRICTION_ONLY_LEFT_TURN; - } else if ("only_straight_on".equalsIgnoreCase(val)) { + } else if ("only_straight_on".equalsIgnoreCase(val)) { //$NON-NLS-1$ type = MapRenderingTypes.RESTRICTION_ONLY_STRAIGHT_ON; } if (type != -1) { loadEntityData(e, true); - Collection fromL = ((Relation) e).getMemberIds("from"); - Collection toL = ((Relation) e).getMemberIds("to"); + Collection fromL = ((Relation) e).getMemberIds("from"); //$NON-NLS-1$ + Collection toL = ((Relation) e).getMemberIds("to"); //$NON-NLS-1$ if (!fromL.isEmpty() && !toL.isEmpty()) { EntityId from = fromL.iterator().next(); EntityId to = toL.iterator().next(); @@ -1239,13 +1240,13 @@ public class IndexCreator { } } } - if (indexMap && e instanceof Relation && "multipolygon".equals(e.getTag(OSMTagKey.TYPE))) { + if (indexMap && e instanceof Relation && "multipolygon".equals(e.getTag(OSMTagKey.TYPE))) { //$NON-NLS-1$ loadEntityData(e, true); Map entities = ((Relation) e).getMemberEntities(); for (Entity es : entities.keySet()) { if (es instanceof Way) { - boolean inner = "inner".equals(entities.get(es)); + boolean inner = "inner".equals(entities.get(es)); //$NON-NLS-1$ if (!inner) { for (String t : es.getTagKeySet()) { e.putTag(t, es.getTag(t)); @@ -1277,24 +1278,24 @@ public class IndexCreator { // skip completed rings that are not one type for (List l : completedRings) { - boolean innerType = "inner".equals(entities.get(l.get(0))); + boolean innerType = "inner".equals(entities.get(l.get(0))); //$NON-NLS-1$ for (Way way : l) { - boolean inner = "inner".equals(entities.get(way)); + boolean inner = "inner".equals(entities.get(way)); //$NON-NLS-1$ if (innerType != inner) { - log.warn("Probably map bug: Multipoligon contains outer and inner ways.\n" + - "Way:" + way.getId() + " is strange part of completed ring. InnerType:" + innerType + " way inner: " + inner + " way inner string:" + entities.get(way)); + log.warn("Probably map bug: Multipoligon contains outer and inner ways.\n" + //$NON-NLS-1$ + "Way:" + way.getId() + " is strange part of completed ring. InnerType:" + innerType + " way inner: " + inner + " way inner string:" + entities.get(way)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ return; } } } for (List l : completedRings) { - boolean innerType = "inner".equals(entities.get(l.get(0))); + boolean innerType = "inner".equals(entities.get(l.get(0))); //$NON-NLS-1$ boolean clockwise = isClockwiseWay(l); // clockwise - outer (like coastline), anticlockwise - inner boolean inverse = clockwise != !innerType; for (Way way : l) { - boolean inner = "inner".equals(entities.get(way)); + boolean inner = "inner".equals(entities.get(way)); //$NON-NLS-1$ if (!inner && name != null) { multiPolygonsNames.put(way.getId(), name); } @@ -1575,7 +1576,7 @@ public class IndexCreator { int ind = 0; int sh = 0; if(typeUse.size() > 3){ - log.error("Types for low index way more than 4"); + log.error("Types for low index way more than 4"); //$NON-NLS-1$ } i |= (mainType << sh); if (typeUse.size() > ind) { @@ -1907,7 +1908,7 @@ public class IndexCreator { break; } } - progress.startTask("Serializing city addresses...", j + ((cities.size() - j) / 100 + 1)); + progress.startTask(Messages.getString("IndexCreator.SERIALIZING_ADRESS"), j + ((cities.size() - j) / 100 + 1)); //$NON-NLS-1$ Map> postcodes = new TreeMap>(); boolean writeCities = true; @@ -1950,7 +1951,7 @@ public class IndexCreator { } } if (f > 500) { - System.out.println("! " + c.getName() + " ! " + f + " " + bCount + " streets " + streets.size()); + System.out.println("! " + c.getName() + " ! " + f + " " + bCount + " streets " + streets.size()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ } } writer.endCityIndexes(!writeCities); @@ -1975,7 +1976,7 @@ public class IndexCreator { public void writeBinaryMapIndex(BinaryMapIndexWriter writer) throws IOException, SQLException { try { - PreparedStatement selectData = mapConnection.prepareStatement("SELECT nodes, types, name, highway, restrictions FROM binary_map_objects WHERE id = ?"); + PreparedStatement selectData = mapConnection.prepareStatement("SELECT nodes, types, name, highway, restrictions FROM binary_map_objects WHERE id = ?"); //$NON-NLS-1$ writer.startWriteMapIndex(regionName); @@ -2024,7 +2025,7 @@ public class IndexCreator { rs.getBytes(2), rs.getString(3), rs.getInt(4), rs.getBytes(5)); } else { - log.error("Something goes wrong with id = " + id); + log.error("Something goes wrong with id = " + id); //$NON-NLS-1$ } } else { long ptr = ((NonLeafElement) e[i]).getPtr(); @@ -2049,14 +2050,14 @@ public class IndexCreator { private Map createStringTableForTransport() { Map stringTable = new LinkedHashMap(); - registerString(stringTable, "bus"); - registerString(stringTable, "trolleybus"); - registerString(stringTable, "subway"); - registerString(stringTable, "tram"); - registerString(stringTable, "share_taxi"); - registerString(stringTable, "taxi"); - registerString(stringTable, "train"); - registerString(stringTable, "ferry"); + registerString(stringTable, "bus"); //$NON-NLS-1$ + registerString(stringTable, "trolleybus"); //$NON-NLS-1$ + registerString(stringTable, "subway"); //$NON-NLS-1$ + registerString(stringTable, "tram"); //$NON-NLS-1$ + registerString(stringTable, "share_taxi"); //$NON-NLS-1$ + registerString(stringTable, "taxi"); //$NON-NLS-1$ + registerString(stringTable, "train"); //$NON-NLS-1$ + registerString(stringTable, "ferry"); //$NON-NLS-1$ return stringTable; } @@ -2064,10 +2065,10 @@ public class IndexCreator { try { visitedStops = null; // allow gc to collect it PreparedStatement selectTransportRouteData = mapConnection.prepareStatement( - "SELECT id, dist, name, name_en, ref, operator, type FROM transport_route"); - PreparedStatement selectTransportData = mapConnection.prepareStatement("SELECT S.stop, S.direction," + - " A.latitude, A.longitude, A.name, A.name_en " + - "FROM transport_route_stop S INNER JOIN transport_stop A ON A.id = S.stop WHERE S.route = ? ORDER BY S.ord asc"); + "SELECT id, dist, name, name_en, ref, operator, type FROM transport_route"); //$NON-NLS-1$ + PreparedStatement selectTransportData = mapConnection.prepareStatement("SELECT S.stop, S.direction," + //$NON-NLS-1$ + " A.latitude, A.longitude, A.name, A.name_en " + //$NON-NLS-1$ + "FROM transport_route_stop S INNER JOIN transport_stop A ON A.id = S.stop WHERE S.route = ? ORDER BY S.ord asc"); //$NON-NLS-1$ writer.startWriteTransportIndex(regionName); @@ -2127,9 +2128,9 @@ public class IndexCreator { writer.endWriteTransportRoutes(); PreparedStatement selectTransportStop = mapConnection.prepareStatement( - "SELECT A.id, A.latitude, A.longitude, A.name, A.name_en FROM transport_stop A where A.id = ?"); + "SELECT A.id, A.latitude, A.longitude, A.name, A.name_en FROM transport_stop A where A.id = ?"); //$NON-NLS-1$ PreparedStatement selectTransportRouteStop = mapConnection.prepareStatement( - "SELECT DISTINCT S.route FROM transport_route_stop S WHERE S.stop = ? "); + "SELECT DISTINCT S.route FROM transport_route_stop S WHERE S.stop = ? "); //$NON-NLS-1$ long rootIndex = transportStopsTree.getFileHdr().getRootIndex(); rtree.Node root = transportStopsTree.getReadNode(rootIndex); Rect rootBounds = calcBounds(root); @@ -2180,7 +2181,7 @@ public class IndexCreator { while (rset.next()) { Long route = transportRoutes.get(rset.getLong(1)); if (route == null) { - log.error("Something goes wrong with transport route id = " + rset.getLong(1)); + log.error("Something goes wrong with transport route id = " + rset.getLong(1)); //$NON-NLS-1$ } else { routes.add(route); } @@ -2188,7 +2189,7 @@ public class IndexCreator { rset.close(); writer.writeTransportStop(id, x24, y24, name, nameEn, stringTable, routes); } else { - log.error("Something goes wrong with transport id = " + id); + log.error("Something goes wrong with transport id = " + id); //$NON-NLS-1$ } } else { long ptr = ((NonLeafElement) e[i]).getPtr(); @@ -2219,19 +2220,19 @@ public class IndexCreator { } public String getRTreeMapIndexNonPackFileName() { - return mapFile.getAbsolutePath() + ".rtree"; + return mapFile.getAbsolutePath() + ".rtree"; //$NON-NLS-1$ } public String getRTreeTransportStopsFileName() { - return mapFile.getAbsolutePath() + ".trans"; + return mapFile.getAbsolutePath() + ".trans"; //$NON-NLS-1$ } public String getRTreeTransportStopsPackFileName() { - return mapFile.getAbsolutePath() + ".ptrans"; + return mapFile.getAbsolutePath() + ".ptrans"; //$NON-NLS-1$ } public String getRTreeMapIndexPackFileName() { - return mapFile.getAbsolutePath() + ".prtree"; + return mapFile.getAbsolutePath() + ".prtree"; //$NON-NLS-1$ } public void generateIndexes(File readFile, IProgress progress, IOsmStorageFilter addFilter) throws IOException, SAXException, @@ -2272,8 +2273,8 @@ public class IndexCreator { int allWays = 1000000; int allNodes = 10000000; if (loadFromPath) { - progress.setGeneralProgress("[35 of 100]"); - progress.startTask("Loading file " + readFile.getAbsolutePath(), -1); + progress.setGeneralProgress("[35 / 100]"); //$NON-NLS-1$ + progress.startTask(Messages.getString("IndexCreator.LOADING_FILE") + readFile.getAbsolutePath(), -1); //$NON-NLS-1$ NewDataExtractionOsmFilter filter = extractOsmToNodesDB(readFile, progress, addFilter); if (filter != null) { @@ -2283,14 +2284,14 @@ public class IndexCreator { } } - pselectNode = dbConn.prepareStatement("select n.latitude, n.longitude, t.skeys, t.value from node n left join tags t on n.id = t.id and t.type = 0 where n.id = ?"); - pselectWay = dbConn.prepareStatement("select w.node, w.ord, t.skeys, t.value, n.latitude, n.longitude " + - "from ways w left join tags t on w.id = t.id and t.type = 1 and w.ord = 0 inner join node n on w.node = n.id " + - "where w.id = ? order by w.ord"); - pselectRelation = dbConn.prepareStatement("select r.member, r.type, r.role, r.ord, t.skeys, t.value " + - "from relations r left join tags t on r.id = t.id and t.type = 2 and r.ord = 0 " + - "where r.id = ? order by r.ord"); - pselectTags = dbConn.prepareStatement("select skeys, value from tags where id = ? and type = ?"); + pselectNode = dbConn.prepareStatement("select n.latitude, n.longitude, t.skeys, t.value from node n left join tags t on n.id = t.id and t.type = 0 where n.id = ?"); //$NON-NLS-1$ + pselectWay = dbConn.prepareStatement("select w.node, w.ord, t.skeys, t.value, n.latitude, n.longitude " + //$NON-NLS-1$ + "from ways w left join tags t on w.id = t.id and t.type = 1 and w.ord = 0 inner join node n on w.node = n.id " + //$NON-NLS-1$ + "where w.id = ? order by w.ord"); //$NON-NLS-1$ + pselectRelation = dbConn.prepareStatement("select r.member, r.type, r.role, r.ord, t.skeys, t.value " + //$NON-NLS-1$ + "from relations r left join tags t on r.id = t.id and t.type = 2 and r.ord = 0 " + //$NON-NLS-1$ + "where r.id = ? order by r.ord"); //$NON-NLS-1$ + pselectTags = dbConn.prepareStatement("select skeys, value from tags where id = ? and type = ?"); //$NON-NLS-1$ // do not create temp map file and rtree files if (recreateOnlyBinaryFile) { @@ -2310,7 +2311,7 @@ public class IndexCreator { transportStopsTree = new RTree(getRTreeTransportStopsPackFileName()); } } catch (RTreeException e) { - log.error("Error flushing", e); + log.error("Error flushing", e); //$NON-NLS-1$ throw new IOException(e); } } else { @@ -2322,8 +2323,8 @@ public class IndexCreator { // 3.1 write all cities if (indexAddress) { - progress.setGeneralProgress("[40 of 100]"); - progress.startTask("Indexing cities...", allNodes); + progress.setGeneralProgress("[40 / 100]"); //$NON-NLS-1$ + progress.startTask(Messages.getString("IndexCreator.INDEX_CITIES"), allNodes); //$NON-NLS-1$ if (!loadFromPath) { allNodes = iterateOverEntities(progress, EntityType.NODE, allNodes, STEP_CITY_NODES); } @@ -2342,8 +2343,8 @@ public class IndexCreator { // 3.2 index address relations if (indexAddress || indexMap) { - progress.setGeneralProgress("[40 of 100]"); - progress.startTask("Preindexing address and map ways...", allRelations); + progress.setGeneralProgress("[40 / 100]"); //$NON-NLS-1$ + progress.startTask(Messages.getString("IndexCreator.PREINDEX_ADRESS_MAP"), allRelations); //$NON-NLS-1$ allRelations = iterateOverEntities(progress, EntityType.RELATION, allRelations, STEP_ADDRESS_RELATIONS_AND_MULTYPOLYGONS); // commit to put all cities @@ -2394,16 +2395,16 @@ public class IndexCreator { // 4. packing map rtree indexes if (indexMap) { - progress.setGeneralProgress("[90 of 100]"); - progress.startTask("Packing rtree map data...", -1); + progress.setGeneralProgress("[90 / 100]"); //$NON-NLS-1$ + progress.startTask(Messages.getString("IndexCreator.PACK_RTREE_MAP"), -1); //$NON-NLS-1$ for (int i = 0; i < MAP_ZOOMS.length - 1; i++) { mapTree[i] = packRtreeFile(mapTree[i], getRTreeMapIndexNonPackFileName() + i, getRTreeMapIndexPackFileName() + i); } } if (indexTransport) { - progress.setGeneralProgress("[90 of 100]"); - progress.startTask("Packing rtree transport data...", -1); + progress.setGeneralProgress("[90 / 100]"); //$NON-NLS-1$ + progress.startTask(Messages.getString("IndexCreator.PACK_RTREE_TRANSP"), -1); //$NON-NLS-1$ transportStopsTree = packRtreeFile(transportStopsTree, getRTreeTransportStopsFileName(), getRTreeTransportStopsPackFileName()); } } @@ -2440,19 +2441,19 @@ public class IndexCreator { progress.finishTask(); writer.close(); mapRAFile.close(); - log.info("Finish writing binary file"); + log.info("Finish writing binary file"); //$NON-NLS-1$ } } catch (RuntimeException e) { - log.error("Log exception", e); + log.error("Log exception", e); //$NON-NLS-1$ throw e; } catch (SQLException e) { - log.error("Log exception", e); + log.error("Log exception", e); //$NON-NLS-1$ throw e; } catch (IOException e) { - log.error("Log exception", e); + log.error("Log exception", e); //$NON-NLS-1$ throw e; } catch (SAXException e) { - log.error("Log exception", e); + log.error("Log exception", e); //$NON-NLS-1$ throw e; } finally { try { @@ -2532,14 +2533,14 @@ public class IndexCreator { // do not delete first db connection if (dbConn != null) { if (usingH2()) { - dbConn.createStatement().execute("SHUTDOWN COMPACT"); + dbConn.createStatement().execute("SHUTDOWN COMPACT"); //$NON-NLS-1$ } dbConn.close(); } if (deleteOsmDB) { if (usingDerby()) { try { - DriverManager.getConnection("jdbc:derby:;shutdown=true"); + DriverManager.getConnection("jdbc:derby:;shutdown=true"); //$NON-NLS-1$ } catch (SQLException e) { // ignore exception } @@ -2572,7 +2573,7 @@ public class IndexCreator { private RTree packRtreeFile(RTree tree, String nonPackFileName, String packFileName) throws IOException { try { - assert rtree.Node.MAX < 50 : "It is better for search performance"; + assert rtree.Node.MAX < 50 : "It is better for search performance"; //$NON-NLS-1$ tree.flush(); File file = new File(packFileName); if (file.exists()) { @@ -2589,7 +2590,7 @@ public class IndexCreator { return new RTree(packFileName); } } catch (RTreeException e) { - log.error("Error flushing", e); + log.error("Error flushing", e); //$NON-NLS-1$ throw new IOException(e); } return tree; @@ -2602,13 +2603,13 @@ public class IndexCreator { InputStream stream = new FileInputStream(readFile); InputStream streamFile = stream; long st = System.currentTimeMillis(); - if (readFile.getName().endsWith(".bz2")) { + if (readFile.getName().endsWith(".bz2")) { //$NON-NLS-1$ if (stream.read() != 'B' || stream.read() != 'Z') { - throw new RuntimeException("The source stream must start with the characters BZ if it is to be read as a BZip2 stream."); + throw new RuntimeException("The source stream must start with the characters BZ if it is to be read as a BZip2 stream."); //$NON-NLS-1$ } else { stream = new CBZip2InputStream(stream); } - } else if (readFile.getName().endsWith(".pbf")) { + } else if (readFile.getName().endsWith(".pbf")) { //$NON-NLS-1$ pbfFile = true; } @@ -2633,13 +2634,13 @@ public class IndexCreator { dbConn.commit(); if (log.isInfoEnabled()) { - log.info("File parsed : " + (System.currentTimeMillis() - st)); + log.info("File parsed : " + (System.currentTimeMillis() - st)); //$NON-NLS-1$ } progress.finishTask(); return filter; } finally { if (log.isInfoEnabled()) { - log.info("File indexed : " + (System.currentTimeMillis() - st)); + log.info("File indexed : " + (System.currentTimeMillis() - st)); //$NON-NLS-1$ } } } @@ -2748,15 +2749,15 @@ public class IndexCreator { } public static void removeWayNodes(File sqlitedb) throws SQLException { - Connection dbConn = DriverManager.getConnection("jdbc:sqlite:" + sqlitedb.getAbsolutePath()); + Connection dbConn = DriverManager.getConnection("jdbc:sqlite:" + sqlitedb.getAbsolutePath()); //$NON-NLS-1$ dbConn.setAutoCommit(false); Statement st = dbConn.createStatement(); - st.execute("DELETE FROM street_node WHERE 1=1"); + st.execute("DELETE FROM street_node WHERE 1=1"); //$NON-NLS-1$ st.close(); dbConn.commit(); st = dbConn.createStatement(); if (usingSQLite()) { - st.execute("VACUUM"); + st.execute("VACUUM"); //$NON-NLS-1$ } st.close(); dbConn.close(); @@ -2766,7 +2767,7 @@ public class IndexCreator { long time = System.currentTimeMillis(); - IndexCreator creator = new IndexCreator(new File("e:/Information/OSM maps/osmand/")); + IndexCreator creator = new IndexCreator(new File("e:/Information/OSM maps/osmand/")); //$NON-NLS-1$ creator.setIndexMap(true); creator.setIndexAddress(true); creator.setIndexPOI(true); @@ -2800,14 +2801,14 @@ public class IndexCreator { // creator.generateIndexes(new File("e:/Information/OSM maps/osm_map/map.osm"), new ConsoleProgressImplementation(15), null); - System.out.println("WHOLE GENERATION TIME : " + (System.currentTimeMillis() - time)); - System.out.println("COORDINATES_SIZE " + BinaryMapIndexWriter.COORDINATES_SIZE + " count " + BinaryMapIndexWriter.COORDINATES_COUNT); - System.out.println("TYPES_SIZE " + BinaryMapIndexWriter.TYPES_SIZE); - System.out.println("ID_SIZE " + BinaryMapIndexWriter.ID_SIZE); - System.out.println("- COORD_TYPES_ID SIZE " + (BinaryMapIndexWriter.COORDINATES_SIZE + BinaryMapIndexWriter.TYPES_SIZE + BinaryMapIndexWriter.ID_SIZE)); - System.out.println("- MAP_DATA_SIZE " + BinaryMapIndexWriter.MAP_DATA_SIZE); - System.out.println("- STRING_TABLE_SIZE " + BinaryMapIndexWriter.STRING_TABLE_SIZE); - System.out.println("-- MAP_DATA_AND_STRINGS SIZE " + (BinaryMapIndexWriter.MAP_DATA_SIZE + BinaryMapIndexWriter.STRING_TABLE_SIZE)); + 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$ + System.out.println("TYPES_SIZE " + BinaryMapIndexWriter.TYPES_SIZE); //$NON-NLS-1$ + System.out.println("ID_SIZE " + BinaryMapIndexWriter.ID_SIZE); //$NON-NLS-1$ + System.out.println("- COORD_TYPES_ID SIZE " + (BinaryMapIndexWriter.COORDINATES_SIZE + BinaryMapIndexWriter.TYPES_SIZE + BinaryMapIndexWriter.ID_SIZE)); //$NON-NLS-1$ + System.out.println("- MAP_DATA_SIZE " + BinaryMapIndexWriter.MAP_DATA_SIZE); //$NON-NLS-1$ + System.out.println("- STRING_TABLE_SIZE " + BinaryMapIndexWriter.STRING_TABLE_SIZE); //$NON-NLS-1$ + System.out.println("-- MAP_DATA_AND_STRINGS SIZE " + (BinaryMapIndexWriter.MAP_DATA_SIZE + BinaryMapIndexWriter.STRING_TABLE_SIZE)); //$NON-NLS-1$ } } \ No newline at end of file diff --git a/DataExtractionOSM/src/net/osmand/swing/MapInformationLayer.java b/DataExtractionOSM/src/net/osmand/swing/MapInformationLayer.java index f6a5ab4934..14478d4b45 100644 --- a/DataExtractionOSM/src/net/osmand/swing/MapInformationLayer.java +++ b/DataExtractionOSM/src/net/osmand/swing/MapInformationLayer.java @@ -38,10 +38,10 @@ public class MapInformationLayer implements MapPanelLayer { gpsLocation.setOpaque(false); updateLocationLabel(); - JButton zoomIn = new JButton("+"); - JButton zoomOut = new JButton("-"); + JButton zoomIn = new JButton("+"); //$NON-NLS-1$ + JButton zoomOut = new JButton("-"); //$NON-NLS-1$ areaButton = new JButton(); - areaButton.setAction(new AbstractAction("Preload area"){ + areaButton.setAction(new AbstractAction(Messages.getString("MapInformationLayer.PRELOAD.AREA")){ //$NON-NLS-1$ private static final long serialVersionUID = -5512220294374994021L; @Override @@ -88,7 +88,7 @@ public class MapInformationLayer implements MapPanelLayer { double latitude = map.getLatitude(); double longitude = map.getLongitude(); int zoom = map.getZoom(); - gpsLocation.setText(MessageFormat.format("Lat : {0,number,#.####}, lon : {1,number,#.####}, zoom : {2}", latitude, longitude, zoom)); + gpsLocation.setText(MessageFormat.format("Lat : {0,number,#.####}, lon : {1,number,#.####}, zoom : {2}", latitude, longitude, zoom)); //$NON-NLS-1$ } @Override public void prepareToDraw() { diff --git a/DataExtractionOSM/src/net/osmand/swing/MapPanel.java b/DataExtractionOSM/src/net/osmand/swing/MapPanel.java index b72854d0e7..234f05420c 100644 --- a/DataExtractionOSM/src/net/osmand/swing/MapPanel.java +++ b/DataExtractionOSM/src/net/osmand/swing/MapPanel.java @@ -63,13 +63,13 @@ public class MapPanel extends JPanel implements IMapDownloaderCallback { public static JMenu getMenuToChooseSource(final MapPanel panel){ - final JMenu tiles = new JMenu("Source of tiles"); - final JMenu userDefined = new JMenu("User defined"); + final JMenu tiles = new JMenu(Messages.getString("MapPanel.SOURCE.OF.TILES")); //$NON-NLS-1$ + final JMenu userDefined = new JMenu(Messages.getString("MapPanel.USER.DEFINED")); //$NON-NLS-1$ final List list = TileSourceManager.getKnownSourceTemplates(); final List udf = TileSourceManager.getUserDefinedTemplates(DataExtractionSettings.getSettings().getTilesDirectory()); final Map items = new LinkedHashMap(); tiles.add(userDefined); - userDefined.add(new AbstractAction("Create new tile source"){ + userDefined.add(new AbstractAction(Messages.getString("MapPanel.NEW.TILE.SRC")){ //$NON-NLS-1$ private static final long serialVersionUID = -8286622335859339130L; @Override @@ -137,7 +137,7 @@ public class MapPanel extends JPanel implements IMapDownloaderCallback { public static void main(String[] args) throws IOException { - JFrame frame = new JFrame("Map view"); + JFrame frame = new JFrame(Messages.getString("MapPanel.MAP.VIEW")); //$NON-NLS-1$ try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (Exception e) { @@ -327,7 +327,7 @@ public class MapPanel extends JPanel implements IMapDownloaderCallback { } public String getFileForImage (int x, int y, int zoom, String ext){ - return map.getName() +"/"+zoom+"/"+(x) +"/"+y+ext+".tile"; + return map.getName() +"/"+zoom+"/"+(x) +"/"+y+ext+".tile"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ } public Image getImageFor(int x, int y, int zoom, boolean loadIfNeeded) throws IOException{ @@ -344,13 +344,13 @@ public class MapPanel extends JPanel implements IMapDownloaderCallback { remove.flush(); } if(log.isInfoEnabled()){ - log.info("Before running gc on map tiles. Total Memory : " + (Runtime.getRuntime().totalMemory() >> 20) + " Mb. Used memory : " - + ((Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) >> 20) + " Mb"); + log.info("Before running gc on map tiles. Total Memory : " + (Runtime.getRuntime().totalMemory() >> 20) + " Mb. Used memory : " //$NON-NLS-1$ //$NON-NLS-2$ + + ((Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) >> 20) + " Mb"); //$NON-NLS-1$ } System.gc(); if(log.isInfoEnabled()){ - log.info("After running gc on map tiles. Total Memory : " + (Runtime.getRuntime().totalMemory() >> 20) + " Mb. Used memory : " - + ((Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) >> 20) + " Mb"); + log.info("After running gc on map tiles. Total Memory : " + (Runtime.getRuntime().totalMemory() >> 20) + " Mb. Used memory : " //$NON-NLS-1$ //$NON-NLS-2$ + + ((Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) >> 20) + " Mb"); //$NON-NLS-1$ } } if (!downloader.isFileCurrentlyDownloaded(en)) { @@ -362,7 +362,7 @@ public class MapPanel extends JPanel implements IMapDownloaderCallback { // log.debug("Loaded file : " + file + " " + (System.currentTimeMillis() - time) + " ms"); // } } catch (IIOException e) { - log.error("Eror reading png " + x + " " + y + " zoom : " + zoom, e); + log.error("Eror reading png " + x + " " + y + " zoom : " + zoom, e); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ } } if(loadIfNeeded && cache.get(file) == null){ @@ -393,7 +393,7 @@ public class MapPanel extends JPanel implements IMapDownloaderCallback { images[i][j] = getImageFor(request.xTile, request.yTile, zoom, false); repaint(); } catch (IOException e) { - log.error("Eror reading png " + request.xTile + " " + request.yTile + " zoom : " + zoom, e); + log.error("Eror reading png " + request.xTile + " " + request.yTile + " zoom : " + zoom, e); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ } } @@ -440,7 +440,7 @@ public class MapPanel extends JPanel implements IMapDownloaderCallback { } repaint(); } catch (IOException e) { - log.error("Eror reading png preparing images"); + log.error("Eror reading png preparing images"); //$NON-NLS-1$ } } diff --git a/DataExtractionOSM/src/net/osmand/swing/NewTileSourceDialog.java b/DataExtractionOSM/src/net/osmand/swing/NewTileSourceDialog.java index 755f97ac37..ed9ad9c365 100644 --- a/DataExtractionOSM/src/net/osmand/swing/NewTileSourceDialog.java +++ b/DataExtractionOSM/src/net/osmand/swing/NewTileSourceDialog.java @@ -42,7 +42,7 @@ public class NewTileSourceDialog extends JDialog { public NewTileSourceDialog(Component parent){ super(JOptionPane.getFrameForComponent(parent), true); - setTitle("Create new tile source"); + setTitle(Messages.getString("NewTileSourceDialog.CREATE.NEW.TILE")); //$NON-NLS-1$ initDialog(); } @@ -67,9 +67,9 @@ public class NewTileSourceDialog extends JDialog { FlowLayout l = new FlowLayout(FlowLayout.RIGHT); JPanel buttonsPane = new JPanel(l); - okButton = new JButton("OK"); + okButton = new JButton("OK"); //$NON-NLS-1$ buttonsPane.add(okButton); - cancelButton = new JButton("Cancel"); + cancelButton = new JButton(Messages.getString("NewTileSourceDialog.CANCEL")); //$NON-NLS-1$ buttonsPane.add(cancelButton); buttonsPane.setMaximumSize(new Dimension(Short.MAX_VALUE, (int) l.preferredLayoutSize(buttonsPane).getHeight())); @@ -83,11 +83,11 @@ public class NewTileSourceDialog extends JDialog { JPanel panel = new JPanel(); GridBagLayout l = new GridBagLayout(); panel.setLayout(l); - panel.setBorder(BorderFactory.createTitledBorder("Input source")); + panel.setBorder(BorderFactory.createTitledBorder(Messages.getString("NewTileSourceDialog.INPUT.SOURCE"))); //$NON-NLS-1$ root.add(panel); - JLabel label = new JLabel("Name of template : "); + JLabel label = new JLabel(Messages.getString("NewTileSourceDialog.NAME")); //$NON-NLS-1$ panel.add(label); GridBagConstraints constr = new GridBagConstraints(); constr.anchor = GridBagConstraints.WEST; @@ -97,7 +97,7 @@ public class NewTileSourceDialog extends JDialog { l.setConstraints(label, constr); templateName = new JTextField(); - templateName.setText("Mapnik example"); + templateName.setText(Messages.getString("NewTileSourceDialog.MAPNIK.EXAMPLE")); //$NON-NLS-1$ panel.add(templateName); constr = new GridBagConstraints(); constr.fill = GridBagConstraints.HORIZONTAL; @@ -106,7 +106,7 @@ public class NewTileSourceDialog extends JDialog { constr.gridy = 0; l.setConstraints(templateName, constr); - label = new JLabel("Url template with placeholders {$x}, {$y}, {$z} : "); + label = new JLabel(Messages.getString("NewTileSourceDialog.URL.TEMPLATE")); //$NON-NLS-1$ panel.add(label); constr = new GridBagConstraints(); constr.ipadx = 5; @@ -118,7 +118,7 @@ public class NewTileSourceDialog extends JDialog { templateUrl = new JTextField(); // Give hint about wms - templateUrl.setText("http://tile.openstreetmap.org/{$z}/{$x}/{$y}.png"); + templateUrl.setText("http://tile.openstreetmap.org/{$z}/{$x}/{$y}.png"); //$NON-NLS-1$ panel.add(templateUrl); constr = new GridBagConstraints(); constr.weightx = 1; @@ -129,7 +129,7 @@ public class NewTileSourceDialog extends JDialog { l.setConstraints(templateUrl, constr); - label = new JLabel("To add wms service you can use retiling pattern : "); + label = new JLabel(Messages.getString("NewTileSourceDialog.ADD.WMS.SERVICE")); //$NON-NLS-1$ panel.add(label); constr = new GridBagConstraints(); constr.ipadx = 5; @@ -141,7 +141,7 @@ public class NewTileSourceDialog extends JDialog { label = new JLabel(); // Give hint about wms - label.setText("http://whoots.mapwarper.net/tms/{$z}/{$x}/{$y}/{layer}/http://path.to.wms.server"); + label.setText("http://whoots.mapwarper.net/tms/{$z}/{$x}/{$y}/{layer}/http://path.to.wms.server"); //$NON-NLS-1$ panel.add(label); constr = new GridBagConstraints(); constr.weightx = 1; @@ -176,16 +176,16 @@ public class NewTileSourceDialog extends JDialog { public boolean okPressed(){ if(Algoritms.isEmpty(templateName.getText())){ - JOptionPane.showMessageDialog(this, "Please specify template name" , "Error creating new tile source", JOptionPane.ERROR_MESSAGE); + JOptionPane.showMessageDialog(this, Messages.getString("NewTileSourceDialog.SPECIFY.TEMPLATE.NAME") , Messages.getString("NewTileSourceDialog.ERROR.CREATING.NEW.TILE.SRC"), JOptionPane.ERROR_MESSAGE); //$NON-NLS-1$ //$NON-NLS-2$ return false; } if(Algoritms.isEmpty(templateUrl.getText())){ - JOptionPane.showMessageDialog(this, "Please specify template url" , "Error creating new tile source", JOptionPane.ERROR_MESSAGE); + JOptionPane.showMessageDialog(this, Messages.getString("NewTileSourceDialog.SPECIFY.TEMPLATE.URL") , Messages.getString("NewTileSourceDialog.ERROR.CREATING.NEW.TILE.SRC"), JOptionPane.ERROR_MESSAGE); //$NON-NLS-1$ //$NON-NLS-2$ return false; } String url = templateUrl.getText(); - if(url.indexOf("{$x}") == -1 || url.indexOf("{$y}") == -1 || url.indexOf("{$z}") == -1){ - JOptionPane.showMessageDialog(this, "Please specify all placeholders {$x}, {$y}, {$z} in url" , "Error creating new tile source", JOptionPane.ERROR_MESSAGE); + if(url.indexOf("{$x}") == -1 || url.indexOf("{$y}") == -1 || url.indexOf("{$z}") == -1){ //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + JOptionPane.showMessageDialog(this, Messages.getString("NewTileSourceDialog.SPECIFY.ALL.PLACEHLDRS") , Messages.getString("NewTileSourceDialog.ERROR.CREATING.NEW.TILE.SRC"), JOptionPane.ERROR_MESSAGE); //$NON-NLS-1$ //$NON-NLS-2$ return false; } File tilesDirectory = DataExtractionSettings.getSettings().getTilesDirectory(); @@ -193,13 +193,13 @@ public class NewTileSourceDialog extends JDialog { File dir = new File(tilesDirectory, templateName.getText()); if(dir.mkdirs()){ try { - FileOutputStream ous = new FileOutputStream(new File(dir, "url")); - ous.write(url.getBytes("UTF-8")); + FileOutputStream ous = new FileOutputStream(new File(dir, "url")); //$NON-NLS-1$ + ous.write(url.getBytes("UTF-8")); //$NON-NLS-1$ ous.close(); } catch (UnsupportedEncodingException e) { - log.error("Error creating new tile source " + url, e); + log.error(Messages.getString("NewTileSourceDialog.ERROR.CREATING.NEW.TILE.SRC") +" " + url, e); //$NON-NLS-1$ } catch (IOException e) { - log.error("Error creating new tile source " + url, e); + log.error(Messages.getString("NewTileSourceDialog.ERROR.CREATING.NEW.TILE.SRC") +" " + url, e); //$NON-NLS-1$ } } } diff --git a/DataExtractionOSM/src/net/osmand/swing/OsmExtractionPreferencesDialog.java b/DataExtractionOSM/src/net/osmand/swing/OsmExtractionPreferencesDialog.java index dfb365040d..ae247db58a 100644 --- a/DataExtractionOSM/src/net/osmand/swing/OsmExtractionPreferencesDialog.java +++ b/DataExtractionOSM/src/net/osmand/swing/OsmExtractionPreferencesDialog.java @@ -36,7 +36,7 @@ public class OsmExtractionPreferencesDialog extends JDialog { public OsmExtractionPreferencesDialog(Component parent){ super(JOptionPane.getFrameForComponent(parent), true); - setTitle("Preferences"); + setTitle(Messages.getString("OsmExtractionPreferencesDialog.PREFERENCES")); //$NON-NLS-1$ initDialog(); } @@ -62,9 +62,9 @@ public class OsmExtractionPreferencesDialog extends JDialog { FlowLayout l = new FlowLayout(FlowLayout.RIGHT); JPanel buttonsPane = new JPanel(l); - okButton = new JButton("OK"); + okButton = new JButton(Messages.getString("OsmExtractionPreferencesDialog.OK")); //$NON-NLS-1$ buttonsPane.add(okButton); - cancelButton = new JButton("Cancel"); + cancelButton = new JButton(Messages.getString("OsmExtractionPreferencesDialog.CANCEL")); //$NON-NLS-1$ buttonsPane.add(cancelButton); buttonsPane.setMaximumSize(new Dimension(Short.MAX_VALUE, (int) l.preferredLayoutSize(buttonsPane).getHeight())); @@ -76,21 +76,21 @@ public class OsmExtractionPreferencesDialog extends JDialog { private void createGeneralSection(JPanel root) { JPanel panel = new JPanel(); panel.setLayout(new GridLayout(3, 1, 5, 5)); - panel.setBorder(BorderFactory.createTitledBorder("General")); + panel.setBorder(BorderFactory.createTitledBorder(Messages.getString("OsmExtractionPreferencesDialog.GENERAL"))); //$NON-NLS-1$ root.add(panel); useInternet = new JCheckBox(); - useInternet.setText("Use internet to download tiles"); + useInternet.setText(Messages.getString("OsmExtractionPreferencesDialog.INTERNET.TO.DOWNLOAD.FILES")); //$NON-NLS-1$ useInternet.setSelected(DataExtractionSettings.getSettings().useInternetToLoadImages()); panel.add(useInternet); supressWarning = new JCheckBox(); - supressWarning.setText("Supress warnings for duplicated id in osm file"); + supressWarning.setText(Messages.getString("OsmExtractionPreferencesDialog.DUPLICATED.ID")); //$NON-NLS-1$ supressWarning.setSelected(DataExtractionSettings.getSettings().isSupressWarningsForDuplicatedId()); panel.add(supressWarning); loadWholeOsmInfo = new JCheckBox(); - loadWholeOsmInfo.setText("Load whole osm info (to save valid osm file - use in JOSM...)"); + loadWholeOsmInfo.setText(Messages.getString("OsmExtractionPreferencesDialog.LOAD.WHOLE.OSM")); //$NON-NLS-1$ loadWholeOsmInfo.setSelected(DataExtractionSettings.getSettings().getLoadEntityInfo()); panel.add(loadWholeOsmInfo); panel.setMaximumSize(new Dimension(Short.MAX_VALUE, panel.getPreferredSize().height)); @@ -101,10 +101,10 @@ public class OsmExtractionPreferencesDialog extends JDialog { JPanel panel = new JPanel(); GridBagLayout l = new GridBagLayout(); panel.setLayout(l); - panel.setBorder(BorderFactory.createTitledBorder("Normalizing streets")); + panel.setBorder(BorderFactory.createTitledBorder(Messages.getString("OsmExtractionPreferencesDialog.NORMALIZE.STREETS"))); //$NON-NLS-1$ root.add(panel); - JLabel label = new JLabel("Street name suffixes (av., avenue)"); + JLabel label = new JLabel(Messages.getString("OsmExtractionPreferencesDialog.NAME.SUFFIXES")); //$NON-NLS-1$ panel.add(label); GridBagConstraints constr = new GridBagConstraints(); constr.anchor = GridBagConstraints.WEST; @@ -123,7 +123,7 @@ public class OsmExtractionPreferencesDialog extends JDialog { constr.gridy = 0; l.setConstraints(streetSuffixes, constr); - label = new JLabel("Street name default suffixes (str., street, rue)"); + label = new JLabel(Messages.getString("OsmExtractionPreferencesDialog.DEFAULT.SUFFIXES")); //$NON-NLS-1$ panel.add(label); constr = new GridBagConstraints(); constr.ipadx = 5; diff --git a/DataExtractionOSM/src/net/osmand/swing/ProgressDialog.java b/DataExtractionOSM/src/net/osmand/swing/ProgressDialog.java index e0bb79a5e5..7dfce5047d 100644 --- a/DataExtractionOSM/src/net/osmand/swing/ProgressDialog.java +++ b/DataExtractionOSM/src/net/osmand/swing/ProgressDialog.java @@ -109,7 +109,7 @@ public class ProgressDialog extends JDialog implements IProgress { pane.add(label, BorderLayout.CENTER); add(pane); - label.setText("Please waiting..."); + label.setText(Messages.getString("OsmExtractionUI.PLEASE.WAIT")); //$NON-NLS-1$ progressBar.setIndeterminate(true); setSize(550, 100); double x = getParent().getBounds().getCenterX(); @@ -141,8 +141,8 @@ public class ProgressDialog extends JDialog implements IProgress { private void updateMessage() { if(!progressBar.isIndeterminate()){ - String format = String.format("\t %.1f %%", progressBar.getValue() * 100f / ((float) progressBar.getMaximum())); - label.setText(taskName + format + (genProgress == null ? "" : (" " + genProgress))); + String format = String.format("\t %.1f %%", progressBar.getValue() * 100f / ((float) progressBar.getMaximum())); //$NON-NLS-1$ + label.setText(taskName + format + (genProgress == null ? "" : (" " + genProgress))); //$NON-NLS-1$ //$NON-NLS-2$ } } @@ -177,19 +177,19 @@ public class ProgressDialog extends JDialog implements IProgress { @Override public void startTask(String taskName, int work) { if (log.isDebugEnabled()) { - log.debug("Memory before task exec: " + Runtime.getRuntime().totalMemory() + " free : " + Runtime.getRuntime().freeMemory()); + log.debug("Memory before task exec: " + Runtime.getRuntime().totalMemory() + " free : " + Runtime.getRuntime().freeMemory()); //$NON-NLS-1$ //$NON-NLS-2$ if (previousTaskStarted == 0) { - log.debug(taskName + " started"); + log.debug(taskName + " started"); //$NON-NLS-1$ } else { - log.debug(taskName + " started after " + (System.currentTimeMillis() - previousTaskStarted) + " ms"); + log.debug(taskName + " started after " + (System.currentTimeMillis() - previousTaskStarted) + " ms"); //$NON-NLS-1$ //$NON-NLS-2$ } } previousTaskStarted = System.currentTimeMillis(); if(taskName == null){ - taskName = ""; + taskName = ""; //$NON-NLS-1$ } - label.setText(taskName + (genProgress == null ? "" : (" "+genProgress))); + label.setText(taskName + (genProgress == null ? "" : (" "+genProgress))); //$NON-NLS-1$ //$NON-NLS-2$ this.taskName = taskName; startWork(work); } diff --git a/DataExtractionOSM/src/net/osmand/swing/TileBundleDownloadDialog.java b/DataExtractionOSM/src/net/osmand/swing/TileBundleDownloadDialog.java index d14d42d91c..e2f9b51b1b 100644 --- a/DataExtractionOSM/src/net/osmand/swing/TileBundleDownloadDialog.java +++ b/DataExtractionOSM/src/net/osmand/swing/TileBundleDownloadDialog.java @@ -56,7 +56,7 @@ public class TileBundleDownloadDialog extends JDialog { selectionArea = panel.getSelectionArea(); zoom = panel.getZoom(); tilesLocation = panel.getTilesLocation(); - setTitle("Download bundle tiles"); + setTitle(Messages.getString("TileBundleDownloadDialog.DOWNLOAD.BUNDLE.TILES")); //$NON-NLS-1$ initDialog(); } @@ -89,14 +89,14 @@ public class TileBundleDownloadDialog extends JDialog { JPanel zoomControls = new JPanel(); zoomControls.setLayout(new BoxLayout(zoomControls, BoxLayout.X_AXIS)); - JLabel lab = new JLabel("Start zoom level : "); + JLabel lab = new JLabel(Messages.getString("TileBundleDownloadDialog.START.ZOOM.LEVEL")); //$NON-NLS-1$ zoomControls.add(lab); startSpinner = new JSpinner(getSpinnerModel(map.getMinimumZoomSupported(), zoom)); zoomControls.add(startSpinner); startSpinner.setMaximumSize(new Dimension(15, startSpinner.getMaximumSize().height)); zoomControls.add(Box.createHorizontalStrut(15)); - lab = new JLabel("End zoom level : "); + lab = new JLabel(Messages.getString("TileBundleDownloadDialog.END.ZOOM.LEVEL")); //$NON-NLS-1$ zoomControls.add(lab); endSpinner = new JSpinner(getSpinnerModel(zoom, map.getMaximumZoomSupported())); zoomControls.add(endSpinner); @@ -108,13 +108,13 @@ public class TileBundleDownloadDialog extends JDialog { JPanel buttonControls = new JPanel(); buttonControls.setLayout(new BoxLayout(buttonControls, BoxLayout.X_AXIS)); buttonControls.add(Box.createHorizontalGlue()); - specifyFolder = new JButton("Specify different folder"); + specifyFolder = new JButton(Messages.getString("TileBundleDownloadDialog.SPECIFY.FOLDER")); //$NON-NLS-1$ buttonControls.add(specifyFolder); buttonControls.add(Box.createHorizontalStrut(3)); - downloadButton = new JButton("Download tiles"); + downloadButton = new JButton(Messages.getString("TileBundleDownloadDialog.DOWNLOAD.TILES")); //$NON-NLS-1$ buttonControls.add(downloadButton); buttonControls.add(Box.createHorizontalStrut(3)); - cancelButton = new JButton("Cancel"); + cancelButton = new JButton(Messages.getString("TileBundleDownloadDialog.CANCEL")); //$NON-NLS-1$ buttonControls.add(cancelButton); pane.add(buttonControls, BorderLayout.SOUTH); @@ -156,7 +156,7 @@ public class TileBundleDownloadDialog extends JDialog { @Override public void actionPerformed(ActionEvent e) { JFileChooser fc = new JFileChooser(); - fc.setDialogTitle("Choose working directory"); + fc.setDialogTitle(Messages.getString("TileBundleDownloadDialog.CHOOSE.DIRECTORY")); //$NON-NLS-1$ fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); if(tilesLocation != null){ fc.setCurrentDirectory(tilesLocation); @@ -173,7 +173,7 @@ public class TileBundleDownloadDialog extends JDialog { public void downloadTiles(){ setVisible(false); - final ProgressDialog progressDialog = new ProgressDialog(this, "Downloading tiles"); + final ProgressDialog progressDialog = new ProgressDialog(this, Messages.getString("TileBundleDownloadDialog.DOWNLOADING.TILES")); //$NON-NLS-1$ int numberTiles = 0; final int startZoom = (Integer) startSpinner.getValue(); final int endZoom = (Integer) endSpinner.getValue(); @@ -190,7 +190,7 @@ public class TileBundleDownloadDialog extends JDialog { @Override public void run() { - progressDialog.startTask("Loading...", number); + progressDialog.startTask(Messages.getString("TileBundleDownloadDialog.LOADING"), number); //$NON-NLS-1$ for (int zoom = startZoom; zoom <= endZoom; zoom++) { int x1 = (int) MapUtils.getTileNumberX(zoom, selectionArea.getLon1()); int x2 = (int) MapUtils.getTileNumberX(zoom, selectionArea.getLon2()); @@ -249,7 +249,7 @@ public class TileBundleDownloadDialog extends JDialog { } public String getFileForImage (int x, int y, int zoom, String ext){ - return map.getName() +"/"+zoom+"/"+(x) +"/"+y+ext+".tile"; + return map.getName() +"/"+zoom+"/"+(x) +"/"+y+ext+".tile"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ } @@ -263,7 +263,7 @@ public class TileBundleDownloadDialog extends JDialog { numberTiles += (x2 - x1 + 1) * (y2 - y1 + 1); } - String text = MessageFormat.format("Request to download {0} tiles from ''{1}'' (approximately {2} Mb)", + String text = MessageFormat.format(Messages.getString("TileBundleDownloadDialog.REQUEST.DOWNLOAD"), //$NON-NLS-1$ numberTiles, map.getName(), (double)numberTiles*12/1000); label.setText(text); } diff --git a/DataExtractionOSM/src/net/osmand/swing/messages.properties b/DataExtractionOSM/src/net/osmand/swing/messages.properties index 354aed82cb..266c4d59d2 100644 --- a/DataExtractionOSM/src/net/osmand/swing/messages.properties +++ b/DataExtractionOSM/src/net/osmand/swing/messages.properties @@ -1,3 +1,43 @@ +IndexCreator.INDEX_CITIES=Indexing cities... +IndexCreator.INDEX_LO_LEVEL_WAYS=Indexing low level ways... +IndexCreator.LOADING_FILE=Loading file +IndexCreator.PACK_RTREE_MAP=Packing rtree map data... +IndexCreator.PACK_RTREE_TRANSP=Packing rtree transport data... +IndexCreator.PREINDEX_ADRESS_MAP=Preindexing address and map ways... +IndexCreator.PROCESS_OSM_NODES=Processing osm nodes... +IndexCreator.PROCESS_OSM_REL=Processing osm relations... +IndexCreator.PROCESS_OSM_WAYS=Processing osm ways... +IndexCreator.REGISTER_PCODES=Registering postcodes... +IndexCreator.SERIALIZING_ADRESS=Serializing city addresses... +IndexCreator.WRITE_ADDRESS_INDEX=Writing address index to binary file... +IndexCreator.WRITE_MAP_INDEX=Writing map index to binary file... +IndexCreator.WRITE_TRANSP_INDEX=Writing transport index to binary file... +MapInformationLayer.PRELOAD.AREA=Preload area +MapPanel.MAP.VIEW=Map view +MapPanel.NEW.TILE.SRC=Create new tile source +MapPanel.SOURCE.OF.TILES=Source of tiles +MapPanel.USER.DEFINED=User defined +NewTileSourceDialog.ADD.WMS.SERVICE=To add wms service you can use retiling pattern : +NewTileSourceDialog.CANCEL=Cancel +NewTileSourceDialog.CREATE.NEW.TILE=Create new tile source +NewTileSourceDialog.ERROR.CREATING.NEW.TILE.SRC=Error creating new tile source +NewTileSourceDialog.INPUT.SOURCE=Input source +NewTileSourceDialog.MAPNIK.EXAMPLE=Mapnik example +NewTileSourceDialog.NAME=Name of template : +NewTileSourceDialog.SPECIFY.ALL.PLACEHLDRS=Please specify all placeholders {$x}, {$y}, {$z} in url +NewTileSourceDialog.SPECIFY.TEMPLATE.NAME=Please specify template name +NewTileSourceDialog.SPECIFY.TEMPLATE.URL=Please specify template url +NewTileSourceDialog.URL.TEMPLATE=Url template with placeholders {$x}, {$y}, {$z} : +OsmExtractionPreferencesDialog.DEFAULT.SUFFIXES=Street name default suffixes (str., street, rue) +OsmExtractionPreferencesDialog.DUPLICATED.ID=Supress warnings for duplicated id in osm file +OsmExtractionPreferencesDialog.GENERAL=General +OsmExtractionPreferencesDialog.INTERNET.TO.DOWNLOAD.FILES=Use internet to download tiles +OsmExtractionPreferencesDialog.LOAD.WHOLE.OSM=Load whole osm info (to save valid osm file - use in JOSM...) +OsmExtractionPreferencesDialog.NAME.SUFFIXES=Street name suffixes (av., avenue) +OsmExtractionPreferencesDialog.NORMALIZE.STREETS=Normalizing streets +OsmExtractionPreferencesDialog.OK=OK +OsmExtractionPreferencesDialog.PREFERENCES=Preferences +OsmExtractionPreferencesDialog.CANCEL=Cancel OsmExtractionUI.ADDRESS=address OsmExtractionUI.BUILD_ADDRESS=Build Address index OsmExtractionUI.BUILD_MAP=Build map index @@ -26,6 +66,7 @@ OsmExtractionUI.OPEN_LOG_FILE_MANUALLY=Open log file manually OsmExtractionUI.OSM_FILES=Osm Files (*.bz2, *.osm, *.pbf) OsmExtractionUI.OSMAND_MAP_CREATOR=OsmAnd Map Creator OsmExtractionUI.OSMAND_MAP_CREATOR_FILE=OsmAnd Map Creator - +OsmExtractionUI.PLEASE.WAIT=Please waiting... OsmExtractionUI.POI=POI OsmExtractionUI.REGION=Region OsmExtractionUI.SAVING_OSM_FILE=Saving osm file @@ -38,3 +79,13 @@ OsmExtractionUI.UNABLE_OPEN_FILE=Failed to open log file OsmExtractionUI.WORKING_DIR=Working directory : OsmExtractionUI.WORKING_DIR_UNSPECIFIED= OsmExtractionUI.WORKING_DIRECTORY=Working directory : +TileBundleDownloadDialog.CANCEL=Cancel +TileBundleDownloadDialog.DOWNLOAD.BUNDLE.TILES=Download bundle tiles +TileBundleDownloadDialog.DOWNLOAD.TILES=Download tiles +TileBundleDownloadDialog.DOWNLOADING.TILES=Downloading tiles +TileBundleDownloadDialog.END.ZOOM.LEVEL=End zoom level : +TileBundleDownloadDialog.CHOOSE.DIRECTORY=Choose working directory +TileBundleDownloadDialog.LOADING=Loading... +TileBundleDownloadDialog.REQUEST.DOWNLOAD=Request to download {0} tiles from ''{1}'' (approximately {2} Mb) +TileBundleDownloadDialog.SPECIFY.FOLDER=Specify different folder +TileBundleDownloadDialog.START.ZOOM.LEVEL=Start zoom level : diff --git a/DataExtractionOSM/src/net/osmand/swing/messages_sk.properties b/DataExtractionOSM/src/net/osmand/swing/messages_sk.properties index f44b4cab79..664335cc8f 100644 --- a/DataExtractionOSM/src/net/osmand/swing/messages_sk.properties +++ b/DataExtractionOSM/src/net/osmand/swing/messages_sk.properties @@ -1,40 +1,91 @@ -OsmExtractionUI.ADDRESS=adresa -OsmExtractionUI.BUILD_ADDRESS=Vytvori\u0165 index adries -OsmExtractionUI.BUILD_MAP=Vytvori\u0165 index mapy -OsmExtractionUI.BUILD_POI=Vytvori\u0165 index POI -OsmExtractionUI.BUILD_TRANSPORT=Vytvori\u0165 index dopravy -OsmExtractionUI.CHOOSE_OSM_FILE=Vyberte OSM s\u00fabor -OsmExtractionUI.CHOOSE_WORKING_DIR=Vyberte pracovn\u00fd adres\u00e1r -OsmExtractionUI.CREATING_INDEX=Vytv\u00e1ra sa index -OsmExtractionUI.GENERATION_DATA=Gener\u00e1cia \u00fadajov -OsmExtractionUI.INDEXES_FOR=Indexy pre -OsmExtractionUI.LOADING_OSM_FILE=Na\u010d\u00edtavanie OSM s\u00faboru -OsmExtractionUI.LOG_FILE_NOT_FOUND=S\u00fabor z\u00e1znamu nen\u00e1jden\u00fd -OsmExtractionUI.MAP=mapa -OsmExtractionUI.MENU_ABOUT=O programe -OsmExtractionUI.MENU_ABOUT_2=O programe... -OsmExtractionUI.MENU_CREATE_SQLITE=Vytvori\u0165 sqlite datab\u00e1zu -OsmExtractionUI.MENU_EXIT=Skon\u010di\u0165 -OsmExtractionUI.MENU_FILE=S\u00fabor -OsmExtractionUI.MENU_OPEN_LOG=Otvori\u0165 s\u00fabor z\u00e1znamu... -OsmExtractionUI.MENU_SELECT_FILE=Vybra\u0165 OSM s\u00fabor... -OsmExtractionUI.MENU_SELECT_OSM_FILE_AREA=Vybra\u0165 OSM s\u00fabor pre ur\u010den\u00fa oblas\u0165... -OsmExtractionUI.MENU_SETTINGS=Nastavenia... -OsmExtractionUI.MENU_WINDOW=Okno -OsmExtractionUI.NORMALIZE_STREETS=Normaliz\u00e1cia ul\u00edc -OsmExtractionUI.OPEN_LOG_FILE_MANUALLY=Otvori\u0165 s\u00fabor z\u00e1znamu ru\u010dne -OsmExtractionUI.OSM_FILES=OSM s\u00fabory (*.bz2, *.osm, *.pbf) -OsmExtractionUI.OSMAND_MAP_CREATOR=Tvorca OsmAnd mapy -OsmExtractionUI.OSMAND_MAP_CREATOR_FILE=Tvorca OsmAnd mapy - -OsmExtractionUI.POI=POI -OsmExtractionUI.REGION=Oblas\u0165 -OsmExtractionUI.SAVING_OSM_FILE=Uklad\u00e1 sa OSM s\u00fabor -OsmExtractionUI.SELECT_AREA=Vybra\u0165 oblas\u0165 -OsmExtractionUI.SELECT_AREA_TO_FILTER=Vybra\u0165 oblas\u0165 na vyfiltrovanie -OsmExtractionUI.SPECIFY_WORKING_DIR=Ur\u010di\u0165 pracovn\u00fd adres\u00e1r... -OsmExtractionUI.SUCCESFULLY_CREATED=\ - \u00faspe\u0161ne vytvoren\u00e9 v pracovnom adres\u00e1ry. -OsmExtractionUI.TRANSPORT=doprava -OsmExtractionUI.UNABLE_OPEN_FILE=Zlyhalo otv\u00e1ranie z\u00e1znamov\u00e9ho s\u00faboru -OsmExtractionUI.WORKING_DIR=Pracovn\u00fd adres\u00e1r : -OsmExtractionUI.WORKING_DIR_UNSPECIFIED= -OsmExtractionUI.WORKING_DIRECTORY=Pracovn\u00fd adres\u00e1r : +IndexCreator.INDEX_CITIES=Indexovanie miest... +IndexCreator.INDEX_LO_LEVEL_WAYS=Indexovanie n\u00edzko\u00farov\u0148ov\u00fdch ciest... +IndexCreator.LOADING_FILE=Na\u010d\u00edtava sa s\u00fabor +IndexCreator.PACK_RTREE_MAP=Balenie rtree mapov\u00fdch \u00fadajov... +IndexCreator.PACK_RTREE_TRANSP=Balenie rtree dopravn\u00fdch \u00fadajov... +IndexCreator.PREINDEX_ADRESS_MAP=Preindexovanie adries a ciest mapy... +IndexCreator.PROCESS_OSM_NODES=Spracov\u00e1vanie OSM uzlov... +IndexCreator.PROCESS_OSM_REL=Spracov\u00e1vanie OSM rel\u00e1ci\u00ed... +IndexCreator.PROCESS_OSM_WAYS=Spracov\u00e1vanie OSM ciest... +IndexCreator.REGISTER_PCODES=Registrovanie PS\u010c... +IndexCreator.SERIALIZING_ADRESS=S\u00e9riovanie adries miest... +IndexCreator.WRITE_ADDRESS_INDEX=Zapisovanie indexu adries do bin\u00e1rneho s\u00faboru... +IndexCreator.WRITE_MAP_INDEX=Zapisovanie indexu mapy do bin\u00e1rneho s\u00faboru... +IndexCreator.WRITE_TRANSP_INDEX=Zapisovanie indexu dopravy do bin\u00e1rneho s\u00faboru... +MapInformationLayer.PRELOAD.AREA=Stiahnu\u0165 oblas\u0165 +MapPanel.MAP.VIEW=Zobrazenie mapy +MapPanel.NEW.TILE.SRC=Vytvori\u0165 nov\u00fd zdroj dla\u017ed\u00edc +MapPanel.SOURCE.OF.TILES=Zdroj dla\u017ed\u00edc +MapPanel.USER.DEFINED=U\u017e\u00edvate\u013eom definovan\u00fd +NewTileSourceDialog.ADD.WMS.SERVICE=Na pridanie wms slu\u017eby m\u00f4\u017eete pou\u017ei\u0165 sie\u0165ov\u00fd vzor: +NewTileSourceDialog.CANCEL=Zru\u0161i\u0165 +NewTileSourceDialog.CREATE.NEW.TILE=Vytvorenie nov\u00e9ho zdroja dla\u017ed\u00edc +NewTileSourceDialog.ERROR.CREATING.NEW.TILE.SRC=Chyba po\u010das vytv\u00e1rania nov\u00e9ho zdroja dla\u017ed\u00edc +NewTileSourceDialog.INPUT.SOURCE=Vstupn\u00fd zdroj +NewTileSourceDialog.MAPNIK.EXAMPLE=Napr\u00edklad Mapnik +NewTileSourceDialog.NAME=N\u00e1zov \u0161abl\u00f3ny: +NewTileSourceDialog.SPECIFY.ALL.PLACEHLDRS=Pros\u00edm, ur\u010dite v\u0161etky premenn\u00e9 {$x}, {$y}, {$z} v url +NewTileSourceDialog.SPECIFY.TEMPLATE.NAME=Pros\u00edm, zadajte n\u00e1zov \u0161abl\u00f3ny +NewTileSourceDialog.SPECIFY.TEMPLATE.URL=Pros\u00edm, zadajte url vzoru +NewTileSourceDialog.URL.TEMPLATE=Vzor url s premenn\u00fdmi {$x}, {$y}, {$z} : +OsmExtractionPreferencesDialog.DEFAULT.SUFFIXES=\u0160tandardn\u00e9 pr\u00edpony n\u00e1zvov ul\u00edc (str., street, rue, ulica) +OsmExtractionPreferencesDialog.DUPLICATED.ID=Zak\u00e1za\u0165 varovania na duplik\u00e1tne id v OSM s\u00fabore +OsmExtractionPreferencesDialog.GENERAL=V\u0161eobecn\u00e9 +OsmExtractionPreferencesDialog.INTERNET.TO.DOWNLOAD.FILES=Pou\u017ei\u0165 internet na stiahnutie dla\u017ed\u00edc mapy +OsmExtractionPreferencesDialog.LOAD.WHOLE.OSM=Na\u010d\u00edta\u0165 v\u0161etky OSM inform\u00e1cie (na ulo\u017eenie platn\u00e9ho OSM s\u00faboru - pou\u017eitie v JOSM...) +OsmExtractionPreferencesDialog.NAME.SUFFIXES=Pr\u00edpona n\u00e1zvov ul\u00edc (av., avenue, ulica) +OsmExtractionPreferencesDialog.NORMALIZE.STREETS=Normaliz\u00e1cia ul\u00edc +OsmExtractionPreferencesDialog.OK=OK +OsmExtractionPreferencesDialog.PREFERENCES=Vlastnosti +OsmExtractionPreferencesDialog.CANCEL=Zru\u0161i\u0165 +OsmExtractionUI.ADDRESS=adresa +OsmExtractionUI.BUILD_ADDRESS=Vytvori\u0165 index adries +OsmExtractionUI.BUILD_MAP=Vytvori\u0165 index mapy +OsmExtractionUI.BUILD_POI=Vytvori\u0165 index POI +OsmExtractionUI.BUILD_TRANSPORT=Vytvori\u0165 index dopravy +OsmExtractionUI.CHOOSE_OSM_FILE=Vyberte OSM s\u00fabor +OsmExtractionUI.CHOOSE_WORKING_DIR=Vyberte pracovn\u00fd adres\u00e1r +OsmExtractionUI.CREATING_INDEX=Vytv\u00e1ra sa index +OsmExtractionUI.GENERATION_DATA=Gener\u00e1cia \u00fadajov +OsmExtractionUI.INDEXES_FOR=Indexy pre +OsmExtractionUI.LOADING_OSM_FILE=Na\u010d\u00edtavanie OSM s\u00faboru +OsmExtractionUI.LOG_FILE_NOT_FOUND=S\u00fabor z\u00e1znamu nen\u00e1jden\u00fd +OsmExtractionUI.MAP=mapa +OsmExtractionUI.MENU_ABOUT=O programe +OsmExtractionUI.MENU_ABOUT_2=O programe... +OsmExtractionUI.MENU_CREATE_SQLITE=Vytvori\u0165 sqlite datab\u00e1zu +OsmExtractionUI.MENU_EXIT=Skon\u010di\u0165 +OsmExtractionUI.MENU_FILE=S\u00fabor +OsmExtractionUI.MENU_OPEN_LOG=Otvori\u0165 s\u00fabor z\u00e1znamu... +OsmExtractionUI.MENU_SELECT_FILE=Vybra\u0165 OSM s\u00fabor... +OsmExtractionUI.MENU_SELECT_OSM_FILE_AREA=Vybra\u0165 OSM s\u00fabor pre ur\u010den\u00fa oblas\u0165... +OsmExtractionUI.MENU_SETTINGS=Nastavenia... +OsmExtractionUI.MENU_WINDOW=Okno +OsmExtractionUI.NORMALIZE_STREETS=Normaliz\u00e1cia ul\u00edc +OsmExtractionUI.OPEN_LOG_FILE_MANUALLY=otvorte s\u00fabor z\u00e1znamu ru\u010dne +OsmExtractionUI.OSM_FILES=OSM s\u00fabory (*.bz2, *.osm, *.pbf) +OsmExtractionUI.OSMAND_MAP_CREATOR=Tvorca OsmAnd mapy +OsmExtractionUI.OSMAND_MAP_CREATOR_FILE=Tvorca OsmAnd mapy - +OsmExtractionUI.PLEASE.WAIT=Pros\u00edm \u010dakajte... +OsmExtractionUI.POI=POI +OsmExtractionUI.REGION=Oblas\u0165 +OsmExtractionUI.SAVING_OSM_FILE=Uklad\u00e1 sa OSM s\u00fabor +OsmExtractionUI.SELECT_AREA=Vybra\u0165 oblas\u0165 +OsmExtractionUI.SELECT_AREA_TO_FILTER=Vybra\u0165 oblas\u0165 na vyfiltrovanie +OsmExtractionUI.SPECIFY_WORKING_DIR=Ur\u010di\u0165 pracovn\u00fd adres\u00e1r... +OsmExtractionUI.SUCCESFULLY_CREATED=\ - \u00faspe\u0161ne vytvoren\u00e9 v pracovnom adres\u00e1ry. +OsmExtractionUI.TRANSPORT=doprava +OsmExtractionUI.UNABLE_OPEN_FILE=Zlyhalo otv\u00e1ranie z\u00e1znamov\u00e9ho s\u00faboru +OsmExtractionUI.WORKING_DIR=Pracovn\u00fd adres\u00e1r : +OsmExtractionUI.WORKING_DIR_UNSPECIFIED= +OsmExtractionUI.WORKING_DIRECTORY=Pracovn\u00fd adres\u00e1r : +TileBundleDownloadDialog.CANCEL=Zru\u0161i\u0165 +TileBundleDownloadDialog.DOWNLOAD.BUNDLE.TILES=Stiahnutie bal\u00edka dla\u017ed\u00edc +TileBundleDownloadDialog.DOWNLOAD.TILES=Stiahnu\u0165 dla\u017edice +TileBundleDownloadDialog.DOWNLOADING.TILES=S\u0165ahuj\u00fa sa dla\u017edice +TileBundleDownloadDialog.END.ZOOM.LEVEL=Kon\u010den\u00fd zoom: +TileBundleDownloadDialog.CHOOSE.DIRECTORY=Vybra\u0165 pracovn\u00fd adres\u00e1r +TileBundleDownloadDialog.LOADING=Na\u010d\u00edtava sa... +TileBundleDownloadDialog.REQUEST.DOWNLOAD=Po\u017eiadavka na stiahnutie {0} dla\u017ed\u00edc z ''{1}'' (odhadom {2} Mb) +TileBundleDownloadDialog.SPECIFY.FOLDER=Ur\u010di\u0165 in\u00fa zlo\u017eku +TileBundleDownloadDialog.START.ZOOM.LEVEL=Za\u010diato\u010dn\u00fd zoom: