[Tilecache] Changing scales

Jonathan W. Lowe jlowe at giswebsite.com
Tue Feb 19 05:08:40 EST 2008


Oles,

I experienced what you call the puzzle-effect when I had a mismatch
between the number of zoom levels and resolutions specified in the
tilecache.cfg.  Your [UK_27700] example has 16 resolutions, but no
"levels" set.  Since "levels" defaults to 20, there might be a mismatch.
Try adding levels=16 (or whatever number of resolutions you set) to see
if the problem goes away.

Jonathan

On Tue, 2008-02-19 at 09:10 +0000, Oles Kit wrote:
> Dear list,
> 
> I seemed to be an easy trick, but I am playing with this problem for a
> couple of days already without much success.
> 
> I've got a WMS server [MapServer] serving a map of the UK in
> EPSG:27700 projection. This server is accessed by TileCache using the
> following configuration:
> 
> [UK_27700]
> type=WMS
> url=http://......../mapfile.map
> layers=uk
> extension=png
> size=256,256
> srs=EPSG:27700
> bbox=82445,3034,651251,396307
> resolutions=496.34031413612564,248.17015706806282,124.08507853403141,62.042539267015705,31.021269633507853,15.510634816753926,7.755317408376963,3.8776587041884816,1.9388293520942408,0.9694146760471204,0.4847073380235602,0.2423536690117801,0.12117683450589005,0.060588417252945025,0.030294208626472512,0.015147104313236256
> 
> with OpenLayers javascript configured as:
> 
> map = new OpenLayers.Map('charts_map', {maxResolution: 'auto',
> 	maxExtent: new OpenLayers.Bounds(82445,3034,651251,396307),
> 	resolutions:
> [496.34031413612564,248.17015706806282,124.08507853403141,62.042539267015705,31.021269633507853,15.510634816753926,7.755317408376963,3.8776587041884816,1.9388293520942408,0.9694146760471204,0.4847073380235602,0.2423536690117801,0.12117683450589005,0.060588417252945025,0.030294208626472512,0.015147104313236256], 
> 
> 
> 	projection: "EPSG:27700",
> 	units: "meters"});
> 
> This configuration performs well at the resolution of 496.34031413612564
> meters per pixel and higher (i.e. when a 256-pixel tile roughly
> represents a 127x127 km square). It seems logical to me that if I want
> to reduce the scale of the map by the factor of 2 (i.e. to represent the
> area of 254x254 km with one 256-pixel tile) I have to add one more
> resolution to the list of resolutions, and namely 992.68062827225128,
> but doing so I am getting unexpected results (usually wrong scale,
> sometimes just a combination of shuffled tiles (puzzle-effect)). Playing
> with bounding boxes, min/maxResolutions and Mapfile Capabilities does
> not really help...
> 
> Any input is highly appreciated!
> 




More information about the Tilecache mailing list