[Tilecache] Mercator calculations ( GMaps ) for tilecache Layer.py

Bill Woodall bwoodall at wardrobe.dhs.org
Sun Mar 25 13:02:24 EDT 2007


On Sun, 2007-03-25 at 07:00 -0500, Christopher Schmidt wrote:
> On Sun, Mar 25, 2007 at 01:34:08AM -0700, Bill Woodall wrote:
> > Hi Christopher, Schuyler, & List
> > 
> > ** Work in Progress **
> > 
> > Attached is the lastest working copy of Layer.py and might not be the
> > best form of python, but it works!   OK, with one small intermittent bug
> > when using MetaTiles which I'm still tracking down :(
> > 
> > To use the code, add a line to your tilecache.cfg in the layer section
> > like;
> > 
> > projtype=mercator
> > 
> > Here is a breakdown of the issues that stop the stock TC from generating
> > tiles for overlays on a Google baselayer;
> > 
> >   * Google does not use square tiles
> >   * Tiles lat changes as you move away from the equator
> >     ( gets smaller as you move away )
> >   * Tiles are number ( decimal degrees ) from North to 
> >     South and West to East
> > 
> > So to address these, here is what is needed to get a Gmaps baselayer and
> > overlays to play nice 
> > *NOTE: I have mainly tested on WMS overlays so you mileage may vary
> 
> Bill:
> 
> Can you give an example request to the backend WMS server when using a
> Mercator projection option?
> 
> Regards,
Christopher

Here is one,

/cgi-bin/wmsveg?layers=Woodland&styles=&service=WMS&width=256&format=image%2Fpng&request=GetMap&height=256&srs=EPSG%3A4326&version=1.1.1&bbox=-118.125%2C53.4375%2C-117.421875%2C54.140625

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




More information about the Tilecache mailing list