Opened 18 years ago

Closed 17 years ago

Last modified 15 years ago

#179 closed defect (fixed)

Transparent WMS Layer aren't shown transparent.

Reported by: horst.duester@… Owned by: gsherman
Priority: minor: annoyance Milestone:
Component: WMS Version: Trunk
Keywords: Cc:
Must Fix for Release: No Platform: RedHat
Platform Version: Awaiting user input: yes

Description

I believe, that since my update from QT-4.1.2 to QT-4.1.3 former transparent shown WMS layer are shown opaque now. Perhaps is hasn't any relation to my QT update. For test you can try the following small swiss WMS service:

http://www.sogis1.so.ch/cgi-bin/sogis/sogis_uep.wms

Please regard it's a large scale layer and it should appear transparent.

Change History (19)

comment:1 by g_j_m, 18 years ago

Browsing the Trolltech task tracker yields two bugs that may be causing this problem:

http://www.trolltech.com/developer/task-tracker/index_html?method=entry&id=116149

http://www.trolltech.com/developer/task-tracker/index_html?method=entry&id=119696

Both are scheduled to be fixed in the 4.2.0 version of Qt

comment:2 by morb_au, 18 years ago

Resolution: worksforme
Status: newclosed

I tried your http://www.sogis1.so.ch/cgi-bin/sogis/sogis_uep.wms WMS URL today;

It comes up with one layer (Übersichtsplan) which then appears to be completely blank. e.g. the Full layer extent at http://www.sogis1.so.ch/cgi-bin/sogis/sogis_uep.wms?SERVICE=WMS&VERSION=1.1.0&REQUEST=GetMap&BBOX=7.340840,47.074200,8.033780,47.504100&SRS=EPSG:4326&WIDTH=578&HEIGHT=359&LAYERS=uep&STYLES=&FORMAT=image/png&TRANSPARENT=TRUE

Transparent layers work in QGIS (e.g. qgis-0.8.0-win32-060724) so I'm going to close this ticket until such time that someone else can reproduce it.

comment:3 by horst.duester@…, 18 years ago

Resolution: worksforme
Status: closedreopened

With qgis-0-8.0-win32-060724 it works for me. But my RedHat QGIS does not work. If you like to see the spatial Data you have to set the following BBOX: 7.65519,47.17545,7.66674,47.18626

You will see the opaque effect when you add a second WMS layer with mentioned BBOX Try http://www.sogis1.so.ch/cgi-bin/sogis/sogis_ch? select the layer gemeinde_01 (Gemeindegrenzen Solothurn). The first layer of the TOC will cover the second layer.

My QT-version 4.1.3.

I hope this will explain much more better the mentioned behavior.

comment:4 by morb_au, 18 years ago

I suppose the same opaque effect could be had for you when the background colour is set to non-white (through the Settings > Project Properties > General > Map Appearance settings) and you use the "http://www.sogis1.so.ch/cgi-bin/sogis/sogis_ch?" / "gemeinde_01" layer combination?

I have FC4 and Qt 4.1.0 and the above combo lets my non-white background show through (i.e. no bug). So I'm finding it difficult to reproduce. Perhaps we can put something in the release notes? Can you try with Qt4.1.0 at all?

comment:5 by horst.duester@…, 18 years ago

No it is not possible to try it with QT4.1.0 due to some bugs of QT which will have influence to the stability of QGIS. I changed from QT4.1.2 where transparent WMS works to QT4.1.3 where transparent WMS doesn't work. The need of update QT to 4.1.3 was based on some Gnome gdm incompatibilities which leeds to QGIS crashes. Can you try it with QT4.1.3??

comment:6 by horst.duester@…, 18 years ago

OK I changed from QT4.1.3 to QT4.1.0 and the transparency works without rebuild QGIS!! It looks like QT4.1.3 is the culprit.

When I connect to my WMS Layer the terminal throws tons of the following warnings:

Warning: Object::connect: No such signal QgsRasterLayer::drawingProgress(int,int) Warning: QPaintEngine::setSystemRect, should not be changed while engine is active Warning: QPaintEngine::setSystemClip(), should not be changed while engine is active

.... tons of these 2 lines ...

