[OSM-talk] Lakes and relations, what did I break?
Dermot McNally
dermotm at gmail.com
Mon Apr 21 02:22:17 BST 2008
On 21/04/2008, Frederik Ramm <frederik at remote.org> wrote:
> It seems the problem is close-areas related after all.
Ha! ;)
> Close-areas uses a tile index to find out what to do when it
> encounters a tile with *no* coastline at all (and your tiles do not
> have coastline on them). The tile index may indicate either land, sea,
> or "mixed". It returns "mixed" for your tiles. I am leaning towards
> changing this into "land" because your tiles are, from a "the coast of
> Ireland" perspective, clearly inland...
That feels to me like the right solution. Having them default to land
would basically say "render me white if empty" (not that they are) and
"use a white background" otherwise. And even if they do gain some
coastline, come global warming, close-areas should make the water
appear in the right place.
> My initial implementation of close-areas did create a blue background
> only if the tile index indicated "sea". It seems that meanwhile
> someone has added code to "guess" the background colour in cases where
> the tile index indicates "mixed". The guessing goes like this:
>
> * if none of the four tiles to the east/west/north/south of the tile
> is marked "land", then draw a blue background;
And bingo, this will be triggered for most of them at least. The
reasoning must have been that you should have only one row or column
of mixed tiles on the transition from land to coast. And, to be fair,
when there _was_ coastline in these tiles, it worked well. Now that
there isn't, it's not really valid to call them mixed anyway. I'll
mark those as land that have no coastline at all, since that's what
"land" was supposed to mean anyway.
Thanks for rummaging - I would have had to do a lot of head-scratching
before I started looking at the tile index.
Dermot
More information about the talk
mailing list