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 5be470ac4d..cf9def40cf 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,6 +87,12 @@ public class OsmMapUtils { } public static LatLon getComplexPolyCenter(Collection outer, List> inner) { + if (outer.size() <= 5 && inner == null) { + List sub = new ArrayList<>(outer); + + return getWeightCenterForNodes(sub.subList(0, sub.size()-1)); + } + final List> rings = new ArrayList<>(); List outerRing = new ArrayList<>();