[Tilecache] bbox.... is what exactly...?

Bill Levering yidbill at planx.com
Sun Nov 28 03:49:12 EST 2010


What is the bbox in the tilecache config?...

The Tilecache doc says: http://tilecache.org/docs/README.html
   bbox - 'The bounding box of the Layer. The resolutions array  
defaults to having resolutions which are equal to the bbox divided by  
512 (two standard tiles).'

ok... what does that mean?

on the examples page it shows: http://tilecache.org/docs/EXAMPLES.html
bbox=0,0,5889,224 < - not helpful
bbox=0,0,4000,1870 < - not helpful
bbox 
= 
218337.16112593404,889611.9317974453,248183.9359890727,914312.7109945256
... ok... so this must mean it is 2 points SRID:900913 ... Lower Left  
and Upper Right? (why can't the docs just say that?)
With postgis I can get the bounding box with the following sql:
SELECT ST_ASText( ST_Transform( ST_Envelope( polygon ), 900913)  )

which returns 5 points making a closed polygon...
POLYGON((-13624842.5394113 6027232.47650529,-13624842.5394113  
6049819.23154221,-13618287.6395857 6049819
.23154221,-13618287.6395857 6027232.47650529,-13624842.5394113  
6027232.47650529))

So I enter point 1 and 3 like so:
bbox:-13624842.5394113,6027232.47650529,-13618287.6395857,6049819

and... I get the infamous error:

"An error occurred: Current x value -13609460.012119 is too far from  
tile corner x -13605274.660174"

See:
http://osgeo-org.1803224.n2.nabble.com/OpenLayers-Tilecache-Mapserver-limiting-the-maxExtent-td5297429.html

I also matched the bbox with the mapserver extent as per:
http://osgeo-org.1803224.n2.nabble.com/Configuration-of-MapServer-Tilecache-and-Openlayers-Together-SOLVED-td4438807.html
  go the error: 'An error occurred: Current x value -13609460.012119  
is too far from tile corner x -13614025.850622'


so... is the bbox the area that the tilecache is supposed to return  
results? or am I completely off-base and it limits/sets something else?

If I use the following, I at least get results:
bbox=-20037508.34,-20037508.34,20035017.34,20035017.34


At this point I've given up on setting the bbox. But, while seeding  
the _entire world_, I've run into disk space issues...


Very frustrated,
Bill

----

tilecache.cfg:
[geoms]
type=WMSLayer
# for google projection compatibility
srs=EPSG:900913
extension=gif
extent_type=loose
metaTile=true
levels=20
# Bounding box found with: SELECT  
ST_ASText( ST_Transform( getOuterBounds(), 900913)  )
# example result:
# POLYGON((-13624842.5394113 6027232.47650529,-13624842.5394113  
6049819.23154221,-13618287.6395857 6049819.23154221,-13618287.6395857  
6027232.47650529,-13624842.5394113 6027232.47650529))
# use points in this order 1, 3 (ignore 2, 4, 5)
bbox=-20037508.34,-20037508.34,20035017.34,20035017.34
# all google maps resolutions
resolutions=156543.0339,78271.51695,39135.758475000,19567.879237500,9783.939618750,4891.969809375,2445.984904688,1222.992452344,611.496226172,305.748113086,152.874056543,76.437028271,38.218514136,19.109257068,9.554628534,4.777314267,2.388657133,1.194328567,0.59716428337097171575,0.298582142
# google maps max resolution
maxresolution=156543.0339
url=http://mapserver.myserver.com/mapserv?map=/mymap.map&TRANSPARENT=true&
layers=all


Bill Levering
idbill at planx.com
KFP: 0C38 4D7E 5B50 94FE 992D  406D 6C81 DE33 5459 A1AC






More information about the Tilecache mailing list