[ka-Map-users] Script for creating image tiles

Daniel Morissette dmorissette at dmsolutions.ca
Tue May 24 14:12:51 EDT 2005


All you need to prepopulate the ka-map cache is a loop that calls 
tile.php once for each metatile and the rest happens by magic. I think 
referencing a repository of existing tiles is a different problem.

I think Paul started working on a precache.php script but I'm not sure 
if it was complete.

FWIW, I used the following bash command on a Linux server to regenerate 
all existing tiles from an existing cache (and for a given scale) after 
a change to the mapfile. You may need to do a little bit of work to make 
it generic:

$ scale=20000; map=gmap; for tileid in `find 
/path/to/kacache/$map/$scale -name "t*" -type d -printf "%f "`; do wget
"http://your.host/url/tile.php?map=$map&tileid=$tileid&w=200&h=200&s=$scale&force=1"
-O ttt.png; rm ttt.png; done

The advantage of using something like this is that you regenerate only 
the tiles that were already in the cache, and are the most likely to 
ever be used by your visitors, saving you disk space and processing time.

Daniel


Steve Lime wrote:
> I imagine work would need to be done to make the code work from the
> pre-computed pile of images- that is, it's not enough to just create
> them you have to have a way to reference them. I have 300,000 quad map
> tiles I'd love to leverage with a ka-map frontend...
> 
> Steve
> 
> 
>>>>Armin Burger <armin.burger at gmx.net> 5/24/2005 12:13:48 PM >>>
> 
> Hello,
> 
> is anybody already working on a script that can create, ie.
> pre-process, all the image tiles so that they do not have to be created
> first when a user zooms to this extent/zoom level? Would be nice
> especially if one modifies the map file.
> 
> Armin
> 


More information about the ka-Map-users mailing list