[Tilecache] RV: Internal organisation

Vidal, Antoni antoni.vidal at icc.cat
Wed Oct 7 07:14:48 EDT 2009


Hi Steven,

Thank's for your answer, but I think that is not exactly my case. Maybe because We use an old version of Tilecache, it seems 2.8.

My tilecache.cfg has the following entries. Pay attention to bbox in UTM (meters):

bbox=258000,4485000,536000,4752000
srs=EPSG:23031
resolutions=1100,550,275,100,50,25,10,5,2,1,0.5

And the structure I get running tilecache in example, level 7:

Topo/07/000/000/000 untill 215/000/000/number.jpg

Only that 5th directory changes her name and contains, always, 2 directories more and the last contains images.

If I supose that there are 216 columns (5th. Directory) 216 columns multiplyed by 256 px = 55269 multiplyed by 5 meters/px = 276480 meters. This is good because east minus west = 536000 - 258000 = 278000, almost the same.

Best Regards,

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
 


-----Missatge original-----
De: Steven M. Ottens [mailto:steven at minst.net] 
Enviat: miércoles, 07 de octubre de 2009 10:22
Per a: Vidal, Antoni
A/c: tilecache at openlayers.org
Tema: Re: [Tilecache] Internal organisation

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