Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2016-04-26 17:32:22 +02:00
commit 83046f7588
2 changed files with 28 additions and 2 deletions

View file

@ -547,6 +547,21 @@ 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(",");
}
b.append(" ");
}
if (vInfo.vmapCoordinates) {
b.append(" lat/lon : ");
for (int i = 0; i < obj.getPointsLength(); i++) {
float x = (float) MapUtils.get31LongitudeX(obj.getPoint31XTile(i));
float y = (float) MapUtils.get31LatitudeY(obj.getPoint31YTile(i));
b.append(y).append(" / ").append(x).append(" , ");
}
}
println(b.toString());
return false;
}

View file

@ -8,6 +8,7 @@ import java.text.MessageFormat;
import net.osmand.binary.BinaryMapRouteReaderAdapter.RouteRegion;
import net.osmand.binary.BinaryMapRouteReaderAdapter.RouteTypeRule;
import net.osmand.util.Algorithms;
import net.osmand.util.MapUtils;
public class RouteDataObject {
/*private */static final int RESTRICTION_SHIFT = 3;
@ -466,8 +467,18 @@ public class RouteDataObject {
assertTrueLength("14.5'", 4.4196f);
assertTrueLength("15ft", 4.572f);
}
public String coordinates() {
StringBuilder b = new StringBuilder();
b.append(" lat/lon : ");
for (int i = 0; i < getPointsLength(); i++) {
float x = (float) MapUtils.get31LongitudeX(getPoint31XTile(i));
float y = (float) MapUtils.get31LatitudeY(getPoint31YTile(i));
b.append(y).append(" / ").append(x).append(" , ");
}
return b.toString();
}
@Override
public String toString() {
String name = getName();