Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
dad1861baf
1 changed files with 4 additions and 4 deletions
|
@ -77,13 +77,13 @@ public class RouteDataObject {
|
||||||
heightDistanceArray = new float[2*getPointsLength()];
|
heightDistanceArray = new float[2*getPointsLength()];
|
||||||
double plon = 0;
|
double plon = 0;
|
||||||
double plat = 0;
|
double plat = 0;
|
||||||
int prevHeight = startHeight;
|
float prevHeight = startHeight;
|
||||||
for(int k = 0; k < getPointsLength(); k++) {
|
for(int k = 0; k < getPointsLength(); k++) {
|
||||||
double lon = MapUtils.get31LongitudeX(getPoint31XTile(k));
|
double lon = MapUtils.get31LongitudeX(getPoint31XTile(k));
|
||||||
double lat = MapUtils.get31LatitudeY(getPoint31YTile(k));
|
double lat = MapUtils.get31LatitudeY(getPoint31YTile(k));
|
||||||
if(k > 0) {
|
if(k > 0) {
|
||||||
double dd = MapUtils.getDistance(plat, plon, lat, lon);
|
double dd = MapUtils.getDistance(plat, plon, lat, lon);
|
||||||
int height = HEIGHT_UNDEFINED;
|
float height = HEIGHT_UNDEFINED;
|
||||||
if(k == getPointsLength() - 1) {
|
if(k == getPointsLength() - 1) {
|
||||||
height = endHeight;
|
height = endHeight;
|
||||||
} else {
|
} else {
|
||||||
|
@ -92,10 +92,10 @@ public class RouteDataObject {
|
||||||
for (int id : tps) {
|
for (int id : tps) {
|
||||||
RouteTypeRule rt = region.quickGetEncodingRule(id);
|
RouteTypeRule rt = region.quickGetEncodingRule(id);
|
||||||
if (rt.getTag().equals("osmand_ele_asc")) {
|
if (rt.getTag().equals("osmand_ele_asc")) {
|
||||||
height = (int) (prevHeight + Float.parseFloat(rt.getValue()));
|
height = (prevHeight + Float.parseFloat(rt.getValue()));
|
||||||
break;
|
break;
|
||||||
} else if (rt.getTag().equals("osmand_ele_desc")) {
|
} else if (rt.getTag().equals("osmand_ele_desc")) {
|
||||||
height = (int) (prevHeight - Float.parseFloat(rt.getValue()));
|
height = (prevHeight - Float.parseFloat(rt.getValue()));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue