[OSM-dev] [PATCH] close-areas.pl: Fix coastline leaving/entering around pi=0

Jeroen Dekkers jeroen at vrijschrift.org
Sat Apr 28 20:25:20 BST 2007


At Sat, 28 Apr 2007 20:57:43 +0200,
Frederik Ramm wrote:
> > I found an interesting cornercase while trying to render tile
> > 2105,1344. The coastline exits as angle 0.49745684251941 and enters at
> > 6.27805519711706. The current code checks whether the exit angle is
> > smaller and draws a way all around the box if it is, but fails to
> > check whether this is because it crosses boundary of 0 and 2*pi(). 
> 
> It seems I broke that when I "fixed" the bug where islands open on the 
> right hand side weren't closed properly. The special handling with 
> ...<pi() ... >pi() was intended to catch that but it seems it doesn't.
> 
> Are you reasonably sure that your patch does not break anything else ;-)
>
> I'll apply it and we will see. Trigonometry makes my head go round.

I already committed the patch after testing it for some time. I've
have rendered a lot of coast tiles and didn't see any problems yet
(I'm busy fixing the coast of the Netherlands). I've also tested that
the case of islands being open on the right side still works fine.

Jeroen Dekkers




More information about the dev mailing list