[Tilecache] Re solutions issues

Yves Moisan yves.moisan at boreal-is.com
Thu Oct 30 09:04:22 EDT 2008


Hi All,

I am fighting to get TileCache to work.  I did it in the past, but I suspect
now the issue has to do with the 900913 projection.  Files :

tilecache.cfg :

[cache]
type=Disk
base=c:/mapping_data/tilecache/

..

[Ikonos]
type=WMS
srs=EPSG:29194
#BBOX=-19000000,-8000000,19000000,19000000
BBOX=-4093623,-1086705,-4083992,-1077571
#BBOX=-4094656,-1086705,-4083992,-1077571
url=http://myserver:8292/cgi-bin/mapserv.exe
extension=png
#resolutions=256,128,64,32,24,16,8,4,2,1,0.5,0.25
#resolutions:192,96,48,24,12,6,3,1.5,0.75,0.375,0.25
resolutions:96,48,32,24,12,6,3,1.5,0.6,0.25
extent_type=loose
metaTile=true

You can see I tried a few options ...

html file :

           options = {
                 maxExtent:  new OpenLayers.Bounds(-19000000, -8000000,
19000000, 19000000),
                      //maxExtent: new
OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34),
                      //numZoomLevels: 14,
                      numZoomLevels: 16,
                   //   maxResolution: 156000,
                      minScale: 110000000,
                      resolutions:[96,48,32,24,12,6,3,1.5,0.6,0.25],
                      controls: [],
                      units: 'm',
                      projection: new OpenLayers.Projection("EPSG:900913"),
                      displayProjection: new
OpenLayers.Projection("EPSG:4326")
                      };
           
            map = new OpenLayers.Map('map', options);

...

            var Ikonos_TC = new OpenLayers.Layer.WMS(
                       "Ikonos TC",  
                       "http://myserver:8292/tilecache/tilecache.cgi",
                       {layers: 'Ikonos',
                        transparent: 'false',
                        srs: 'EPSG:29194',
                        format: 'image/png'},
                       {isBaseLayer: 'true',
                        buffer:0,
                        transitionEffect:'resize'});  
                       
            map.addLayer(Ikonos_TC);

and the map file :

...
#  IMAGETYPE PNG24
  IMAGETYPE jpeg
  IMAGECOLOR 255 255 255
  UNITS meters                                                                
  #FONTSET '../etc/fonts.txt'    
  SHAPEPATH ...\WEB-INF\classes\module\maps\data\'
  #SYMBOLSET '../etc/symbols.sym'
 ...  
  PROJECTION
   "init=epsg:900913"
   END

...

LAYER
  NAME Ikonos
  GROUP "Imagery"
  PROJECTION
   "init=epsg:29194"
  END
  TYPE RASTER
  DUMP FALSE
  STATUS ON
  DATA "ARAPIRACA_IKONOS_2007NOV25.TIF"
 
  METADATA

    # OGC:WMS specific tags
    "ows_title"    "Ikonos"
    #"ows_abstract"    "Ikonos 3 colors, 1 m"
    "ows_keywordlist"    "PHOTO"
    "wms_opaque"    "1"
    "ows_srs" "EPSG:900913"
    "wms_group_title" "Imagery"
    "wms_group_abstract" "Imagery layers"
    "wms_resx" "0.17578125"
    "wms_resy" "0.17578125"
    "ows_extent" "751977.182 8949542.880 740606.182, 8925969.880"
    "ows_metadataurl_type" "FGDC"
    "wms_metadataurl_format" "text/html"
    "ows_metadataurl_href" ""
    "wms_dataurl_format" "image/tiff"
    "wms_dataurl_href" ""
  END
END #layer Ikonos

I know there are a few parameters there that are probably redundant, but at
any rate that layer works (MapServer projects the image from its src SRS to
900913) if I call the WMS service directly.  It does not work (pink tiles,
then "An error occurred: Current x value -4094656.000000 is too far from
tile corner x -4093623.000000" type messages) when I use TileCache.

I can see the c:/mapping_data/tilecache directories are created, but that is
it.  If I tweak the x and y to satisfy the error messages, then I get a
"can't find resolution index for 19.964844. Available resolutions are:
[96.0, 48.0, 32.0, 24.0, 12.0, ..." type message.  What should I look for
and how I should I go about debugging this ?

TIA,

Yves Moisan
-- 
View this message in context: http://www.nabble.com/Resolutions-issues-tp20246563p20246563.html
Sent from the TileCache mailing list archive at Nabble.com.




More information about the Tilecache mailing list