[Tilecache] Call TileCache from MapServer

Christopher Helm CHelm at wapa.gov
Wed Oct 10 11:56:21 EDT 2007


Hi all,

I recently installed TileCache and I love it, it works great with my WMS and Open Layers. I have it caching tiles from terra server (the DOQ layer from http://terraserver-usa.com/ogcmap.ashx?). However I was hoping that I would be able cache a bunch of these tiles and access them via MapServer, i.e. set up a WMS connection layer in my map file where the connection calls tile cache. This seems to be something pretty intuitive but I have yet to be able to get it working. I also haven't found any documentation on the subject yet, if you know of an example please point me there. Thanx.

My map file layer looks like this:

LAYER
  NAME "ortho"
  METADATA
    "wms_title"  "USGS Digital Ortho-Quads"
    "wms_srs"   "EPSG:4326"                               # WGS84 LATLON
    "wms_name" "DOQ"
    "wms_format" "image/png"
    "wms_server_version"  "1.1.1"
    "wms_connectiontimeout"  "120"
  END
  STATUS OFF
  TYPE RASTER
  MINSCALE 3800
  CONNECTIONTYPE WMS
  CONNECTION "http://alcs7u.hq.wapa.gov/cgi-bin/tilecache-1.4/tilecache.cgi?"
  #CONNECTION "http://terraserver-usa.com/ogcmap.ashx?"  # terra server connection (WORKS FINE, just slow)
  PROJECTION
    "init=epsg:4326"
  END
  CLASS
    NAME "USGS Ortho-Photos"
    KEYIMAGE '/data/gis/www/html/ms_common/doqq_sym.png'
  END
END

And my tile cache config layer looks like:

[DOQ]
type=WMSLayer
layers=DOQ
url=http://terraservice.net/ogcmap.ashx?
extension=png
debug=on

and finally the error I'm getting from mapserver is the standard EPPL exception quote:

msDrawMap(): WMS connection error. Failed to draw WMS layer named 'ortho'. This most likely happened because the remote WMS server returned an invalid image, and XML exception or another unexpected result in response to the GetMap request. Also check and make sure that the layer's connection URL is valid. msDrawRaster(): Image handling error. Unrecognized or unsupported image format drawEPP(): Image handling error. /data/gis/www/html/tmp/470cec9b_1e71_0.img.tmp is not an EPPL file. 


Again, this layer works fine in Openlayers, I'm looking to call TileCache as a WMS from within Mapserver.

Thanks,
Chris Helm
Colorado 






More information about the Tilecache mailing list