optimze code
This commit is contained in:
parent
93c12b50e3
commit
4503feeb22
1 changed files with 4 additions and 2 deletions
|
@ -705,8 +705,10 @@ public class RouteDataObject {
|
|||
//}
|
||||
}
|
||||
// Experimental: Distance analysis for STOP with no recognized directional tagging
|
||||
if (((direction == true) && (distance(0, intId) < distance(intId, getPointsLength() - 1)))
|
||||
|| ((direction == false) && (distance(0, intId) > distance(intId, getPointsLength() - 1)))) {
|
||||
double d1 = distance(0, intId);
|
||||
double d2 = distance(intId, getPointsLength() - 1);
|
||||
if (((direction == true) && (d1 < d2))
|
||||
|| ((direction == false) && (d1 > d2)) && (d1 != 0) && (d2 != 0)) {
|
||||
return false;
|
||||
}
|
||||
// No directional info detected
|
||||
|
|
Loading…
Reference in a new issue