However, there is still a problem in that with your v3 patch in place,
I no longer get any sea polygons visible when I use
generate-sea=polygons. I wonder if the change you made to the size of
the sea polygons is responsible for that? Could you please change that
code so that it only produces the over-large sea background when
generateSeaUsingMP is true?

Attached patch (against the mp branch) solves this.

WanMil
Index: src/uk/me/parabola/mkgmap/reader/osm/xml/Osm5XmlHandler.java
===================================================================
--- src/uk/me/parabola/mkgmap/reader/osm/xml/Osm5XmlHandler.java        
(revision 1487)
+++ src/uk/me/parabola/mkgmap/reader/osm/xml/Osm5XmlHandler.java        
(working copy)
@@ -1265,16 +1265,29 @@
                if (generateSeaBackground) {
                        seaId = FakeIdGenerator.makeFakeId();
                        sea = new Way(seaId);
-                       // the sea background area must be a little bigger than 
all
-                       // inner land areas. this is a workaround for a mp 
shortcoming:
-                       // mp is not able to combine outer and inner if they 
intersect
-                       // or have overlaying lines
-                       // the added area will be clipped later by the style 
generator (?)
-                       sea.addPoint(new 
Coord(nw.getLatitude()-1,nw.getLongitude()-1));
-                       sea.addPoint(new 
Coord(sw.getLatitude()+1,sw.getLongitude()-1));
-                       sea.addPoint(new 
Coord(se.getLatitude()+1,se.getLongitude()+1));
-                       sea.addPoint(new 
Coord(ne.getLatitude()-1,ne.getLongitude()+1));
-                       sea.addPoint(new 
Coord(nw.getLatitude()-1,nw.getLongitude()-1));
+                       if (generateSeaUsingMP) {
+                               // the sea background area must be a little 
bigger than all
+                               // inner land areas. this is a workaround for a 
mp shortcoming:
+                               // mp is not able to combine outer and inner if 
they intersect
+                               // or have overlaying lines
+                               // the added area will be clipped later by the 
style generator
+                               sea.addPoint(new Coord(nw.getLatitude() - 1,
+                                               nw.getLongitude() - 1));
+                               sea.addPoint(new Coord(sw.getLatitude() + 1,
+                                               sw.getLongitude() - 1));
+                               sea.addPoint(new Coord(se.getLatitude() + 1,
+                                               se.getLongitude() + 1));
+                               sea.addPoint(new Coord(ne.getLatitude() - 1,
+                                               ne.getLongitude() + 1));
+                               sea.addPoint(new Coord(nw.getLatitude() - 1,
+                                               nw.getLongitude() - 1));
+                       } else {
+                               sea.addPoint(nw);
+                               sea.addPoint(sw);
+                               sea.addPoint(se);
+                               sea.addPoint(ne);
+                               sea.addPoint(nw);
+                       }
                        sea.addTag("natural", "sea");
                        log.info("sea: ", sea);
                        wayMap.put(seaId, sea);
_______________________________________________
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Reply via email to