Bug report #15553
QGIS Server OPACITIES parameter works only when STYLES parameter is default
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | QGIS Server | ||
Affected QGIS version: | 2.18.4 | Regression?: | No |
Operating System: | Debian Stretch | Easy fix?: | No |
Pull Request or Patch supplied: | No | Resolution: | fixed/implemented |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 23476 |
Description
If in the GetMap request the STYLES parameter is empty/default the OPACITIES parameter works at it should.
If the STYLE=whatever_else then the OPACITIES parameter doesn't work.
How to recreate:
- Download test data from https://github.com/tudorbarascu/qgis-server-tutorial-data/archive/master.zip
- Run GetMap request with default style (works)
http://qgisplatform.demo/cgi-bin/qgis_mapserv.fcgi ?MAP=/home/web/projects/world.qgs &SERVICE=WMS &VERSION=1.3.0 &REQUEST=GetMap &BBOX=-432786,4372992,3358959,7513746 &SRS=EPSG:3857 &WIDTH=665 &HEIGHT=551 &FORMAT=image/jpg &LAYERS=countries &STYLES= &OPACITIES=50
The above request outputs:
When running the same GetMap request with explicit STYLE, it doesn't work.
http://qgisplatform.demo/cgi-bin/qgis_mapserv.fcgi ?MAP=/home/web/projects/world.qgs &SERVICE=WMS &VERSION=1.3.0 &REQUEST=GetMap &BBOX=-432786,4372992,3358959,7513746 &SRS=EPSG:3857 &WIDTH=665 &HEIGHT=551 &FORMAT=image/jpg &LAYERS=countries &STYLES=classified_by_name &OPACITIES=50
The above request outputs:
Tested on QGIS Server master, 2.14 and 2.16
History
#1 Updated by Jukka Rahkonen about 8 years ago
I am not sure what QGIS does with OPACITIES, but generally speaking JPEG format does not support transparency so I think that you should do all testing with transparency/opacity with png format.
#2 Updated by Tudor Bărăscu about 8 years ago
Good point.
I actually tested with the png format but at some point in testing and testing I mistakenly turned to jpeg.
Same problem nonetheless.
The second image should be the same as the first one, and they're not.
Thanks.
#3 Updated by Jukka Rahkonen about 8 years ago
I wonder how strict the predefined styles are. For example, if opacity is defined in the style, should if still be possible to change it with OPACITIES? If QGIS server supports the GetStyles request, what does it send with 6STYLES=classified_by_name?
#4 Updated by Tudor Bărăscu over 7 years ago
- Target version changed from Version 2.14 to Version 2.18
The issue is still present in 2.18.4 and 2.14.12
#5 Updated by Giovanni Manghi over 7 years ago
- Affected QGIS version changed from 2.14.5 to 2.18.4
#6 Updated by Giovanni Manghi over 7 years ago
- Regression? set to No
- Easy fix? set to No
#7 Updated by Tudor Bărăscu about 6 years ago
- Status changed from Open to Closed
This works in QGIS 3 + 3.4 LTR is coming out so I'm closing it!
#8 Updated by Giovanni Manghi about 6 years ago
- Resolution set to fixed/implemented
- Description updated (diff)