[Tilecache] tilecache and getFeatureInfo

Steven M. Ottens steven at minst.net
Tue Jul 31 12:35:34 EDT 2007


Christopher Schmidt wrote:
> On Tue, Jul 31, 2007 at 04:42:39PM +0200, Steven M. Ottens wrote:
>   
>> Hi all,
>>
>> I need both a cached WMS and the ability to do getFeatureInfo requests.
>> Right now TileCache doesn't support getFeatureInfo and it would require
>> a complex scheme to change the request url from tilecache.py to the
>> mapserver.cgi url at the client side. 
>>     
> Why? 
>   
I need the ability to add layers dynamically. There are multiple 
map-files involved so I cannot just replace tilecache.py with 
mapserver.cgi. Although come to think of it I might be able to just use 
tilecache.py?maps=/path/to/map.file&RestOfThe request. If Tilecache.py 
ignores the map= bit, it should work.
>> So I was looking into adding
>> getFeatureInfo support to tilecache.
>> I have a couple of questions:
>> 1. Is it feasible at all?
>>     
> Anything is feasible, though it's somewhat against the design of TC, so
> I'd be surprised by a patch I liked, I think.
>   
True, I've been hacking a bit but it's going to hack in deep, so that 
might break the whole elegance of it.
>> 2. Is it desired by other people and/or has soemone tried to write such
>> a feature?
>>     
> Others have asked, and when I mentioned the idea of just changing the
> URL at the client side, they seemed happy with that.
>   
Still, if you have multiple mapservers, you need to write filters for 
each layer: if layerX then replace with mapserverY etc etc. This 
requires an extra set of configurations and is error prone: if you 
update a mapserver, you already need to update tilecache.cfg, but then 
you also need to update the client.
>   
>> 3. I've no experience with python but from reading the code I figured
>> that I need to do something like this:
>>        add a function in Service.py "getFeatureInfo" this should call
>> wms.fetch() once the WMS parameters are set.
>>     In Client.py I should add support different request types and add an
>> extra "Content-Type"
>>
>> sounds this about right? Am I forgetting something?
>>     
>
> That would probably work.  
>
> TileCache is a highly specialized piece of software: it serves tiles,
> and metadata about how to request those tiles. Anything else is beyond
> the scope of TileCache, from my point of view, though I might be able to
> be convinced otherwise.
>   
Right, thanks

Steven
> is not a WMS
> server, and
>   
> Regards,
>   







More information about the Tilecache mailing list