[OSM-dev] How to delete metatiles?

Jon Burgess jburgess777 at gmail.com
Sun Jan 16 12:59:51 GMT 2011


On Sun, 2011-01-16 at 03:25 +0100, Frederik Ramm wrote:
> Maybe we should start some sort of general metatile utility, or 
> collection of utilities. Tirex already has at least one such thing, a 
> metatile viewer, that has nothing to do with Tirex itself - it is
> useful 
> for everyone working with metatiles, as would your tool.
> 
> The way I see it, the concept of metatiles is a general concept used
> by 
> (currently) at least three different components - mod_tile, renderd,
> and 
> Tirex. Ideally of course there would be a library that does all the 
> metatile stuff (computing paths and so on) used by everyone, but
> that's 
> maybe too hard because it would have to be usable from so many
> different 
> places.
> 
> I would be interested to hear Jon's opinion about this.
> 

Splitting the meta tile handling code out into a library could be
useful. We already have implementations in C, Perl and Python so we
ought be able to extract a set of typical APIs:

- x/y/z to filename 
- filename to x/y/z
- reading a specific tile, or all meta tiles at x/y/z
- writing a tile specific tile, or all meta tiles at x/y/z
- metadata about a tile: timestamp, x & y bounding box
- is x/y/z a valid tile co-ordinate

The code for the above is fairly standard and should be applicable for
any application wanting to use mata tiles. I would be less certain of
including the next layer of code which would likely come above this:

- lat/lon to tile (and reverse)
- lat/lon bounding box to list of tiles
- scanning the filesystem and returning what tiles are found

I think it should initially be limited to the current OSM/900913 tile
layout but perhaps in the longer term it could also implement a
different tile layout for EPSG:4326.

Other possible enhancements:
- Configurable tile size: 64 pixel etc
- Embed the mime-type in the meta tile, allowing JPG tiles etc
- Support a different directory layout supporting higher zoom levels

   Jon





More information about the dev mailing list