Fix initialization problem
This commit is contained in:
parent
002f86d657
commit
d87ec826c8
5 changed files with 9 additions and 5 deletions
|
@ -49,7 +49,7 @@ public class BinaryInspector {
|
|||
// test cases show info
|
||||
|
||||
|
||||
// inspector(new String[]{/*"-vmap", "-bbox=-121.785,37.35,-121.744,37.33", */"/home/victor/projects/OsmAnd/data/temp/Belgium_europe_2.obf"});
|
||||
// inspector(new String[]{/*"-vmap", "-bbox=-121.785,37.35,-121.744,37.33", */"/home/victor/projects/OsmAnd/data/osm-gen/Netherlands_europe.obf"});
|
||||
// test case extract parts
|
||||
// test case
|
||||
}
|
||||
|
|
|
@ -498,7 +498,6 @@ public class BinaryMapAddressReaderAdapter {
|
|||
codedIS.popLimit(old);
|
||||
}
|
||||
if (obj != null) {
|
||||
System.out.println("STREET " + list.get(j) );
|
||||
codedIS.seek(list.get(j));
|
||||
int len = codedIS.readRawVarint32();
|
||||
int old = codedIS.pushLimit(len);
|
||||
|
|
|
@ -155,7 +155,6 @@ public class BinaryMapIndexReader {
|
|||
indexes.add(mapIndex);
|
||||
break;
|
||||
case OsmandOdb.OsmAndStructure.ADDRESSINDEX_FIELD_NUMBER:
|
||||
|
||||
AddressRegion region = new AddressRegion();
|
||||
region.length = readInt();
|
||||
region.filePointer = codedIS.getTotalBytesRead();
|
||||
|
|
|
@ -250,12 +250,15 @@ public class BinaryMapRouteReaderAdapter {
|
|||
int oldLimit = codedIS.pushLimit(subregion.length);
|
||||
readRouteTree(subregion, null, 0, true);
|
||||
region.getSubregions().add(subregion);
|
||||
codedIS.skipRawBytes(codedIS.getBytesUntilLimit());
|
||||
codedIS.popLimit(oldLimit);
|
||||
codedIS.seek(subregion.filePointer + subregion.length);
|
||||
|
||||
region.bottomLatitude = MapUtils.get31LatitudeY(subregion.bottom);
|
||||
region.topLatitude = MapUtils.get31LatitudeY(subregion.top);
|
||||
region.rightLongitude = MapUtils.get31LongitudeX(subregion.right);
|
||||
region.leftLongitude = MapUtils.get31LongitudeX(subregion.left);
|
||||
// Finish reading file!
|
||||
codedIS.skipRawBytes(codedIS.getBytesUntilLimit());
|
||||
} break;
|
||||
|
||||
default:
|
||||
|
@ -527,7 +530,8 @@ public class BinaryMapRouteReaderAdapter {
|
|||
codedIS.popLimit(oldLimit);
|
||||
codedIS.seek(subregion.filePointer + subregion.length);
|
||||
} else {
|
||||
skipUnknownField(t);
|
||||
codedIS.seek(thisTree.filePointer + thisTree.length);
|
||||
// skipUnknownField(t);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -327,6 +327,8 @@ bool readRoutingIndex(CodedInputStream* input, RoutingIndex* routingIndex) {
|
|||
input->PopLimit(oldLimit);
|
||||
input->Seek(subregion.filePointer + subregion.length);
|
||||
routingIndex->subregions.push_back(subregion);
|
||||
// Finish reading
|
||||
input->Seek(routingIndex->filePointer + routingIndex->length);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
|
|
Loading…
Reference in a new issue