-
-
Notifications
You must be signed in to change notification settings - Fork 364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WMS GetFeatureInfo should honour STYLES parameter #4660
Comments
|
STYLES does not seem to be listed as GetFeatureInfo request parameter in the WMS standard and therefore this feature would work as supposed only with a non-standard WMS client. As a WMS server admin I would use this feature only if I could control what WMS client is allowed to use my service. It might be usable with some of our own made web applications. |
|
@jratike80 STYLES is a supported
|
|
Oh sorry, I was totally wrong. I was just reading the Table 9 in WMS 1.3.0 and did not read that actually the map request part says it is even compulsory to copy the whole GetMap despite VERSION and REQUEST. I have never understood it that strictly and I believe we have some applications which are sending GetFeatureInfos for Mapserver without "styles" and "layers" so we are ourselves doing it in a non-standard way. |
|
I checked how we use GetFeatureInfo and we do copy the STYLES parameter into the request. We do not copy SLD_BODY or SLD parameters but I believe that according to the standard we should and Mapserver should also honour the filters used in SLD or SLD_BODY. We have intentionally read the following part of the standard so that the layer in QUERY_LAYERS does not need to be found from LAYERS if it is still available from the server and listed in GetCapabilities. It is perhaps not in the spirit of the standard but not explicitly denied either. "The mandatory QUERY_LAYERS parameter states the map layer(s) from which feature information is desired to How does your patch work with SLD and SDL_BODY and a request like &SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&INFO_FORMAT=text/html&LAYERS=layer_1&FORMAT=image/jpeg&HEIGHT=1019&WIDTH=1400&BBOX=3372226.1053542476,6966830.1615698105,3372720.666976955,6967190.131779482&STYLES=&SRS=EPSG:2393&QUERY_LAYERS=layer_2&Y=628&X=531&FEATURE_COUNT=100? |
|
We copy |
|
Here is a live example, I hope that the long URL tolerates copy/paste. Meaning is to show that with SLD_BODY user can do from the client side the same thing that is done mostly on the server side with predefined STYLES in the original example. The filter inside SLD_BODY is selecting only "highway=trunk" ways from the OpenSteetMap data. The layer name in the WMS service is "roadsfar_01". The user who is looking at the map from my server and sends a GetFeatureInfo request probably wants to get more information about the trunk highways and not from the other ways which do exist on the roadsfar_01 layer but which are hidden with SLD_BODY. I feel that SDL_BODY and SLD are not at all popular and therefore it may be waste of time to think too much about them. Here comes the example anyway. |
|
Thanks for the info. I think the point here is applying CLASS/STYLE mechanisms as part of predefined STYLES, without the need for SLD/SLD_BODY (which, IMHO, introduces a barrier to the client who is expecting default behaviour). |
This is an automated commentThis issue has been closed due to lack of activity. This doesn't mean the issue is invalid, it simply got no attention within the last year. Please reopen with missing/relevant information if still valid. Typically, issues fall in this state for one of the following reasons:
|
As discussed with @Schpidi in IRC:
Using 6.2.1 with the following patch:
https://github.com/mapserver/mapserver/commit/937dcb6857501835b5489fa4bea321105412a20b.patch
...I have 3
CLASSGROUPdirectives defined, which are advertised as WMS LayerSTYLESparameters in WMS. Their underlyingCLASSdefinitions are mapped accordingly in the mapfile. TheCLASSobjects containEXPRESSIONdirectives as a means to filter (I do not / cannot useLAYERlevelFILTERs, as the layer in WFS mode should be returning everything).When performing a GetMap request against each of the 3
CLASSGROUPs via the WMS GetMapSTYLESparameter, the expected results are returned:When performing a GetFeatureInfo request against each of the 3
CLASSGROUPs via the WMS GetFeatureInfoSTYLESparameter, the expected results are not returned:In other words, it looks like
CLASSobjects are ignored for GetFeatureInfo requests. They should be treated exactly how we handle them in GetMap.Test data (save to foo.csv):
Test mapfile (save to foo.map and point to foo.csv as absolute path in OGR VRT def):
The text was updated successfully, but these errors were encountered: