JTS PathLayer: do not try to calculate zero length great circle path by @andreynovikov #390

This commit is contained in:
Emux 2017-08-28 16:56:44 +03:00
parent 7142f3410d
commit e1db67f099
2 changed files with 4 additions and 0 deletions

View File

@ -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);
}

View File

@ -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).
*