[Tilecache] TileCache and The GDAL WMS-C Driver

Christopher Schmidt crschmidt at metacarta.com
Thu Dec 6 15:09:32 EST 2007


On Thu, Dec 06, 2007 at 10:00:44AM -0700, Christopher Helm wrote:
> Thanks for the response. I was able to get it working by specifying an outsize in the gdal_translate call. My system was trying to create an image that was 268435456 by 134217728 (a little too big). So now everything works for the "basic" layer in my local tilecache. But I'm not understanding where the SizeX and SizeY (268435456 and 134217728, respectively) are coming from in the GDAL XML file. Is there an intuitive way to compute these for a given bounding box?

Intuitive? Hah! :)

The size is based on the width/height in pixels of the level 0 zoom, 
times 2 ^ zoomLevels:

  512 * 2 ^ 19 -> 268435456
  256 * 2 ^ 19 -> 134217728

> If so, I have a box of:
> 
> <UpperLeftX>-111.27814</UpperLeftX>
> <UpperLeftY>45.55317</UpperLeftY>
> <LowerRightX>-94.60116</LowerRightX>
> <LowerRightY>36.43102</LowerRightY>

Are you letting TileCache calculate the maxresolution automatically? You
should make it such that your box is evenly divisible by your
maxResolution in *both* directions (which may take some tweaking). Then
calculate your sizes as described above: doing these two things should
get you much closer. Once you do that, let us know, and share your
TileCache config, and we can continue.  

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Tilecache mailing list