Verbose binary inspectory
This commit is contained in:
parent
ae04bf705a
commit
73ef92c4da
2 changed files with 45 additions and 6 deletions
|
@ -536,6 +536,7 @@ public class BinaryInspector {
|
|||
b.setLength(0);
|
||||
b.append("Road ");
|
||||
b.append(obj.id);
|
||||
b.append(" osmid ").append(obj.id >> (SHIFT_ID + 1));
|
||||
for (int i = 0; i < obj.getTypes().length; i++) {
|
||||
RouteTypeRule rr = obj.region.quickGetEncodingRule(obj.getTypes()[i]);
|
||||
b.append(" ").append(rr.getTag()).append("='").append(rr.getValue()).append("'");
|
||||
|
@ -547,12 +548,40 @@ public class BinaryInspector {
|
|||
b.append(" ").append(rr.getTag()).append("='").append(obj.getNames().get(key)).append("'");
|
||||
}
|
||||
}
|
||||
if (obj.restrictions != null) {
|
||||
b.append(" restrictions=");
|
||||
for (int i = 0; i != obj.restrictions.length; i++) {
|
||||
b.append(obj.getRestrictionId(i)).append(",");
|
||||
int pointsLength = obj.getPointsLength();
|
||||
if(obj.hasPointNames() || obj.hasPointTypes()) {
|
||||
b.append(" pointtypes [");
|
||||
for (int i = 0; i < pointsLength; i++) {
|
||||
String[] names = obj.getPointNames(i);
|
||||
int[] nametypes = obj.getPointNameTypes(i);
|
||||
int[] types = obj.getPointTypes(i);
|
||||
b.append(" [" + (i + 1) + ". ");
|
||||
if(names != null) {
|
||||
for(int k = 0; k < names.length; k++) {
|
||||
RouteTypeRule rr = obj.region.quickGetEncodingRule(nametypes[k]);
|
||||
b.append(rr.getTag()).append("='").append(names[k]).append("'");
|
||||
}
|
||||
}
|
||||
if(types != null) {
|
||||
for(int k = 0; k < types.length; k++) {
|
||||
RouteTypeRule rr = obj.region.quickGetEncodingRule(types[k]);
|
||||
b.append(rr.getTag()).append("='").append(rr.getValue()).append("'");
|
||||
}
|
||||
}
|
||||
if(vInfo.vmapCoordinates && (types != null || names != null)) {
|
||||
float x = (float) MapUtils.get31LongitudeX(obj.getPoint31XTile(i));
|
||||
float y = (float) MapUtils.get31LatitudeY(obj.getPoint31YTile(i));
|
||||
b.append(y).append(" / ").append(x).append(" ");
|
||||
}
|
||||
b.append("]");
|
||||
}
|
||||
b.append(" ");
|
||||
}
|
||||
if (obj.restrictions != null) {
|
||||
b.append(" restrictions [");
|
||||
for (int i = 0; i < obj.restrictions.length; i++) {
|
||||
b.append(obj.getRestrictionId(i)).append(" (").append(obj.getRestrictionType(i)).append(") ").append(",");
|
||||
}
|
||||
b.append("] ");
|
||||
}
|
||||
if (vInfo.vmapCoordinates) {
|
||||
b.append(" lat/lon : ");
|
||||
|
@ -914,7 +943,8 @@ public class BinaryInspector {
|
|||
b.append("]");
|
||||
}
|
||||
|
||||
b.append(" id ").append((obj.getId() >> (SHIFT_ID + 1)));
|
||||
b.append(" id ").append(obj.getId());
|
||||
b.append(" osmid ").append((obj.getId() >> (SHIFT_ID + 1)));
|
||||
if (vmapCoordinates) {
|
||||
b.append(" lat/lon : ");
|
||||
for (int i = 0; i < obj.getPointsLength(); i++) {
|
||||
|
|
|
@ -150,6 +150,15 @@ public class RouteDataObject {
|
|||
public long getRestrictionId(int i) {
|
||||
return restrictions[i] >> RESTRICTION_SHIFT;
|
||||
}
|
||||
|
||||
public boolean hasPointTypes() {
|
||||
return pointTypes != null;
|
||||
}
|
||||
|
||||
public boolean hasPointNames() {
|
||||
return pointNames != null;
|
||||
}
|
||||
|
||||
|
||||
public void insert(int pos, int x31, int y31) {
|
||||
int[] opointsX = pointsX;
|
||||
|
|
Loading…
Reference in a new issue