[Tilecache] using OpenLayers offline via TileCache?

Bill Woodall bwoodall at wardrobe.dhs.org
Fri Feb 23 23:59:59 EST 2007


On Thu, 2007-02-22 at 05:45 -0500, Fowlkes, Daniel G NETCOM-ARMY GNOSC
wrote:
> I need to be able to use OpenLayers when offline.  Is it possible to do
> this by dropping WorldWind cache packs into TileCache run locally?
> Thank you.

Hi Dan,

Not directly, at least an additional layer in Layer.py would have to
written.  Another approach could be to convert the WorldWind structure
over to TileCache ( see below).

What I saw of WorldWind cache, their tile structure is like;

        Description		Example
        <layer name>		"Clementine 40xx"
        <zoom>			"0"
        <lon>			"0000"
        <lon>_<lat>.<extension>	"0000_0004.jpg"

but the cache structure for TC is like;

        Description		Example
        <layer name>		"Zip_Codes"
        <zoom>			"9"
        <x1>			"000"		tile.x / 1000000
        <x2>			"000"		(tile.x / 1000) % 1000
        <x3>			"089"		tile.x % 1000
        <y1>			"000"		tile.y / 1000000
        <y2>			"000"		(tile.y / 1000) % 1000
        <y3>.<extension>	"205.png"	tile.y % 1000

	where x = lon, y = lat

So the tile path would be something like;
        <base path to cache>/Zip_Codes/9/000/000/089/000/000/205.png
        
The tile x & y values are calculated from 
bbox / (resolution * tile size)

I hope that helps some

..........Bill,




More information about the Tilecache mailing list