Details
Description
Enhance WMS so that Parametric SQL Views can accept parameters for individual layers (instead of applying the same set to all layers). The current VIEWPARAMS syntax would be extended to allow for specification of multiple parameter sets in the form of VIEWPARAMS=PARAMS1[,PARAMS2[...]] where the number of parameter sets provided can be zero, one or N where N is equal to the number of LAYERS specified. If only one set of parameters is specified it is applied to all layers. I have attached a patch that implements this behavior (n.b. the patch includes some overlap [KvpUtils] with the one provided in GEOS-4180).
Activity
Andrea Aime
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Attachment | GEOS-4184.patch [ 55214 ] |
Andrea Aime
made changes -
| Attachment | compare.png [ 55215 ] |
Andrea Aime
made changes -
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Fix Version/s | 2.1.1 [ 17360 ] | |
| Resolution | Fixed [ 1 ] |
Andrea Aime
made changes -
| Status | Resolved [ 5 ] | Closed [ 6 ] |
Hi Eli,
finally managed to find time to look into this patch. Actually, this is the third time I looked into this, thing is the patch would not apply cleanly so the other two times I gave up.
This time I worked a bit more to make it apply, and found out it was incomplete and would have broken view params in wfs. So I created this new patch, attached, which compared to the original one:
The patch passes a full build and I also tried it out interactively, finding out a useful feature of it past allowing the same param with different meaning in different layers: allowing the same layer to be requested multiple times with different values of the parameter, this allows to make maps like the one attached with this request:
http://localhost:8080/geoserver/topp/wms?VIEWPARAMS=people%3A5000000%2Cpeople%3A10000000&LAYERS=topp%3Avpgstates%2Ctopp%3Avpgstates&STYLES=line%2Cpolygon&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A4326&BBOX=-139.84813671875,18.549615234375,-51.85286328125,55.778384765625&WIDTH=780&HEIGHT=330
Justin, I've cc'ed you in this jira because despite the testing the patch is large and now involves WFS as well. I would like to commit it on 2.1.x too