[PATCH v3] - provide alternative sea drawing mechanism

v3 - generate land poly even if tile doesn't contain any sea (when --generate-sea=no-mp is specified) so that GPS units that ignore the colour of the background poly (0x4b) don't the wrong background colour. --------- v2 - avoid generating sea poly when unclipped tile contains coastline but the clipped tile contains no coastline. --------- Firstly, I would like to thank everyone who responded to my "Understanding the sea" post. From those posts and my own study, I finally worked out what it does. And yes, it works pretty well inasmuch that it generates some useful polygons. The "sea sector" heuristic doesn't work for me so I have been disabling it. The problem is, the end result is "butt ugly". Our MP implementation really can't do a good job on zillions of little islands. After frigging around for a couple of days trying to improve the visual quality, I tried the obvious alternative technique of not using a MP but, instead, just having a sea background and then put the land on top using plain polygons. Guess what? It works very nicely as the attached pics show. I now have a splendid map of the Baltic area (OK it's weird at the edges but that's not a problem for now). Here's the (future) commit comment for this patch: Provide an alternative to using a multipolygon when generating the sea. The --generate-sea option can now take a comma separated list of values: no-mp - don't generate the sea using a multipolygon - instead, generate a background sea polygon and then individual land polygons with tag natural=land. This requires a suitable land polygon type to be defined in the style file (suggested type is 0x010100) and the polygon must be defined in the TYP file as having a higher drawing level than the sea polygon type. no-sea-sectors - disable the generation of "sea sectors" when the coastline fails to reach the tile's boundary. With no values specified, the --generate-sea option should work as before. Oh yes, this patch doesn't include it, but I am also disabling the DP code for polygons as it makes them weird. Cheers and thanks again for the helpful postings. Mark

Thanks! My archipelago is now OK. In my style file I added this: natural=land [0x27 resolution 10] in the typ file draw priority: 0x32 = 1 0x27 = 2 all others = 3 and up I compiled the map using the --generate-sea=no-mp switch and all my problem islands (not sure if everything is OK) appears. Compilation took 2 minutes compared to the usual 118 min :) On Thu, Dec 31, 2009 at 6:02 AM, Mark Burton <markb@ordern.com> wrote:
v3 - generate land poly even if tile doesn't contain any sea (when --generate-sea=no-mp is specified) so that GPS units that ignore the colour of the background poly (0x4b) don't the wrong background colour.
---------
v2 - avoid generating sea poly when unclipped tile contains coastline but the clipped tile contains no coastline.
---------
Firstly, I would like to thank everyone who responded to my "Understanding the sea" post. From those posts and my own study, I finally worked out what it does. And yes, it works pretty well inasmuch that it generates some useful polygons. The "sea sector" heuristic doesn't work for me so I have been disabling it.
The problem is, the end result is "butt ugly". Our MP implementation really can't do a good job on zillions of little islands.
After frigging around for a couple of days trying to improve the visual quality, I tried the obvious alternative technique of not using a MP but, instead, just having a sea background and then put the land on top using plain polygons. Guess what? It works very nicely as the attached pics show. I now have a splendid map of the Baltic area (OK it's weird at the edges but that's not a problem for now).
Here's the (future) commit comment for this patch:
Provide an alternative to using a multipolygon when generating the sea. The --generate-sea option can now take a comma separated list of values: no-mp - don't generate the sea using a multipolygon - instead, generate a background sea polygon and then individual land polygons with tag natural=land. This requires a suitable land polygon type to be defined in the style file (suggested type is 0x010100) and the polygon must be defined in the TYP file as having a higher drawing level than the sea polygon type.
no-sea-sectors - disable the generation of "sea sectors" when the coastline fails to reach the tile's boundary.
With no values specified, the --generate-sea option should work as before.
Oh yes, this patch doesn't include it, but I am also disabling the DP code for polygons as it makes them weird.
Cheers and thanks again for the helpful postings.
Mark
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
-- cheers, maning ------------------------------------------------------ "Freedom is still the most radical idea of all" -N.Branden wiki: http://esambale.wikispaces.com/ blog: http://epsg4253.wordpress.com/ ------------------------------------------------------

Hi Manning,
Thanks! My archipelago is now OK.
Great, can you post a sample picture?
In my style file I added this: natural=land [0x27 resolution 10]
in the typ file draw priority: 0x32 = 1 0x27 = 2 all others = 3 and up
Very good - I did not know that 0x27 was land, it's not listed in my various docs.
I compiled the map using the --generate-sea=no-mp switch and all my problem islands (not sure if everything is OK) appears. Compilation took 2 minutes compared to the usual 118 min :)
Yes, the MP code was rather slow for big polys. Cheers, Mark

Sure! See attached On Thu, Dec 31, 2009 at 5:18 PM, Mark Burton <markb@ordern.com> wrote:
Hi Manning,
Thanks! My archipelago is now OK.
Great, can you post a sample picture?
In my style file I added this: natural=land [0x27 resolution 10]
in the typ file draw priority: 0x32 = 1 0x27 = 2 all others = 3 and up
Very good - I did not know that 0x27 was land, it's not listed in my various docs.
No, it's undocumented according to gentyp so I used it as a hack :)
I compiled the map using the --generate-sea=no-mp switch and all my problem islands (not sure if everything is OK) appears. Compilation took 2 minutes compared to the usual 118 min :)
Yes, the MP code was rather slow for big polys.
Cheers,
Mark _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
-- cheers, maning ------------------------------------------------------ "Freedom is still the most radical idea of all" -N.Branden wiki: http://esambale.wikispaces.com/ blog: http://epsg4253.wordpress.com/ ------------------------------------------------------
participants (2)
-
maning sambale
-
Mark Burton