[OpenLayers-Users] OT: TileCache problems...

Christopher Schmidt crschmidt at metacarta.com
Fri Jan 26 06:32:14 EST 2007


On Thu, Jan 25, 2007 at 10:45:04AM -0700, Corey Puffalt wrote:
> Hi...
> 
> I've been unable to find a mailing list dedicated to TileCache (
> http://labs.metacarta.com/wms-c/) but I've noticed other people posting
> questions about it here as well so I hope no one minds.
> 
> I'm trying to get a system working with an OpenLayers front end, GeoServer
> on the backend with a tile cache in the middle.  I chose TileCache because
> of its nifty meta-tiling feature which makes labelled layers look *much*
> better (by turning the 256x256px OpenLayers tile requests into larger
> requests).
> 
> OpenLayers and GeoServer work just fine together but once I add TileCache to
> the equation things get nutty:
> 
> a) My first issue is that some of the tiles outside the normal bbox of my
> layer are rendered strangely.  The first tile to the left of the bbox of the
> layer appears to be a duplicate of the one to the right.  The tiles below
> the normal bbx of the layer appear to be duplicates (for the most part) of
> the tiles above.  This behavior persists with metaTiling on or off.
> Everything looks fine without TileCache.

That's an interesting problem. When you right click on the misbehaving
tiles, do they appear to be tiles which simply got placed in the wrong
place by OpenLayers? Which version of OL are you using? If it's 2.3-rc2,
you might be running into http://trac.openlayers.org/ticket/480 .

> b) The second issue is that with metaTile=true I start seeing broken
> images.  Some tiles render fine (though with the same problem above when
> outside the bbox boundary) but others are broken.  The error that TileCache
> reports for the broken images is:
> 
> An error occurred: Zero length data returned from layer.
>  File "/stuff/tilecache-1.3/TileCache/Service.py", line 399, in
> modPythonHandler
>    host )
> 
>  File "/stuff/tilecache-1.3/TileCache/Service.py", line 384, in 
>  dispatchRequest
>    return self.renderTile(tile, params.has_key('FORCE'))
> 
>  File "/stuff/tilecache-1.3/TileCache/Service.py", line 363, in renderTile
>    else: raise Exception("Zero length data returned from layer.")
> 
> I added some debug statements to the TileCache code in order to determine
> the actual map request it was making to GeoServer.  When I make the same
> request to GeoServer it returns the image just fine so I'm not sure what the
> actual problem is.

If you look at the GeoServer logs, do you see anything which indicates
that here might have been something going awry? typically, what this
means is "I made a request, and got nothing back", which often happens
in error conditions. Because TileCache will generate images outside the
bounding box of the layer, it's possible that GeoServer is sayin "no
thanks" -- do these issues go away as you zoom in farther?

> The URLs being generated by TileCache with metatiling turned on weren't
> quite what I was expecting.  Specifically the width and height are strange
> values.  I'm using 256x256px tiles and using the default meta* options in
> TileCache and it's turning my 256x256px tile requests into requests of
> 1300x532px size.  Can anyone explain that to me?

TileCache sends requests for tile area that is 10px more on each side (a
'buffer') and then removes that buffer later. The result is that at your
default Resolution, you are seeing a request that is 5 tiles wide
(because 4 tiles won't cover your area horizontally) and 2 tiles high
(because it will vertically) and 10px extra all around.


I'm sorry I can't be more help: your message is informative, but I just
don't have anything off my head to help you with. It seems like
everything should be working... and it isn't.

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list