Rename countLines() to countLanes()

This commit is contained in:
Saikrishna Arcot 2014-10-04 10:41:30 -04:00
parent 82322ac7ec
commit bd5d29fc5f

View file

@ -516,7 +516,7 @@ public class RouteResultPreparation {
kl = true; kl = true;
int lns = attached.getObject().getLanes(); int lns = attached.getObject().getLanes();
if(attached.getObject().getOneway() == 0) { if(attached.getObject().getOneway() == 0) {
lns = countLines(attached, lns); lns = countLanes(attached, lns);
} }
if (lns > 0) { if (lns > 0) {
right += lns; right += lns;
@ -526,7 +526,7 @@ public class RouteResultPreparation {
kr = true; kr = true;
int lns = attached.getObject().getLanes(); int lns = attached.getObject().getLanes();
if(attached.getObject().getOneway() == 0) { if(attached.getObject().getOneway() == 0) {
lns = countLines(attached, lns); lns = countLanes(attached, lns);
} }
if (lns > 0) { if (lns > 0) {
left += lns; left += lns;
@ -544,7 +544,7 @@ public class RouteResultPreparation {
int current = currentSegm.getObject().getLanes(); int current = currentSegm.getObject().getLanes();
// attachedRoutes covers all allowed outbound routes at that point except currentSegm. // attachedRoutes covers all allowed outbound routes at that point except currentSegm.
if (currentSegm.getObject().getOneway() == 0) { if (currentSegm.getObject().getOneway() == 0) {
current = countLines(currentSegm, current); current = countLanes(currentSegm, current);
} }
if (current <= 0) { if (current <= 0) {
current = 1; current = 1;
@ -581,7 +581,7 @@ public class RouteResultPreparation {
return t; return t;
} }
protected int countLines(RouteSegmentResult attached, int lns) { protected int countLanes(RouteSegmentResult attached, int lns) {
try { try {
if (attached.isForwardDirection() && attached.getObject().getValue("lanes:forward") != null) { if (attached.isForwardDirection() && attached.getObject().getValue("lanes:forward") != null) {
return Integer.parseInt(attached.getObject().getValue("lanes:forward")); return Integer.parseInt(attached.getObject().getValue("lanes:forward"));