On Tue, Jul 15, 2008 at 06:21:12PM +0200, spaetz wrote:
> On Tue, Jul 15, 2008 at 05:13:59PM +0100, Andrew McCarthy wrote:
> 
> > One glitch, and I'm not sure if this is happening at the server side or
> > when the client is building the tileset, but I've started to see quite a
> > few "unknown type" tiles, at various zoom levels. For example:
> >     
> > http://www.openstreetmap.org/?lat=52.63473&lon=-8.65818&zoom=17&layers=0B0FFF
> > 
> > Is this a problem with the blankness look-up?
> 
> Actually, I think that is a tah client bug that is starting to appear now. 
> Many tilesets are returned with 0-byte files (which meant delete blankness 
> entry and real tile file in the old server) In the old server this was never 
> seen as the recursive blankness lookup would go up and return whatever 
> blanknessvalue the parent had.
> 
> It does require a look at the tah client and make it return proper blank 
> tiles. If somebody would get to this, I would be very grateful.

Okay, so just to clarify, do you want the client to upload the
emptyland.png or emptysea.png for every blank tile at all zoom levels?
From my understanding of the code, it currently uploads blankness data
only for levels 12 and 15, and zero-byte tiles for the rest when the
"parent" tile is also blank.

If so, deleting lines 1732-1740 and 1745-1752 of tilesGen.pl will do the
trick, I think, as per attached patch. Somebody might like to check it,
first :)

Andrew
Index: tilesGen.pl
===================================================================
--- tilesGen.pl	(revision 9031)
+++ tilesGen.pl	(working copy)
@@ -1729,27 +1729,10 @@
         elsif (not($SubImage->compare($EmptyLandImage) & GD_CMP_IMAGE)) # libGD comparison returns true if images are different. (i.e. non-empty Land tile) so return the opposite (false) if the tile doesn''t look like an empty land tile
         {
             copy("emptyland.png", $Filename);
-            # Change the tile to a zero-length file if it's as blank as the parent
-            # We keep the ones at level 15 so the server fallback never has to go more than 3 levels.
-            if( $Z > 12 and $Z != 15 and not $Config->get("LocalSlippymap") )
-            {
-                my $upfile = tileFilename($layer, ($X * $Size + $xi)>>1, $Ytile>>1, $Z-1);
-                my $upsize = -e $upfile ? -s $upfile : -1;
-                if( $upsize == 0 or $upsize == -s "emptyland.png" )
-                { open my $fh, ">$Filename" }
-            }
         }
         elsif (not($SubImage->compare($EmptySeaImage) & GD_CMP_IMAGE)) # same for Sea tiles
         {
             copy("emptysea.png",$Filename);
-            # Change the tile to a zero-length file if it's as blank as the parent
-            if( $Z > 12 and $Z != 15 and not $Config->get("LocalSlippymap") )
-            {
-                my $upfile = tileFilename($layer, ($X * $Size + $xi)>>1, $Ytile>>1, $Z-1);
-                my $upsize = -e $upfile ? -s $upfile : -1;
-                if( $upsize == 0 or $upsize == -s "emptysea.png" )
-                { open my $fh, ">$Filename" }
-            }
 #            $allempty = 0; # TODO: enable this line if/when serverside empty tile methods is implemented. Used to make sure we                                     generate all blank seatiles in a tileset.
         }
         else

Attachment: signature.asc
Description: Digital signature

_______________________________________________
dev mailing list
[email protected]
http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/dev

Reply via email to