From ab603663f18e19f52e554e4a006d7ef91b0a4f34 Mon Sep 17 00:00:00 2001 From: Denis Kolomiets Date: Tue, 23 Jun 2020 21:57:50 +0300 Subject: [PATCH] quick fix for polygon center point --- OsmAnd-java/src/main/java/net/osmand/osm/edit/OsmMapUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd-java/src/main/java/net/osmand/osm/edit/OsmMapUtils.java b/OsmAnd-java/src/main/java/net/osmand/osm/edit/OsmMapUtils.java index be12ef4d82..0189ff0a97 100644 --- a/OsmAnd-java/src/main/java/net/osmand/osm/edit/OsmMapUtils.java +++ b/OsmAnd-java/src/main/java/net/osmand/osm/edit/OsmMapUtils.java @@ -87,7 +87,7 @@ public class OsmMapUtils { } public static LatLon getComplexPolyCenter(Collection outer, List> inner) { - if (!Algorithms.isEmpty(outer) && outer.size() <= 5 && inner == null) { + if (outer.size() > 3 && outer.size() <= 5 && inner == null) { List sub = new ArrayList<>(outer); return getWeightCenterForNodes(sub.subList(0, sub.size()-1)); }