[Tilecache] getting tilecache 1.4 working...

Bill Woodall bwoodall at wardrobe.dhs.org
Sat Feb 24 01:03:09 EST 2007


Hi Adrian,

On Fri, 2007-02-23 at 12:38 -0500, Adrian Zhao wrote:
> Thanks Bill.  That makes a lot of sense to me.  Can I say that seeding
> the cache is to generate some kind of lookup table for TileCache to use
> when serve the client request.  If it finds it in this look up table it
> will use cached image first.  If not it then generated on the fly.
> 
> If this is the case, do you have to refresh the cache seeding regularly?

If the map server data would change, then yes.

> 
> I think we talked about what cache seeding is and if you can tell me
> little bit more about how the cache seeding works that would be even
> greater.

Not sure what you are getting to in "how the cache seeding works", but
I'll give it a try this way;

        At the end of Client.py, you can see the parts of the code to
        seed your cache using Client.py in a stand alone fashion.  From
        the README;
        
        * Set up the tilecache.cfg if you have not already done so in
        one of the
           above configurations
        
         * In /var/www/tilecache/TileCache,  where /var/www/tilecache is
        the
           directory resulting from the code extraction.
        
         * The syntax is in the form of;
        <path to>python ./Client.py <url> <layer> <zoom start> <zoom
        stop> <bbox>
        
           where:
        
           url -- http://example.com/yourdir/tilecache.cgi? or
                  http://example.com/yourdir/tilecache.py
           layer -- same layer name that is in the tilecache.cfg
           zoom start -- Zoom level to start the process
           zoom end -- Zoom level to end the process
           bbox -- The bounding box (see the *** note *** above)
        
          An example with zoom levels 5 through 12 would be like;
/usr/bin/python ./Client.py "http://example.com/yourdir/tilecache.cgi?"
Zip_Codes 5 12 "-118.12500,31.952162238,-116.015625,34.3071438563"
        
          The bbox can be dropped and defaults to world
        lonlat(-180,-90,180,90)
        
/usr/bin/python ./Client.py "http://example.com/yourdir/tilecache.cgi?"
Zip_Codes 9
        

> Thanks,
> Adrian
> 
> -----Original Message-----
> From: Bill Woodall [mailto:bwoodall at wardrobe.dhs.org] 
> Sent: Thursday, February 22, 2007 11:13 PM
> To: Adrian Zhao
> Cc: Schuyler Erle; tilecache at openlayers.org
> Subject: Re: [Tilecache] getting tilecache 1.4 working...
> 
> On Thu, 2007-02-22 at 14:19 -0500, Adrian Zhao wrote:
> > I am assuming that you guys are writing a long reply for my previous
> > message.
> > 
> > Here are two quick questions:
> > 
> > 1. What is the purpose of seeding the cache? 
> 
> Short answer: Responsiveness to the WebClient
> 
> Longer answer:
> A purpose of TileCache is to serve up tiles that were previously
> generated, so the WebClient does not have to sit and wait while the map
> server generates the needed tiles.  If the Map that the WebClient has
> several overlays active at the same time ( which is my case ) and using
> the default buffer (WMS) at 2, then you would have something like 7x8
> tiles x number of Layers. So in my case, 9 layers comes to ~504 tiles
> for the map server to generate taking an average 6 seconds per tile
> compared to the 0.01 second with TileCache.
> 
> > How important?
> 
> It depends, but since TileCache will build the cache as needed, so those
> tiles that will get requested often will only have to be generated once.
> 
> Again in my case, I have 114 zipcodes that a WebClient could request, so
> I seeded 9 layers in 9 zoom levels to have ~1448000 tiles in
> about 6G of disk space.
> 
> I hope that made sense.
> 
> ........Bill,
> 




More information about the Tilecache mailing list