scale dependent getfeatureinfo

Steven M. Ottens steven.ottens at GEODAN.NL
Tue Feb 13 23:41:53 PST 2007


On Feb 13, 2007, at 8:06 PM, Daniel Morissette wrote:

> Steven M. Ottens wrote:
>> On Feb 13, 2007, at 3:25 PM, Stephen Woodbridge wrote:
>>>
>>> If you always get all 4 results, then only put the Query  
>>> information in the most detailed layer and you will then always  
>>> get just that one. IE: remove it from the other layers.
>>>
>> Steve,
>> I'm slightly at a loss here. What is the query information  
>> exactly? I cannot remove the CLASSITEM from the other layers since  
>> they are raw grids which need to be classified. If I remove  
>> TEMPLATE and the gml_* items from a  layer mapserver complains  
>> that layers are not queryable.
>
> The GetFeatureInfo request contains a QUERY_LAYERS parameter with  
> the list of layers to query. If you list all 4 layers in  
> QUERY_LAYERS then MapServer returns results from each of them. If  
> you want results from only the most detailed layer then list only  
> that layer in QUERY_LAYERS.
>
Ok, but that means that the client needs to know which layer is the  
preferred layer for getFeatureInfo. As far as I know, there's no  
obvious way to automatically use the most detailed layer. The layer  
can be added dynamically through a getCapabilities request, but there  
are a few dozen others as well.
Right now I have the group layer in the query_layers parameter, just  
like I have it in the getMap parameter. In the getMap I get 1 image  
back, the one which is suitable for that particular scale level. In  
my opinion it would make sense if a similar behavior would be  
possible for the getFeatureInfo.

Anyway since I do control the client I can hack it to check if the  
particular layer for getFeatureInfo is indeed the elevation layer and  
replace the group-name for the most detailed layer name.

Thanks for the help,

Steven



More information about the MapServer-users mailing list