Hi,

> It will also be good to give thought to how to expose these 
> features in Mapnik's XML stylesheets, so that users can 
> easily decide which layers (or perhaps even styles, if more 
> than style pulls from a layer), are clickable, and with what metadata.
> 
> Layer's currently have a queryable="<bool>" parameter which 
> is used to determine whether the feature should be able to be 
> queried from a WMS server that supports GetFeatureInfo. 
> Something similiar to that parameter may be in order. 
> 
> Herm, are you familiar with GetFeatureInfo from the WMS spec? 
> If not I would like you to research it, since it is standards 
> based. My understanding is that it is designed to allow 
> feature queryablity without regard to what features would be 
> rendered on a bitmap, so it is a very different thing than 
> your proposal, but an important comparison nontheless.

I have been experimenting with WMS GetFeatureInfo and with different WMS
servers and clients. My experience from the server side is that
Mapserver gives pretty good possibilities for the service provider to
control GetFeatureInfo, even it is not very easy to find where all the
controls are in the mapfile.  However, with Mapserver it is possible to

- select if layer is queryable at all (controlled by TEMPLATE keyword
which can be dummy)
- offers three outputformats: text/plain, text/html, and gml
- gml output is disabled by default, is must be turned on by adding a
key/value pair DUMP TRUE
- by default the response does not contain any attributes, just a plain
feature ID
- attributes to be included must be given as a list after
"wms_include_items" metadata parameter
- with gml output it is also possible to include the geometry of the
queried feature with the response; some clients are utilising this for
highlighting the feature that was hit on a map
- hit tolerance can be set to control how close to the exact location of
the feature the user must click on a map; some tolerance is always
needed with point and line features

I would say that even if the final aim is to make some tailored query
system for Mapnik it is worth reading a bit about WMS GetFeatureInfo
specification, and I think that Mapserver gives a good example of the
server side controls which are good to have.

Unfortunately I have not found a good GetFeatureInfo client yet.  I have
been mainly testing with uDig, QGis and OpenJUMP with deeJUMP plugin.
None of them is parsing the GetCapabilities document for giving a
possibility to select the INFO_FORMAT. They just send requests without
INFO_FORMAT at all which makes the WMS server to use the default format,
which is different for different servers. It is not an error because WMS
standard does not say anything about default formats, it only says that
all the supported formats must be published in the GetCapabilities
document. However, in practise this means goodbye for interoperability
between different servers.

UDig and QGis do not use the FEATURE_COUNT parameter either. If this
parameter is not set the WMS server must use the default value 1. It
means that in case of overlapping areas it is not possible to get info
from the area that is underneath.  The case is just the same is several
POIs are having the same coordinates. I think that for practical use the
query tool should have an option to show a list of at least 10 closest
features.
 

-Jukka Rahkonen-
_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users

Reply via email to