Fix map gen
This commit is contained in:
parent
6fd3c49d85
commit
7783f9abec
1 changed files with 5 additions and 1 deletions
|
@ -301,7 +301,8 @@ public class MapAlgorithms {
|
|||
*/
|
||||
private static int countIntersections(Collection<Node> polyNodes, double latitude, double longitude) {
|
||||
int intersections = 0;
|
||||
if (polyNodes.size() == 0) return 0;
|
||||
if (polyNodes.size() == 0)
|
||||
return 0;
|
||||
Node prev = null;
|
||||
Node first = null;
|
||||
Node last = null;
|
||||
|
@ -321,6 +322,9 @@ public class MapAlgorithms {
|
|||
}
|
||||
prev = n;
|
||||
}
|
||||
if(first == null || last == null) {
|
||||
return 0;
|
||||
}
|
||||
// special handling, also count first and last, might not be closed, but
|
||||
// we want this!
|
||||
if (OsmMapUtils.ray_intersect_lon(first,
|
||||
|
|
Loading…
Reference in a new issue