JTS PathLayer: do not try to calculate zero length great circle path by @andreynovikov #390
This commit is contained in:
parent
7142f3410d
commit
e1db67f099
@ -3,6 +3,7 @@
|
||||
* Copyright 2012 Hannes Janetzek
|
||||
* Copyright 2016-2017 devemux86
|
||||
* Copyright 2016 Pedinel
|
||||
* Copyright 2017 Andrey Novikov
|
||||
*
|
||||
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
||||
*
|
||||
@ -129,6 +130,8 @@ public class PathLayer extends VectorLayer {
|
||||
|
||||
/* add one point for every 100kms of the great circle path */
|
||||
int numberOfPoints = (int) (length / 100000);
|
||||
if (numberOfPoints == 0)
|
||||
return;
|
||||
|
||||
addGreatCircle(startPoint, endPoint, numberOfPoints);
|
||||
}
|
||||
|
@ -4,6 +4,7 @@
|
||||
* Copyright 2016 devemux86
|
||||
* Copyright 2016 Bezzu
|
||||
* Copyright 2016 Pedinel
|
||||
* Copyright 2017 Andrey Novikov
|
||||
*
|
||||
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user