[mapserver-users] Mapserver as a WMS Client - problems working with a 'remote' Tilecache service

Rahkonen Jukka Jukka.Rahkonen at mmmtike.fi
Thu May 5 21:09:55 PDT 2011


Hi,

I have never tried myself but I would guess that you need to prepare a xml file for defining a gdal-wms datasource and refer to that xml file in your mapfile. Read http://gdal.org/frmt_wms.html

-Jukka Rahkonen-

Andrew Cowie wrote:

 
> Hello List,

> We are currently setting up a cascading WMS using Mapserver as a client to request maps from another Mapserver and from a Tilecache. We have read that Mapserver can be configured to do this but we are running into problems when using Mapserver as a client to Tlecache. Specifically, how do we publish metadata in the MapSever Client capabilities document about the correct resolutions / bounding box of a Tilecache service.

> More details...

> Here's a snippet of our 'top level' Mapserver mapfile, which will sit on our public server:


       LAYER
              NAME 'lcr_basemap_cache_wgs84'
              TYPE RASTER
              CONNECTIONTYPE WMS
              CONNECTION "http://ourserver/tilecache/wms-c/tilecache.py?"
              PROCESSING "CLOSE_CONNECTION=DEFER"

              METADATA
                     "wms_name"                  "lcr_basemap_cache_wgs84"
                     "wms_title"                 "Baselayer - Cached"
                     "wms_server_version"        "1.1.1"
                     "wms_format"                "image/png"
                     "wms_srs"                   "EPSG:4326"
                     "wms_extent"                "165 -48 179.5 -33"
                     "wms_abstract"              "Cached via Tilcache"
              END
       END

This pulls a layer from our Tilecache (a snippet from our tilecache config file):

[lcr_basemap_cache_wgs84]
type=WMSLayer
layers=coastpoly,veg,urban_grp,contours,water,coast_feats,height_pnts,tracks,rail,all_roads,railway_station,text
srs=EPSG:4326
bbox=165,-48,179.5,-33
resolutions=0.025398253504337,0.012699126752168,0.006349563376084,0.003174781688042,0.001587390844021,0.000793695422011,0.000317478168804,0.000158739084402,0.000079369542201,0.000031747816880,0.000015873908440,0.000006349563376,0.000003174781688
url=http://ourserver/cgi-bin/mapserv?map=/path/to/ourmapfile.map&transparent=true&
extent_type=loose
metaBuffer=10
metasize=6,6
metaTile=true

(As you can see, Tilecache is pointing to another Mapserver which generates the maps.)

We have had some success in connecting to the Tilecache via the Mapserver Client using an Openlayers client to view the 'top level' WMS layers ** BUT ** this only works because we configured Openlayers to use the correct resolutions / bounding box etc. What we are really trying to achieve with this is a public WMS for which other people/clients can use, e.g. Openlayers / QGIS, by just reading the Capabilities document provided by the MapServer client.

So far, we have yet to find a way to advertise (via the capabilities document) these underlying Tilecache resolutions as metadata in the cascading level Mapserver. Is this possible?

If it is not possible, does anybody have recommendations as to how to go about this in a standards compliant way?

Many thanks,

Andy


________________________________
Please consider the environment before printing this email
Warning: This electronic message together with any attachments is confidential. If you receive it in error: (i) you must not read, use, disclose, copy or retain it; (ii) please contact the sender immediately by reply email and then delete the emails.
The views expressed in this email may not be those of Landcare Research New Zealand Limited. http://www.landcareresearch.co.nz




More information about the MapServer-users mailing list