[Tilecache] threshold

Eric Lemoine Eric.Lemoine at camptocamp.com
Wed Mar 14 04:21:28 EDT 2007


On 3/13/07, Brent Pedersen <bpederse at gmail.com> wrote:
> 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.

It's worse with 10e2 than 10e4.

Let me sum up:

 - with 0.001: baselayer is ok, overlay is pink tiles only for most of
zoom levels. Beyond a certain zoom level the overlay displays
correctly.

 - with (bbox[2] - bbox[0])/10e4: baselayer is ok, overlay displays
correctly for most zoom levels. At maximum zoom out I have pink tiles
on the left of the viewport.

- with (bbox[2] - bbox[0])/10e2: baselayer doesn't show up, I get a
white image instead !

Thanks,
-- 
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine at camptocamp.com
http://www.camptocamp.com



More information about the Tilecache mailing list