[Qgis-developer] [Qgis-user] WMS Rendering Problems

Marco Hugentobler marco.hugentobler at karto.baug.ethz.ch
Sat Nov 3 13:37:07 EDT 2007


Hi Tom,

> The refresh problem arises from the fact that the WMS layer is not
> requested until after the redraw cycle begins. Om a Mac (and probbably
> Windows too, based upon your observations), drawing cannot be
> interrupted to do something else -- either you already possess the
> bitmap or you don't start drawing. The reason you don't see the image
> until some future action is that the WMS image don't show up until after
> the refresh cycle that requested it has competed.

I think that the WMS refresh problem is due to a problem with 
QGraphicsView/QGraphicsRectItem, which I tried to adress with r7316. This fix 
works for me on Kubuntu7.10, Win XP (msys) and Mac (G4).

From what I can see, the synchronous requesting works as expected and is left 
at the time QHttp sends the done() signal (once all the requested data is 
available). The painting is then done into QImage, which I think is plattform 
independent (software rendering). 

Asynchronous requesting of WMS layers could still be a possibility for the 
future. Maybe combined with Tims idea of a composite manager? I think that 
such functionality should be developed in a branch as there is a high risk of 
side effects.

Regards,
Marco


On Tuesday 30 October 2007 19:49:30 Tom Elwertowski wrote:
> Micha Silver wrote:
> > In some early work I noticed on windows, displaying maps from a WMS
> > server (mapserver 4.10.2) that the map image doesn't appear until I "do
> > something". I have to open some other dialog box, then when I close it,
> > the map appears. If I pan or zoom, I see the map layers *while panning*,
> > but as soon I  release the mouse the map layers (as well as north arrow
> > and other decorations) disappear. If I click on the "Render" button to
> > disable rendering, then click again to re-enable, the map appears. But
> > again, any zooming or panning causes it to disappear. I've tried palying
> > with the Rendering options "Update display after reading 1 feature", but
> > that didn't change anything.
>
> This looks like a bug which was reported for Mac OS X a while ago. I
> have a patch which is essentially complete but I don't have the
> capability to build QGIS for Windows. If you or someone else can do a
> source build, I would be interested in finding out if the patch fixes
> your problem.
>
> The patch currently has two deficiencies which probably don't affect you:
> 1.) errors are not reported until one or two refreshes later.
> 2.) the indirection code for layers which return urls instead of bitmaps
> has not been tested.
>
> The refresh problem arises from the fact that the WMS layer is not
> requested until after the redraw cycle begins. Om a Mac (and probbably
> Windows too, based upon your observations), drawing cannot be
> interrupted to do something else -- either you already possess the
> bitmap or you don't start drawing. The reason you don't see the image
> until some future action is that the WMS image don't show up until after
> the refresh cycle that requested it has competed.
>
> > On an Ubuntu machine with the debian binary (Thanks to Jachym Cepicky!),
> > pulling layers from the same WMS server, I don't see this behavior at
> > all.
>
> The reason it works using Ubuntu is that X11 was designed as a
> client/server display system. Since the display doesn't need to be on
> the same machine as the application, X11 is most likely not confounded
> by network requests inside draw events.
>
> The fix I made is to remove the synchronous network request inside the
> draw event with async requests which must be completed before starting
> to draw. This also speeds things up for multiple WMS layers since all
> layers are requested in parallel rather than serially.
>
> > BTW, displaying layers using the WFS plugin from the same server works
> > well on both systems.
>
> The WFS plugin doesn't make network requests inside draw events so the
> problem doesn't happen for WFS.
>
> One further request from readers: does anyone know of a WMS server that
> returns an indirect pointer rather then a bitmap? The main reason I
> haven't submitted this patch previously is that I haven't been able to
> test that situation. Alternatively, I could add a message "Indirect
> retrieval temporarily disabled: send a url if you would like this
> feature back."
>
> Tom
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.qgis.org
> http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user



-- 
Dr. Marco Hugentobler
Institute of Cartography
ETH Zurich
Technical Advisor QGIS Project Steering Committee
marco.hugentobler at karto.baug.ethz.ch



More information about the Qgis-developer mailing list