[Tilecache] tilecache and map servers MAX/MIN SCALE DENOM
Rene Kolb
shikanzen at gmail.com
Wed Feb 4 07:41:38 EST 2009
Hello everybody,
i have a problem with tilecache when using MAXSCALEDNOM / MINSCALEDENOM
option in the map file definition.
the map file has a lots of layers, whose records looks like these:
...
42 LAYER
43 NAME spoj50_0_0
44 TYPE RASTER
45 UNITS meters
46 STATUS ON
47 PROJECTION
48 "init=epsg:4326"
49 # "init=epsg:2065" # krovak s-jtsk
50 END
51 MAXSCALEDENOM 10000000
52 MINSCALEDENOM 200000
53 DATA '/home/koleje/app/data5/spoj50/spoj50_0_0_0_0.tif'
54 CLASS
55 NAME "spoj50_0_0"
56 STYLE
57 COLOR 128 244 -1
58 END
59 # TEMPLATE
60 END
61 END
..
<cut>
...
387 LAYER
388 NAME spoj200_0_0
389 TYPE RASTER
390 UNITS meters
391 STATUS ON
392 PROJECTION
393 "init=epsg:4326"
394 # "init=epsg:2065" # krovak s-jtsk
395 END
396 MAXSCALEDENOM 200000
397 MINSCALEDENOM 0
398 DATA '/home/koleje/app/data5/spoj200/spoj200_0_0.tif'
399 CLASS
400 NAME "spoj200_0_0"
401 STYLE
402 COLOR 128 244 -1
403 END
404 # TEMPLATE
405 END
406 END
...
when i use this map file with mapserver via cgi call, everythings works fine
and at some point the mapserver
uses different layers (better quality - spoj200*) to render the map, you can
check a working example here:
http://koleje.hiro.cz/cgi-bin/mapserv?map=/home/koleje/app/koleje-test3.map
then when I use the same map file in working tilecache environment, the map
is not rendering (http://koleje.hiro.cz/test),
i get only light blue tiles, which usually means, i'm out of bounds (?)
if I remove the MAX and MIN SCALEDENOM options from map file definition,
tilecache works fine(!!) ( but of course without scaling) .
did i forgot about something?
i find that i maybe have to add a 'resolutions' option to the tilecache
configuration, but i don't know what values i have to set
(if its true that this option has to be set - maybe i'm completely wrong
with this)
i'd appreciate any useful hint, advice or link to a resource dealing with
such a dilemma.
Thanks a lot in advance
Rene
tilecache.cfg
----------------
[cache]
type=Disk
base=/home/koleje/app/tmp/maps
[basic]
type=WMS
url=
http://msdemo.hiro.cz/cgi-bin/mapserv?map=/home/koleje/app/koleje-test3.map
layers=spoj50_0_0,spoj50_0_1,spoj50_0_2,spoj50_0_3,spoj50_0_4,spoj50_1_0,spoj50_1_1,spoj50_1_2,spoj50_1_3,spoj50_1_4,spoj50_2_0,spoj50_2_1,s
poj50_2_2,spoj50_2_3,spoj50_2_4,spoj200_0_0,spoj200_0_1,spoj200_1_0,spoj200_1_1
extension=png
mapfile=/home/koleje/app/koleje-test3.map
srs=EPSG:4326
maxresolution=214
spherical_mercator=false
bbox=3427592,5503562,3536464,5663116
openlayers cfg from http://koleje.hiro.cz/test:
----------------------------------------------------
...
var epsg4326 = new OpenLayers.Projection("EPSG:4326");
var bounds = new OpenLayers.Bounds(3427592, 5503562, 3536464,
5663116);
map = new OpenLayers.Map('map',
{
maxExtent: bounds,
projection: epsg4326,
displayProjection: epsg4326,
maxResolution: 214,
//controls: []
});
....
layer = new OpenLayers.Layer.WMS( "Zakladni mapa",
["http://koleje.hiro.cz:3128/tilecache/tilecache.cgi
?",
"http://koleje1.hiro.cz:3128/tilecache/tilecache.cgi
?",
"http://koleje2.hiro.cz:3128/tilecache/tilecache.cgi
?",
"http://koleje3.hiro.cz:3128/tilecache/tilecache.cgi
?",
"http://koleje4.hiro.cz:3128/tilecache/tilecache.cgi
?"],
{
layers: 'basic',
map: "/home/koleje/app/koleje-test3.map",
transitionEffect: 'resize',
transparent: "false", format: "image/png",
},
{isBaseLayer: true, reproject: false, }
);
map.addLayer(layer);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/tilecache/attachments/20090204/be1d449d/attachment.html
More information about the Tilecache
mailing list