[Tilecache] Virtual Earth compatible TC-cache
Steven M. Ottens
steven at minst.net
Tue Feb 12 09:48:19 EST 2008
Hi all,
Once I finished it, I realised that it is actually quite a useless piece
of code. There is hardly any asiteuation where you want to store the
cache inside TC as VE-tiles without exposing them to the outer world. So
I decided to write a service instead. The will take a request with a
quadkey and calculate the row and column in epsg:900913:
A typical request would be
http://steef/tilecache.py?ve=true&layer=hoogtes&tile=120
where ve=true triggers the VETMS service in Service.py
layer=hoogtes gives yoou the layer
tile=120 gives you the quad key number.
120 in this case means z= 3, x=4 and y=5
In virtual earth you can add a tilecache-based layer this way:
var tileSourceSpec = new VETileSourceSpecification("ahn",
"http://steef/tilecache.py?ve=true&layer=hoogtes&tile=%4");
Once again the only reason why you want to use this is if you're somehow
stuck with the VE-client, instead of a more friendly one like OpenLayers.
Attached the VETMS service also you need to add the following lines to
Service.py
elif params.has_key("ve") and \
params['ve'] == "true":
from TileCache.Services.VETMS import VETMS
tile = VETMS(self).parse(params, path_info, host)
just above:
else:
from TileCache.Services.TMS import TMS
tile = TMS(self).parse(params, path_info, host)
(line 173)
Regards,
Steven
Steven M. Ottens wrote:
> Hi all,
>
> For those lost souls who want to create a cache which is directly
> compatible with the virtual earth client I've attached a modified
> disk.py, renamed to VE.py. It is written for TC 2.01 and should be put
> in the <tilecache>/Cache folder.
>
> Some information on the VE compatible cache structure:
> http://msdn2.microsoft.com/en-us/library/bb259689.aspx
>
> This VE cache is a flat file structure, which means that you need a
> filesystem that can handle thousands of files in a directory. To be
> honest the only reason why you would want to do this is so you can
> directly add a dataset in virtualearth using the new
> VETileSourceSpecification
> and have the files available in a web-accessible directory. The next
> step will be to add a VE layer so you can use tilecache to dynamically
> generate the VE-tiles.
>
> The reason why you want to create VE-specific tiles is to be able to
> view them in 3D (inside the VE viewer).
>
> Regards,
> Steven
> ------------------------------------------------------------------------
>
> _______________________________________________
> Tilecache mailing list
> Tilecache at openlayers.org
> http://openlayers.org/mailman/listinfo/tilecache
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: VETMS.py
Url: http://openlayers.org/pipermail/tilecache/attachments/20080212/4c5d59c9/attachment.txt
More information about the Tilecache
mailing list