On Wed, May 7, 2008 at 12:08 AM, Iván Sánchez Ortega <[EMAIL PROTECTED]> wrote: > El Martes, 6 de Mayo de 2008, Martijn van Oosterhout escribió: > > Given a set of closed rings that don't cross you can unambiguously > > draw a polygon with it. > > False. Counter-example: coastline. > > Given a complete set of coastline polygons (e.g. VMAP0), and somehow removing > the clockwiseness of them, please have your computer tell me if Australia is > either an island or a lake.
Actually, given VMAP0 polygon's don't wrap at 180 degrees, it really isn't that hard. That's why we use VMAP0 without difficulty for lowzoom levels. Pick a point in Australia, determine how many polygons it is in. Odd=land, even=sea. If you wanted to be smart you need one reference point, say (0,0)=sea and work it out from there using a line crossing algorithm. I actually wrote code like that but coding the coastline checker was far more interesting and challanging (delete 1% of segments randomly, now decide what is land/sea!). Yes, I suppose it's a nice coincidence that our projection makes it impossible to draw a polygon and accedently say everything except this is foo, but I don't have a problem with taking advantage of that. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ _______________________________________________ dev mailing list [email protected] http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/dev

