OpenStreetMap

Tiles At Home lowzoom

Posted by amillar on 9 June 2008 in English.

I've learned a lot in the last week. I've become interested (obsessed?) with cleaning up the lowzoom levels. It appears that the addition of the captionless layer is a relatively recent change, and therefore most of it is missing. The main "tile" layer has been around a while, but as tiles in the lowzoom layers are rebuilt, they are pulling in a lot of garbage from the missing areas in the captionless layer. I understand that this will fix itself over time, but at the way things look, that could be years. It needs a boost.

The primary problem with the lowzoom builds is that when a tile is missing, the server returns a tile with "unknown type" on it. This is a good thing for the server to do when it has no other information, but in this extended transition period it makes for ugly maps.

The component tiles are in the z12 build request queue, but there are probably hundreds of thousands of them in there (just guessing). In the mean time, almost anything is better than the unknown tiles. I have started copying some land tiles from the main tile layer into the captionless layer, to fill in as a stop-gap. Yes, they will have little captions scrunched down, but it really is better than nothing. As long as the tiles are still in the request queue, they will get properly fixed later. I think it makes a good interim solution.

The problem is that there are sooooo many tiles. The total possible tiles in 17 zoom levels is 68 billion. Most of those are sea, which won't need anything smaller than z12 and rarely below z8. Even without that, there are about 3 million land tiles at z12, and I think about 10000 at z8. That's a lot of tiles to update. Fortunately most of Greenland and Siberia don't need anything more than blank land.

I took the oceantiles_12.png file and broke it down recursively to find the most efficient set of blank tiles to put into the captionless layer. I uploaded levels 3 through 9 for both land and sea. Now I'm uploading 10 and 11, for sea only. Obviously as the tiles get smaller, the number of them increases quickly. It takes a lot of little z10 and z11 tiles to fit in around the edges of the bigger z8 and z9 tiles. I'm doing a higher level of detail on the sea tiles because they are unlikely to change, while the land ones will likely change as roads and features are mapped.

The big bottleneck currently is the upload process. Although the server upload queue already throttles automatically, I'm still competing for a limited resource with the other normal z12 render updates. So I'm throttling mine also. It is going to take days to finish uploading the z10 and 11 blanks. But that's OK because it would have taken them months or longer to get cleaned up through normal render requests.

Sometimes I wonder why I bother with this when Mapnik seems so much more efficient. I think it is because this is a fascinating data management problem which I can work on directly and actually help out. I find that part satisfying.

Discussion

Comment from Andy Allan on 9 June 2008 at 23:05

I come from a mapnik background, so I'm biased in this - but I'd say give it a shot, it's really satisfying how much one person can get done with it.

Comment from spaetz on 10 June 2008 at 08:47

> The problem is that there are sooooo many tiles. The total possible tiles in 17 zoom levels is 68 billion.

You don't need to update all of them as the blankness lookup is recursive. So if you set all 16mio possible z12 tiles to blank sea, that would be enough for all the z13-z18 tiles to also show up as blank sea.

Comment from spaetz on 10 June 2008 at 08:50

Allan, if oyu upload just the right z6 blank, z7 blanks, etc at the lowest possible level, you will be finished much quicker.

Also, I don't know whether the web upload form doesn't skip the throttled upload queue. You might want to try it: http://tah.openstreetmap.org/Upload/

Comment from spaetz on 10 June 2008 at 08:51

Ahh, I see that you are doing it at the lowest possible level already. Thanks, much appreciated

Log in to leave a comment