Prepare to accept merge for mapcreator
This commit is contained in:
parent
a5ccafa209
commit
43e7923289
6 changed files with 51 additions and 1 deletions
|
@ -1,11 +1,15 @@
|
|||
package net.osmand.binary;
|
||||
|
||||
public class BinaryIndexPart {
|
||||
public abstract class BinaryIndexPart {
|
||||
|
||||
String name;
|
||||
int length;
|
||||
int filePointer;
|
||||
|
||||
abstract public String getPartName();
|
||||
|
||||
abstract public int getFieldNumber();
|
||||
|
||||
public int getLength() {
|
||||
return length;
|
||||
}
|
||||
|
|
|
@ -39,6 +39,8 @@ public class BinaryMapAddressReaderAdapter {
|
|||
public final static int STREET_TYPE = 4;
|
||||
|
||||
private static final Log LOG = PlatformUtil.getLog(BinaryMapAddressReaderAdapter.class);
|
||||
public final static int[] TYPES = { CITY_TOWN_TYPE, POSTCODES_TYPE, VILLAGES_TYPE, STREET_TYPE };
|
||||
public final static int[] CITY_TYPES = { CITY_TOWN_TYPE, POSTCODES_TYPE, VILLAGES_TYPE };
|
||||
|
||||
public static class AddressRegion extends BinaryIndexPart {
|
||||
String enName;
|
||||
|
@ -63,10 +65,27 @@ public class BinaryMapAddressReaderAdapter {
|
|||
public int getIndexNameOffset() {
|
||||
return indexNameOffset;
|
||||
}
|
||||
|
||||
|
||||
public String getPartName() {
|
||||
return "Address";
|
||||
}
|
||||
|
||||
public int getFieldNumber() {
|
||||
return OsmandOdb.OsmAndStructure.ADDRESSINDEX_FIELD_NUMBER;
|
||||
}
|
||||
}
|
||||
|
||||
public static class CitiesBlock extends BinaryIndexPart {
|
||||
int type;
|
||||
|
||||
public String getPartName() {
|
||||
return "City";
|
||||
}
|
||||
|
||||
public int getFieldNumber() {
|
||||
return OsmandOdb.OsmAndAddressIndex.CITIES_FIELD_NUMBER;
|
||||
}
|
||||
}
|
||||
|
||||
private CodedInputStream codedIS;
|
||||
|
|
|
@ -82,6 +82,10 @@ public class BinaryMapIndexReader {
|
|||
private final static Log log = PlatformUtil.getLog(BinaryMapIndexReader.class);
|
||||
public static boolean READ_STATS = false;
|
||||
|
||||
public final static int[] TYPES = { CITY_TOWN_TYPE, POSTCODES_TYPE, VILLAGES_TYPE, STREET_TYPE };
|
||||
public final static int[] CITY_TYPES = { CITY_TOWN_TYPE, POSTCODES_TYPE, VILLAGES_TYPE };
|
||||
|
||||
|
||||
private final RandomAccessFile raf;
|
||||
protected final File file;
|
||||
/*private*/ int version;
|
||||
|
|
|
@ -65,6 +65,14 @@ public class BinaryMapPoiReaderAdapter {
|
|||
return leftLongitude;
|
||||
}
|
||||
|
||||
public String getPartName() {
|
||||
return "POI";
|
||||
}
|
||||
|
||||
public int getFieldNumber() {
|
||||
return OsmandOdb.OsmAndStructure.POIINDEX_FIELD_NUMBER;
|
||||
}
|
||||
|
||||
public PoiSubType getSubtypeFromId(int id, StringBuilder returnValue) {
|
||||
int tl;
|
||||
int sl;
|
||||
|
|
|
@ -215,6 +215,13 @@ public class BinaryMapRouteReaderAdapter {
|
|||
int destinationTypeRule = -1;
|
||||
int destinationRefTypeRule = -1;
|
||||
|
||||
public String getPartName() {
|
||||
return "Routing";
|
||||
}
|
||||
|
||||
public int getFieldNumber() {
|
||||
return OsmandOdb.OsmAndStructure.ROUTINGINDEX_FIELD_NUMBER;
|
||||
}
|
||||
|
||||
public RouteTypeRule quickGetEncodingRule(int id) {
|
||||
return routeEncodingRules.get(id);
|
||||
|
|
|
@ -41,6 +41,14 @@ public class BinaryMapTransportReaderAdapter {
|
|||
|
||||
int stopsFileOffset = 0;
|
||||
int stopsFileLength = 0;
|
||||
|
||||
public String getPartName() {
|
||||
return "Transport";
|
||||
}
|
||||
|
||||
public int getFieldNumber() {
|
||||
return OsmandOdb.OsmAndStructure.TRANSPORTINDEX_FIELD_NUMBER;
|
||||
}
|
||||
|
||||
public int getLeft() {
|
||||
return left;
|
||||
|
|
Loading…
Reference in a new issue