[Tilecache] threshold

Brent Pedersen bpederse at gmail.com
Tue Mar 13 13:56:57 EDT 2007


On 3/13/07, Eric Lemoine <Eric.Lemoine at camptocamp.com> wrote:
> On 3/12/07, Brent Pedersen <bpederse at gmail.com> wrote:
> > hi, first thanks to the developers for tilecache--and the help on irc.
> > i was having some problems with tiles not showing up. at first i
> > thought it was because of the metaTiling going out of the designated
> > extents. that was not the case.
> >
> > i was able to fix this by digging into Layer.py and setting
> > exact=False in Layer.getCell().
> > however, i think the real problem is with threshold.
> > it is set to .001 which seems fine for lat/lon, but for a scale in
> > meters, .001 is a millimeter (i think)...
> >
> > anyhoo, a quick fix is to set threshold in __init__ as something like:
> >
> > self.threshold = math.abs(bbox[2]/10e4)
> > or
> > (bbox[2] - bbox[0])/10e4
> >
> > havent done enough testing to be sure this is the case, but it seems
> > to have fixed the problems i was seeing.... and it makes sense.
>
> Brent,
>
> I also hit that bug. Your patch partly fixes it as I still get pink
> tiles at certain zoom levels (not the entire view is pink, a few
> tiles).
>

hm. beats me.

if relaxing the threshold more doesnt do it, then there must be
something else contributing. does
self.threshold = (bbox[2] - bbox[0])/10e2
fix things? that's lenient, but at least it might show if the problem
is with the threshold, or somewhere else.



More information about the Tilecache mailing list