Introduce base map route layer to check/test different routing mechanisms
This commit is contained in:
parent
ad81cef9d1
commit
6b57c14326
32 changed files with 2079 additions and 1303 deletions
|
@ -24,6 +24,8 @@ public class JUnitRouteTest {
|
|||
|
||||
static BinaryMapIndexReader[] rs;
|
||||
static NativeSwingRendering lib;
|
||||
|
||||
|
||||
@Before
|
||||
public void setupFiles() throws IOException {
|
||||
if(rs != null){
|
||||
|
|
|
@ -69,7 +69,11 @@ public class NativeLibrary {
|
|||
*/
|
||||
public NativeSearchResult searchObjectsForRendering(int sleft, int sright, int stop, int sbottom, int zoom,
|
||||
RenderingRuleSearchRequest request, boolean skipDuplicates, Object objectWithInterruptedField, String msgIfNothingFound) {
|
||||
return new NativeSearchResult(searchNativeObjectsForRendering(sleft, sright, stop, sbottom, zoom, request, skipDuplicates,
|
||||
int renderRouteDataFile = 0;
|
||||
if(request.searchRenderingAttribute("showRoadMapsAttribute")){
|
||||
renderRouteDataFile = request.getIntPropertyValue(request.ALL.R_ATTR_INT_VALUE);
|
||||
}
|
||||
return new NativeSearchResult(searchNativeObjectsForRendering(sleft, sright, stop, sbottom, zoom, request, skipDuplicates, renderRouteDataFile,
|
||||
objectWithInterruptedField, msgIfNothingFound));
|
||||
}
|
||||
|
||||
|
@ -127,6 +131,6 @@ public class NativeLibrary {
|
|||
boolean isTransparent, RenderingRuleSearchRequest render, boolean encodePng);
|
||||
|
||||
protected static native long searchNativeObjectsForRendering(int sleft, int sright, int stop, int sbottom, int zoom,
|
||||
RenderingRuleSearchRequest request, boolean skipDuplicates, Object objectWithInterruptedField, String msgIfNothingFound);
|
||||
RenderingRuleSearchRequest request, boolean skipDuplicates, int renderRouteDataFile, Object objectWithInterruptedField, String msgIfNothingFound);
|
||||
|
||||
}
|
||||
|
|
|
@ -1959,9 +1959,6 @@ public class BinaryMapIndexReader {
|
|||
}));
|
||||
}
|
||||
|
||||
public void initRouteRegionsIfNeeded(SearchRequest<RouteDataObject> req) throws IOException {
|
||||
routeAdapter.initRouteTypesIfNeeded(req);
|
||||
}
|
||||
|
||||
public List<RouteSubregion> searchRouteIndexTree(SearchRequest<RouteDataObject> req, List<RouteSubregion> list) throws IOException {
|
||||
req.numberOfVisitedObjects = 0;
|
||||
|
@ -1969,7 +1966,7 @@ public class BinaryMapIndexReader {
|
|||
req.numberOfAcceptedSubtrees = 0;
|
||||
req.numberOfReadSubtrees = 0;
|
||||
if(routeAdapter != null){
|
||||
initRouteRegionsIfNeeded(req);
|
||||
routeAdapter.initRouteTypesIfNeeded(req, list);
|
||||
return routeAdapter.searchRouteRegionTree(req, list, new ArrayList<BinaryMapRouteReaderAdapter.RouteSubregion>());
|
||||
}
|
||||
return Collections.emptyList();
|
||||
|
|
|
@ -158,6 +158,7 @@ public class BinaryMapRouteReaderAdapter {
|
|||
public int regionsRead;
|
||||
|
||||
List<RouteSubregion> subregions = new ArrayList<RouteSubregion>();
|
||||
List<RouteSubregion> basesubregions = new ArrayList<RouteSubregion>();
|
||||
List<RouteTypeRule> routeEncodingRules = new ArrayList<BinaryMapRouteReaderAdapter.RouteTypeRule>();
|
||||
int nameTypeRule = -1;
|
||||
int refTypeRule = -1;
|
||||
|
@ -181,6 +182,10 @@ public class BinaryMapRouteReaderAdapter {
|
|||
public List<RouteSubregion> getSubregions(){
|
||||
return subregions;
|
||||
}
|
||||
|
||||
public List<RouteSubregion> getBaseSubregions(){
|
||||
return basesubregions;
|
||||
}
|
||||
|
||||
public double getLeftLongitude() {
|
||||
double l = 180;
|
||||
|
@ -299,19 +304,28 @@ public class BinaryMapRouteReaderAdapter {
|
|||
codedIS.skipRawBytes(codedIS.getBytesUntilLimit());
|
||||
codedIS.popLimit(oldLimit);
|
||||
} break;
|
||||
case OsmandOdb.OsmAndRoutingIndex.ROOTBOXES_FIELD_NUMBER : {
|
||||
case OsmandOdb.OsmAndRoutingIndex.ROOTBOXES_FIELD_NUMBER :
|
||||
case OsmandOdb.OsmAndRoutingIndex.BASEMAPBOXES_FIELD_NUMBER :{
|
||||
RouteSubregion subregion = new RouteSubregion(region);
|
||||
subregion.length = readInt();
|
||||
subregion.filePointer = codedIS.getTotalBytesRead();
|
||||
int oldLimit = codedIS.pushLimit(subregion.length);
|
||||
readRouteTree(subregion, null, 0, true);
|
||||
region.getSubregions().add(subregion);
|
||||
if(tag == OsmandOdb.OsmAndRoutingIndex.ROOTBOXES_FIELD_NUMBER) {
|
||||
region.subregions.add(subregion);
|
||||
} else {
|
||||
region.basesubregions.add(subregion);
|
||||
}
|
||||
codedIS.skipRawBytes(codedIS.getBytesUntilLimit());
|
||||
codedIS.popLimit(oldLimit);
|
||||
|
||||
break;
|
||||
}
|
||||
case OsmandOdb.OsmAndRoutingIndex.BLOCKS_FIELD_NUMBER : {
|
||||
// Finish reading file!
|
||||
codedIS.skipRawBytes(codedIS.getBytesUntilLimit());
|
||||
} break;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
default:
|
||||
skipUnknownField(t);
|
||||
|
@ -616,20 +630,13 @@ public class BinaryMapRouteReaderAdapter {
|
|||
}
|
||||
}
|
||||
|
||||
public void initRouteTypesIfNeeded(SearchRequest<RouteDataObject> req) throws IOException{
|
||||
for(RouteRegion r: map.getRoutingIndexes() ) {
|
||||
if (r.routeEncodingRules.isEmpty()) {
|
||||
boolean intersect = false;
|
||||
for (RouteSubregion rs : r.subregions) {
|
||||
if (req.intersects(rs.left, rs.top, rs.right, rs.bottom)) {
|
||||
intersect = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(intersect) {
|
||||
codedIS.seek(r.filePointer);
|
||||
int oldLimit = codedIS.pushLimit(r.length);
|
||||
readRouteIndex(r);
|
||||
public void initRouteTypesIfNeeded(SearchRequest<RouteDataObject> req, List<RouteSubregion> list) throws IOException {
|
||||
for (RouteSubregion rs : list) {
|
||||
if (req.intersects(rs.left, rs.top, rs.right, rs.bottom)) {
|
||||
if (rs.routeReg.routeEncodingRules.isEmpty()) {
|
||||
codedIS.seek(rs.routeReg.filePointer);
|
||||
int oldLimit = codedIS.pushLimit(rs.routeReg.length);
|
||||
readRouteIndex(rs.routeReg);
|
||||
codedIS.popLimit(oldLimit);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -140,15 +140,10 @@ public class CachedOsmandIndexes {
|
|||
routing.setName(index.getName());
|
||||
}
|
||||
for(RouteSubregion sub : index.getSubregions()) {
|
||||
OsmandIndex.RoutingSubregion.Builder rpart = OsmandIndex.RoutingSubregion.newBuilder();
|
||||
rpart.setSize(sub.length);
|
||||
rpart.setOffset(sub.filePointer);
|
||||
rpart.setLeft(sub.left);
|
||||
rpart.setRight(sub.right);
|
||||
rpart.setTop(sub.top);
|
||||
rpart.setBottom(sub.bottom);
|
||||
rpart.setShifToData(sub.shiftToData);
|
||||
routing.addSubregions(rpart);
|
||||
addRouteSubregion(routing, sub, false);
|
||||
}
|
||||
for(RouteSubregion sub : index.getBaseSubregions()) {
|
||||
addRouteSubregion(routing, sub, true);
|
||||
}
|
||||
fileIndex.addRoutingIndex(routing);
|
||||
}
|
||||
|
@ -156,6 +151,19 @@ public class CachedOsmandIndexes {
|
|||
storedIndexBuilder.addFileIndex(fileIndex);
|
||||
|
||||
}
|
||||
|
||||
private void addRouteSubregion(RoutingPart.Builder routing, RouteSubregion sub, boolean base) {
|
||||
OsmandIndex.RoutingSubregion.Builder rpart = OsmandIndex.RoutingSubregion.newBuilder();
|
||||
rpart.setSize(sub.length);
|
||||
rpart.setOffset(sub.filePointer);
|
||||
rpart.setLeft(sub.left);
|
||||
rpart.setRight(sub.right);
|
||||
rpart.setTop(sub.top);
|
||||
rpart.setBasemap(base);
|
||||
rpart.setBottom(sub.bottom);
|
||||
rpart.setShifToData(sub.shiftToData);
|
||||
routing.addSubregions(rpart);
|
||||
}
|
||||
|
||||
public BinaryMapIndexReader getReader(File f) throws IOException {
|
||||
RandomAccessFile mf = new RandomAccessFile(f, "r");
|
||||
|
@ -276,7 +284,11 @@ public class CachedOsmandIndexes {
|
|||
sub.top = mr.getTop();
|
||||
sub.bottom = mr.getBottom();
|
||||
sub.shiftToData = mr.getShifToData();
|
||||
mi.subregions.add(sub);
|
||||
if(mr.getBasemap()) {
|
||||
mi.basesubregions.add(sub);
|
||||
} else {
|
||||
mi.subregions.add(sub);
|
||||
}
|
||||
}
|
||||
reader.routingIndexes.add(mi);
|
||||
reader.indexes.add(mi);
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,5 +1,5 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: src/osmand_odb.proto
|
||||
// source: DataExtractionOSM/src/osmand_odb.proto
|
||||
|
||||
package net.osmand.binary;
|
||||
|
||||
|
@ -20994,6 +20994,18 @@ public final class OsmandOdb {
|
|||
return rootBoxes_.get(index);
|
||||
}
|
||||
|
||||
// repeated .OsmAndRoutingIndex.RouteDataBox basemapBoxes = 4;
|
||||
public static final int BASEMAPBOXES_FIELD_NUMBER = 4;
|
||||
private java.util.List<net.osmand.binary.OsmandOdb.OsmAndRoutingIndex.RouteDataBox> basemapBoxes_ =
|
||||
java.util.Collections.emptyList();
|
||||
public java.util.List<net.osmand.binary.OsmandOdb.OsmAndRoutingIndex.RouteDataBox> getBasemapBoxesList() {
|
||||
return basemapBoxes_;
|
||||
}
|
||||
public int getBasemapBoxesCount() { return basemapBoxes_.size(); }
|
||||
public net.osmand.binary.OsmandOdb.OsmAndRoutingIndex.RouteDataBox getBasemapBoxes(int index) {
|
||||
return basemapBoxes_.get(index);
|
||||
}
|
||||
|
||||
// repeated .OsmAndRoutingIndex.RouteDataBlock blocks = 5;
|
||||
public static final int BLOCKS_FIELD_NUMBER = 5;
|
||||
private java.util.List<net.osmand.binary.OsmandOdb.OsmAndRoutingIndex.RouteDataBlock> blocks_ =
|
||||
|
@ -21017,6 +21029,9 @@ public final class OsmandOdb {
|
|||
for (net.osmand.binary.OsmandOdb.OsmAndRoutingIndex.RouteDataBox element : getRootBoxesList()) {
|
||||
if (!element.isInitialized()) return false;
|
||||
}
|
||||
for (net.osmand.binary.OsmandOdb.OsmAndRoutingIndex.RouteDataBox element : getBasemapBoxesList()) {
|
||||
if (!element.isInitialized()) return false;
|
||||
}
|
||||
for (net.osmand.binary.OsmandOdb.OsmAndRoutingIndex.RouteDataBlock element : getBlocksList()) {
|
||||
if (!element.isInitialized()) return false;
|
||||
}
|
||||
|
@ -21036,6 +21051,9 @@ public final class OsmandOdb {
|
|||
for (net.osmand.binary.OsmandOdb.OsmAndRoutingIndex.RouteDataBox element : getRootBoxesList()) {
|
||||
output.writeMessage(3, element);
|
||||
}
|
||||
for (net.osmand.binary.OsmandOdb.OsmAndRoutingIndex.RouteDataBox element : getBasemapBoxesList()) {
|
||||
output.writeMessage(4, element);
|
||||
}
|
||||
for (net.osmand.binary.OsmandOdb.OsmAndRoutingIndex.RouteDataBlock element : getBlocksList()) {
|
||||
output.writeMessage(5, element);
|
||||
}
|
||||
|
@ -21061,6 +21079,10 @@ public final class OsmandOdb {
|
|||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeMessageSize(3, element);
|
||||
}
|
||||
for (net.osmand.binary.OsmandOdb.OsmAndRoutingIndex.RouteDataBox element : getBasemapBoxesList()) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeMessageSize(4, element);
|
||||
}
|
||||
for (net.osmand.binary.OsmandOdb.OsmAndRoutingIndex.RouteDataBlock element : getBlocksList()) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeMessageSize(5, element);
|
||||
|
@ -21225,6 +21247,10 @@ public final class OsmandOdb {
|
|||
result.rootBoxes_ =
|
||||
java.util.Collections.unmodifiableList(result.rootBoxes_);
|
||||
}
|
||||
if (result.basemapBoxes_ != java.util.Collections.EMPTY_LIST) {
|
||||
result.basemapBoxes_ =
|
||||
java.util.Collections.unmodifiableList(result.basemapBoxes_);
|
||||
}
|
||||
if (result.blocks_ != java.util.Collections.EMPTY_LIST) {
|
||||
result.blocks_ =
|
||||
java.util.Collections.unmodifiableList(result.blocks_);
|
||||
|
@ -21261,6 +21287,12 @@ public final class OsmandOdb {
|
|||
}
|
||||
result.rootBoxes_.addAll(other.rootBoxes_);
|
||||
}
|
||||
if (!other.basemapBoxes_.isEmpty()) {
|
||||
if (result.basemapBoxes_.isEmpty()) {
|
||||
result.basemapBoxes_ = new java.util.ArrayList<net.osmand.binary.OsmandOdb.OsmAndRoutingIndex.RouteDataBox>();
|
||||
}
|
||||
result.basemapBoxes_.addAll(other.basemapBoxes_);
|
||||
}
|
||||
if (!other.blocks_.isEmpty()) {
|
||||
if (result.blocks_.isEmpty()) {
|
||||
result.blocks_ = new java.util.ArrayList<net.osmand.binary.OsmandOdb.OsmAndRoutingIndex.RouteDataBlock>();
|
||||
|
@ -21309,6 +21341,12 @@ public final class OsmandOdb {
|
|||
addRootBoxes(subBuilder.buildPartial());
|
||||
break;
|
||||
}
|
||||
case 34: {
|
||||
net.osmand.binary.OsmandOdb.OsmAndRoutingIndex.RouteDataBox.Builder subBuilder = net.osmand.binary.OsmandOdb.OsmAndRoutingIndex.RouteDataBox.newBuilder();
|
||||
input.readMessage(subBuilder, extensionRegistry);
|
||||
addBasemapBoxes(subBuilder.buildPartial());
|
||||
break;
|
||||
}
|
||||
case 42: {
|
||||
net.osmand.binary.OsmandOdb.OsmAndRoutingIndex.RouteDataBlock.Builder subBuilder = net.osmand.binary.OsmandOdb.OsmAndRoutingIndex.RouteDataBlock.newBuilder();
|
||||
input.readMessage(subBuilder, extensionRegistry);
|
||||
|
@ -21443,6 +21481,57 @@ public final class OsmandOdb {
|
|||
return this;
|
||||
}
|
||||
|
||||
// repeated .OsmAndRoutingIndex.RouteDataBox basemapBoxes = 4;
|
||||
public java.util.List<net.osmand.binary.OsmandOdb.OsmAndRoutingIndex.RouteDataBox> getBasemapBoxesList() {
|
||||
return java.util.Collections.unmodifiableList(result.basemapBoxes_);
|
||||
}
|
||||
public int getBasemapBoxesCount() {
|
||||
return result.getBasemapBoxesCount();
|
||||
}
|
||||
public net.osmand.binary.OsmandOdb.OsmAndRoutingIndex.RouteDataBox getBasemapBoxes(int index) {
|
||||
return result.getBasemapBoxes(index);
|
||||
}
|
||||
public Builder setBasemapBoxes(int index, net.osmand.binary.OsmandOdb.OsmAndRoutingIndex.RouteDataBox value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
result.basemapBoxes_.set(index, value);
|
||||
return this;
|
||||
}
|
||||
public Builder setBasemapBoxes(int index, net.osmand.binary.OsmandOdb.OsmAndRoutingIndex.RouteDataBox.Builder builderForValue) {
|
||||
result.basemapBoxes_.set(index, builderForValue.build());
|
||||
return this;
|
||||
}
|
||||
public Builder addBasemapBoxes(net.osmand.binary.OsmandOdb.OsmAndRoutingIndex.RouteDataBox value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
if (result.basemapBoxes_.isEmpty()) {
|
||||
result.basemapBoxes_ = new java.util.ArrayList<net.osmand.binary.OsmandOdb.OsmAndRoutingIndex.RouteDataBox>();
|
||||
}
|
||||
result.basemapBoxes_.add(value);
|
||||
return this;
|
||||
}
|
||||
public Builder addBasemapBoxes(net.osmand.binary.OsmandOdb.OsmAndRoutingIndex.RouteDataBox.Builder builderForValue) {
|
||||
if (result.basemapBoxes_.isEmpty()) {
|
||||
result.basemapBoxes_ = new java.util.ArrayList<net.osmand.binary.OsmandOdb.OsmAndRoutingIndex.RouteDataBox>();
|
||||
}
|
||||
result.basemapBoxes_.add(builderForValue.build());
|
||||
return this;
|
||||
}
|
||||
public Builder addAllBasemapBoxes(
|
||||
java.lang.Iterable<? extends net.osmand.binary.OsmandOdb.OsmAndRoutingIndex.RouteDataBox> values) {
|
||||
if (result.basemapBoxes_.isEmpty()) {
|
||||
result.basemapBoxes_ = new java.util.ArrayList<net.osmand.binary.OsmandOdb.OsmAndRoutingIndex.RouteDataBox>();
|
||||
}
|
||||
super.addAll(values, result.basemapBoxes_);
|
||||
return this;
|
||||
}
|
||||
public Builder clearBasemapBoxes() {
|
||||
result.basemapBoxes_ = java.util.Collections.emptyList();
|
||||
return this;
|
||||
}
|
||||
|
||||
// repeated .OsmAndRoutingIndex.RouteDataBlock blocks = 5;
|
||||
public java.util.List<net.osmand.binary.OsmandOdb.OsmAndRoutingIndex.RouteDataBlock> getBlocksList() {
|
||||
return java.util.Collections.unmodifiableList(result.blocks_);
|
||||
|
@ -21725,136 +21814,138 @@ public final class OsmandOdb {
|
|||
descriptor;
|
||||
static {
|
||||
java.lang.String[] descriptorData = {
|
||||
"\n\024src/osmand_odb.proto\"\232\002\n\017OsmAndStructu" +
|
||||
"re\022\017\n\007version\030\001 \002(\r\022\023\n\013dateCreated\030\022 \002(\003" +
|
||||
"\022)\n\014addressIndex\030\007 \003(\0132\023.OsmAndAddressIn" +
|
||||
"dex\022-\n\016transportIndex\030\004 \003(\0132\025.OsmAndTran" +
|
||||
"sportIndex\022!\n\010poiIndex\030\010 \003(\0132\017.OsmAndPoi" +
|
||||
"Index\022!\n\010mapIndex\030\006 \003(\0132\017.OsmAndMapIndex" +
|
||||
"\022)\n\014routingIndex\030\t \003(\0132\023.OsmAndRoutingIn" +
|
||||
"dex\022\026\n\016versionConfirm\030 \002(\r\"I\n\rOsmAndTil" +
|
||||
"eBox\022\014\n\004left\030\001 \002(\r\022\r\n\005right\030\002 \002(\r\022\013\n\003top" +
|
||||
"\030\003 \002(\r\022\016\n\006bottom\030\004 \002(\r\"\030\n\013StringTable\022\t\n",
|
||||
"\001s\030\001 \003(\t\"f\n\022IndexedStringTable\022\016\n\006prefix" +
|
||||
"\030\001 \001(\t\022\013\n\003key\030\003 \003(\t\022\013\n\003val\030\004 \003(\007\022&\n\tsubt" +
|
||||
"ables\030\005 \003(\0132\023.IndexedStringTable\"\250\004\n\016Osm" +
|
||||
"AndMapIndex\022\014\n\004name\030\002 \002(\t\022.\n\005rules\030\004 \003(\013" +
|
||||
"2\037.OsmAndMapIndex.MapEncodingRule\022,\n\006lev" +
|
||||
"els\030\005 \003(\0132\034.OsmAndMapIndex.MapRootLevel\032" +
|
||||
"X\n\017MapEncodingRule\022\013\n\003tag\030\003 \002(\t\022\r\n\005value" +
|
||||
"\030\005 \001(\t\022\n\n\002id\030\007 \001(\r\022\017\n\007minZoom\030\t \001(\r\022\014\n\004t" +
|
||||
"ype\030\n \001(\r\032\264\001\n\014MapRootLevel\022\017\n\007maxZoom\030\001 " +
|
||||
"\002(\005\022\017\n\007minZoom\030\002 \002(\005\022\014\n\004left\030\003 \002(\005\022\r\n\005ri",
|
||||
"ght\030\004 \002(\005\022\013\n\003top\030\005 \002(\005\022\016\n\006bottom\030\006 \002(\005\022)" +
|
||||
"\n\005boxes\030\007 \003(\0132\032.OsmAndMapIndex.MapDataBo" +
|
||||
"x\022\035\n\006blocks\030\017 \003(\0132\r.MapDataBlock\032\230\001\n\nMap" +
|
||||
"DataBox\022\014\n\004left\030\001 \002(\021\022\r\n\005right\030\002 \002(\021\022\013\n\003" +
|
||||
"top\030\003 \002(\021\022\016\n\006bottom\030\004 \002(\021\022\026\n\016shiftToMapD" +
|
||||
"ata\030\005 \001(\007\022\r\n\005ocean\030\006 \001(\010\022)\n\005boxes\030\007 \003(\0132" +
|
||||
"\032.OsmAndMapIndex.MapDataBox\"`\n\014MapDataBl" +
|
||||
"ock\022\016\n\006baseId\030\n \001(\004\022\035\n\013dataObjects\030\014 \003(\013" +
|
||||
"2\010.MapData\022!\n\013stringTable\030\017 \001(\0132\014.String" +
|
||||
"Table\"\266\001\n\007MapData\022\023\n\013coordinates\030\001 \001(\014\022\027",
|
||||
"\n\017areaCoordinates\030\002 \001(\014\022\037\n\027polygonInnerC" +
|
||||
"oordinates\030\004 \003(\014\022\027\n\017additionalTypes\030\006 \001(" +
|
||||
"\014\022\r\n\005types\030\007 \002(\014\022\023\n\013stringNames\030\n \001(\014\022\n\n" +
|
||||
"\002id\030\014 \002(\022\022\023\n\013rasterBytes\030\017 \001(\014\"\222\002\n\022OsmAn" +
|
||||
"dAddressIndex\022\014\n\004name\030\001 \002(\t\022\017\n\007name_en\030\002" +
|
||||
" \001(\t\022\"\n\nboundaries\030\003 \001(\0132\016.OsmAndTileBox" +
|
||||
"\022/\n\006cities\030\006 \003(\0132\037.OsmAndAddressIndex.Ci" +
|
||||
"tiesIndex\022.\n\tnameIndex\030\007 \001(\0132\033.OsmAndAdd" +
|
||||
"ressNameIndexData\032X\n\013CitiesIndex\022\014\n\004type" +
|
||||
"\030\002 \002(\r\022\032\n\006cities\030\005 \003(\0132\n.CityIndex\022\037\n\006bl",
|
||||
"ocks\030\007 \003(\0132\017.CityBlockIndex\"\301\001\n\032OsmAndAd" +
|
||||
"dressNameIndexData\022\"\n\005table\030\004 \002(\0132\023.Inde" +
|
||||
"xedStringTable\022>\n\004atom\030\007 \003(\01320.OsmAndAdd" +
|
||||
"ressNameIndexData.AddressNameIndexData\032?" +
|
||||
"\n\024AddressNameIndexData\022\'\n\004atom\030\004 \003(\0132\031.A" +
|
||||
"ddressNameIndexDataAtom\"v\n\030AddressNameIn" +
|
||||
"dexDataAtom\022\014\n\004name\030\001 \001(\t\022\016\n\006nameEn\030\002 \001(" +
|
||||
"\t\022\014\n\004type\030\003 \002(\r\022\024\n\014shiftToIndex\030\005 \003(\005\022\030\n" +
|
||||
"\020shiftToCityIndex\030\006 \003(\005\"~\n\tCityIndex\022\021\n\t" +
|
||||
"city_type\030\001 \001(\r\022\014\n\004name\030\002 \002(\t\022\017\n\007name_en",
|
||||
"\030\003 \001(\t\022\n\n\002id\030\004 \001(\004\022\t\n\001x\030\005 \002(\r\022\t\n\001y\030\006 \002(\r" +
|
||||
"\022\035\n\025shiftToCityBlockIndex\030\n \001(\007\"l\n\016CityB" +
|
||||
"lockIndex\022\030\n\020shiftToCityIndex\030\004 \001(\007\022!\n\tb" +
|
||||
"uildings\030\n \003(\0132\016.BuildingIndex\022\035\n\007street" +
|
||||
"s\030\014 \003(\0132\014.StreetIndex\"\235\001\n\013StreetIndex\022\014\n" +
|
||||
"\004name\030\001 \002(\t\022\017\n\007name_en\030\002 \001(\t\022\t\n\001x\030\003 \002(\021\022" +
|
||||
"\t\n\001y\030\004 \002(\021\022\n\n\002id\030\006 \001(\004\022!\n\tbuildings\030\014 \003(" +
|
||||
"\0132\016.BuildingIndex\022*\n\rintersections\030\005 \003(\013" +
|
||||
"2\023.StreetIntersection\"_\n\022StreetIntersect" +
|
||||
"ion\022\014\n\004name\030\002 \002(\t\022\017\n\007name_en\030\003 \001(\t\022\024\n\014in",
|
||||
"tersectedX\030\004 \002(\021\022\024\n\014intersectedY\030\005 \002(\021\"\262" +
|
||||
"\001\n\rBuildingIndex\022\014\n\004name\030\001 \002(\t\022\017\n\007name_e" +
|
||||
"n\030\002 \001(\t\022\r\n\005name2\030\003 \001(\t\022\020\n\010name_en2\030\004 \001(\t" +
|
||||
"\022\025\n\rinterpolation\030\005 \001(\021\022\t\n\001x\030\007 \002(\021\022\t\n\001y\030" +
|
||||
"\010 \002(\021\022\n\n\002x2\030\t \001(\021\022\n\n\002y2\030\n \001(\021\022\n\n\002id\030\r \001(" +
|
||||
"\004\022\020\n\010postcode\030\016 \001(\t\"2\n\017TransportRoutes\022\037" +
|
||||
"\n\006routes\030\006 \003(\0132\017.TransportRoute\"\317\001\n\016Tran" +
|
||||
"sportRoute\022\n\n\002id\030\001 \002(\004\022\014\n\004type\030\003 \001(\r\022\020\n\010" +
|
||||
"operator\030\004 \001(\r\022\013\n\003ref\030\005 \001(\t\022\014\n\004name\030\006 \001(" +
|
||||
"\r\022\017\n\007name_en\030\007 \001(\r\022\020\n\010distance\030\010 \001(\r\022(\n\013",
|
||||
"directStops\030\017 \003(\0132\023.TransportRouteStop\022)" +
|
||||
"\n\014reverseStops\030\020 \003(\0132\023.TransportRouteSto" +
|
||||
"p\"W\n\022TransportRouteStop\022\n\n\002id\030\001 \002(\022\022\n\n\002d" +
|
||||
"x\030\002 \002(\021\022\n\n\002dy\030\003 \002(\021\022\014\n\004name\030\006 \002(\r\022\017\n\007nam" +
|
||||
"e_en\030\007 \001(\r\"b\n\rTransportStop\022\n\n\002dx\030\001 \002(\021\022" +
|
||||
"\n\n\002dy\030\002 \002(\021\022\n\n\002id\030\005 \002(\022\022\014\n\004name\030\006 \002(\r\022\017\n" +
|
||||
"\007name_en\030\007 \001(\r\022\016\n\006routes\030\020 \003(\r\"\244\001\n\022Trans" +
|
||||
"portStopsTree\022\014\n\004left\030\001 \002(\021\022\r\n\005right\030\002 \002" +
|
||||
"(\021\022\013\n\003top\030\003 \002(\021\022\016\n\006bottom\030\004 \002(\021\022%\n\010subtr" +
|
||||
"ees\030\007 \003(\0132\023.TransportStopsTree\022\035\n\005leafs\030",
|
||||
"\010 \003(\0132\016.TransportStop\022\016\n\006baseId\030\020 \001(\004\"\215\001" +
|
||||
"\n\024OsmAndTransportIndex\022\014\n\004name\030\001 \001(\t\022 \n\006" +
|
||||
"routes\030\003 \001(\0132\020.TransportRoutes\022\"\n\005stops\030" +
|
||||
"\006 \001(\0132\023.TransportStopsTree\022!\n\013stringTabl" +
|
||||
"e\030\t \002(\0132\014.StringTable\"\333\001\n\016OsmAndPoiIndex" +
|
||||
"\022\014\n\004name\030\001 \002(\t\022\"\n\nboundaries\030\002 \002(\0132\016.Osm" +
|
||||
"AndTileBox\022-\n\017categoriesTable\030\003 \003(\0132\024.Os" +
|
||||
"mAndCategoryTable\022&\n\tnameIndex\030\004 \001(\0132\023.O" +
|
||||
"smAndPoiNameIndex\022\034\n\005boxes\030\006 \003(\0132\r.OsmAn" +
|
||||
"dPoiBox\022\"\n\007poiData\030\t \003(\0132\021.OsmAndPoiBoxD",
|
||||
"ata\"\270\001\n\022OsmAndPoiNameIndex\022\"\n\005table\030\003 \002(" +
|
||||
"\0132\023.IndexedStringTable\0228\n\004data\030\005 \003(\0132*.O" +
|
||||
"smAndPoiNameIndex.OsmAndPoiNameIndexData" +
|
||||
"\032D\n\026OsmAndPoiNameIndexData\022*\n\005atoms\030\003 \003(" +
|
||||
"\0132\033.OsmAndPoiNameIndexDataAtom\"Q\n\032OsmAnd" +
|
||||
"PoiNameIndexDataAtom\022\014\n\004zoom\030\002 \001(\r\022\t\n\001x\030" +
|
||||
"\003 \001(\r\022\t\n\001y\030\004 \001(\r\022\017\n\007shiftTo\030\016 \001(\007\">\n\023Osm" +
|
||||
"AndCategoryTable\022\020\n\010category\030\001 \002(\t\022\025\n\rsu" +
|
||||
"bcategories\030\003 \003(\t\"\227\001\n\014OsmAndPoiBox\022\014\n\004zo" +
|
||||
"om\030\001 \002(\r\022\014\n\004left\030\002 \002(\021\022\013\n\003top\030\003 \002(\021\022(\n\nc",
|
||||
"ategories\030\004 \001(\0132\024.OsmAndPoiCategories\022\037\n" +
|
||||
"\010subBoxes\030\n \003(\0132\r.OsmAndPoiBox\022\023\n\013shiftT" +
|
||||
"oData\030\016 \001(\007\")\n\023OsmAndPoiCategories\022\022\n\nca" +
|
||||
"tegories\030\003 \003(\r\"^\n\020OsmAndPoiBoxData\022\014\n\004zo" +
|
||||
"om\030\001 \001(\r\022\t\n\001x\030\002 \001(\r\022\t\n\001y\030\003 \001(\r\022&\n\007poiDat" +
|
||||
"a\030\005 \003(\0132\025.OsmAndPoiBoxDataAtom\"\255\001\n\024OsmAn" +
|
||||
"dPoiBoxDataAtom\022\n\n\002dx\030\002 \002(\021\022\n\n\002dy\030\003 \002(\021\022" +
|
||||
"\022\n\ncategories\030\004 \003(\r\022\014\n\004name\030\006 \001(\t\022\016\n\006nam" +
|
||||
"eEn\030\007 \001(\t\022\n\n\002id\030\010 \001(\004\022\024\n\014openingHours\030\n " +
|
||||
"\001(\t\022\014\n\004site\030\013 \001(\t\022\r\n\005phone\030\014 \001(\t\022\014\n\004note",
|
||||
"\030\r \001(\t\"\032\n\007IdTable\022\017\n\007routeId\030\001 \003(\022\"F\n\017Re" +
|
||||
"strictionData\022\014\n\004type\030\001 \002(\005\022\014\n\004from\030\002 \002(" +
|
||||
"\005\022\n\n\002to\030\003 \002(\005\022\013\n\003via\030\004 \001(\005\"d\n\tRouteData\022" +
|
||||
"\016\n\006points\030\001 \002(\014\022\022\n\npointTypes\030\004 \001(\014\022\r\n\005t" +
|
||||
"ypes\030\007 \002(\014\022\017\n\007routeId\030\014 \002(\005\022\023\n\013stringNam" +
|
||||
"es\030\016 \001(\014\"\251\004\n\022OsmAndRoutingIndex\022\014\n\004name\030" +
|
||||
"\001 \002(\t\0224\n\005rules\030\002 \003(\0132%.OsmAndRoutingInde" +
|
||||
"x.RouteEncodingRule\0223\n\trootBoxes\030\003 \003(\0132 " +
|
||||
".OsmAndRoutingIndex.RouteDataBox\0222\n\006bloc" +
|
||||
"ks\030\005 \003(\0132\".OsmAndRoutingIndex.RouteDataB",
|
||||
"lock\032;\n\021RouteEncodingRule\022\013\n\003tag\030\003 \002(\t\022\r" +
|
||||
"\n\005value\030\005 \002(\t\022\n\n\002id\030\007 \001(\r\032\216\001\n\014RouteDataB" +
|
||||
"ox\022\014\n\004left\030\001 \002(\021\022\r\n\005right\030\002 \002(\021\022\013\n\003top\030\003" +
|
||||
" \002(\021\022\016\n\006bottom\030\004 \002(\021\022\023\n\013shiftToData\030\005 \001(" +
|
||||
"\007\022/\n\005boxes\030\007 \003(\0132 .OsmAndRoutingIndex.Ro" +
|
||||
"uteDataBox\032\227\001\n\016RouteDataBlock\022\031\n\007idTable" +
|
||||
"\030\005 \001(\0132\010.IdTable\022!\n\013stringTable\030\010 \001(\0132\014." +
|
||||
"StringTable\022\037\n\013dataObjects\030\006 \003(\0132\n.Route" +
|
||||
"Data\022&\n\014restrictions\030\007 \003(\0132\020.Restriction" +
|
||||
"DataB\023\n\021net.osmand.binary"
|
||||
"\n&DataExtractionOSM/src/osmand_odb.proto" +
|
||||
"\"\232\002\n\017OsmAndStructure\022\017\n\007version\030\001 \002(\r\022\023\n" +
|
||||
"\013dateCreated\030\022 \002(\003\022)\n\014addressIndex\030\007 \003(\013" +
|
||||
"2\023.OsmAndAddressIndex\022-\n\016transportIndex\030" +
|
||||
"\004 \003(\0132\025.OsmAndTransportIndex\022!\n\010poiIndex" +
|
||||
"\030\010 \003(\0132\017.OsmAndPoiIndex\022!\n\010mapIndex\030\006 \003(" +
|
||||
"\0132\017.OsmAndMapIndex\022)\n\014routingIndex\030\t \003(\013" +
|
||||
"2\023.OsmAndRoutingIndex\022\026\n\016versionConfirm\030" +
|
||||
" \002(\r\"I\n\rOsmAndTileBox\022\014\n\004left\030\001 \002(\r\022\r\n\005" +
|
||||
"right\030\002 \002(\r\022\013\n\003top\030\003 \002(\r\022\016\n\006bottom\030\004 \002(\r",
|
||||
"\"\030\n\013StringTable\022\t\n\001s\030\001 \003(\t\"f\n\022IndexedStr" +
|
||||
"ingTable\022\016\n\006prefix\030\001 \001(\t\022\013\n\003key\030\003 \003(\t\022\013\n" +
|
||||
"\003val\030\004 \003(\007\022&\n\tsubtables\030\005 \003(\0132\023.IndexedS" +
|
||||
"tringTable\"\250\004\n\016OsmAndMapIndex\022\014\n\004name\030\002 " +
|
||||
"\002(\t\022.\n\005rules\030\004 \003(\0132\037.OsmAndMapIndex.MapE" +
|
||||
"ncodingRule\022,\n\006levels\030\005 \003(\0132\034.OsmAndMapI" +
|
||||
"ndex.MapRootLevel\032X\n\017MapEncodingRule\022\013\n\003" +
|
||||
"tag\030\003 \002(\t\022\r\n\005value\030\005 \001(\t\022\n\n\002id\030\007 \001(\r\022\017\n\007" +
|
||||
"minZoom\030\t \001(\r\022\014\n\004type\030\n \001(\r\032\264\001\n\014MapRootL" +
|
||||
"evel\022\017\n\007maxZoom\030\001 \002(\005\022\017\n\007minZoom\030\002 \002(\005\022\014",
|
||||
"\n\004left\030\003 \002(\005\022\r\n\005right\030\004 \002(\005\022\013\n\003top\030\005 \002(\005" +
|
||||
"\022\016\n\006bottom\030\006 \002(\005\022)\n\005boxes\030\007 \003(\0132\032.OsmAnd" +
|
||||
"MapIndex.MapDataBox\022\035\n\006blocks\030\017 \003(\0132\r.Ma" +
|
||||
"pDataBlock\032\230\001\n\nMapDataBox\022\014\n\004left\030\001 \002(\021\022" +
|
||||
"\r\n\005right\030\002 \002(\021\022\013\n\003top\030\003 \002(\021\022\016\n\006bottom\030\004 " +
|
||||
"\002(\021\022\026\n\016shiftToMapData\030\005 \001(\007\022\r\n\005ocean\030\006 \001" +
|
||||
"(\010\022)\n\005boxes\030\007 \003(\0132\032.OsmAndMapIndex.MapDa" +
|
||||
"taBox\"`\n\014MapDataBlock\022\016\n\006baseId\030\n \001(\004\022\035\n" +
|
||||
"\013dataObjects\030\014 \003(\0132\010.MapData\022!\n\013stringTa" +
|
||||
"ble\030\017 \001(\0132\014.StringTable\"\266\001\n\007MapData\022\023\n\013c",
|
||||
"oordinates\030\001 \001(\014\022\027\n\017areaCoordinates\030\002 \001(" +
|
||||
"\014\022\037\n\027polygonInnerCoordinates\030\004 \003(\014\022\027\n\017ad" +
|
||||
"ditionalTypes\030\006 \001(\014\022\r\n\005types\030\007 \002(\014\022\023\n\013st" +
|
||||
"ringNames\030\n \001(\014\022\n\n\002id\030\014 \002(\022\022\023\n\013rasterByt" +
|
||||
"es\030\017 \001(\014\"\222\002\n\022OsmAndAddressIndex\022\014\n\004name\030" +
|
||||
"\001 \002(\t\022\017\n\007name_en\030\002 \001(\t\022\"\n\nboundaries\030\003 \001" +
|
||||
"(\0132\016.OsmAndTileBox\022/\n\006cities\030\006 \003(\0132\037.Osm" +
|
||||
"AndAddressIndex.CitiesIndex\022.\n\tnameIndex" +
|
||||
"\030\007 \001(\0132\033.OsmAndAddressNameIndexData\032X\n\013C" +
|
||||
"itiesIndex\022\014\n\004type\030\002 \002(\r\022\032\n\006cities\030\005 \003(\013",
|
||||
"2\n.CityIndex\022\037\n\006blocks\030\007 \003(\0132\017.CityBlock" +
|
||||
"Index\"\301\001\n\032OsmAndAddressNameIndexData\022\"\n\005" +
|
||||
"table\030\004 \002(\0132\023.IndexedStringTable\022>\n\004atom" +
|
||||
"\030\007 \003(\01320.OsmAndAddressNameIndexData.Addr" +
|
||||
"essNameIndexData\032?\n\024AddressNameIndexData" +
|
||||
"\022\'\n\004atom\030\004 \003(\0132\031.AddressNameIndexDataAto" +
|
||||
"m\"v\n\030AddressNameIndexDataAtom\022\014\n\004name\030\001 " +
|
||||
"\001(\t\022\016\n\006nameEn\030\002 \001(\t\022\014\n\004type\030\003 \002(\r\022\024\n\014shi" +
|
||||
"ftToIndex\030\005 \003(\005\022\030\n\020shiftToCityIndex\030\006 \003(" +
|
||||
"\005\"~\n\tCityIndex\022\021\n\tcity_type\030\001 \001(\r\022\014\n\004nam",
|
||||
"e\030\002 \002(\t\022\017\n\007name_en\030\003 \001(\t\022\n\n\002id\030\004 \001(\004\022\t\n\001" +
|
||||
"x\030\005 \002(\r\022\t\n\001y\030\006 \002(\r\022\035\n\025shiftToCityBlockIn" +
|
||||
"dex\030\n \001(\007\"l\n\016CityBlockIndex\022\030\n\020shiftToCi" +
|
||||
"tyIndex\030\004 \001(\007\022!\n\tbuildings\030\n \003(\0132\016.Build" +
|
||||
"ingIndex\022\035\n\007streets\030\014 \003(\0132\014.StreetIndex\"" +
|
||||
"\235\001\n\013StreetIndex\022\014\n\004name\030\001 \002(\t\022\017\n\007name_en" +
|
||||
"\030\002 \001(\t\022\t\n\001x\030\003 \002(\021\022\t\n\001y\030\004 \002(\021\022\n\n\002id\030\006 \001(\004" +
|
||||
"\022!\n\tbuildings\030\014 \003(\0132\016.BuildingIndex\022*\n\ri" +
|
||||
"ntersections\030\005 \003(\0132\023.StreetIntersection\"" +
|
||||
"_\n\022StreetIntersection\022\014\n\004name\030\002 \002(\t\022\017\n\007n",
|
||||
"ame_en\030\003 \001(\t\022\024\n\014intersectedX\030\004 \002(\021\022\024\n\014in" +
|
||||
"tersectedY\030\005 \002(\021\"\262\001\n\rBuildingIndex\022\014\n\004na" +
|
||||
"me\030\001 \002(\t\022\017\n\007name_en\030\002 \001(\t\022\r\n\005name2\030\003 \001(\t" +
|
||||
"\022\020\n\010name_en2\030\004 \001(\t\022\025\n\rinterpolation\030\005 \001(" +
|
||||
"\021\022\t\n\001x\030\007 \002(\021\022\t\n\001y\030\010 \002(\021\022\n\n\002x2\030\t \001(\021\022\n\n\002y" +
|
||||
"2\030\n \001(\021\022\n\n\002id\030\r \001(\004\022\020\n\010postcode\030\016 \001(\t\"2\n" +
|
||||
"\017TransportRoutes\022\037\n\006routes\030\006 \003(\0132\017.Trans" +
|
||||
"portRoute\"\317\001\n\016TransportRoute\022\n\n\002id\030\001 \002(\004" +
|
||||
"\022\014\n\004type\030\003 \001(\r\022\020\n\010operator\030\004 \001(\r\022\013\n\003ref\030" +
|
||||
"\005 \001(\t\022\014\n\004name\030\006 \001(\r\022\017\n\007name_en\030\007 \001(\r\022\020\n\010",
|
||||
"distance\030\010 \001(\r\022(\n\013directStops\030\017 \003(\0132\023.Tr" +
|
||||
"ansportRouteStop\022)\n\014reverseStops\030\020 \003(\0132\023" +
|
||||
".TransportRouteStop\"W\n\022TransportRouteSto" +
|
||||
"p\022\n\n\002id\030\001 \002(\022\022\n\n\002dx\030\002 \002(\021\022\n\n\002dy\030\003 \002(\021\022\014\n" +
|
||||
"\004name\030\006 \002(\r\022\017\n\007name_en\030\007 \001(\r\"b\n\rTranspor" +
|
||||
"tStop\022\n\n\002dx\030\001 \002(\021\022\n\n\002dy\030\002 \002(\021\022\n\n\002id\030\005 \002(" +
|
||||
"\022\022\014\n\004name\030\006 \002(\r\022\017\n\007name_en\030\007 \001(\r\022\016\n\006rout" +
|
||||
"es\030\020 \003(\r\"\244\001\n\022TransportStopsTree\022\014\n\004left\030" +
|
||||
"\001 \002(\021\022\r\n\005right\030\002 \002(\021\022\013\n\003top\030\003 \002(\021\022\016\n\006bot" +
|
||||
"tom\030\004 \002(\021\022%\n\010subtrees\030\007 \003(\0132\023.TransportS",
|
||||
"topsTree\022\035\n\005leafs\030\010 \003(\0132\016.TransportStop\022" +
|
||||
"\016\n\006baseId\030\020 \001(\004\"\215\001\n\024OsmAndTransportIndex" +
|
||||
"\022\014\n\004name\030\001 \001(\t\022 \n\006routes\030\003 \001(\0132\020.Transpo" +
|
||||
"rtRoutes\022\"\n\005stops\030\006 \001(\0132\023.TransportStops" +
|
||||
"Tree\022!\n\013stringTable\030\t \002(\0132\014.StringTable\"" +
|
||||
"\333\001\n\016OsmAndPoiIndex\022\014\n\004name\030\001 \002(\t\022\"\n\nboun" +
|
||||
"daries\030\002 \002(\0132\016.OsmAndTileBox\022-\n\017categori" +
|
||||
"esTable\030\003 \003(\0132\024.OsmAndCategoryTable\022&\n\tn" +
|
||||
"ameIndex\030\004 \001(\0132\023.OsmAndPoiNameIndex\022\034\n\005b" +
|
||||
"oxes\030\006 \003(\0132\r.OsmAndPoiBox\022\"\n\007poiData\030\t \003",
|
||||
"(\0132\021.OsmAndPoiBoxData\"\270\001\n\022OsmAndPoiNameI" +
|
||||
"ndex\022\"\n\005table\030\003 \002(\0132\023.IndexedStringTable" +
|
||||
"\0228\n\004data\030\005 \003(\0132*.OsmAndPoiNameIndex.OsmA" +
|
||||
"ndPoiNameIndexData\032D\n\026OsmAndPoiNameIndex" +
|
||||
"Data\022*\n\005atoms\030\003 \003(\0132\033.OsmAndPoiNameIndex" +
|
||||
"DataAtom\"Q\n\032OsmAndPoiNameIndexDataAtom\022\014" +
|
||||
"\n\004zoom\030\002 \001(\r\022\t\n\001x\030\003 \001(\r\022\t\n\001y\030\004 \001(\r\022\017\n\007sh" +
|
||||
"iftTo\030\016 \001(\007\">\n\023OsmAndCategoryTable\022\020\n\010ca" +
|
||||
"tegory\030\001 \002(\t\022\025\n\rsubcategories\030\003 \003(\t\"\227\001\n\014" +
|
||||
"OsmAndPoiBox\022\014\n\004zoom\030\001 \002(\r\022\014\n\004left\030\002 \002(\021",
|
||||
"\022\013\n\003top\030\003 \002(\021\022(\n\ncategories\030\004 \001(\0132\024.OsmA" +
|
||||
"ndPoiCategories\022\037\n\010subBoxes\030\n \003(\0132\r.OsmA" +
|
||||
"ndPoiBox\022\023\n\013shiftToData\030\016 \001(\007\")\n\023OsmAndP" +
|
||||
"oiCategories\022\022\n\ncategories\030\003 \003(\r\"^\n\020OsmA" +
|
||||
"ndPoiBoxData\022\014\n\004zoom\030\001 \001(\r\022\t\n\001x\030\002 \001(\r\022\t\n" +
|
||||
"\001y\030\003 \001(\r\022&\n\007poiData\030\005 \003(\0132\025.OsmAndPoiBox" +
|
||||
"DataAtom\"\255\001\n\024OsmAndPoiBoxDataAtom\022\n\n\002dx\030" +
|
||||
"\002 \002(\021\022\n\n\002dy\030\003 \002(\021\022\022\n\ncategories\030\004 \003(\r\022\014\n" +
|
||||
"\004name\030\006 \001(\t\022\016\n\006nameEn\030\007 \001(\t\022\n\n\002id\030\010 \001(\004\022" +
|
||||
"\024\n\014openingHours\030\n \001(\t\022\014\n\004site\030\013 \001(\t\022\r\n\005p",
|
||||
"hone\030\014 \001(\t\022\014\n\004note\030\r \001(\t\"\032\n\007IdTable\022\017\n\007r" +
|
||||
"outeId\030\001 \003(\022\"F\n\017RestrictionData\022\014\n\004type\030" +
|
||||
"\001 \002(\005\022\014\n\004from\030\002 \002(\005\022\n\n\002to\030\003 \002(\005\022\013\n\003via\030\004" +
|
||||
" \001(\005\"d\n\tRouteData\022\016\n\006points\030\001 \002(\014\022\022\n\npoi" +
|
||||
"ntTypes\030\004 \001(\014\022\r\n\005types\030\007 \002(\014\022\017\n\007routeId\030" +
|
||||
"\014 \002(\005\022\023\n\013stringNames\030\016 \001(\014\"\341\004\n\022OsmAndRou" +
|
||||
"tingIndex\022\014\n\004name\030\001 \002(\t\0224\n\005rules\030\002 \003(\0132%" +
|
||||
".OsmAndRoutingIndex.RouteEncodingRule\0223\n" +
|
||||
"\trootBoxes\030\003 \003(\0132 .OsmAndRoutingIndex.Ro" +
|
||||
"uteDataBox\0226\n\014basemapBoxes\030\004 \003(\0132 .OsmAn",
|
||||
"dRoutingIndex.RouteDataBox\0222\n\006blocks\030\005 \003" +
|
||||
"(\0132\".OsmAndRoutingIndex.RouteDataBlock\032;" +
|
||||
"\n\021RouteEncodingRule\022\013\n\003tag\030\003 \002(\t\022\r\n\005valu" +
|
||||
"e\030\005 \002(\t\022\n\n\002id\030\007 \001(\r\032\216\001\n\014RouteDataBox\022\014\n\004" +
|
||||
"left\030\001 \002(\021\022\r\n\005right\030\002 \002(\021\022\013\n\003top\030\003 \002(\021\022\016" +
|
||||
"\n\006bottom\030\004 \002(\021\022\023\n\013shiftToData\030\005 \001(\007\022/\n\005b" +
|
||||
"oxes\030\007 \003(\0132 .OsmAndRoutingIndex.RouteDat" +
|
||||
"aBox\032\227\001\n\016RouteDataBlock\022\031\n\007idTable\030\005 \001(\013" +
|
||||
"2\010.IdTable\022!\n\013stringTable\030\010 \001(\0132\014.String" +
|
||||
"Table\022\037\n\013dataObjects\030\006 \003(\0132\n.RouteData\022&",
|
||||
"\n\014restrictions\030\007 \003(\0132\020.RestrictionDataB\023" +
|
||||
"\n\021net.osmand.binary"
|
||||
};
|
||||
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
|
||||
new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
|
||||
|
@ -22171,7 +22262,7 @@ public final class OsmandOdb {
|
|||
internal_static_OsmAndRoutingIndex_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
|
||||
internal_static_OsmAndRoutingIndex_descriptor,
|
||||
new java.lang.String[] { "Name", "Rules", "RootBoxes", "Blocks", },
|
||||
new java.lang.String[] { "Name", "Rules", "RootBoxes", "BasemapBoxes", "Blocks", },
|
||||
net.osmand.binary.OsmandOdb.OsmAndRoutingIndex.class,
|
||||
net.osmand.binary.OsmandOdb.OsmAndRoutingIndex.Builder.class);
|
||||
internal_static_OsmAndRoutingIndex_RouteEncodingRule_descriptor =
|
||||
|
|
|
@ -310,10 +310,15 @@ public class BinaryMapIndexWriter {
|
|||
}
|
||||
}
|
||||
|
||||
public BinaryFileReference startRouteTreeElement(int leftX, int rightX, int topY, int bottomY, boolean containsObjects) throws IOException {
|
||||
public BinaryFileReference startRouteTreeElement(int leftX, int rightX, int topY, int bottomY, boolean containsObjects,
|
||||
boolean basemap) throws IOException {
|
||||
checkPeekState(ROUTE_TREE, ROUTE_INDEX_INIT);
|
||||
if (state.peek() == ROUTE_INDEX_INIT) {
|
||||
codedOutStream.writeTag(OsmAndRoutingIndex.ROOTBOXES_FIELD_NUMBER, WireFormat.WIRETYPE_FIXED32_LENGTH_DELIMITED);
|
||||
if(basemap) {
|
||||
codedOutStream.writeTag(OsmAndRoutingIndex.BASEMAPBOXES_FIELD_NUMBER, WireFormat.WIRETYPE_FIXED32_LENGTH_DELIMITED);
|
||||
} else {
|
||||
codedOutStream.writeTag(OsmAndRoutingIndex.ROOTBOXES_FIELD_NUMBER, WireFormat.WIRETYPE_FIXED32_LENGTH_DELIMITED);
|
||||
}
|
||||
} else {
|
||||
codedOutStream.writeTag(RouteDataBox.BOXES_FIELD_NUMBER, WireFormat.WIRETYPE_FIXED32_LENGTH_DELIMITED);
|
||||
}
|
||||
|
|
|
@ -597,10 +597,17 @@ public class IndexCreator {
|
|||
});
|
||||
|
||||
// 3.4 combine all low level ways and simplify them
|
||||
if (indexMap) {
|
||||
if (indexMap || indexRouting) {
|
||||
progress.setGeneralProgress("[90 / 100]");
|
||||
progress.startTask(Messages.getString("IndexCreator.INDEX_LO_LEVEL_WAYS"), indexMapCreator.getLowLevelWays());
|
||||
indexMapCreator.processingLowLevelWays(progress);
|
||||
if(indexMap) {
|
||||
progress.startTask(Messages.getString("IndexCreator.INDEX_LO_LEVEL_WAYS"), indexMapCreator.getLowLevelWays());
|
||||
indexMapCreator.processingLowLevelWays(progress);
|
||||
}
|
||||
if(indexRouting) {
|
||||
progress.startTask(Messages.getString("IndexCreator.INDEX_LO_LEVEL_WAYS"), -1);
|
||||
indexRouteCreator.processingLowLevelWays(progress);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 3.5 update all postal codes from relations
|
||||
|
@ -734,26 +741,31 @@ public class IndexCreator {
|
|||
public static void main(String[] args) throws IOException, SAXException, SQLException, InterruptedException {
|
||||
long time = System.currentTimeMillis();
|
||||
IndexCreator creator = new IndexCreator(new File("/home/victor/projects/OsmAnd/data/osm-gen/")); //$NON-NLS-1$
|
||||
creator.setIndexMap(true);
|
||||
creator.setIndexAddress(true);
|
||||
creator.setIndexPOI(true);
|
||||
creator.setIndexTransport(true);
|
||||
// creator.setIndexMap(true);
|
||||
// creator.setIndexAddress(true);
|
||||
// creator.setIndexPOI(true);
|
||||
// creator.setInde xTransport(true);
|
||||
creator.setIndexRouting(true);
|
||||
|
||||
// creator.deleteDatabaseIndexes = false;
|
||||
// creator.recreateOnlyBinaryFile = true;
|
||||
// creator.deleteOsmDB = false;
|
||||
creator.deleteOsmDB = false;
|
||||
|
||||
creator.setZoomWaySmothness(2);
|
||||
MapRenderingTypes rt = MapRenderingTypes.getDefault();
|
||||
MapZooms zooms = MapZooms.getDefault(); // MapZooms.parseZooms("15-");
|
||||
creator.setNodesDBFile(new File("/home/victor/projects/OsmAnd/data/osm-gen/nodes.tmp.odb"));
|
||||
creator.generateIndexes(new File("/home/victor/projects/OsmAnd/temp/map.osm"),
|
||||
// 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/RU-SPE.osm.bz2"),
|
||||
|
||||
// String file = "/home/victor/projects/OsmAnd/temp/map.osm";
|
||||
String file = "/home/victor/projects/OsmAnd/temp/belarus.osm.pbf";
|
||||
// String file = "/home/victor/projects/OsmAnd/temp/picardie.osm.pbf";
|
||||
int st = file.lastIndexOf('/');
|
||||
int e = file.indexOf('.', st);
|
||||
creator.setNodesDBFile(new File("/home/victor/projects/OsmAnd/data/osm-gen/"+file.substring(st, e) + ".tmp.odb"));
|
||||
creator.generateIndexes(new File(file),
|
||||
new ConsoleProgressImplementation(1), null, zooms, rt, log);
|
||||
|
||||
|
||||
|
||||
// BASEMAP generation
|
||||
// zooms = MapZooms.parseZooms("1-2;3;4-5;6-7;8-9;10-");
|
||||
// creator.setMapFileName("World_basemap_2.obf");
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -382,7 +382,7 @@ public class IndexVectorMapCreator extends AbstractIndexPartCreator {
|
|||
|
||||
}
|
||||
|
||||
private static boolean checkForSmallAreas(List<Node> nodes, int zoom, int minz, int maxz) {
|
||||
public static boolean checkForSmallAreas(List<Node> nodes, int zoom, int minz, int maxz) {
|
||||
int minX = Integer.MAX_VALUE;
|
||||
int maxX = Integer.MIN_VALUE;
|
||||
int minY = Integer.MAX_VALUE;
|
||||
|
|
|
@ -11,12 +11,16 @@ import java.util.Map;
|
|||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
|
||||
import net.osmand.osm.MapRoutingTypes.MapRouteType;
|
||||
|
||||
|
||||
public class MapRoutingTypes {
|
||||
|
||||
private static Set<String> TAGS_TO_SAVE = new HashSet<String>();
|
||||
private static Set<String> TAGS_TO_ACCEPT = new HashSet<String>();
|
||||
private static Set<String> TAGS_TEXT = new HashSet<String>();
|
||||
private static Set<String> BASE_TAGS_TEXT = new HashSet<String>();
|
||||
private static Set<String> BASE_TAGS_TO_SAVE = new HashSet<String>();
|
||||
private static char TAG_DELIMETER = '/'; //$NON-NLS-1$
|
||||
static {
|
||||
TAGS_TO_ACCEPT.add("highway");
|
||||
|
@ -24,6 +28,12 @@ public class MapRoutingTypes {
|
|||
TAGS_TO_ACCEPT.add("cycleway");
|
||||
TAGS_TO_ACCEPT.add("route");
|
||||
|
||||
BASE_TAGS_TEXT.add("int_ref");
|
||||
BASE_TAGS_TEXT.add("ref");
|
||||
|
||||
BASE_TAGS_TO_SAVE.add("toll");
|
||||
BASE_TAGS_TO_SAVE.add("maxspeed");
|
||||
|
||||
// TEXT tags
|
||||
TAGS_TEXT.add("int_ref");
|
||||
TAGS_TEXT.add("ref");
|
||||
|
@ -75,7 +85,9 @@ public class MapRoutingTypes {
|
|||
}
|
||||
|
||||
private Map<String, MapRouteType> types = new LinkedHashMap<String, MapRoutingTypes.MapRouteType>();
|
||||
private List<MapRouteType> listTypes = new ArrayList<MapRoutingTypes.MapRouteType>();
|
||||
private List<MapRouteType> listTypes = new ArrayList<MapRoutingTypes.MapRouteType>();
|
||||
private MapRouteType refRuleType;
|
||||
private MapRouteType nameRuleType;
|
||||
|
||||
public static String constructRuleKey(String tag, String val) {
|
||||
if(val == null || val.length() == 0){
|
||||
|
@ -100,6 +112,15 @@ public class MapRoutingTypes {
|
|||
return null;
|
||||
}
|
||||
|
||||
public MapRouteType getRefRuleType() {
|
||||
return refRuleType;
|
||||
}
|
||||
|
||||
|
||||
public MapRouteType getNameRuleType() {
|
||||
return nameRuleType;
|
||||
}
|
||||
|
||||
private boolean contains(Set<String> s, String tag, String value) {
|
||||
if(s.contains(tag) || s.contains(tag + TAG_DELIMETER + value)){
|
||||
return true;
|
||||
|
@ -137,6 +158,45 @@ public class MapRoutingTypes {
|
|||
return true;
|
||||
}
|
||||
|
||||
public boolean encodeBaseEntity(Way et, TIntArrayList outTypes, Map<MapRouteType, String> names){
|
||||
Way e = (Way) et;
|
||||
boolean init = false;
|
||||
for(Entry<String, String> es : e.getTags().entrySet()) {
|
||||
String tag = es.getKey();
|
||||
String value = es.getValue();
|
||||
if (contains(TAGS_TO_ACCEPT, tag, value)) {
|
||||
if(value.startsWith("trunk") || value.startsWith("motorway")
|
||||
|| value.startsWith("primary") || value.startsWith("secondary")
|
||||
|| value.startsWith("tertiary")
|
||||
) {
|
||||
init = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!init) {
|
||||
return false;
|
||||
}
|
||||
outTypes.clear();
|
||||
names.clear();
|
||||
for(Entry<String, String> es : e.getTags().entrySet()) {
|
||||
String tag = es.getKey();
|
||||
String value = converBooleanValue(es.getValue());
|
||||
if(BASE_TAGS_TEXT.contains(tag)) {
|
||||
names.put(registerRule(tag, null), value);
|
||||
}
|
||||
// do not use links in base map
|
||||
if(value.endsWith("_link")){
|
||||
value = value.substring(0, value.length() - 5);
|
||||
}
|
||||
if(contains(TAGS_TO_ACCEPT, tag, value) ||
|
||||
contains(BASE_TAGS_TO_SAVE, tag, value)) {
|
||||
outTypes.add(registerRule(tag, value).id);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private String converBooleanValue(String value){
|
||||
if(value.equals("true")) {
|
||||
return "yes";
|
||||
|
@ -178,6 +238,12 @@ public class MapRoutingTypes {
|
|||
rt.value = val;
|
||||
types.put(id, rt);
|
||||
listTypes.add(rt);
|
||||
if(tag.equals("ref")){
|
||||
refRuleType = rt;
|
||||
}
|
||||
if(tag.equals("name")){
|
||||
nameRuleType = rt;
|
||||
}
|
||||
}
|
||||
MapRouteType type = types.get(id);
|
||||
type.freq ++;
|
||||
|
@ -215,9 +281,17 @@ public class MapRoutingTypes {
|
|||
this.targetId = targetId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
if (value == null) {
|
||||
return "'" + tag + "'";
|
||||
}
|
||||
return tag + "='" + value + "'";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public List<MapRouteType> getEncodingRuleTypes() {
|
||||
return listTypes;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -471,6 +471,29 @@ public class MapUtils {
|
|||
|
||||
}
|
||||
|
||||
|
||||
public static double squareDist31TileMetric(int x1, int y1, int x2, int y2) {
|
||||
// translate into meters
|
||||
double dy = convert31YToMeters(y1, y2);
|
||||
double dx = convert31XToMeters(x1, x2);
|
||||
return dx * dx + dy * dy;
|
||||
}
|
||||
public static double convert31YToMeters(float y1, float y2) {
|
||||
// translate into meters
|
||||
return (y1 - y2) * 0.01863d;
|
||||
}
|
||||
|
||||
public static double convert31XToMeters(float x1, float x2) {
|
||||
// translate into meters
|
||||
return (x1 - x2) * 0.011d;
|
||||
}
|
||||
|
||||
|
||||
public static double calculateProjection31TileMetric(int xA, int yA, int xB, int yB, int xC, int yC) {
|
||||
// Scalar multiplication between (AB, AC)
|
||||
double multiple = convert31XToMeters(xB, xA) * convert31XToMeters(xC, xA) + convert31YToMeters(yB, yA) * convert31YToMeters(yC, yA);
|
||||
return multiple;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -20,19 +20,28 @@
|
|||
type="string" possibleValues="default,car,bicycle,pedestrian"/>
|
||||
<renderingProperty attr="noPolygons" name="No polygons" description="Make all areal land features on map transparent"
|
||||
type="boolean" possibleValues=""/>
|
||||
<renderingProperty attr="showRoadMaps" name="Show road maps" description="Select how to show maps that have only road information."
|
||||
type="string" possibleValues="yes,only_roads,no"/>
|
||||
|
||||
<renderingAttribute name="defaultColor">
|
||||
<filter noPolygons="true" attrColorValue="#00ffffff"/>
|
||||
<filter nightMode="true" attrColorValue="#003333"/>
|
||||
<filter attrColorValue="#f1eae4"/>
|
||||
</renderingAttribute>
|
||||
|
||||
<renderingAttribute name="showRoadMapsAttribute">
|
||||
<filter showRoadMaps="only_roads" attrIntValue="1"/>
|
||||
<filter showRoadMaps="yes" attrIntValue="0"/>
|
||||
<filter showRoadMaps="no" attrIntValue="-1"/>
|
||||
<filter attrIntValue="0"/>
|
||||
</renderingAttribute>
|
||||
|
||||
<!-- 0 - no shadow, 1 - one step, 2 - blur shadow, 3 - solid shadow -->
|
||||
<renderingAttribute name="shadowRendering">
|
||||
<!-- next line corrects for shadowColor appearing very dark with solid shadow in day view -->
|
||||
<filter minzoom="14" nightMode="false" attrIntValue="3" shadowColor="#969696"/>
|
||||
<filter minzoom="14" attrIntValue="3" shadowColor="#464646"/>
|
||||
<filter minzoom="9" maxzoom="13" attrIntValue="1" shadowColor="#464646"/>
|
||||
<filter minzoom="9" maxzoom="13" attrIntValue="3" shadowColor="#464646"/>
|
||||
<filter attrIntValue="0"/>
|
||||
</renderingAttribute>
|
||||
|
||||
|
@ -80,6 +89,7 @@
|
|||
<renderingConstant name="tertiaryRoadColor" value="#F0CE30"/>
|
||||
-->
|
||||
|
||||
|
||||
<!--
|
||||
All-Purpose Renderer (with attr="hmRendered" name="Show more map detail") (by Hardy Mueller), v023:
|
||||
- some roads already rendered at lower zooms (travel/orienteering)
|
||||
|
@ -311,47 +321,46 @@
|
|||
<!-- PRIORITY Input to filter : tag, value, zoom [minzoom, maxzoom], textLength, ref, textOrder (default=100) -->
|
||||
<text>
|
||||
<!-- Highway refs -->
|
||||
<filter minzoom="10" tag="highway" value="motorway" nameTag="ref" textMinDistance="150" textColor="#ffffff" textSize="12" textBold="true" textOrder="7">
|
||||
<filter minzoom="8" tag="highway" value="motorway" nameTag="ref" textMinDistance="150" textColor="#ffffff" textSize="12" textBold="true" textOrder="7">
|
||||
<filter textLength="1" textShield="mot_shield1"/>
|
||||
<filter textLength="2" textShield="mot_shield2"/>
|
||||
<filter textLength="3" textShield="mot_shield3"/>
|
||||
<filter textLength="4" textShield="mot_shield4"/>
|
||||
<filter textLength="5" textShield="mot_shield5"/>
|
||||
<filter textLength="6" textShield="mot_shield6"/>
|
||||
<filter textShield="mot_shield6"/>
|
||||
</filter>
|
||||
<filter minzoom="10" tag="highway" value="trunk" nameTag="ref" textMinDistance="150" textColor="#ffffff" textSize="12" textBold="true" textOrder="7">
|
||||
<filter minzoom="8" tag="highway" value="trunk" nameTag="ref" textMinDistance="150" textColor="#ffffff" textSize="12" textBold="true" textOrder="7">
|
||||
<filter textLength="1" textShield="tru_shield1"/>
|
||||
<filter textLength="2" textShield="tru_shield2"/>
|
||||
<filter textLength="3" textShield="tru_shield3"/>
|
||||
<filter textLength="4" textShield="tru_shield4"/>
|
||||
<filter textLength="5" textShield="tru_shield5"/>
|
||||
<filter textLength="6" textShield="tru_shield6"/>
|
||||
<filter textShield="tru_shield6"/>
|
||||
</filter>
|
||||
<filter minzoom="11" tag="highway" value="primary" nameTag="ref" textMinDistance="150" textColor="#ffffff" textSize="12" textBold="true" textOrder="8">
|
||||
<filter minzoom="10" tag="highway" value="primary" nameTag="ref" textMinDistance="150" textColor="#ffffff" textSize="12" textBold="true" textOrder="8">
|
||||
<filter textLength="1" textShield="pri_shield1"/>
|
||||
<filter textLength="2" textShield="pri_shield2"/>
|
||||
<filter textLength="3" textShield="pri_shield3"/>
|
||||
<filter textLength="4" textShield="pri_shield4"/>
|
||||
<filter textLength="5" textShield="pri_shield5"/>
|
||||
<filter textLength="6" textShield="pri_shield6"/>
|
||||
<filter textShield="pri_shield6"/>
|
||||
</filter>
|
||||
<filter minzoom="13" tag="highway" value="secondary" nameTag="ref" textMinDistance="150" textColor="#ffffff" textSize="12" textBold="true" textOrder="9">
|
||||
<filter minzoom="12" tag="highway" value="secondary" nameTag="ref" textMinDistance="150" textColor="#ffffff" textSize="12" textBold="true" textOrder="9">
|
||||
<filter textLength="1" textShield="sec_shield1"/>
|
||||
<filter textLength="2" textShield="sec_shield2"/>
|
||||
<filter textLength="3" textShield="sec_shield3"/>
|
||||
<filter textLength="4" textShield="sec_shield4"/>
|
||||
<filter textLength="5" textShield="sec_shield5"/>
|
||||
<filter textLength="6" textShield="sec_shield6"/>
|
||||
<filter textShield="sec_shield6"/>
|
||||
</filter>
|
||||
<filter minzoom="14" tag="highway" value="tertiary" nameTag="ref" textMinDistance="150" textColor="#ffffff" textSize="12" textBold="true" textOrder="10">
|
||||
<filter minzoom="13" tag="highway" value="tertiary" nameTag="ref" textMinDistance="150" textColor="#ffffff" textSize="12" textBold="true" textOrder="10">
|
||||
<filter textLength="1" textShield="ter_shield1"/>
|
||||
<filter textLength="2" textShield="ter_shield2"/>
|
||||
<filter textLength="3" textShield="ter_shield3"/>
|
||||
<filter textLength="4" textShield="ter_shield4"/>
|
||||
<filter textLength="5" textShield="ter_shield5"/>
|
||||
<filter textLength="6" textShield="ter_shield6"/>
|
||||
<filter textShield="ter_shield6"/>
|
||||
</filter>
|
||||
|
||||
<!-- Highway text -->
|
||||
<group>
|
||||
<filter tag="highway" value="motorway" nameTag="" textOrder="6"/>
|
||||
|
@ -1072,7 +1081,7 @@
|
|||
<filter tag="highway" value="motorway_link" maxzoom="13" color="$motorwayRoadColor"/>
|
||||
<filter tag="highway" value="trunk" maxzoom="13" color="$trunkRoadColor"/>
|
||||
<filter tag="highway" value="trunk_link" maxzoom="13" color="$trunkRoadColor"/>
|
||||
<groupFilter cap="ROUND">
|
||||
<groupFilter cap="ROUND" shadowRadius="1">
|
||||
<filter minzoom="5" maxzoom="9" strokeWidth="5"/>
|
||||
<filter minzoom="10" maxzoom="10" strokeWidth="6"/>
|
||||
<filter minzoom="11" maxzoom="11" strokeWidth="7"/>
|
||||
|
@ -1084,7 +1093,7 @@
|
|||
<group>
|
||||
<filter tag="highway" value="primary" maxzoom="13" color="$primaryRoadColor"/>
|
||||
<filter tag="highway" value="primary_link" maxzoom="13" color="$primaryRoadColor"/>
|
||||
<groupFilter cap="ROUND">
|
||||
<groupFilter cap="ROUND" shadowRadius="1">
|
||||
<filter minzoom="7" maxzoom="9" strokeWidth="4"/>
|
||||
<filter minzoom="10" maxzoom="10" strokeWidth="5"/>
|
||||
<filter minzoom="11" maxzoom="11" strokeWidth="6"/>
|
||||
|
@ -1097,7 +1106,8 @@
|
|||
<filter tag="highway" value="secondary" maxzoom="13" color="$secondaryRoadColor"/>
|
||||
<filter tag="highway" value="secondary_link" maxzoom="13" color="$secondaryRoadColor"/>
|
||||
<groupFilter shadowRadius="1" cap="ROUND">
|
||||
<filter minzoom="9" maxzoom="9" strokeWidth="3"/>
|
||||
<!-- too much in europe ? -->
|
||||
<!-- <filter minzoom="9" maxzoom="9" strokeWidth="3"/> -->
|
||||
<filter minzoom="10" maxzoom="10" strokeWidth="4"/>
|
||||
<filter minzoom="11" maxzoom="11" strokeWidth="5"/>
|
||||
<filter minzoom="12" maxzoom="12" strokeWidth="6"/>
|
||||
|
@ -1140,7 +1150,8 @@
|
|||
<filter tag="highway" value="tertiary" color="$tertiaryRoadColor"/>
|
||||
<filter tag="highway" value="tertiary_link" color="$tertiaryRoadColor"/>
|
||||
<groupFilter shadowRadius="1" cap="ROUND">
|
||||
<filter minzoom="10" maxzoom="10" strokeWidth="3"/>
|
||||
<!-- too much in europe ? -->
|
||||
<!-- <filter minzoom="10" maxzoom="10" strokeWidth="3"/> -->
|
||||
<filter minzoom="11" maxzoom="11" strokeWidth="4"/>
|
||||
<filter minzoom="12" maxzoom="12" strokeWidth="5"/>
|
||||
<filter minzoom="13" maxzoom="13" strokeWidth="6"/>
|
||||
|
|
|
@ -34,8 +34,8 @@ public class BinaryRoutePlanner {
|
|||
|
||||
private static double squareRootDist(int x1, int y1, int x2, int y2) {
|
||||
// translate into meters
|
||||
double dy = convert31YToMeters(y1, y2);
|
||||
double dx = convert31XToMeters(x1, x2);
|
||||
double dy = MapUtils.convert31YToMeters(y1, y2);
|
||||
double dx = MapUtils.convert31XToMeters(x1, x2);
|
||||
return Math.sqrt(dx * dx + dy * dy);
|
||||
// return measuredDist(x1, y1, x2, y2);
|
||||
}
|
||||
|
@ -45,30 +45,6 @@ public class BinaryRoutePlanner {
|
|||
MapUtils.get31LatitudeY(y2), MapUtils.get31LongitudeX(x2));
|
||||
}
|
||||
|
||||
private static double squareDist(int x1, int y1, int x2, int y2) {
|
||||
// translate into meters
|
||||
double dy = convert31YToMeters(y1, y2);
|
||||
double dx = convert31XToMeters(x1, x2);
|
||||
return dx * dx + dy * dy;
|
||||
}
|
||||
|
||||
private static double convert31YToMeters(int y1, int y2) {
|
||||
// translate into meters
|
||||
return (y1 - y2) * 0.01863d;
|
||||
}
|
||||
|
||||
private static double convert31XToMeters(int x1, int x2) {
|
||||
// translate into meters
|
||||
return (x1 - x2) * 0.011d;
|
||||
}
|
||||
|
||||
|
||||
private static double calculateProjection(int xA, int yA, int xB, int yB, int xC, int yC) {
|
||||
// Scalar multiplication between (AB, AC)
|
||||
double multiple = convert31XToMeters(xB, xA) * convert31XToMeters(xC, xA) + convert31YToMeters(yB, yA) * convert31YToMeters(yC, yA);
|
||||
return multiple;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public RouteSegment findRouteSegment(double lat, double lon, RoutingContext ctx) throws IOException {
|
||||
|
@ -93,7 +69,7 @@ public class BinaryRoutePlanner {
|
|||
r.getPoint31YTile(j - 1));
|
||||
int prx = r.getPoint31XTile(j);
|
||||
int pry = r.getPoint31YTile(j);
|
||||
double projection = calculateProjection(r.getPoint31XTile(j - 1), r.getPoint31YTile(j - 1), r.getPoint31XTile(j),
|
||||
double projection = MapUtils. calculateProjection31TileMetric(r.getPoint31XTile(j - 1), r.getPoint31YTile(j - 1), r.getPoint31XTile(j),
|
||||
r.getPoint31YTile(j), px, py);
|
||||
if (projection < 0) {
|
||||
prx = r.getPoint31XTile(j - 1);
|
||||
|
@ -107,7 +83,7 @@ public class BinaryRoutePlanner {
|
|||
pry = (int) (r.getPoint31YTile(j - 1) + (r.getPoint31YTile(j) - r.getPoint31YTile(j - 1))
|
||||
* (projection / (mDist * mDist)));
|
||||
}
|
||||
double currentsDist = squareDist(prx, pry, px, py);
|
||||
double currentsDist = MapUtils. squareDist31TileMetric(prx, pry, px, py);
|
||||
if (road == null || currentsDist < sdist) {
|
||||
RouteDataObject ro = new RouteDataObject(r);
|
||||
road = new RouteSegment(ro, j);
|
||||
|
@ -992,6 +968,10 @@ public class BinaryRoutePlanner {
|
|||
StringBuilder additional = new StringBuilder();
|
||||
additional.append("time = \"").append(res.getSegmentTime()).append("\" ");
|
||||
additional.append("name = \"").append(name).append("\" ");
|
||||
// float ms = res.getObject().getMaximumSpeed();
|
||||
// if(ms > 0) {
|
||||
// additional.append("maxspeed = \"").append(ms * 3.6f).append("\" ");
|
||||
// }
|
||||
additional.append("distance = \"").append(res.getDistance()).append("\" ");
|
||||
if (res.getTurnType() != null) {
|
||||
additional.append("turn = \"").append(res.getTurnType()).append("\" ");
|
||||
|
|
|
@ -34,6 +34,8 @@ import org.apache.commons.logging.Log;
|
|||
public class RoutingContext {
|
||||
|
||||
public static final boolean SHOW_GC_SIZE = false;
|
||||
public boolean USE_BASEMAP = false;
|
||||
|
||||
private final static Log log = LogUtil.getLog(RoutingContext.class);
|
||||
public static final int OPTION_NO_LOAD = 0;
|
||||
public static final int OPTION_SMART_LOAD = 1;
|
||||
|
@ -119,7 +121,9 @@ public class RoutingContext {
|
|||
List<RouteRegion> rr = mr.getRoutingIndexes();
|
||||
List<RouteSubregion> subregions = new ArrayList<BinaryMapRouteReaderAdapter.RouteSubregion>();
|
||||
for (RouteRegion r : rr) {
|
||||
for (RouteSubregion rs : r.getSubregions()) {
|
||||
List<RouteSubregion> subregs = USE_BASEMAP ? r.getBaseSubregions() :
|
||||
r.getSubregions();
|
||||
for (RouteSubregion rs : subregs) {
|
||||
subregions.add(new RouteSubregion(rs));
|
||||
}
|
||||
this.reverseMap.put(r, mr);
|
||||
|
@ -127,7 +131,6 @@ public class RoutingContext {
|
|||
this.map.put(mr, subregions);
|
||||
}
|
||||
this.config = config;
|
||||
// this.nativeLib = null;
|
||||
this.nativeLib = nativeLibrary;
|
||||
}
|
||||
|
||||
|
@ -618,7 +621,9 @@ public class RoutingContext {
|
|||
return original;
|
||||
}
|
||||
// Native use case
|
||||
long nanoTime = System.nanoTime();
|
||||
RouteDataObject[] res = ctx.nativeLib.getDataObjects(searchResult, x31, y31);
|
||||
ctx.timeToLoad += (System.nanoTime() - nanoTime);
|
||||
if (res != null) {
|
||||
for (RouteDataObject ro : res) {
|
||||
RouteDataObject toCmp = excludeDuplications.get(ro.id);
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<attribute name="zoomToLoadTiles" value="16" />
|
||||
<!-- by default it is 30. Value specified here overwrites all others
|
||||
(don't specify here ! it is device dependent) -->
|
||||
<attribute name="memoryLimitInMB" value="" />
|
||||
<attribute name="memoryLimitInMB" value="450" />
|
||||
|
||||
<!-- 1.2 Dynamic road prioritizing (heuristic) -->
|
||||
<attribute name="useDynamicRoadPrioritising" value="false" />
|
||||
|
|
|
@ -171,23 +171,22 @@ public class MapRouterLayer implements MapPanelLayer {
|
|||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
new Thread() {
|
||||
@Override
|
||||
public void run() {
|
||||
List<Way> ways = selfRoute(startRoute, endRoute, intermediates, null);
|
||||
if (ways != null) {
|
||||
DataTileManager<Way> points = new DataTileManager<Way>();
|
||||
points.setZoom(11);
|
||||
for (Way w : ways) {
|
||||
LatLon n = w.getLatLon();
|
||||
points.registerObject(n.getLatitude(), n.getLongitude(), w);
|
||||
}
|
||||
map.setPoints(points);
|
||||
}
|
||||
}
|
||||
}.start();
|
||||
previousRoute = null;
|
||||
calcRoute(false);
|
||||
}
|
||||
};
|
||||
menu.add(selfRoute);
|
||||
|
||||
Action selfBaseRoute = new AbstractAction("Calculate OsmAnd base route") {
|
||||
private static final long serialVersionUID = 8049785829806139142L;
|
||||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
previousRoute = null;
|
||||
calcRoute(true);
|
||||
}
|
||||
};
|
||||
menu.add(selfBaseRoute);
|
||||
|
||||
Action recalculate = new AbstractAction("Recalculate OsmAnd route") {
|
||||
private static final long serialVersionUID = 507156107455281238L;
|
||||
|
@ -200,25 +199,11 @@ public class MapRouterLayer implements MapPanelLayer {
|
|||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
new Thread() {
|
||||
@Override
|
||||
public void run() {
|
||||
List<Way> ways = selfRoute(startRoute, endRoute, intermediates, previousRoute);
|
||||
if (ways != null) {
|
||||
DataTileManager<Way> points = new DataTileManager<Way>();
|
||||
points.setZoom(11);
|
||||
for (Way w : ways) {
|
||||
LatLon n = w.getLatLon();
|
||||
points.registerObject(n.getLatitude(), n.getLongitude(), w);
|
||||
}
|
||||
map.setPoints(points);
|
||||
}
|
||||
}
|
||||
}.start();
|
||||
calcRoute(false);
|
||||
}
|
||||
};
|
||||
|
||||
menu.add(selfRoute);
|
||||
|
||||
menu.add(recalculate);
|
||||
Action route_YOURS = new AbstractAction("Calculate YOURS route") {
|
||||
private static final long serialVersionUID = 507156107455281238L;
|
||||
|
@ -304,6 +289,24 @@ public class MapRouterLayer implements MapPanelLayer {
|
|||
}
|
||||
|
||||
|
||||
private void calcRoute(final boolean useBasemap) {
|
||||
new Thread() {
|
||||
@Override
|
||||
public void run() {
|
||||
List<Way> ways = selfRoute(startRoute, endRoute, intermediates, previousRoute, useBasemap);
|
||||
if (ways != null) {
|
||||
DataTileManager<Way> points = new DataTileManager<Way>();
|
||||
points.setZoom(11);
|
||||
for (Way w : ways) {
|
||||
LatLon n = w.getLatLon();
|
||||
points.registerObject(n.getLatitude(), n.getLongitude(), w);
|
||||
}
|
||||
map.setPoints(points);
|
||||
}
|
||||
}
|
||||
}.start();
|
||||
}
|
||||
|
||||
public static List<Way> route_YOURS(LatLon start, LatLon end){
|
||||
List<Way> res = new ArrayList<Way>();
|
||||
long time = System.currentTimeMillis();
|
||||
|
@ -563,7 +566,7 @@ public class MapRouterLayer implements MapPanelLayer {
|
|||
return res;
|
||||
}
|
||||
|
||||
public List<Way> selfRoute(LatLon start, LatLon end, List<LatLon> intermediates, List<RouteSegmentResult> previousRoute) {
|
||||
public List<Way> selfRoute(LatLon start, LatLon end, List<LatLon> intermediates, List<RouteSegmentResult> previousRoute, boolean useBasemap) {
|
||||
List<Way> res = new ArrayList<Way>();
|
||||
long time = System.currentTimeMillis();
|
||||
List<File> files = new ArrayList<File>();
|
||||
|
@ -615,6 +618,7 @@ public class MapRouterLayer implements MapPanelLayer {
|
|||
// config.NUMBER_OF_DESIRABLE_TILES_IN_MEMORY = 300;
|
||||
// config.ZOOM_TO_LOAD_TILES = 14;
|
||||
RoutingContext ctx = new RoutingContext(config, NativeSwingRendering.getDefaultFromSettings(), rs);
|
||||
ctx.USE_BASEMAP = useBasemap;
|
||||
ctx.previouslyCalculatedRoute = previousRoute;
|
||||
log.info("Use " + config.routerName + "mode for routing");
|
||||
|
||||
|
|
|
@ -75,12 +75,14 @@ message MapPart {
|
|||
message RoutingSubregion {
|
||||
required int64 size = 1;
|
||||
required int64 offset = 2;
|
||||
required bool basemap= 3;
|
||||
|
||||
required int32 left = 4;
|
||||
required int32 right = 5;
|
||||
required int32 top = 6;
|
||||
required int32 bottom = 7;
|
||||
required uint32 shifToData = 8;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ option java_package = "net.osmand.binary";
|
|||
//protoc --java_out=DataExtractionOSM/src DataExtractionOSM/src/osmand_odb.proto
|
||||
|
||||
// C++ # cd OsmAnd
|
||||
// # protoc --proto_path=../DataExtractionOSM/src --cpp_out=jni/osmand/proto ../DataExtractionOSM/src/osmand_odb.proto
|
||||
// # protoc --proto_path=../DataExtractionOSM/src --cpp_out=../Osmand-kernel/osmand/src/proto/ ../DataExtractionOSM/src/osmand_odb.proto
|
||||
|
||||
//
|
||||
// STORAGE LAYER: Storing primitives.
|
||||
|
@ -508,6 +508,9 @@ message OsmAndRoutingIndex {
|
|||
// encoded as fixed32 length delimited
|
||||
repeated RouteDataBox rootBoxes = 3;
|
||||
|
||||
// encoded as fixed32 length delimited
|
||||
repeated RouteDataBox basemapBoxes = 4;
|
||||
|
||||
repeated RouteDataBlock blocks = 5;
|
||||
message RouteDataBox {
|
||||
// for root box is absolute coordinates
|
||||
|
|
|
@ -118,19 +118,6 @@ public class OsmandExtraSettings extends OsmandPlugin {
|
|||
}
|
||||
});
|
||||
|
||||
// FIXME delete strings from this code
|
||||
// final MapInfoControlRegInfo fluorescent = mapInfoControls.registerAppearanceWidget(R.drawable.widget_fluorescent_routes, R.string.map_widget_fluorescent,
|
||||
// "fluorescent", view.getSettings().FLUORESCENT_OVERLAYS);
|
||||
// fluorescent.setStateChangeListener(new Runnable() {
|
||||
// @Override
|
||||
// public void run() {
|
||||
// view.getSettings().FLUORESCENT_OVERLAYS.set(!view.getSettings().FLUORESCENT_OVERLAYS.get());
|
||||
// view.refreshMap();
|
||||
// }
|
||||
// });
|
||||
|
||||
|
||||
// final CommonPreference<Integer> posPref = view.getSettings().POSITION_ON_MAP;
|
||||
// final MapInfoControlRegInfo posMap = mapInfoControls.registerAppearanceWidget(R.drawable.widget_position_marker, R.string.position_on_map,
|
||||
// "position_on_map", textSizePref);
|
||||
// posMap.setStateChangeListener(new Runnable() {
|
||||
|
|
|
@ -11,6 +11,7 @@ LOCAL_MODULE := expat_static_neon
|
|||
LOCAL_ARM_NEON := true
|
||||
endif
|
||||
|
||||
|
||||
ifneq ($(OSMAND_USE_PREBUILT),true)
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
|
|
@ -19,10 +19,18 @@ using google::protobuf::io::FileInputStream;
|
|||
using google::protobuf::internal::WireFormatLite;
|
||||
//using namespace google::protobuf::internal;
|
||||
|
||||
|
||||
static int zoomForBaseRouteRendering = 14;
|
||||
std::map< std::string, BinaryMapFile* > openFiles;
|
||||
OsmAndStoredIndex* cache = NULL;
|
||||
|
||||
void searchRouteSubRegion(int fileInd, std::vector<RouteDataObject*>& list, RoutingIndex* routingIndex, RouteSubregion* sub);
|
||||
void searchRouteRegion(CodedInputStream* input, SearchQuery* q, RoutingIndex* ind, std::vector<RouteSubregion>& subregions,
|
||||
std::vector<RouteSubregion>& toLoad);
|
||||
bool readRouteTreeData(CodedInputStream* input, RouteSubregion* s, std::vector<RouteDataObject*>& dataObjects,
|
||||
RoutingIndex* routingIndex);
|
||||
|
||||
bool sortRouteRegions (const RouteSubregion& i,const RouteSubregion& j) { return (i.mapDataBlock<j.mapDataBlock); }
|
||||
|
||||
inline bool readInt(CodedInputStream* input, uint32_t* sz ){
|
||||
uint8_t buf[4];
|
||||
if (!input->ReadRaw(buf, 4)) {
|
||||
|
@ -329,7 +337,9 @@ bool readRoutingIndex(CodedInputStream* input, RoutingIndex* routingIndex) {
|
|||
input->PopLimit(oldLimit);
|
||||
break;
|
||||
}
|
||||
case OsmAndRoutingIndex::kRootBoxesFieldNumber: {
|
||||
case OsmAndRoutingIndex::kRootBoxesFieldNumber:
|
||||
case OsmAndRoutingIndex::kBasemapBoxesFieldNumber:{
|
||||
bool basemap = WireFormatLite::GetTagFieldNumber(tag) == OsmAndRoutingIndex::kBasemapBoxesFieldNumber;
|
||||
RouteSubregion subregion;
|
||||
readInt(input, &subregion.length);
|
||||
subregion.filePointer = input->getTotalBytesRead();
|
||||
|
@ -337,7 +347,16 @@ bool readRoutingIndex(CodedInputStream* input, RoutingIndex* routingIndex) {
|
|||
readRouteTree(input, &subregion, NULL, 0, true);
|
||||
input->PopLimit(oldLimit);
|
||||
input->Seek(subregion.filePointer + subregion.length);
|
||||
routingIndex->subregions.push_back(subregion);
|
||||
if(basemap) {
|
||||
osmand_log_print(LOG_INFO, "route basemap %d %s",subregion.filePointer, routingIndex->name.c_str() );
|
||||
routingIndex->basesubregions.push_back(subregion);
|
||||
} else {
|
||||
osmand_log_print(LOG_INFO, "route map %d %s",subregion.filePointer, routingIndex->name.c_str() );
|
||||
routingIndex->subregions.push_back(subregion);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case OsmAndRoutingIndex::kBlocksFieldNumber: {
|
||||
// Finish reading
|
||||
input->Seek(routingIndex->filePointer + routingIndex->length);
|
||||
break;
|
||||
|
@ -438,15 +457,15 @@ bool initMapStructure(CodedInputStream* input, BinaryMapFile* file) {
|
|||
break;
|
||||
}
|
||||
case OsmAndStructure::kRoutingIndexFieldNumber: {
|
||||
RoutingIndex routingIndex;
|
||||
readInt(input, &routingIndex.length);
|
||||
routingIndex.filePointer = input->getTotalBytesRead();
|
||||
int oldLimit = input->PushLimit(routingIndex.length);
|
||||
readRoutingIndex(input, &routingIndex);
|
||||
RoutingIndex* routingIndex = new RoutingIndex;
|
||||
readInt(input, &routingIndex->length);
|
||||
routingIndex->filePointer = input->getTotalBytesRead();
|
||||
int oldLimit = input->PushLimit(routingIndex->length);
|
||||
readRoutingIndex(input, routingIndex);
|
||||
input->PopLimit(oldLimit);
|
||||
input->Seek(routingIndex.filePointer + routingIndex.length);
|
||||
input->Seek(routingIndex->filePointer + routingIndex->length);
|
||||
file->routingIndexes.push_back(routingIndex);
|
||||
file->indexes.push_back(&file->routingIndexes.back());
|
||||
file->indexes.push_back(file->routingIndexes.back());
|
||||
break;
|
||||
}
|
||||
case OsmAndStructure::kVersionConfirmFieldNumber: {
|
||||
|
@ -882,11 +901,191 @@ void searchMapData(CodedInputStream* input, MapRoot* root, MapIndex* ind, Search
|
|||
}
|
||||
|
||||
|
||||
void convertRouteDataObjecToMapObjects(SearchQuery* q, std::vector<RouteDataObject*>& list, std::vector<MapDataObject*>& tempResult,
|
||||
bool skipDuplicates, UNORDERED(set)<long long>& ids) {
|
||||
std::vector<RouteDataObject*>::iterator rIterator = list.begin();
|
||||
tempResult.reserve((size_t) (list.size() + tempResult.size()));
|
||||
for (; rIterator != list.end(); rIterator++) {
|
||||
RouteDataObject* r = (*rIterator);
|
||||
if(r == NULL) {
|
||||
continue;
|
||||
}
|
||||
if (skipDuplicates && r->id > 0) {
|
||||
if (ids.find(r->id) != ids.end()) {
|
||||
continue;
|
||||
}
|
||||
ids.insert(r->id);
|
||||
}
|
||||
// convert route data object to map data object
|
||||
MapDataObject* obj = new MapDataObject;
|
||||
bool add = true;
|
||||
std::vector<uint32_t>::iterator typeIt = r->types.begin();
|
||||
for (; typeIt != r->types.end(); typeIt++) {
|
||||
uint32_t k = (*typeIt);
|
||||
if (k < r->region->decodingRules.size()) {
|
||||
tag_value t = r->region->decodingRules[k];
|
||||
if (t.first == "highway" || t.first == "route" || t.first == "railway" || t.first == "aeroway"
|
||||
|| t.first == "aerialway") {
|
||||
obj->types.push_back(t);
|
||||
// if (q->zoom < 15 && t.second != "motorway" && t.second != "primary" && t.second != "secondary"
|
||||
// && t.second != "tertiary" && t.second != "ferry" && t.second != "trunk") {
|
||||
// add = false;
|
||||
// }
|
||||
} else {
|
||||
obj->additionalTypes.push_back(t);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if (add) {
|
||||
for (uint32_t s = 0; s < r->pointsX.size(); s++) {
|
||||
obj->points.push_back(std::pair<int, int>(r->pointsX[s], r->pointsY[s]));
|
||||
}
|
||||
obj->id = r->id;
|
||||
UNORDERED(map)<int, std::string >::iterator nameIterator = r->names.begin();
|
||||
for (; nameIterator != r->names.end(); nameIterator++) {
|
||||
obj->objectNames[r->region->decodingRules[nameIterator->first].first] = nameIterator->second;
|
||||
}
|
||||
obj->area = false;
|
||||
tempResult.push_back(obj);
|
||||
} else {
|
||||
delete obj;
|
||||
}
|
||||
delete r;
|
||||
}
|
||||
}
|
||||
|
||||
void checkAndInitRouteRegionRules(int fileInd, RoutingIndex* routingIndex){
|
||||
// init decoding rules
|
||||
if (routingIndex->decodingRules.size() == 0) {
|
||||
routingIndex->subregions.clear();
|
||||
lseek(fileInd, 0, SEEK_SET);
|
||||
FileInputStream input(fileInd);
|
||||
input.SetCloseOnDelete(false);
|
||||
CodedInputStream cis(&input);
|
||||
cis.SetTotalBytesLimit(INT_MAX, INT_MAX >> 2);
|
||||
|
||||
cis.Seek(routingIndex->filePointer);
|
||||
uint32_t old = cis.PushLimit(routingIndex->length);
|
||||
readRoutingIndex(&cis, routingIndex);
|
||||
cis.PopLimit(old);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ResultPublisher* searchObjectsForRendering(SearchQuery* q, bool skipDuplicates, std::string msgNothingFound) {
|
||||
void readRouteDataAsMapObjects(SearchQuery* q, BinaryMapFile* file, std::vector<MapDataObject*>& tempResult,
|
||||
bool skipDuplicates, UNORDERED(set)<long long>& ids) {
|
||||
|
||||
for (std::vector<RoutingIndex*>::iterator routeIndex = file->routingIndexes.begin();
|
||||
routeIndex != file->routingIndexes.end(); routeIndex++) {
|
||||
if (q->publisher->isCancelled()) {
|
||||
break;
|
||||
}
|
||||
bool contains = false;
|
||||
std::vector<RouteSubregion> subs =
|
||||
q->zoom <= zoomForBaseRouteRendering ? (*routeIndex)->basesubregions : (*routeIndex)->subregions;
|
||||
for (std::vector<RouteSubregion>::iterator subreg = subs.begin(); subreg != subs.end(); subreg++) {
|
||||
if (subreg->right >= q->left && q->right >= subreg->left && subreg->bottom >= q->top
|
||||
&& q->bottom >= subreg->top) {
|
||||
osmand_log_print(LOG_INFO, "Search route map %s", (*routeIndex)->name.c_str());
|
||||
contains = true;
|
||||
}
|
||||
}
|
||||
osmand_log_print(LOG_INFO, "Search map %s %d", (*routeIndex)->name.c_str(), subs.size());
|
||||
if (contains) {
|
||||
vector<RouteSubregion> found;
|
||||
lseek(file->fd, 0, SEEK_SET);
|
||||
FileInputStream input(file->fd);
|
||||
input.SetCloseOnDelete(false);
|
||||
CodedInputStream cis(&input);
|
||||
cis.SetTotalBytesLimit(INT_MAX, INT_MAX >> 1);
|
||||
cis.Seek((*routeIndex)->filePointer);
|
||||
uint32_t old = cis.PushLimit((*routeIndex)->length);
|
||||
searchRouteRegion(&cis, q, *routeIndex, subs, found);
|
||||
cis.PopLimit(old);
|
||||
|
||||
checkAndInitRouteRegionRules(file->fd, (*routeIndex));
|
||||
osmand_log_print(LOG_INFO, "Search map %s %d", (*routeIndex)->name.c_str(), found.size());
|
||||
sort(found.begin(), found.end(), sortRouteRegions);
|
||||
{
|
||||
lseek(file->fd, 0, SEEK_SET);
|
||||
FileInputStream input(file->fd);
|
||||
input.SetCloseOnDelete(false);
|
||||
CodedInputStream cis(&input);
|
||||
cis.SetTotalBytesLimit(INT_MAX, INT_MAX >> 2);
|
||||
for (std::vector<RouteSubregion>::iterator sub = found.begin(); sub != found.end();sub++) {
|
||||
std::vector<RouteDataObject*> list;
|
||||
cis.Seek(sub->filePointer + sub->mapDataBlock);
|
||||
uint32_t length;
|
||||
cis.ReadVarint32(&length);
|
||||
uint32_t old = cis.PushLimit(length);
|
||||
readRouteTreeData(&cis, &(*sub), list, *routeIndex);
|
||||
cis.PopLimit(old);
|
||||
convertRouteDataObjecToMapObjects(q, list, tempResult, skipDuplicates, ids);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void readMapObjects(SearchQuery* q, BinaryMapFile* file) {
|
||||
for (std::vector<MapIndex>::iterator mapIndex = file->mapIndexes.begin(); mapIndex != file->mapIndexes.end();
|
||||
mapIndex++) {
|
||||
for (std::vector<MapRoot>::iterator mapLevel = mapIndex->levels.begin(); mapLevel != mapIndex->levels.end();
|
||||
mapLevel++) {
|
||||
if (q->publisher->isCancelled()) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (mapLevel->minZoom <= q->zoom && mapLevel->maxZoom >= q->zoom) {
|
||||
if (mapLevel->right >= q->left && q->right >= mapLevel->left && mapLevel->bottom >= q->top
|
||||
&& q->bottom >= mapLevel->top) {
|
||||
// osmand_log_print(LOG_INFO, "Search map %s", mapIndex->name.c_str());
|
||||
// lazy initializing rules
|
||||
if (mapIndex->decodingRules.size() == 0) {
|
||||
lseek(file->fd, 0, SEEK_SET);
|
||||
FileInputStream input(file->fd);
|
||||
input.SetCloseOnDelete(false);
|
||||
CodedInputStream cis(&input);
|
||||
cis.SetTotalBytesLimit(INT_MAX, INT_MAX >> 1);
|
||||
cis.Seek(mapIndex->filePointer);
|
||||
int oldLimit = cis.PushLimit(mapIndex->length);
|
||||
readMapIndex(&cis, &(*mapIndex), true);
|
||||
cis.PopLimit(oldLimit);
|
||||
}
|
||||
// lazy initializing subtrees
|
||||
if (mapLevel->bounds.size() == 0) {
|
||||
lseek(file->fd, 0, SEEK_SET);
|
||||
FileInputStream input(file->fd);
|
||||
input.SetCloseOnDelete(false);
|
||||
CodedInputStream cis(&input);
|
||||
cis.SetTotalBytesLimit(INT_MAX, INT_MAX >> 1);
|
||||
cis.Seek(mapLevel->filePointer);
|
||||
int oldLimit = cis.PushLimit(mapLevel->length);
|
||||
readMapLevel(&cis, &(*mapLevel), true);
|
||||
cis.PopLimit(oldLimit);
|
||||
}
|
||||
lseek(file->fd, 0, SEEK_SET);
|
||||
FileInputStream input(file->fd);
|
||||
input.SetCloseOnDelete(false);
|
||||
CodedInputStream cis(&input);
|
||||
cis.SetTotalBytesLimit(INT_MAX, INT_MAX >> 2);
|
||||
searchMapData(&cis, &(*mapLevel), &(*mapIndex), q);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ResultPublisher* searchObjectsForRendering(SearchQuery* q, bool skipDuplicates, int renderRouteDataFile, std::string msgNothingFound) {
|
||||
map<std::string, BinaryMapFile*>::iterator i = openFiles.begin();
|
||||
UNORDERED(set)<long long> ids;
|
||||
if(skipDuplicates){
|
||||
// override it for now
|
||||
// TODO skip duplicates doesn't work correctly with basemap ?
|
||||
skipDuplicates = false;
|
||||
}
|
||||
int count = 0;
|
||||
std::vector<MapDataObject*> basemapResult;
|
||||
std::vector<MapDataObject*> tempResult;
|
||||
|
@ -900,59 +1099,14 @@ ResultPublisher* searchObjectsForRendering(SearchQuery* q, bool skipDuplicates,
|
|||
q->req->clearState();
|
||||
}
|
||||
q->publisher->result.clear();
|
||||
for (std::vector<MapIndex>::iterator mapIndex = file->mapIndexes.begin(); mapIndex != file->mapIndexes.end();
|
||||
mapIndex++) {
|
||||
for (std::vector<MapRoot>::iterator mapLevel = mapIndex->levels.begin(); mapLevel != mapIndex->levels.end();
|
||||
mapLevel++) {
|
||||
if (q->publisher->isCancelled()) {
|
||||
break;
|
||||
}
|
||||
basemapExists |= file->isBasemap();
|
||||
if (mapLevel->minZoom <= q->zoom && mapLevel->maxZoom >= q->zoom) {
|
||||
if (mapLevel->right >= q->left && q->right >= mapLevel->left && mapLevel->bottom >= q->top
|
||||
&& q->bottom >= mapLevel->top) {
|
||||
osmand_log_print(LOG_INFO, "Search map %s", mapIndex->name.c_str());
|
||||
// lazy initializing rules
|
||||
if (mapIndex->decodingRules.size() == 0) {
|
||||
lseek(file->fd, 0, SEEK_SET);
|
||||
FileInputStream input(file->fd);
|
||||
input.SetCloseOnDelete(false);
|
||||
CodedInputStream cis(&input);
|
||||
cis.SetTotalBytesLimit(INT_MAX, INT_MAX >> 1);
|
||||
cis.Seek(mapIndex->filePointer);
|
||||
int oldLimit = cis.PushLimit(mapIndex->length);
|
||||
readMapIndex(&cis, &(*mapIndex), true);
|
||||
cis.PopLimit(oldLimit);
|
||||
}
|
||||
// lazy initializing subtrees
|
||||
if (mapLevel->bounds.size() == 0) {
|
||||
lseek(file->fd, 0, SEEK_SET);
|
||||
FileInputStream input(file->fd);
|
||||
input.SetCloseOnDelete(false);
|
||||
CodedInputStream cis(&input);
|
||||
cis.SetTotalBytesLimit(INT_MAX, INT_MAX >> 1);
|
||||
cis.Seek(mapLevel->filePointer);
|
||||
int oldLimit = cis.PushLimit(mapLevel->length);
|
||||
readMapLevel(&cis, &(*mapLevel), true);
|
||||
cis.PopLimit(oldLimit);
|
||||
}
|
||||
lseek(file->fd, 0, SEEK_SET);
|
||||
FileInputStream input(file->fd);
|
||||
input.SetCloseOnDelete(false);
|
||||
CodedInputStream cis(&input);
|
||||
cis.SetTotalBytesLimit(INT_MAX, INT_MAX >> 2);
|
||||
searchMapData(&cis, &(*mapLevel), &(*mapIndex), q);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
basemapExists |= file->isBasemap();
|
||||
readMapObjects(q, file);
|
||||
|
||||
if (!q->publisher->isCancelled()) {
|
||||
std::vector<MapDataObject*>::iterator r = q->publisher->result.begin();
|
||||
tempResult.reserve((size_t)(q->publisher->result.size() + tempResult.size()));
|
||||
for (; r != q->publisher->result.end(); r++) {
|
||||
// TODO skip duplicates doesn't work correctly with basemap (id < 0?)
|
||||
if (skipDuplicates && (*r)->id > 0 && false) {
|
||||
if (skipDuplicates && (*r)->id > 0 ) {
|
||||
if (ids.find((*r)->id) != ids.end()) {
|
||||
continue;
|
||||
}
|
||||
|
@ -971,13 +1125,31 @@ ResultPublisher* searchObjectsForRendering(SearchQuery* q, bool skipDuplicates,
|
|||
if (i->second->isBasemap()) {
|
||||
basemapResult.push_back(*r);
|
||||
} else {
|
||||
tempResult.push_back(*r);
|
||||
if(renderRouteDataFile != 1){
|
||||
tempResult.push_back(*r);
|
||||
renderRouteDataFile = -1;
|
||||
} else {
|
||||
delete *r;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (renderRouteDataFile >= 0) {
|
||||
i = openFiles.begin();
|
||||
for (; i != openFiles.end() && !q->publisher->isCancelled(); i++) {
|
||||
BinaryMapFile* file = i->second;
|
||||
if (q->req != NULL) {
|
||||
q->req->clearState();
|
||||
}
|
||||
q->publisher->result.clear();
|
||||
readRouteDataAsMapObjects(q, file, tempResult, skipDuplicates, ids);
|
||||
}
|
||||
osmand_log_print(LOG_INFO, "Route objects %d", tempResult.size());
|
||||
}
|
||||
|
||||
// sort results/ analyze coastlines and publish back to publisher
|
||||
if (q->publisher->isCancelled()) {
|
||||
deleteObjects(coastLines);
|
||||
|
@ -1031,7 +1203,7 @@ ResultPublisher* searchObjectsForRendering(SearchQuery* q, bool skipDuplicates,
|
|||
o->objectNames["name"] = msgNothingFound;
|
||||
tempResult.push_back(o);
|
||||
}
|
||||
if (q->zoom <= BASEMAP_ZOOM || emptyData) {
|
||||
if (q->zoom <= BASEMAP_ZOOM || emptyData || renderRouteDataFile >= 0) {
|
||||
tempResult.insert(tempResult.end(), basemapResult.begin(), basemapResult.end());
|
||||
} else {
|
||||
deleteObjects(basemapResult);
|
||||
|
@ -1048,20 +1220,20 @@ ResultPublisher* searchObjectsForRendering(SearchQuery* q, bool skipDuplicates,
|
|||
|
||||
|
||||
void searchRouteRegion(CodedInputStream* input, SearchQuery* q, RoutingIndex* ind, std::vector<RouteSubregion>& subregions,
|
||||
std::vector<RouteSubregion>& toLoad, BinaryMapFile* file) {
|
||||
std::vector<RouteSubregion>& toLoad) {
|
||||
for (std::vector<RouteSubregion>::iterator subreg = subregions.begin();
|
||||
subreg != subregions.end(); subreg++) {
|
||||
if (subreg->right >= q->left && q->right >= subreg->left && subreg->bottom >= q->top
|
||||
&& q->bottom >= subreg->top) {
|
||||
if(subreg->subregions.empty()){
|
||||
bool contains = subreg->right <= q->right && q->left <= subreg->left && subreg->top <= q->top
|
||||
if(subreg->subregions.empty() && subreg->mapDataBlock == 0){
|
||||
bool contains = subreg->right <= q->right && subreg->left >= q->left && subreg->top <= q->top
|
||||
&& subreg->bottom >= q->bottom;
|
||||
input->Seek(subreg->filePointer);
|
||||
uint32_t old = input->PushLimit(subreg->length);
|
||||
readRouteTree(input, &(*subreg), NULL, contains? -1 : 1, false);
|
||||
readRouteTree(input, &(*subreg), NULL, -1/*contains? -1 : 1*/, false);
|
||||
input->PopLimit(old);
|
||||
}
|
||||
searchRouteRegion(input, q, ind, subreg->subregions, toLoad, file);
|
||||
searchRouteRegion(input, q, ind, subreg->subregions, toLoad);
|
||||
if(subreg->mapDataBlock != 0) {
|
||||
toLoad.push_back(*subreg);
|
||||
}
|
||||
|
@ -1168,7 +1340,7 @@ bool readRouteDataObject(CodedInputStream* input, uint32_t left, uint32_t top, R
|
|||
|
||||
const static int RESTRICTION_SHIFT = 3;
|
||||
const static int RESTRICTION_MASK = 7;
|
||||
bool readRouteTreeData(CodedInputStream* input, RouteSubregion* s, std::vector<RouteDataObject*>& dataObjects) {
|
||||
bool readRouteTreeData(CodedInputStream* input, RouteSubregion* s, std::vector<RouteDataObject*>& dataObjects, RoutingIndex* routingIndex) {
|
||||
int tag;
|
||||
std::vector<int64_t> idTables;
|
||||
UNORDERED(map)<int64_t, std::vector<uint64_t> > restrictions;
|
||||
|
@ -1185,6 +1357,7 @@ bool readRouteTreeData(CodedInputStream* input, RouteSubregion* s, std::vector<R
|
|||
if(dataObjects.size() <= obj->id ) {
|
||||
dataObjects.resize((uint32_t) obj->id + 1, NULL);
|
||||
}
|
||||
obj->region = routingIndex;
|
||||
dataObjects[obj->id] = obj;
|
||||
input->PopLimit(oldLimit);
|
||||
break;
|
||||
|
@ -1314,62 +1487,49 @@ bool readRouteTreeData(CodedInputStream* input, RouteSubregion* s, std::vector<R
|
|||
|
||||
}
|
||||
|
||||
bool sortRouteRegions (const RouteSubregion& i,const RouteSubregion& j) { return (i.mapDataBlock<j.mapDataBlock); }
|
||||
|
||||
void searchRouteRegion(SearchQuery* q, std::vector<RouteDataObject*>& list, RoutingIndex* rs, RouteSubregion* sub){
|
||||
void searchRouteSubRegion(int fileInd, std::vector<RouteDataObject*>& list, RoutingIndex* routingIndex, RouteSubregion* sub){
|
||||
|
||||
checkAndInitRouteRegionRules(fileInd, routingIndex);
|
||||
|
||||
// could be simplified but it will be concurrency with init block
|
||||
lseek(fileInd, 0, SEEK_SET);
|
||||
FileInputStream input(fileInd);
|
||||
input.SetCloseOnDelete(false);
|
||||
CodedInputStream cis(&input);
|
||||
cis.SetTotalBytesLimit(INT_MAX, INT_MAX >> 2);
|
||||
|
||||
cis.Seek(sub->filePointer + sub->mapDataBlock);
|
||||
uint32_t length;
|
||||
cis.ReadVarint32(&length);
|
||||
uint32_t old = cis.PushLimit(length);
|
||||
readRouteTreeData(&cis, &(*sub), list, routingIndex);
|
||||
cis.PopLimit(old);
|
||||
}
|
||||
|
||||
void searchRouteDataForSubRegion(SearchQuery* q, std::vector<RouteDataObject*>& list, RoutingIndex* rs, RouteSubregion* sub){
|
||||
map<std::string, BinaryMapFile*>::iterator i = openFiles.begin();
|
||||
UNORDERED(set)<long long> ids;
|
||||
int count = 0;
|
||||
bool basemapExists = false;
|
||||
for (; i != openFiles.end() && !q->publisher->isCancelled(); i++) {
|
||||
BinaryMapFile* file = i->second;
|
||||
for (std::vector<RoutingIndex>::iterator routingIndex = file->routingIndexes.begin();
|
||||
for (std::vector<RoutingIndex*>::iterator routingIndex = file->routingIndexes.begin();
|
||||
routingIndex != file->routingIndexes.end(); routingIndex++) {
|
||||
if (q->publisher->isCancelled()) {
|
||||
break;
|
||||
}
|
||||
if(rs != NULL && (rs->name != routingIndex->name || rs->filePointer != routingIndex->filePointer)){
|
||||
if(rs != NULL && (rs->name != (*routingIndex)->name || rs->filePointer != (*routingIndex)->filePointer)){
|
||||
continue;
|
||||
}
|
||||
|
||||
// init decoding rules
|
||||
if (routingIndex->decodingRules.size() == 0) {
|
||||
routingIndex->subregions.clear();
|
||||
lseek(file->routefd, 0, SEEK_SET);
|
||||
FileInputStream input(file->routefd);
|
||||
input.SetCloseOnDelete(false);
|
||||
CodedInputStream cis(&input);
|
||||
cis.SetTotalBytesLimit(INT_MAX, INT_MAX >> 2);
|
||||
|
||||
cis.Seek(routingIndex->filePointer);
|
||||
uint32_t old = cis.PushLimit(routingIndex->length);
|
||||
readRoutingIndex(&cis, &(*routingIndex));
|
||||
cis.PopLimit(old);
|
||||
}
|
||||
|
||||
// could be simplified but it will be concurrency with init block
|
||||
lseek(file->routefd, 0, SEEK_SET);
|
||||
FileInputStream input(file->routefd);
|
||||
input.SetCloseOnDelete(false);
|
||||
CodedInputStream cis(&input);
|
||||
cis.SetTotalBytesLimit(INT_MAX, INT_MAX >> 2);
|
||||
|
||||
|
||||
// cis.Seek(sub->filePointer);
|
||||
// uint32_t old = cis.PushLimit(sub->length);
|
||||
// readRouteTree(&cis, &(*sub), NULL, 0, true);
|
||||
// cis.PopLimit(old);
|
||||
cis.Seek(sub->filePointer + sub->mapDataBlock);
|
||||
uint32_t length;
|
||||
cis.ReadVarint32(&length);
|
||||
uint32_t old = cis.PushLimit(length);
|
||||
readRouteTreeData(&cis, &(*sub), list);
|
||||
cis.PopLimit(old);
|
||||
searchRouteSubRegion(file->routefd, list, (*routingIndex), sub);
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool closeBinaryMapFile(std::string inputName) {
|
||||
std::map<std::string, BinaryMapFile*>::iterator iterator;
|
||||
if ((iterator = openFiles.find(inputName)) != openFiles.end()) {
|
||||
|
@ -1493,11 +1653,14 @@ BinaryMapFile* initBinaryMapFile(std::string inputName) {
|
|||
mr.mapDataBlock = ml.shiftodata();
|
||||
mr.filePointer = ml.offset();
|
||||
mr.length = ml.size();
|
||||
osmand_log_print(LOG_DEBUG, "Native file init subregion %d %d %d ", mr.filePointer, mr.length, mr.mapDataBlock);
|
||||
mi.subregions.push_back(mr);
|
||||
if (ml.basemap()) {
|
||||
mi.basesubregions.push_back(mr);
|
||||
} else {
|
||||
mi.subregions.push_back(mr);
|
||||
}
|
||||
}
|
||||
mapFile->routingIndexes.push_back(mi);
|
||||
mapFile->indexes.push_back(&mapFile->routingIndexes.back());
|
||||
mapFile->routingIndexes.push_back(new RoutingIndex(mi));
|
||||
mapFile->indexes.push_back(mapFile->routingIndexes.back());
|
||||
}
|
||||
osmand_log_print(LOG_DEBUG, "Native file initialized from cache %s", inputName.c_str());
|
||||
} else {
|
||||
|
|
|
@ -78,8 +78,10 @@ struct BinaryPartIndex {
|
|||
};
|
||||
|
||||
struct RoutingIndex : BinaryPartIndex {
|
||||
UNORDERED(map)< int, tag_value > decodingRules;
|
||||
// UNORDERED(map)< uint32_t, tag_value > decodingRules;
|
||||
vector< tag_value > decodingRules;
|
||||
std::vector<RouteSubregion> subregions;
|
||||
std::vector<RouteSubregion> basesubregions;
|
||||
RoutingIndex() : BinaryPartIndex(ROUTING_INDEX) {
|
||||
}
|
||||
|
||||
|
@ -87,6 +89,9 @@ struct RoutingIndex : BinaryPartIndex {
|
|||
tag_value pair = tag_value(tag, val);
|
||||
// DEFINE hash
|
||||
//encodingRules[pair] = id;
|
||||
while(decodingRules.size() < id + 1){
|
||||
decodingRules.push_back(pair);
|
||||
}
|
||||
decodingRules[id] = pair;
|
||||
}
|
||||
};
|
||||
|
@ -175,7 +180,7 @@ struct BinaryMapFile {
|
|||
uint32_t version;
|
||||
uint64_t dateCreated;
|
||||
std::vector<MapIndex> mapIndexes;
|
||||
std::vector<RoutingIndex> routingIndexes;
|
||||
std::vector<RoutingIndex*> routingIndexes;
|
||||
std::vector<BinaryPartIndex*> indexes;
|
||||
int fd;
|
||||
int routefd;
|
||||
|
@ -247,9 +252,9 @@ struct SearchQuery {
|
|||
}
|
||||
};
|
||||
|
||||
void searchRouteRegion(SearchQuery* q, std::vector<RouteDataObject*>& list, RoutingIndex* rs, RouteSubregion* sub);
|
||||
void searchRouteDataForSubRegion(SearchQuery* q, std::vector<RouteDataObject*>& list, RoutingIndex* rs, RouteSubregion* sub);
|
||||
|
||||
ResultPublisher* searchObjectsForRendering(SearchQuery* q, bool skipDuplicates, std::string msgNothingFound);
|
||||
ResultPublisher* searchObjectsForRendering(SearchQuery* q, bool skipDuplicates, int renderRouteDataFile, std::string msgNothingFound);
|
||||
|
||||
BinaryMapFile* initBinaryMapFile(std::string inputName);
|
||||
|
||||
|
|
|
@ -47,6 +47,8 @@
|
|||
# define UNORDERED_NAMESPACE std
|
||||
# define UNORDERED_map unordered_map
|
||||
# define UNORDERED_set unordered_set
|
||||
//# define UNORDERED_map map
|
||||
//# define UNORDERED_set set
|
||||
#endif
|
||||
#define UNORDERED(cls) UNORDERED_NAMESPACE::UNORDERED_##cls
|
||||
|
||||
|
|
|
@ -145,6 +145,7 @@ void initProperties(JNIEnv* env, RenderingRulesStorage* st, jobject javaStorage)
|
|||
|
||||
}
|
||||
|
||||
|
||||
void initRules(JNIEnv* env, RenderingRulesStorage* st, jobject javaStorage) {
|
||||
for (int i = 1; i < RenderingRulesStorage::SIZE_STATES; i++) {
|
||||
jobjectArray rules = (jobjectArray) env->CallObjectMethod(javaStorage, RenderingRulesStorage_getRules, i);
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include "binaryRead.h"
|
||||
#include "rendering.h"
|
||||
|
||||
|
||||
JavaVM* globalJVM = NULL;
|
||||
void loadJniRenderingContext(JNIEnv* env);
|
||||
void loadJniRenderingRules(JNIEnv* env);
|
||||
|
@ -106,7 +107,8 @@ RenderingRuleSearchRequest* initSearchRequest(JNIEnv* env, jobject renderingRule
|
|||
|
||||
extern "C" JNIEXPORT jlong JNICALL Java_net_osmand_NativeLibrary_searchNativeObjectsForRendering(JNIEnv* ienv,
|
||||
jobject obj, jint sleft, jint sright, jint stop, jint sbottom, jint zoom,
|
||||
jobject renderingRuleSearchRequest, bool skipDuplicates, jobject objInterrupted, jstring msgNothingFound) {
|
||||
jobject renderingRuleSearchRequest, bool skipDuplicates, int renderRouteDataFile,
|
||||
jobject objInterrupted, jstring msgNothingFound) {
|
||||
RenderingRuleSearchRequest* req = initSearchRequest(ienv, renderingRuleSearchRequest);
|
||||
jfieldID interruptedField = 0;
|
||||
if(objInterrupted != NULL) {
|
||||
|
@ -120,7 +122,7 @@ extern "C" JNIEXPORT jlong JNICALL Java_net_osmand_NativeLibrary_searchNativeObj
|
|||
q.zoom = zoom;
|
||||
|
||||
|
||||
ResultPublisher* res = searchObjectsForRendering(&q, skipDuplicates, getString(ienv, msgNothingFound));
|
||||
ResultPublisher* res = searchObjectsForRendering(&q, skipDuplicates, renderRouteDataFile, getString(ienv, msgNothingFound));
|
||||
delete req;
|
||||
return (jlong) j;
|
||||
}
|
||||
|
@ -604,7 +606,7 @@ extern "C" JNIEXPORT jobject JNICALL Java_net_osmand_NativeLibrary_loadRoutingDa
|
|||
sub.mapDataBlock= ienv->GetIntField(subreg, jfield_RouteSubregion_shiftToData);
|
||||
std::vector<RouteDataObject*> result;
|
||||
SearchQuery q;
|
||||
searchRouteRegion(&q, result, &ind, &sub);
|
||||
searchRouteDataForSubRegion(&q, result, &ind, &sub);
|
||||
|
||||
|
||||
if (loadObjects) {
|
||||
|
|
|
@ -962,6 +962,13 @@ class RoutingSubregion : public ::google::protobuf::MessageLite {
|
|||
inline ::google::protobuf::int64 offset() const;
|
||||
inline void set_offset(::google::protobuf::int64 value);
|
||||
|
||||
// required bool basemap = 3;
|
||||
inline bool has_basemap() const;
|
||||
inline void clear_basemap();
|
||||
static const int kBasemapFieldNumber = 3;
|
||||
inline bool basemap() const;
|
||||
inline void set_basemap(bool value);
|
||||
|
||||
// required int32 left = 4;
|
||||
inline bool has_left() const;
|
||||
inline void clear_left();
|
||||
|
@ -1003,6 +1010,7 @@ class RoutingSubregion : public ::google::protobuf::MessageLite {
|
|||
|
||||
::google::protobuf::int64 size_;
|
||||
::google::protobuf::int64 offset_;
|
||||
bool basemap_;
|
||||
::google::protobuf::int32 left_;
|
||||
::google::protobuf::int32 right_;
|
||||
::google::protobuf::int32 top_;
|
||||
|
@ -1012,7 +1020,7 @@ class RoutingSubregion : public ::google::protobuf::MessageLite {
|
|||
friend void protobuf_AssignDesc_osmand_5findex_2eproto();
|
||||
friend void protobuf_ShutdownFile_osmand_5findex_2eproto();
|
||||
|
||||
::google::protobuf::uint32 _has_bits_[(7 + 31) / 32];
|
||||
::google::protobuf::uint32 _has_bits_[(8 + 31) / 32];
|
||||
|
||||
// WHY DOES & HAVE LOWER PRECEDENCE THAN != !?
|
||||
inline bool _has_bit(int index) const {
|
||||
|
@ -2208,83 +2216,99 @@ inline void RoutingSubregion::set_offset(::google::protobuf::int64 value) {
|
|||
offset_ = value;
|
||||
}
|
||||
|
||||
// required bool basemap = 3;
|
||||
inline bool RoutingSubregion::has_basemap() const {
|
||||
return _has_bit(2);
|
||||
}
|
||||
inline void RoutingSubregion::clear_basemap() {
|
||||
basemap_ = false;
|
||||
_clear_bit(2);
|
||||
}
|
||||
inline bool RoutingSubregion::basemap() const {
|
||||
return basemap_;
|
||||
}
|
||||
inline void RoutingSubregion::set_basemap(bool value) {
|
||||
_set_bit(2);
|
||||
basemap_ = value;
|
||||
}
|
||||
|
||||
// required int32 left = 4;
|
||||
inline bool RoutingSubregion::has_left() const {
|
||||
return _has_bit(2);
|
||||
return _has_bit(3);
|
||||
}
|
||||
inline void RoutingSubregion::clear_left() {
|
||||
left_ = 0;
|
||||
_clear_bit(2);
|
||||
_clear_bit(3);
|
||||
}
|
||||
inline ::google::protobuf::int32 RoutingSubregion::left() const {
|
||||
return left_;
|
||||
}
|
||||
inline void RoutingSubregion::set_left(::google::protobuf::int32 value) {
|
||||
_set_bit(2);
|
||||
_set_bit(3);
|
||||
left_ = value;
|
||||
}
|
||||
|
||||
// required int32 right = 5;
|
||||
inline bool RoutingSubregion::has_right() const {
|
||||
return _has_bit(3);
|
||||
return _has_bit(4);
|
||||
}
|
||||
inline void RoutingSubregion::clear_right() {
|
||||
right_ = 0;
|
||||
_clear_bit(3);
|
||||
_clear_bit(4);
|
||||
}
|
||||
inline ::google::protobuf::int32 RoutingSubregion::right() const {
|
||||
return right_;
|
||||
}
|
||||
inline void RoutingSubregion::set_right(::google::protobuf::int32 value) {
|
||||
_set_bit(3);
|
||||
_set_bit(4);
|
||||
right_ = value;
|
||||
}
|
||||
|
||||
// required int32 top = 6;
|
||||
inline bool RoutingSubregion::has_top() const {
|
||||
return _has_bit(4);
|
||||
return _has_bit(5);
|
||||
}
|
||||
inline void RoutingSubregion::clear_top() {
|
||||
top_ = 0;
|
||||
_clear_bit(4);
|
||||
_clear_bit(5);
|
||||
}
|
||||
inline ::google::protobuf::int32 RoutingSubregion::top() const {
|
||||
return top_;
|
||||
}
|
||||
inline void RoutingSubregion::set_top(::google::protobuf::int32 value) {
|
||||
_set_bit(4);
|
||||
_set_bit(5);
|
||||
top_ = value;
|
||||
}
|
||||
|
||||
// required int32 bottom = 7;
|
||||
inline bool RoutingSubregion::has_bottom() const {
|
||||
return _has_bit(5);
|
||||
return _has_bit(6);
|
||||
}
|
||||
inline void RoutingSubregion::clear_bottom() {
|
||||
bottom_ = 0;
|
||||
_clear_bit(5);
|
||||
_clear_bit(6);
|
||||
}
|
||||
inline ::google::protobuf::int32 RoutingSubregion::bottom() const {
|
||||
return bottom_;
|
||||
}
|
||||
inline void RoutingSubregion::set_bottom(::google::protobuf::int32 value) {
|
||||
_set_bit(5);
|
||||
_set_bit(6);
|
||||
bottom_ = value;
|
||||
}
|
||||
|
||||
// required uint32 shifToData = 8;
|
||||
inline bool RoutingSubregion::has_shiftodata() const {
|
||||
return _has_bit(6);
|
||||
return _has_bit(7);
|
||||
}
|
||||
inline void RoutingSubregion::clear_shiftodata() {
|
||||
shiftodata_ = 0u;
|
||||
_clear_bit(6);
|
||||
_clear_bit(7);
|
||||
}
|
||||
inline ::google::protobuf::uint32 RoutingSubregion::shiftodata() const {
|
||||
return shiftodata_;
|
||||
}
|
||||
inline void RoutingSubregion::set_shiftodata(::google::protobuf::uint32 value) {
|
||||
_set_bit(6);
|
||||
_set_bit(7);
|
||||
shiftodata_ = value;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: src/osmand_odb.proto
|
||||
// source: osmand_odb.proto
|
||||
|
||||
#ifndef PROTOBUF_src_2fosmand_5fodb_2eproto__INCLUDED
|
||||
#define PROTOBUF_src_2fosmand_5fodb_2eproto__INCLUDED
|
||||
#ifndef PROTOBUF_osmand_5fodb_2eproto__INCLUDED
|
||||
#define PROTOBUF_osmand_5fodb_2eproto__INCLUDED
|
||||
|
||||
#include <string>
|
||||
|
||||
|
@ -26,9 +26,9 @@
|
|||
// @@protoc_insertion_point(includes)
|
||||
|
||||
// Internal implementation detail -- do not call these.
|
||||
void protobuf_AddDesc_src_2fosmand_5fodb_2eproto();
|
||||
void protobuf_AssignDesc_src_2fosmand_5fodb_2eproto();
|
||||
void protobuf_ShutdownFile_src_2fosmand_5fodb_2eproto();
|
||||
void protobuf_AddDesc_osmand_5fodb_2eproto();
|
||||
void protobuf_AssignDesc_osmand_5fodb_2eproto();
|
||||
void protobuf_ShutdownFile_osmand_5fodb_2eproto();
|
||||
|
||||
class OsmAndStructure;
|
||||
class OsmAndTileBox;
|
||||
|
@ -223,9 +223,9 @@ class OsmAndStructure : public ::google::protobuf::Message {
|
|||
::google::protobuf::RepeatedPtrField< ::OsmAndMapIndex > mapindex_;
|
||||
::google::protobuf::RepeatedPtrField< ::OsmAndRoutingIndex > routingindex_;
|
||||
::google::protobuf::uint32 versionconfirm_;
|
||||
friend void protobuf_AddDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AddDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_osmand_5fodb_2eproto();
|
||||
|
||||
::google::protobuf::uint32 _has_bits_[(8 + 31) / 32];
|
||||
|
||||
|
@ -336,9 +336,9 @@ class OsmAndTileBox : public ::google::protobuf::Message {
|
|||
::google::protobuf::uint32 right_;
|
||||
::google::protobuf::uint32 top_;
|
||||
::google::protobuf::uint32 bottom_;
|
||||
friend void protobuf_AddDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AddDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_osmand_5fodb_2eproto();
|
||||
|
||||
::google::protobuf::uint32 _has_bits_[(4 + 31) / 32];
|
||||
|
||||
|
@ -434,9 +434,9 @@ class StringTable : public ::google::protobuf::Message {
|
|||
mutable int _cached_size_;
|
||||
|
||||
::google::protobuf::RepeatedPtrField< ::std::string> s_;
|
||||
friend void protobuf_AddDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AddDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_osmand_5fodb_2eproto();
|
||||
|
||||
::google::protobuf::uint32 _has_bits_[(1 + 31) / 32];
|
||||
|
||||
|
@ -570,9 +570,9 @@ class IndexedStringTable : public ::google::protobuf::Message {
|
|||
::google::protobuf::RepeatedPtrField< ::std::string> key_;
|
||||
::google::protobuf::RepeatedField< ::google::protobuf::uint32 > val_;
|
||||
::google::protobuf::RepeatedPtrField< ::IndexedStringTable > subtables_;
|
||||
friend void protobuf_AddDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AddDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_osmand_5fodb_2eproto();
|
||||
|
||||
::google::protobuf::uint32 _has_bits_[(4 + 31) / 32];
|
||||
|
||||
|
@ -699,9 +699,9 @@ class OsmAndMapIndex_MapEncodingRule : public ::google::protobuf::Message {
|
|||
::google::protobuf::uint32 id_;
|
||||
::google::protobuf::uint32 minzoom_;
|
||||
::google::protobuf::uint32 type_;
|
||||
friend void protobuf_AddDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AddDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_osmand_5fodb_2eproto();
|
||||
|
||||
::google::protobuf::uint32 _has_bits_[(5 + 31) / 32];
|
||||
|
||||
|
@ -854,9 +854,9 @@ class OsmAndMapIndex_MapRootLevel : public ::google::protobuf::Message {
|
|||
::google::protobuf::int32 bottom_;
|
||||
::google::protobuf::RepeatedPtrField< ::OsmAndMapIndex_MapDataBox > boxes_;
|
||||
::google::protobuf::RepeatedPtrField< ::MapDataBlock > blocks_;
|
||||
friend void protobuf_AddDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AddDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_osmand_5fodb_2eproto();
|
||||
|
||||
::google::protobuf::uint32 _has_bits_[(8 + 31) / 32];
|
||||
|
||||
|
@ -996,9 +996,9 @@ class OsmAndMapIndex_MapDataBox : public ::google::protobuf::Message {
|
|||
::google::protobuf::uint32 shifttomapdata_;
|
||||
bool ocean_;
|
||||
::google::protobuf::RepeatedPtrField< ::OsmAndMapIndex_MapDataBox > boxes_;
|
||||
friend void protobuf_AddDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AddDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_osmand_5fodb_2eproto();
|
||||
|
||||
::google::protobuf::uint32 _has_bits_[(7 + 31) / 32];
|
||||
|
||||
|
@ -1119,9 +1119,9 @@ class OsmAndMapIndex : public ::google::protobuf::Message {
|
|||
static const ::std::string _default_name_;
|
||||
::google::protobuf::RepeatedPtrField< ::OsmAndMapIndex_MapEncodingRule > rules_;
|
||||
::google::protobuf::RepeatedPtrField< ::OsmAndMapIndex_MapRootLevel > levels_;
|
||||
friend void protobuf_AddDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AddDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_osmand_5fodb_2eproto();
|
||||
|
||||
::google::protobuf::uint32 _has_bits_[(3 + 31) / 32];
|
||||
|
||||
|
@ -1229,9 +1229,9 @@ class MapDataBlock : public ::google::protobuf::Message {
|
|||
::google::protobuf::uint64 baseid_;
|
||||
::google::protobuf::RepeatedPtrField< ::MapData > dataobjects_;
|
||||
::StringTable* stringtable_;
|
||||
friend void protobuf_AddDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AddDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_osmand_5fodb_2eproto();
|
||||
|
||||
::google::protobuf::uint32 _has_bits_[(3 + 31) / 32];
|
||||
|
||||
|
@ -1407,9 +1407,9 @@ class MapData : public ::google::protobuf::Message {
|
|||
::google::protobuf::int64 id_;
|
||||
::std::string* rasterbytes_;
|
||||
static const ::std::string _default_rasterbytes_;
|
||||
friend void protobuf_AddDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AddDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_osmand_5fodb_2eproto();
|
||||
|
||||
::google::protobuf::uint32 _has_bits_[(8 + 31) / 32];
|
||||
|
||||
|
@ -1522,9 +1522,9 @@ class OsmAndAddressIndex_CitiesIndex : public ::google::protobuf::Message {
|
|||
::google::protobuf::uint32 type_;
|
||||
::google::protobuf::RepeatedPtrField< ::CityIndex > cities_;
|
||||
::google::protobuf::RepeatedPtrField< ::CityBlockIndex > blocks_;
|
||||
friend void protobuf_AddDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AddDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_osmand_5fodb_2eproto();
|
||||
|
||||
::google::protobuf::uint32 _has_bits_[(3 + 31) / 32];
|
||||
|
||||
|
@ -1658,9 +1658,9 @@ class OsmAndAddressIndex : public ::google::protobuf::Message {
|
|||
::OsmAndTileBox* boundaries_;
|
||||
::google::protobuf::RepeatedPtrField< ::OsmAndAddressIndex_CitiesIndex > cities_;
|
||||
::OsmAndAddressNameIndexData* nameindex_;
|
||||
friend void protobuf_AddDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AddDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_osmand_5fodb_2eproto();
|
||||
|
||||
::google::protobuf::uint32 _has_bits_[(5 + 31) / 32];
|
||||
|
||||
|
@ -1752,9 +1752,9 @@ class OsmAndAddressNameIndexData_AddressNameIndexData : public ::google::protobu
|
|||
mutable int _cached_size_;
|
||||
|
||||
::google::protobuf::RepeatedPtrField< ::AddressNameIndexDataAtom > atom_;
|
||||
friend void protobuf_AddDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AddDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_osmand_5fodb_2eproto();
|
||||
|
||||
::google::protobuf::uint32 _has_bits_[(1 + 31) / 32];
|
||||
|
||||
|
@ -1856,9 +1856,9 @@ class OsmAndAddressNameIndexData : public ::google::protobuf::Message {
|
|||
|
||||
::IndexedStringTable* table_;
|
||||
::google::protobuf::RepeatedPtrField< ::OsmAndAddressNameIndexData_AddressNameIndexData > atom_;
|
||||
friend void protobuf_AddDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AddDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_osmand_5fodb_2eproto();
|
||||
|
||||
::google::protobuf::uint32 _has_bits_[(2 + 31) / 32];
|
||||
|
||||
|
@ -1995,9 +1995,9 @@ class AddressNameIndexDataAtom : public ::google::protobuf::Message {
|
|||
::google::protobuf::uint32 type_;
|
||||
::google::protobuf::RepeatedField< ::google::protobuf::int32 > shifttoindex_;
|
||||
::google::protobuf::RepeatedField< ::google::protobuf::int32 > shifttocityindex_;
|
||||
friend void protobuf_AddDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AddDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_osmand_5fodb_2eproto();
|
||||
|
||||
::google::protobuf::uint32 _has_bits_[(5 + 31) / 32];
|
||||
|
||||
|
@ -2140,9 +2140,9 @@ class CityIndex : public ::google::protobuf::Message {
|
|||
::google::protobuf::uint32 x_;
|
||||
::google::protobuf::uint32 y_;
|
||||
::google::protobuf::uint32 shifttocityblockindex_;
|
||||
friend void protobuf_AddDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AddDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_osmand_5fodb_2eproto();
|
||||
|
||||
::google::protobuf::uint32 _has_bits_[(7 + 31) / 32];
|
||||
|
||||
|
@ -2255,9 +2255,9 @@ class CityBlockIndex : public ::google::protobuf::Message {
|
|||
::google::protobuf::uint32 shifttocityindex_;
|
||||
::google::protobuf::RepeatedPtrField< ::BuildingIndex > buildings_;
|
||||
::google::protobuf::RepeatedPtrField< ::StreetIndex > streets_;
|
||||
friend void protobuf_AddDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AddDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_osmand_5fodb_2eproto();
|
||||
|
||||
::google::protobuf::uint32 _has_bits_[(3 + 31) / 32];
|
||||
|
||||
|
@ -2410,9 +2410,9 @@ class StreetIndex : public ::google::protobuf::Message {
|
|||
::google::protobuf::uint64 id_;
|
||||
::google::protobuf::RepeatedPtrField< ::BuildingIndex > buildings_;
|
||||
::google::protobuf::RepeatedPtrField< ::StreetIntersection > intersections_;
|
||||
friend void protobuf_AddDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AddDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_osmand_5fodb_2eproto();
|
||||
|
||||
::google::protobuf::uint32 _has_bits_[(7 + 31) / 32];
|
||||
|
||||
|
@ -2531,9 +2531,9 @@ class StreetIntersection : public ::google::protobuf::Message {
|
|||
static const ::std::string _default_name_en_;
|
||||
::google::protobuf::int32 intersectedx_;
|
||||
::google::protobuf::int32 intersectedy_;
|
||||
friend void protobuf_AddDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AddDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_osmand_5fodb_2eproto();
|
||||
|
||||
::google::protobuf::uint32 _has_bits_[(4 + 31) / 32];
|
||||
|
||||
|
@ -2720,9 +2720,9 @@ class BuildingIndex : public ::google::protobuf::Message {
|
|||
::google::protobuf::uint64 id_;
|
||||
::std::string* postcode_;
|
||||
static const ::std::string _default_postcode_;
|
||||
friend void protobuf_AddDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AddDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_osmand_5fodb_2eproto();
|
||||
|
||||
::google::protobuf::uint32 _has_bits_[(11 + 31) / 32];
|
||||
|
||||
|
@ -2814,9 +2814,9 @@ class TransportRoutes : public ::google::protobuf::Message {
|
|||
mutable int _cached_size_;
|
||||
|
||||
::google::protobuf::RepeatedPtrField< ::TransportRoute > routes_;
|
||||
friend void protobuf_AddDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AddDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_osmand_5fodb_2eproto();
|
||||
|
||||
::google::protobuf::uint32 _has_bits_[(1 + 31) / 32];
|
||||
|
||||
|
@ -2981,9 +2981,9 @@ class TransportRoute : public ::google::protobuf::Message {
|
|||
::google::protobuf::uint32 distance_;
|
||||
::google::protobuf::RepeatedPtrField< ::TransportRouteStop > directstops_;
|
||||
::google::protobuf::RepeatedPtrField< ::TransportRouteStop > reversestops_;
|
||||
friend void protobuf_AddDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AddDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_osmand_5fodb_2eproto();
|
||||
|
||||
::google::protobuf::uint32 _has_bits_[(9 + 31) / 32];
|
||||
|
||||
|
@ -3102,9 +3102,9 @@ class TransportRouteStop : public ::google::protobuf::Message {
|
|||
::google::protobuf::int32 dy_;
|
||||
::google::protobuf::uint32 name_;
|
||||
::google::protobuf::uint32 name_en_;
|
||||
friend void protobuf_AddDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AddDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_osmand_5fodb_2eproto();
|
||||
|
||||
::google::protobuf::uint32 _has_bits_[(5 + 31) / 32];
|
||||
|
||||
|
@ -3236,9 +3236,9 @@ class TransportStop : public ::google::protobuf::Message {
|
|||
::google::protobuf::uint32 name_;
|
||||
::google::protobuf::uint32 name_en_;
|
||||
::google::protobuf::RepeatedField< ::google::protobuf::uint32 > routes_;
|
||||
friend void protobuf_AddDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AddDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_osmand_5fodb_2eproto();
|
||||
|
||||
::google::protobuf::uint32 _has_bits_[(6 + 31) / 32];
|
||||
|
||||
|
@ -3383,9 +3383,9 @@ class TransportStopsTree : public ::google::protobuf::Message {
|
|||
::google::protobuf::RepeatedPtrField< ::TransportStopsTree > subtrees_;
|
||||
::google::protobuf::RepeatedPtrField< ::TransportStop > leafs_;
|
||||
::google::protobuf::uint64 baseid_;
|
||||
friend void protobuf_AddDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AddDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_osmand_5fodb_2eproto();
|
||||
|
||||
::google::protobuf::uint32 _has_bits_[(7 + 31) / 32];
|
||||
|
||||
|
@ -3500,9 +3500,9 @@ class OsmAndTransportIndex : public ::google::protobuf::Message {
|
|||
::TransportRoutes* routes_;
|
||||
::TransportStopsTree* stops_;
|
||||
::StringTable* stringtable_;
|
||||
friend void protobuf_AddDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AddDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_osmand_5fodb_2eproto();
|
||||
|
||||
::google::protobuf::uint32 _has_bits_[(4 + 31) / 32];
|
||||
|
||||
|
@ -3648,9 +3648,9 @@ class OsmAndPoiIndex : public ::google::protobuf::Message {
|
|||
::OsmAndPoiNameIndex* nameindex_;
|
||||
::google::protobuf::RepeatedPtrField< ::OsmAndPoiBox > boxes_;
|
||||
::google::protobuf::RepeatedPtrField< ::OsmAndPoiBoxData > poidata_;
|
||||
friend void protobuf_AddDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AddDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_osmand_5fodb_2eproto();
|
||||
|
||||
::google::protobuf::uint32 _has_bits_[(6 + 31) / 32];
|
||||
|
||||
|
@ -3742,9 +3742,9 @@ class OsmAndPoiNameIndex_OsmAndPoiNameIndexData : public ::google::protobuf::Mes
|
|||
mutable int _cached_size_;
|
||||
|
||||
::google::protobuf::RepeatedPtrField< ::OsmAndPoiNameIndexDataAtom > atoms_;
|
||||
friend void protobuf_AddDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AddDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_osmand_5fodb_2eproto();
|
||||
|
||||
::google::protobuf::uint32 _has_bits_[(1 + 31) / 32];
|
||||
|
||||
|
@ -3846,9 +3846,9 @@ class OsmAndPoiNameIndex : public ::google::protobuf::Message {
|
|||
|
||||
::IndexedStringTable* table_;
|
||||
::google::protobuf::RepeatedPtrField< ::OsmAndPoiNameIndex_OsmAndPoiNameIndexData > data_;
|
||||
friend void protobuf_AddDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AddDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_osmand_5fodb_2eproto();
|
||||
|
||||
::google::protobuf::uint32 _has_bits_[(2 + 31) / 32];
|
||||
|
||||
|
@ -3959,9 +3959,9 @@ class OsmAndPoiNameIndexDataAtom : public ::google::protobuf::Message {
|
|||
::google::protobuf::uint32 x_;
|
||||
::google::protobuf::uint32 y_;
|
||||
::google::protobuf::uint32 shiftto_;
|
||||
friend void protobuf_AddDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AddDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_osmand_5fodb_2eproto();
|
||||
|
||||
::google::protobuf::uint32 _has_bits_[(4 + 31) / 32];
|
||||
|
||||
|
@ -4069,9 +4069,9 @@ class OsmAndCategoryTable : public ::google::protobuf::Message {
|
|||
::std::string* category_;
|
||||
static const ::std::string _default_category_;
|
||||
::google::protobuf::RepeatedPtrField< ::std::string> subcategories_;
|
||||
friend void protobuf_AddDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AddDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_osmand_5fodb_2eproto();
|
||||
|
||||
::google::protobuf::uint32 _has_bits_[(2 + 31) / 32];
|
||||
|
||||
|
@ -4203,9 +4203,9 @@ class OsmAndPoiBox : public ::google::protobuf::Message {
|
|||
::OsmAndPoiCategories* categories_;
|
||||
::google::protobuf::RepeatedPtrField< ::OsmAndPoiBox > subboxes_;
|
||||
::google::protobuf::uint32 shifttodata_;
|
||||
friend void protobuf_AddDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AddDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_osmand_5fodb_2eproto();
|
||||
|
||||
::google::protobuf::uint32 _has_bits_[(6 + 31) / 32];
|
||||
|
||||
|
@ -4297,9 +4297,9 @@ class OsmAndPoiCategories : public ::google::protobuf::Message {
|
|||
mutable int _cached_size_;
|
||||
|
||||
::google::protobuf::RepeatedField< ::google::protobuf::uint32 > categories_;
|
||||
friend void protobuf_AddDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AddDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_osmand_5fodb_2eproto();
|
||||
|
||||
::google::protobuf::uint32 _has_bits_[(1 + 31) / 32];
|
||||
|
||||
|
@ -4415,9 +4415,9 @@ class OsmAndPoiBoxData : public ::google::protobuf::Message {
|
|||
::google::protobuf::uint32 x_;
|
||||
::google::protobuf::uint32 y_;
|
||||
::google::protobuf::RepeatedPtrField< ::OsmAndPoiBoxDataAtom > poidata_;
|
||||
friend void protobuf_AddDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AddDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_osmand_5fodb_2eproto();
|
||||
|
||||
::google::protobuf::uint32 _has_bits_[(4 + 31) / 32];
|
||||
|
||||
|
@ -4605,9 +4605,9 @@ class OsmAndPoiBoxDataAtom : public ::google::protobuf::Message {
|
|||
static const ::std::string _default_phone_;
|
||||
::std::string* note_;
|
||||
static const ::std::string _default_note_;
|
||||
friend void protobuf_AddDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AddDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_osmand_5fodb_2eproto();
|
||||
|
||||
::google::protobuf::uint32 _has_bits_[(10 + 31) / 32];
|
||||
|
||||
|
@ -4699,9 +4699,9 @@ class IdTable : public ::google::protobuf::Message {
|
|||
mutable int _cached_size_;
|
||||
|
||||
::google::protobuf::RepeatedField< ::google::protobuf::int64 > routeid_;
|
||||
friend void protobuf_AddDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AddDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_osmand_5fodb_2eproto();
|
||||
|
||||
::google::protobuf::uint32 _has_bits_[(1 + 31) / 32];
|
||||
|
||||
|
@ -4812,9 +4812,9 @@ class RestrictionData : public ::google::protobuf::Message {
|
|||
::google::protobuf::int32 from_;
|
||||
::google::protobuf::int32 to_;
|
||||
::google::protobuf::int32 via_;
|
||||
friend void protobuf_AddDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AddDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_osmand_5fodb_2eproto();
|
||||
|
||||
::google::protobuf::uint32 _has_bits_[(4 + 31) / 32];
|
||||
|
||||
|
@ -4949,9 +4949,9 @@ class RouteData : public ::google::protobuf::Message {
|
|||
::google::protobuf::int32 routeid_;
|
||||
::std::string* stringnames_;
|
||||
static const ::std::string _default_stringnames_;
|
||||
friend void protobuf_AddDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AddDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_osmand_5fodb_2eproto();
|
||||
|
||||
::google::protobuf::uint32 _has_bits_[(5 + 31) / 32];
|
||||
|
||||
|
@ -5062,9 +5062,9 @@ class OsmAndRoutingIndex_RouteEncodingRule : public ::google::protobuf::Message
|
|||
::std::string* value_;
|
||||
static const ::std::string _default_value_;
|
||||
::google::protobuf::uint32 id_;
|
||||
friend void protobuf_AddDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AddDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_osmand_5fodb_2eproto();
|
||||
|
||||
::google::protobuf::uint32 _has_bits_[(3 + 31) / 32];
|
||||
|
||||
|
@ -5196,9 +5196,9 @@ class OsmAndRoutingIndex_RouteDataBox : public ::google::protobuf::Message {
|
|||
::google::protobuf::int32 bottom_;
|
||||
::google::protobuf::uint32 shifttodata_;
|
||||
::google::protobuf::RepeatedPtrField< ::OsmAndRoutingIndex_RouteDataBox > boxes_;
|
||||
friend void protobuf_AddDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AddDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_osmand_5fodb_2eproto();
|
||||
|
||||
::google::protobuf::uint32 _has_bits_[(6 + 31) / 32];
|
||||
|
||||
|
@ -5319,9 +5319,9 @@ class OsmAndRoutingIndex_RouteDataBlock : public ::google::protobuf::Message {
|
|||
::StringTable* stringtable_;
|
||||
::google::protobuf::RepeatedPtrField< ::RouteData > dataobjects_;
|
||||
::google::protobuf::RepeatedPtrField< ::RestrictionData > restrictions_;
|
||||
friend void protobuf_AddDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AddDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_osmand_5fodb_2eproto();
|
||||
|
||||
::google::protobuf::uint32 _has_bits_[(4 + 31) / 32];
|
||||
|
||||
|
@ -5433,6 +5433,18 @@ class OsmAndRoutingIndex : public ::google::protobuf::Message {
|
|||
inline ::google::protobuf::RepeatedPtrField< ::OsmAndRoutingIndex_RouteDataBox >*
|
||||
mutable_rootboxes();
|
||||
|
||||
// repeated .OsmAndRoutingIndex.RouteDataBox basemapBoxes = 4;
|
||||
inline int basemapboxes_size() const;
|
||||
inline void clear_basemapboxes();
|
||||
static const int kBasemapBoxesFieldNumber = 4;
|
||||
inline const ::OsmAndRoutingIndex_RouteDataBox& basemapboxes(int index) const;
|
||||
inline ::OsmAndRoutingIndex_RouteDataBox* mutable_basemapboxes(int index);
|
||||
inline ::OsmAndRoutingIndex_RouteDataBox* add_basemapboxes();
|
||||
inline const ::google::protobuf::RepeatedPtrField< ::OsmAndRoutingIndex_RouteDataBox >&
|
||||
basemapboxes() const;
|
||||
inline ::google::protobuf::RepeatedPtrField< ::OsmAndRoutingIndex_RouteDataBox >*
|
||||
mutable_basemapboxes();
|
||||
|
||||
// repeated .OsmAndRoutingIndex.RouteDataBlock blocks = 5;
|
||||
inline int blocks_size() const;
|
||||
inline void clear_blocks();
|
||||
|
@ -5454,12 +5466,13 @@ class OsmAndRoutingIndex : public ::google::protobuf::Message {
|
|||
static const ::std::string _default_name_;
|
||||
::google::protobuf::RepeatedPtrField< ::OsmAndRoutingIndex_RouteEncodingRule > rules_;
|
||||
::google::protobuf::RepeatedPtrField< ::OsmAndRoutingIndex_RouteDataBox > rootboxes_;
|
||||
::google::protobuf::RepeatedPtrField< ::OsmAndRoutingIndex_RouteDataBox > basemapboxes_;
|
||||
::google::protobuf::RepeatedPtrField< ::OsmAndRoutingIndex_RouteDataBlock > blocks_;
|
||||
friend void protobuf_AddDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_src_2fosmand_5fodb_2eproto();
|
||||
friend void protobuf_AddDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_AssignDesc_osmand_5fodb_2eproto();
|
||||
friend void protobuf_ShutdownFile_osmand_5fodb_2eproto();
|
||||
|
||||
::google::protobuf::uint32 _has_bits_[(4 + 31) / 32];
|
||||
::google::protobuf::uint32 _has_bits_[(5 + 31) / 32];
|
||||
|
||||
// WHY DOES & HAVE LOWER PRECEDENCE THAN != !?
|
||||
inline bool _has_bit(int index) const {
|
||||
|
@ -10356,6 +10369,31 @@ OsmAndRoutingIndex::mutable_rootboxes() {
|
|||
return &rootboxes_;
|
||||
}
|
||||
|
||||
// repeated .OsmAndRoutingIndex.RouteDataBox basemapBoxes = 4;
|
||||
inline int OsmAndRoutingIndex::basemapboxes_size() const {
|
||||
return basemapboxes_.size();
|
||||
}
|
||||
inline void OsmAndRoutingIndex::clear_basemapboxes() {
|
||||
basemapboxes_.Clear();
|
||||
}
|
||||
inline const ::OsmAndRoutingIndex_RouteDataBox& OsmAndRoutingIndex::basemapboxes(int index) const {
|
||||
return basemapboxes_.Get(index);
|
||||
}
|
||||
inline ::OsmAndRoutingIndex_RouteDataBox* OsmAndRoutingIndex::mutable_basemapboxes(int index) {
|
||||
return basemapboxes_.Mutable(index);
|
||||
}
|
||||
inline ::OsmAndRoutingIndex_RouteDataBox* OsmAndRoutingIndex::add_basemapboxes() {
|
||||
return basemapboxes_.Add();
|
||||
}
|
||||
inline const ::google::protobuf::RepeatedPtrField< ::OsmAndRoutingIndex_RouteDataBox >&
|
||||
OsmAndRoutingIndex::basemapboxes() const {
|
||||
return basemapboxes_;
|
||||
}
|
||||
inline ::google::protobuf::RepeatedPtrField< ::OsmAndRoutingIndex_RouteDataBox >*
|
||||
OsmAndRoutingIndex::mutable_basemapboxes() {
|
||||
return &basemapboxes_;
|
||||
}
|
||||
|
||||
// repeated .OsmAndRoutingIndex.RouteDataBlock blocks = 5;
|
||||
inline int OsmAndRoutingIndex::blocks_size() const {
|
||||
return blocks_.size();
|
||||
|
@ -10395,4 +10433,4 @@ namespace protobuf {
|
|||
|
||||
// @@protoc_insertion_point(global_scope)
|
||||
|
||||
#endif // PROTOBUF_src_2fosmand_5fodb_2eproto__INCLUDED
|
||||
#endif // PROTOBUF_osmand_5fodb_2eproto__INCLUDED
|
||||
|
|
|
@ -502,6 +502,7 @@ void RenderingRuleSearchRequest::setStringFilter(RenderingRuleProperty* p, std::
|
|||
values[p->id] = storage->getDictionaryValue(filter);
|
||||
}
|
||||
}
|
||||
|
||||
void RenderingRuleSearchRequest::setIntFilter(RenderingRuleProperty* p, int filter) {
|
||||
if (p != NULL) {
|
||||
// assert p->input;
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
#include "rendering.h"
|
||||
|
||||
|
||||
|
||||
struct MapDataObjectPrimitive {
|
||||
MapDataObject* obj;
|
||||
int typeInd;
|
||||
|
@ -36,6 +35,8 @@ struct MapDataObjectPrimitive {
|
|||
int objectType;
|
||||
};
|
||||
|
||||
|
||||
|
||||
const int MAX_V = 32;
|
||||
void calcPoint(std::pair<int, int> c, RenderingContext* rc)
|
||||
{
|
||||
|
@ -234,7 +235,6 @@ void renderText(MapDataObject* obj, RenderingRuleSearchRequest* req, RenderingCo
|
|||
rc->textToDraw.push_back(info);
|
||||
}
|
||||
}
|
||||
|
||||
it++;
|
||||
}
|
||||
|
||||
|
|
|
@ -114,6 +114,13 @@ private:
|
|||
}
|
||||
};
|
||||
|
||||
inline float sqr(float a){
|
||||
return a*a;
|
||||
}
|
||||
|
||||
inline float absFloat(float a){
|
||||
return a > 0 ? a : -a;
|
||||
}
|
||||
|
||||
|
||||
void fillTextProperties(TextDrawInfo* info, RenderingRuleSearchRequest* render, float cx, float cy) {
|
||||
|
@ -217,19 +224,7 @@ bool calculatePathToRotate(RenderingContext* rc, TextDrawInfo* p) {
|
|||
int len = p->path->countPoints();
|
||||
SkPoint points[len];
|
||||
p->path->getPoints(points, len);
|
||||
if (!p->drawOnPath) {
|
||||
// simply calculate rotation of path used for shields
|
||||
float px = 0;
|
||||
float py = 0;
|
||||
for (int i = 1; i < len; i++) {
|
||||
px += points[i].fX - points[i - 1].fX;
|
||||
py += points[i].fY - points[i - 1].fY;
|
||||
}
|
||||
if (px != 0 || py != 0) {
|
||||
p->pathRotate = atan2(py, px);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool inverse = false;
|
||||
float roadLength = 0;
|
||||
|
@ -293,66 +288,98 @@ bool calculatePathToRotate(RenderingContext* rc, TextDrawInfo* p) {
|
|||
} while(ch);
|
||||
}
|
||||
}
|
||||
// shrink path to display more text
|
||||
if (startInd > 0 || endInd < len) {
|
||||
// find subpath
|
||||
SkPath* path = new SkPath;
|
||||
for (int i = startInd; i < endInd; i++) {
|
||||
if (i == startInd) {
|
||||
path->moveTo(points[i].fX, points[i].fY);
|
||||
} else {
|
||||
path->lineTo(points[i].fX, points[i].fY);
|
||||
|
||||
if (!p->drawOnPath) {
|
||||
int middle = startInd + 1 + (endInd - startInd - 1) / 2;
|
||||
|
||||
float px = 0;
|
||||
float py = 0;
|
||||
for (i = startInd; i < endInd; i++) {
|
||||
px += points[i].fX ;
|
||||
py += points[i].fY;
|
||||
}
|
||||
px /= (endInd - startInd);
|
||||
py /= (endInd - startInd);
|
||||
float cx = 0;
|
||||
float cy = 0;
|
||||
float cd = -1;
|
||||
for (i = startInd + 1; i < endInd; i++) {
|
||||
float fd = sqr(px - points[i].fX) + sqr(py - points[i].fY);
|
||||
if (cd < 0 || fd < cd) {
|
||||
cx = points[i].fX;
|
||||
cy = points[i].fY;
|
||||
cd = fd;
|
||||
}
|
||||
}
|
||||
if (p->path != NULL) {
|
||||
delete p->path;
|
||||
}
|
||||
p->path = path;
|
||||
}
|
||||
// calculate vector of the road (px, py) to proper rotate it
|
||||
float px = 0;
|
||||
float py = 0;
|
||||
for (i = startInd + 1; i < endInd; i++) {
|
||||
px += points[i].fX - points[i - 1].fX;
|
||||
py += points[i].fY - points[i - 1].fY;
|
||||
}
|
||||
float scale = 0.5f;
|
||||
float plen = sqrt(px * px + py * py);
|
||||
// vector ox,oy orthogonal to px,py to measure height
|
||||
float ox = -py;
|
||||
float oy = px;
|
||||
if(plen > 0) {
|
||||
float rot = atan2(py, px);
|
||||
if (rot < 0) rot += M_PI * 2;
|
||||
if (rot > M_PI_2 && rot < 3 * M_PI_2) {
|
||||
rot += M_PI;
|
||||
inverse = true;
|
||||
ox = -ox;
|
||||
oy = -oy;
|
||||
}
|
||||
p->pathRotate = rot;
|
||||
ox *= (p->bounds.height() / plen) / 2;
|
||||
oy *= (p->bounds.height() / plen) / 2;
|
||||
}
|
||||
p->centerX = cx;
|
||||
p->centerY = cy;
|
||||
p->pathRotate = atan2(py, px);
|
||||
p->vOffset += p->textSize / 2 - 1;
|
||||
p->hOffset = 0;
|
||||
} else {
|
||||
// shrink path to display more text
|
||||
|
||||
p->centerX = points[startInd].fX + scale * px + ox;
|
||||
p->centerY = points[startInd].fY + scale * py + oy;
|
||||
p->vOffset += p->textSize / 2 - 1;
|
||||
p->hOffset = 0;
|
||||
|
||||
if (inverse) {
|
||||
SkPath* path = new SkPath;
|
||||
for (int i = endInd - 1; i >= startInd; i--) {
|
||||
if (i == (int)(endInd - 1)) {
|
||||
path->moveTo(points[i].fX, points[i].fY);
|
||||
} else {
|
||||
path->lineTo(points[i].fX, points[i].fY);
|
||||
if (startInd > 0 || endInd < len) {
|
||||
// find subpath
|
||||
SkPath* path = new SkPath;
|
||||
for (int i = startInd; i < endInd; i++) {
|
||||
if (i == startInd) {
|
||||
path->moveTo(points[i].fX, points[i].fY);
|
||||
} else {
|
||||
path->lineTo(points[i].fX, points[i].fY);
|
||||
}
|
||||
}
|
||||
if (p->path != NULL) {
|
||||
delete p->path;
|
||||
}
|
||||
p->path = path;
|
||||
}
|
||||
if (p->path != NULL) {
|
||||
delete p->path;
|
||||
// calculate vector of the road (px, py) to proper rotate it
|
||||
float px = 0;
|
||||
float py = 0;
|
||||
for (i = startInd + 1; i < endInd; i++) {
|
||||
px += points[i].fX - points[i - 1].fX;
|
||||
py += points[i].fY - points[i - 1].fY;
|
||||
}
|
||||
float scale = 0.5f;
|
||||
float plen = sqrt(px * px + py * py);
|
||||
// vector ox,oy orthogonal to px,py to measure height
|
||||
float ox = -py;
|
||||
float oy = px;
|
||||
if (plen > 0 ) {
|
||||
float rot = atan2(py, px);
|
||||
if (rot < 0)
|
||||
rot += M_PI * 2;
|
||||
if (rot > M_PI_2 && rot < 3 * M_PI_2) {
|
||||
rot += M_PI;
|
||||
inverse = true;
|
||||
ox = -ox;
|
||||
oy = -oy;
|
||||
}
|
||||
p->pathRotate = rot;
|
||||
ox *= (p->bounds.height() / plen) / 2;
|
||||
oy *= (p->bounds.height() / plen) / 2;
|
||||
}
|
||||
|
||||
p->centerX = points[startInd].fX + scale * px + ox;
|
||||
p->centerY = points[startInd].fY + scale * py + oy;
|
||||
p->vOffset += p->textSize / 2 - 1;
|
||||
p->hOffset = 0;
|
||||
|
||||
if (inverse) {
|
||||
SkPath* path = new SkPath;
|
||||
for (int i = endInd - 1; i >= startInd; i--) {
|
||||
if (i == (int) (endInd - 1)) {
|
||||
path->moveTo(points[i].fX, points[i].fY);
|
||||
} else {
|
||||
path->lineTo(points[i].fX, points[i].fY);
|
||||
}
|
||||
}
|
||||
if (p->path != NULL) {
|
||||
delete p->path;
|
||||
}
|
||||
p->path = path;
|
||||
}
|
||||
p->path = path;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -372,13 +399,6 @@ void drawTestBox(SkCanvas* cv, SkRect* r, float rot, SkPaint* paintIcon, std::st
|
|||
cv->restore();
|
||||
}
|
||||
|
||||
inline float sqr(float a){
|
||||
return a*a;
|
||||
}
|
||||
|
||||
inline float absFloat(float a){
|
||||
return a > 0 ? a : -a;
|
||||
}
|
||||
|
||||
bool intersects(SkRect tRect, float tRot, TextDrawInfo* s)
|
||||
{
|
||||
|
@ -496,8 +516,7 @@ void drawTextOverCanvas(RenderingContext* rc, SkCanvas* cv) {
|
|||
|
||||
// 1. Sort text using text order
|
||||
std::sort(rc->textToDraw.begin(), rc->textToDraw.end(), textOrder);
|
||||
uint32_t size = rc->textToDraw.size();
|
||||
for (uint32_t i = 0; i < size; i++) {
|
||||
for (uint32_t i = 0; i < rc->textToDraw.size(); i++) {
|
||||
TextDrawInfo* text = rc->textToDraw.at(i);
|
||||
if (text->text.length() > 0) {
|
||||
// sest text size before finding intersection (it is used there)
|
||||
|
|
Loading…
Reference in a new issue