[Tilecache] Internal organisation

Steven M. Ottens steven at minst.net
Wed Oct 7 04:22:20 EDT 2009


Hi Antoni,

The default structure is defined by this:

   components = ( self.basedir,
                        tile.layer.name,
                        "%02d" % tile.z,
                        "%03d" % int(tile.x / 1000000),
                        "%03d" % (int(tile.x / 1000) % 1000),
                        "%03d" % (int(tile.x) % 1000),
                        "%03d" % int(tile.y / 1000000),
                        "%03d" % (int(tile.y / 1000) % 1000),
                        "%03d.%s" % (int(tile.y) % 1000,  
tile.layer.extension)
                     )

Meaning:
1st directory: layername
2nd directory: zoomlevel (in 2 digits eg. 01)
the 3rd-5th directory are the columnnumber (x), split into thousands:
-if you have x = 018782353 you get
   3rd: directory 018
   4th directory: 782
   5th directory: 353
the 6th and 7th and the filename are the row numbers (y) split into  
thousands:
-if you have y = 786 347 862 you get
   6rd: directory 786
   7th directory: 347
   filename: 862
and you end with the filetype

So you end up with:
layername/01/018/782/353/786/347/862.filetype

The actual number of rows, columns and zoomlevels depend on the  
tileschema you are using. The reason for splitting the rows and  
columns in a three deep directory structure is because certain  
filesystems cannot handle large amounts of files in a directory. Also  
there are different caching-backends, including a more simple  
approach like layer/z/x/y.filetype

Regardds,
Steven



On Oct 7, 2009, at 9:38 AM, Vidal, Antoni wrote:

> Hello,
>
>
>
> I’m new on tilecahe and I would like to understand the internal  
> organisation of tiles. My porpouse is to study the possibility of  
> change WMS request to an application that cut the original map  
> image in the litle tiles.
>
>
>
> Our organisation is going to increase the number of actualizations  
> of tilecache and requests to WMS server are too slow.
>
>
>
> Any help will be appreciate.
>
>
>
> Antoni Vidal
>
> Unitat d'Aplicacions SIG-WEB
> Institut Cartogràfic de Catalunya
> Parc de Montjuïc, E-08038 Barcelona
> Tel. (+34) 93 567 15 00 (ext. 3228)
> www.icc.cat
>
>
>
>
>
>
>
> _______________________________________________
> Tilecache mailing list
> Tilecache at openlayers.org
> http://openlayers.org/mailman/listinfo/tilecache





More information about the Tilecache mailing list