Warning: QPaintEngine::setSystemRect, should not be changed while engine is active Warning: QPaintEngine::setSystemClip(), should not be changed while engine is active Warning: Object::disconnect: No such signal QgsRasterLayer::drawingProgress(int,int)

Perhaps this can help you and me.

comment:7 by morb_au, 18 years ago

Is it 4.1.0 that throws up all those warnings or 4.1.3?

I think the resolution to this is to add a release note to avoid 4.1.3 with transparent WMS layers. Your opinion?

comment:8 by horst.duester@…, 18 years ago

Ups... Of course it's my mistake. 4.1.3 throws the messages.

Your suggested solution sounds like ESRI Support. Long time ago I had a problem with a non working ArcView3 feature. The ESRI Solution was to fix the documentation in regard to the error and not the faulty feature.

All jokes aside, but 4.1.4 doesn't work too.

comment:9 by g_j_m, 18 years ago

We're in a bit of a sticky situation here. Versions of Qt prior to 4.1.4 have other problems that have caused bugs in Qgis.

This particular problem is quite likely to be caused by one of the two bugs on Qt's tracker (see the first comment in this ticket). One of these has been flagged as fixed, and will be available in the next release of Qt. The other bug was put down to programmer error - perhaps we could look at how Qgis does things with the comments in that bug in mind.

comment:10 by horst.duester@…, 18 years ago

I'm in doubt about the relation between the two QT bugs and our problem. 1. They were discovered at version 4.1.2, this version works fine for me. 2. The tickets do refer to PNG images. But GIF images are also shown opaque.

Unfortunately I'm not a great QT/C++ programmer, so I can't support you in this way.

I agree to your statement that versions of Qt prior to 4.1.4 have other problems that have caused bugs in Qgis.

It would be great when we are able to present transparent WMS layer at the FOSS4G2006 in Lausanne.

comment:11 by morb_au, 18 years ago

Priority: majorminor

Over the next few days I'll grab the latest Qt (4.1.4) and see if I can reproduce the error. This may be a low-priority activity for me though.

comment:12 by morb_au, 18 years ago

I'm having issues getting 4.1.4 but in the meantime this may be another Qt bug that simulates this problem: http://www.trolltech.com/developer/task-tracker/index_html?method=entry&id=118082

comment:13 by morb_au, 18 years ago

I finally was able to test this against Qt 4.1.3.

I am now also getting the following errors while retrieving the WMS layer: --- Warning: QPaintEngine::setSystemRect, should not be changed while engine is active Warning: QPaintEngine::setSystemClip(), should not be changed while engine is active --- And the byte count is no longer updating.

HOWEVER, the http://www.sogis1.so.ch/cgi-bin/sogis/sogis_ch? server / gemeinde_01 layer / PNG encoding still gives a transparent background. I otherwise have a FC4 system.

I'm fast running out of ways of reproducing the problem, so I might leave this ticket dormant. I will have to raise another ticket to address the paint engine issue.

comment:14 by g_j_m, 18 years ago

Note that the QPaintEngine() warnings are due to an aspect of how qgis is trying to use the Qt4 canvas stuff. This problem has also been reported in ticket #139, albeit with different symptons.

comment:15 by morb_au, 18 years ago

Milestone: Version 0.8 ReleaseVersion 0.9 Release
Owner: changed from morb_au to gsherman
Status: reopenednew

I'm going to push this out from a 0.8 release as it doesn't appear to be a problem with QGIS and therefore shouldn't block its release. It's possibly not even a problem with Qt, perhaps being a problem with whatever libpng is being used to render the image.

I'm going to bow out of this one and let someone else have a go at it.

comment:16 by lubaby, 17 years ago

Awaiting user input: unset
Must Fix for Release: No

I cant' reproduce this with Kubuntu Feisty 7.04, QGIS 0.8.1p3 built against Qt 4.2.3. Is it still problem or could be closed now?

comment:17 by lubaby, 17 years ago

Awaiting user input: set

comment:18 by horst.duester, 17 years ago

Resolution: fixed
Status: newclosed

The problem seems to be solved with QT4.2.x. I believe it can be closed now.

comment:19 by (none), 15 years ago

Milestone: Version 0.9

Milestone Version 0.9 deleted

Note: See TracTickets for help on using tickets.