diff --git a/OsmAnd-java/src/net/osmand/binary/BinaryInspector.java b/OsmAnd-java/src/net/osmand/binary/BinaryInspector.java index a0b4c5da89..446923d19a 100644 --- a/OsmAnd-java/src/net/osmand/binary/BinaryInspector.java +++ b/OsmAnd-java/src/net/osmand/binary/BinaryInspector.java @@ -59,7 +59,7 @@ public class BinaryInspector { public static final int BUFFER_SIZE = 1 << 20; - private static final int SHIFT_ID = 6; + public static final int SHIFT_ID = 6; private VerboseInfo vInfo; public static void main(String[] args) throws IOException { @@ -536,7 +536,7 @@ public class BinaryInspector { b.setLength(0); b.append("Road "); b.append(obj.id); - b.append(" osmid ").append(obj.id >> (SHIFT_ID + 2)); + b.append(" osmid ").append(obj.getId() >> (SHIFT_ID)); 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("'"); @@ -950,7 +950,7 @@ public class BinaryInspector { } b.append(" id ").append(obj.getId()); - b.append(" osmid ").append((obj.getId() >> (SHIFT_ID + 2))); + b.append(" osmid ").append((obj.getId() >> (SHIFT_ID + 1))); if (vmapCoordinates) { b.append(" lat/lon : "); for (int i = 0; i < obj.getPointsLength(); i++) { diff --git a/OsmAnd-java/src/net/osmand/router/RouteResultPreparation.java b/OsmAnd-java/src/net/osmand/router/RouteResultPreparation.java index dc7279d4ed..72415adacd 100644 --- a/OsmAnd-java/src/net/osmand/router/RouteResultPreparation.java +++ b/OsmAnd-java/src/net/osmand/router/RouteResultPreparation.java @@ -12,6 +12,7 @@ import java.util.Iterator; import java.util.List; import net.osmand.PlatformUtil; +import net.osmand.binary.BinaryInspector; import net.osmand.binary.BinaryMapIndexReader; import net.osmand.binary.BinaryMapRouteReaderAdapter.RouteTypeRule; import net.osmand.binary.RouteDataObject; @@ -325,7 +326,8 @@ public class RouteResultPreparation { additional.append("start_bearing = \"").append(res.getBearingBegin()).append("\" "); additional.append("end_bearing = \"").append(res.getBearingEnd()).append("\" "); additional.append("description = \"").append(res.getDescription()).append("\" "); - println(MessageFormat.format("\t", (res.getObject().getId()) + "", + println(MessageFormat.format("\t", + (res.getObject().getId() >> (BinaryInspector.SHIFT_ID )) + "", res.getObject().getId() + "", res.getStartPointIndex() + "", res.getEndPointIndex() + "", additional.toString())); printAdditionalPointInfo(res); }