[PATCH v1] - provide alternative sea drawing mechanism

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

Mark Burton wrote:
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
Hurrah! Does this also mean that, with suitable definition of the polygon used for land, we can finally banish the "Garmin yellow" background to history? -- Charlie

Hello Charlie,
Hurrah! Does this also mean that, with suitable definition of the polygon used for land, we can finally banish the "Garmin yellow" background to history?
Yes (and no). You can give the "land" polygon whatever colour you desire. However, at the moment, the patch doesn't generate "land" polygons for tiles that contain no sea so you will end up with different colour land depending if the tile contains sea or not. Mapsource and some GPS units honour the colour in the 0x4b (Map background) polygon but not all do (like the Nuvi). I am just making a v3 patch that will generate a "land" polygon for tiles that have no sea as long as --generate-sea=no-mp has been specified. I realise that it is perverse that the land colour is influenced by --generate-sea. Cheers, Mark

On 12/30/2009 10:17 PM, Mark Burton wrote:
Mapsource and some GPS units honour the colour in the 0x4b (Map background) polygon but not all do (like the Nuvi).
My Nuvi 255T does show the white background using my topo map.

On 12/30/2009 10:49 PM, Mark Burton wrote:
My Nuvi 255T does show the white background using my topo map.
My 255W ignores any colour change on the 0x4b polygon.
Have you tried setting the polygon 0x10d "Basemap coverage area (background)" to white, too?

Ralf Kleineisel wrote:
On 12/30/2009 10:49 PM, Mark Burton wrote:
My Nuvi 255T does show the white background using my topo map. My 255W ignores any colour change on the 0x4b polygon.
Have you tried setting the polygon 0x10d "Basemap coverage area (background)" to white, too? _
I've tried that and it makes no difference on my GPSMap. -- Charlie
participants (3)
-
Charlie Ferrero
-
Mark Burton
-
Ralf Kleineisel