[Tilecache] problems getting tilecache.cfg and Openlayers WMS parameters in sync

David Herbert darb1 at bas.ac.uk
Fri Jul 20 08:07:17 EDT 2007


Hello,

I have seen problems related to the ones I'm having on the list
already.  However, I seem to be going round in circles getting different
Tilecache errors each time.  Time to ask for help!  I downloaded the 1.9
distribution from SVN (the links on the website appear to be broken
today).  I am using Tilecache in CGI mode on Windows XP under Apache
2.2, and have made all the relevant changes to tilecache.cgi to reflect
my Python path (BTW I am a Java programmer and know next to nothing
about Python).  I have Geoserver WMS map layers (a base layer and a
number of overlays) which I wish Tilecache to cache.  Here are the
relevant bits of my tilecache.cfg:

[cache]
type=DiskCache
base=c:\temp\tilecache

[sggis:bathy_poly,sggis:coast_polygon]
type=WMSLayer
url=http://10.48.1.76:8080/geoserver/wms
layers=sggis:bathy_poly,sggis:coast_polygon
extension=png
bbox=-82000,7800,80000,116000
srs=EPSG:2007056

(my SRS is a recently defined one for the island of South Georgia in
the Southern Ocean - our local Geoserver has been modified to use it).

In Openlayers I have:

var sgStandardLayerOpts = {        
    'maxExtent' : new OpenLayers.Bounds(-82000,7800,80000,116000), 
    'maxResolution' : 'auto',
    'minResolution' : 0.5,
    'units' : 'm',    
    'projection' : EPSG:2007056
};

to initialise my map to the full extent of the enclosing <div>.  I am
not fussy about the set of resolutions or zoom levels.  When I bring up
my map, the following URL is fetched:

http://10.48.1.76/tilecache/tilecache.cgi?LAYERS=sggis%3Abathy_poly%2Csggis%3Acoast_polygon&STYLES=sggis_bathymetry_polygon%2Csggis_coastline&FORMAT=image%2Fpng&TRANSPARENT=off&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A2007056&BBOX=-133294.814815%2C59094.814815%2C-82000%2C110389.62963&WIDTH=256&HEIGHT=256

I can't understand where Tilecache is getting the bounding box it is
eventually giving to Geoserver.  It seems to be out of range.  I
currently get the error:

An error occurred: can't find resolution index for 200.370370.
Available resolutions are: 
[419.921875, 209.9609375, 104.98046875, 52.490234375, 26.2451171875,
13.12255859375, 6.561279296875, 3.2806396484375, 1.64031982421875,
0.820159912109375, 0.4100799560546875, 0.20503997802734375,
0.10251998901367187, 0.051259994506835938, 0.025629997253417969,
0.012814998626708984, 0.0064074993133544922, 0.0032037496566772461,
0.001601874828338623, 0.00080093741416931152]

from Tilecache when I put the above URL into a browser.

Any help greatly appreciated!

Thanks,

David Herbert
British Antarctic Survey.

--  
This message (and any attachments) is for the recipient only.  NERC is subject
to the Freedom of Information Act 2000 and the contents of this email and any
reply you make may be disclosed by NERC unless it is exempt from release under
the Act.  Any material supplied to NERC may be stored in an electronic
records management system.




More information about the Tilecache mailing list