Index: src/uk/me/parabola/mkgmap/filters/PolygonSplitterFilter.java
===================================================================
--- src/uk/me/parabola/mkgmap/filters/PolygonSplitterFilter.java	(revision 4735)
+++ src/uk/me/parabola/mkgmap/filters/PolygonSplitterFilter.java	(working copy)
@@ -22,6 +22,7 @@
 import uk.me.parabola.mkgmap.general.MapElement;
 import uk.me.parabola.mkgmap.general.MapShape;
 import uk.me.parabola.mkgmap.reader.osm.GType;
+import uk.me.parabola.util.GpxCreator;
 import uk.me.parabola.util.ShapeSplitter;
 
 import java.util.ArrayList;
@@ -87,8 +88,24 @@
 			if (log.isDebugEnabled()) {
 				log.debug("splitting shape", GType.formatType(shape.getType()), "at shift", shift);
 			}
+//			log.error("splitting shape", GType.formatType(shape.getType()), "at shift", shift);
 			List<MapShape> outputs = new ArrayList<>();
 			split(shape, outputs); // split in half
+			double eps = 0.0001;
+			long testVal = Math.abs(ShapeMergeFilter.calcAreaSizeTestVal(shape.getPoints()));
+			long sumSplit = outputs.stream()
+					.mapToLong(s -> Math.abs(ShapeMergeFilter.calcAreaSizeTestVal(s.getPoints()))).sum();
+			double ratio = (double) testVal / sumSplit;
+			
+			if (ratio < 1 - eps || ratio > 1 + eps) {
+				GpxCreator.createGpx("e:/ld/o", shape.getPoints());
+				for (int i = 0; i < outputs.size(); i++) {
+					GpxCreator.createGpx("e:/ld/s_"+i, outputs.get(i).getPoints());
+				}
+				log.error("split failed, ratio:", ratio);
+			} else {
+//				log.error("split worked, ratio:", ratio);
+			}
 			for (MapShape s : outputs) {
 				doFilter(s, next); // recurse as components could still be too big
 			}
Index: src/uk/me/parabola/util/GpxCreator.java
===================================================================
--- src/uk/me/parabola/util/GpxCreator.java	(revision 4735)
+++ src/uk/me/parabola/util/GpxCreator.java	(working copy)
@@ -86,7 +86,7 @@
 	}
 
 	public static void createGpx(String name, List<Coord> points) {
-		for (int i = 0; i < 2; i++){
+		for (int i = 1; i < 2; i++){
 			String fname = name + (i==0 ? "_mu":"_hp");
 			try {
 				File f = new File(fname);
Index: src/uk/me/parabola/util/ShapeSplitter.java
===================================================================
--- src/uk/me/parabola/util/ShapeSplitter.java	(revision 4735)
+++ src/uk/me/parabola/util/ShapeSplitter.java	(working copy)
@@ -380,8 +380,8 @@
 					if (thisLine.direction == 0)
 						thisLine.direction = areaDirection * Long.signum(thisLine.areaToLine);
 		}
-		if (diagMsg != "") {
-			log.warn(diagMsg, "Probably self-intersecting polygon", fullAreaSign, someDirectionsNotSet, areaDirection);
+		if (!diagMsg.isEmpty()) {
+			log.error(diagMsg, "Probably self-intersecting polygon", fullAreaSign, someDirectionsNotSet, areaDirection);
 			for (MergeCloseHelper thisLine : lineInfo) {
 				log.warn(thisLine);
 				if (log.isDebugEnabled())
@@ -471,10 +471,12 @@
 				return cmp;
 			// case where when have same start & end
 			// return the shape as lower than the hole, to handle first
-			cmp = other.areaOrHole - this.areaOrHole;
+//			cmp = other.areaOrHole - this.areaOrHole;
+			// Above is not reliable, there might be an earlier shape. try doing larger area first
+			cmp = Long.compare(this.areaToLine * this.areaOrHole, other.areaToLine * other.areaOrHole);
 			if (cmp != 0)
 				return cmp;
-			log.warn("Lines hit divider at same points and have same area sign", "this:", this, "other:", other);
+			log.error("Lines hit divider at same points and have same area sign", "this:", this, "other:", other);
 			// after this, don't think anthing else possible, but, for stability
 			return this.direction - other.direction;
 		} // compareTo
@@ -644,6 +646,9 @@
 			trailAlong = leadAlong;
 			trailRel = leadRel;
 		} // for leadCoord
+		if (log.isDebugEnabled()) {
+			log.debug("initSplit #points", coords.size(), "on", dividingLine, isLongitude, "Area", runningArea, "#newLess", newLess.size(), "#newMore", newMore.size());
+		}
 		processLineList(newLess, lessList, runningArea);
 		processLineList(newMore, moreList, runningArea);
 	} // splitShape
