[Tilecache] tilecache_seed error, wrong bbox?

Enrico Sartorello enrico.sartorello at gmail.com
Wed Jul 15 06:19:29 EDT 2009


Hi all,
i'm trying to get tilecache_seed working, but i have a problem.

I'm using tilecache 2.10, with that layer specified in tilecache.cfg:

[picture]
type=GDAL
file=image.tif
filebounds= -180,-90,180,90

Let's say i wanna force recaching, with tilecache_seed, of the zoom levels
0, 1, 2. Here's what happens:

$ ./tilecache_seed.py picture 0 2 -f
###### (0, 0, 0), (2, 1, 0)
Cache miss: -180.0,-90.0,0.0,90.0, Tile: x: 0, y: 0, z: 0, time:
1.39069890976
00 (000000, 000000) = (-180.0000 -90.0000 0.0000 90.0000) [1.3908s :
0.719/s] 1/2
Cache miss: 0.0,-90.0,180.0,90.0, Tile: x: 1, y: 0, z: 0, time:
1.35869908333
00 (000001, 000000) = (0.0000 -90.0000 180.0000 90.0000) [1.3588s : 0.727/s]
2/2
Cache miss: 180.0,-90.0,360.0,90.0, Tile: x: 2, y: 0, z: 0, time:
0.0159740447998
00 (000002, 000000) = (180.0000 -90.0000 360.0000 90.0000) [0.0161s :
1.085/s] 3/2
Traceback (most recent call last):
  File "./tilecache_seed.py", line 9, in <module>
    TileCache.Client.main()
  File "/var/www/tilecache-2.10/TileCache/Client.py", line 162, in main
    seed(svc, layer, map(int, args[1:3]), bboxlist ,
padding=options.padding, force = options.force, reverse = options.reverse)
  File "/var/www/tilecache-2.10/TileCache/Client.py", line 117, in seed
    svc.renderTile(tile,force=force)
  File "/var/www/tilecache-2.10/TileCache/Service.py", line 138, in
renderTile
    data = layer.render(tile, force=force)
  File "/var/www/tilecache-2.10/TileCache/Layer.py", line 443, in render
    return self.renderTile(tile)
  File "/var/www/tilecache-2.10/TileCache/Layers/GDAL.py", line 123, in
renderTile
    im = PIL.Image.fromarray(array)
  File "/usr/lib/python2.5/site-packages/PIL/Image.py", line 1861, in
fromarray
    return frombuffer(mode, size, obj, "raw", mode, 0, 1)
  File "/usr/lib/python2.5/site-packages/PIL/Image.py", line 1806, in
frombuffer
    return apply(fromstring, (mode, size, data, decoder_name, args))
  File "/usr/lib/python2.5/site-packages/PIL/Image.py", line 1745, in
fromstring
    im.fromstring(data, decoder_name, args)
  File "/usr/lib/python2.5/site-packages/PIL/Image.py", line 572, in
fromstring
    d.setimage(self.im)
ValueError: tile cannot extend outside image

It seems the last cache miss, the one which raises the exception, have a
completely wrong bbox: (180.0,-90.0,360.0,90.0), even if my layer's bbox is
correctly specified as (-180,-90,180,90) in tilecache.cfg.
The same problem arises in a lot of other situations, every time caused by
(in my humble opinion) a request to a wrong bbox.

Could you please help me? Am i doing something wrong?

Best regards,

-- 
Enrico Sartorello
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/tilecache/attachments/20090715/23d91de8/attachment.html


More information about the Tilecache mailing list