[Tilecache] Multiple LAYERS support in WMS

bwoodall bwoodall at bwoodall.org
Thu Jun 19 12:05:03 EDT 2008


On Thu, 2008-06-19 at 08:38 -0400, Christopher Schmidt wrote:
> On Thu, Jun 19, 2008 at 12:31:13PM +0200, Frédéric Junod wrote:
> > Hi,
> > 
> > I needed to have a multiple layer support in tilecache for the WMS service;
> > something like:
> > 
> > http://www.example.com/tilecache/?LAYERS=a,b,c&SERVICE=WMS&blabla
> > 
> > ('a', 'b' and 'c' are layers defined in tilecache.cfg)
> > 
> > I hacked TC and you can find a patch in attachment.
> > 
> > The modification is quite simple: the layer's images are extracted from the
> > cache and merged with the Python Imaging Library.
> 
> My first reaction to this is "eeck." Not because you code is bad -- it
> looks reasonable -- but it's something that I had kinda hoped I could
> get away with TileCache not doing, simply because it adds more
> complexity.
> 
> I'm not sure what I want to do about this. I want to turn it over in my
> head for a bit.
> 
> If you don't see action on this, poke me in a week or so, as I'm likely
> to have forgotten.

Another approach is to have one layer in OL, something like;

        http://www.this.com/cgi-bin/tilecache.cgi?LAYERS=Vegetation&SERVICE=WMS&....
        
and then in tilecache.cfg, have something like 
(note: the 'layers' line below is linewarp for reading);

        [Vegetation]
        type=WMSLayer
        url=http://www.this.net/cgi-bin/wmsveg
        layers=Scrub_and_Chaparral,Non-Native_Vegetation_Developed_Areas_or_Unvegetated_Habitat,
        Bog_and_Marsh,Dune_Community,Forest,Grasslands_Vernal_Pools_Meadows_and_other_Herb_Communities,
        Riparian_and_Bottomland_Habitat,Woodland


....Bill,




More information about the Tilecache mailing list