[Tilecache] cells not being calculated correctly for bounding box

Christopher Schmidt crschmidt at metacarta.com
Thu Feb 5 19:25:42 EST 2009


On Thu, Feb 05, 2009 at 04:13:17PM -0800, Andrew Wooster wrote:
> I'm not sure whether it'll help in your situation, but in the  
> TileCache/Layer.py, try changing:
> 
>          x = int(round(x0))
>          y = int(round(y0))
> to:
>          x = int(x0)
>          y = int(y0)
> 
> That fixed some bounding box issues in my configuration.[0]
> 
> -Andrew
> 
> [0] I sent in a patch awhile ago, but got no response. *shrug*

Your patch went to me personally, and not to the list, so it wasn't in
my tilecache inbox. Applied in r385.

> 
> 
> On Feb 5, 2009, at 3:13 PM, Matt Bartolome wrote:
> > Hi,
> > I'm trying to seed a cache with a specific bounding box. Most of my
> > layers honor the extent and seed perfectly however with certain layers
> > tilecache does not calculate the cells correctly and always returns
> > 0,0 which causes tilecache_seed.py to try to seed the entire bbox of
> > the layer intead of my specified one in tilecache_seed.py.
> >
> > Here are some tilecache.cfg examples and tilecache_seed.py commands
> > I'm using. Does anybody know what can cause this issue?
> >
> > #These are a couple that are going nuts:
> > ################################
> >
> > [62971931]
> > layers = 62971931
> > mapfile = mapnik-config/62971931.xml
> > metatile = true
> > srs = epsg:2230
> > metabuffer = 5
> > bbox = 6296999.495,1930999.505,6309000.495,1939000.505
> > debug = false
> > type = Mapnik
> >
> > $ tilecache_seed.py 62971931 10 11
> > "6296999.495,1930999.505,6309000.495,1939000.505"
> > ###### (0, 0, 10), (1024, 683, 10)
> > 10 (000000, 000000) = (6296999.4950 1930999.5050 6297011.2147
> > 1931011.2247) [0.0002s : 1250.005/s] 1/28085
> >
> > [62971923]
> > layers = 62971923
> > mapfile = mapnik-config/62971923.xml
> > metatile = true
> > srs = epsg:2230
> > metabuffer = 5
> > bbox = 6296999.495,1922999.505,6309000.495,1931000.505
> > debug = false
> > type = Mapnik
> >
> > $  tilecache_seed.py 62971923 10 11
> > "6296999.495,1922999.505,6309000.495,1931000.505"
> > ###### (0, 0, 10), (1024, 683, 10)
> > 10 (000000, 000000) = (6296999.4950 1922999.5050 6297011.2147
> > 1923011.2247) [0.0002s : 1838.454/s] 1/28085
> >
> > [62971939]
> > layers = 62971939
> > mapfile = mapnik-config/62971939.xml
> > metatile = true
> > srs = epsg:2230
> > metabuffer = 5
> > bbox = 6124093,1761898.25,6637898,2175848.75
> > debug = false
> > type = Mapnik
> >
> > #These are fine
> > #############
> >
> > $ tilecache_seed.py 62971939 10 11
> > "6296999.495,1938999.505,6309000.495,1947000.505"
> > ###### (345, 353, 10), (369, 369, 10)
> > 10 (000345, 000353) = (6297201.1299 1939020.4814 6297702.8926
> > 1939522.2441) [0.0895s : 11.112/s] 1/20
> >
> > [62731995]
> > layers = 62731995
> > mapfile = mapnik-config/62731995.xml
> > metatile = true
> > srs = epsg:2230
> > metabuffer = 5
> > bbox = 6124093,1761898.25,6637898,2175848.75
> > debug = false
> > type = Mapnik
> >
> > $ tilecache_seed.py 62731995 10 11
> > "6272999.495,1994999.505,6285000.495,2003000.505"
> > ###### (297, 465, 10), (321, 481, 10)
> > 10 (000297, 000465) = (6273116.5205 1995217.9033 6273618.2832
> > 1995719.6660) [0.0486s : 20.352/s] 1/20
> > _______________________________________________
> > Tilecache mailing list
> > Tilecache at openlayers.org
> > http://openlayers.org/mailman/listinfo/tilecache
> 
> _______________________________________________
> Tilecache mailing list
> Tilecache at openlayers.org
> http://openlayers.org/mailman/listinfo/tilecache

-- 
Christopher Schmidt
MetaCarta



More information about the Tilecache mailing list