Re: [Qgis-user] WMS Rendering Problems

2007-11-05 Thread Marco Hugentobler
Hi Tom,

You are right, resizing is a problem. I did some further tests on Linux and 
Mac, and found that resizing is a problem on both plattforms (maybe also on 
win, I didn't test). So I don't think it is a Mac specific issue. Also I 
found resizing can be a problem with large vector layers.

 r7316 doesn't fix the Mac WMS rendering problem; I am also using a Mac
 G4. To reproduce the bug, open a WMS layer and then resize or maximize
 the window. The layer is cleared and not redrawn. Other widgets such as
 the status and tool bars are sometimes drawn at incorrect locations too.

Maximizing worked on my G4 perfectly. I observed problems with the status and 
tool bar when resizing the window with the mouse (both on G4 and Linux).

 My guess is that the begin() of the second draw event is ignored as
 superfluous because the painter is already active. The second draw event
 then draws and successfully closes the painter. At this point, the
 resumed first draw is attempting to draw into an inactive painter.

That's why I tried to protect the QGraphicsRectItem from paint events in 
r7316:

if (mCanvas-isDirty())
  {
setEnabled(false);
mCanvas-render();
setEnabled(true);
  }

If the item is disabled, it does not receive events during the rendering. I 
have the impression that concurrent paint events are not the only problem. 
Maybe Qts update optimisation of QWidget and QGraphicsView is also a cause?


 It's probably best
 left for QGIS 1.1. For now, we should see if nested draw events can be
 eliminated without a major redesign.

I totally agree. As 0.9.1 is meant as a bugfix release, it would be nice to 
have a solution with minimal code changes.  

Regards,
Marco


On Sunday 04 November 2007 06:51:46 Tom Elwertowski wrote:
 Marco Hugentobler wrote:
  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.

 Hi Marco,

 r7316 doesn't fix the Mac WMS rendering problem; I am also using a Mac
 G4. To reproduce the bug, open a WMS layer and then resize or maximize
 the window. The layer is cleared and not redrawn. Other widgets such as
 the status and tool bars are sometimes drawn at incorrect locations too.

 Resizing a window by dragging the size control is a gold standard for
 testing Mac drawing code. If there are problems, they are most likely to
 show up while resizing a window.

 The problem is that the WMS implementation is not Qt processEvent
 safe. Moving to asynchronous network events is one way to make the code
 processEvent safe. Moving the synchronous transfer outside the draw
 event might also work. Using threads for drawing is probably the best
 solution. I chose the asynchronous approach because it seemed closest to
 a bug fix than a redesign.

 This is the problematic sequence of events:

 1. Resize window
 2. WMS provider initiates draw event.
 3. draw routine discovers layer needs refresh from WMS server.
 4. draw routine issues network request.
 5. QgsHttpTransaction calls processEvents so that network request can
 leave local machine.
 6. processEvents now runs other events while waiting for the remote
 response.
 7. there are drawing events pending due to setStatus signals from
 QgsHttpTransaction and QgsRasterLayer as well as for drawing the
 overview canvas. If a drag resize is in progress, there are also
 additional draw events due to the continued resizing of the main canvas.
 This is the bug -- a Mac draw event cannot be interrupted by another
 draw event.
 8. eventually we resume interrupted draw events which are not able to be
 resumed.

 Here is the Mac terminal log:

 Warning: QWidget::repaint: Recursive repaint detected
 Warning: QCoreGraphicsPaintEngine::begin: Painter already active
 Warning: QPainter::begin(): Returned false
 Warning: QPainter::end: Painter not active, aborted

 followed by many of:

 Warning: QWidget: It is dangerous to leave painters active on a widget
 outside of the PaintEvent

 My guess is that the begin() of the second draw event is ignored as
 superfluous because the painter is already active. The second draw event
 then draws and successfully closes the painter. At this point, the
 resumed first draw is attempting to draw into an inactive painter.

 If we don't change anything, we need to tell users that QGIS/Mac does
 not support resizing or maximizing project windows containing 

[Qgis-user] Automatic translation of menus

2007-11-05 Thread Agustin Lobo
A problem related with translation.
I've found that even if I select English during install
I get the QGis gui in Spanish, probably because of the locale.
There should be a way of actually selecting the language
in the Options. I want to present some data using QGis to a
group of international students and having the menus in
Spanish is a problem. It is also a problem
for reporting bugs and problems to this list.

Is there any way of having the menus in English?

Thanks!

Agus
-- 
Dr. Agustin Lobo
Institut de Ciencies de la Terra Jaume Almera (CSIC)
LLuis Sole Sabaris s/n
08028 Barcelona
Spain
Tel. 34 934095410
Fax. 34 934110012
email: [EMAIL PROTECTED]
http://www.ija.csic.es/gt/obster
___
Qgis-user mailing list
Qgis-user@lists.qgis.org
http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user


[Qgis-user] Graduated color

2007-11-05 Thread Agustin Lobo

I'm using QGis 0.9.0 for Win.

When I select Graduate Color
as the legend for AREA in the vector layer lakes from the
sample data, I get different colors as expected but
only the 2 extremes in the legend, while I was expecting a
continuous bar. Instead, if I select graduate
symbol I do get a full legend with as many colors as selected
classes, as expected.

Is this a bug or am I misunderstanding the tools?

Thanks

Agus

-- 
Dr. Agustin Lobo
Institut de Ciencies de la Terra Jaume Almera (CSIC)
LLuis Sole Sabaris s/n
08028 Barcelona
Spain
Tel. 34 934095410
Fax. 34 934110012
email: [EMAIL PROTECTED]
http://www.ija.csic.es/gt/obster
___
Qgis-user mailing list
Qgis-user@lists.qgis.org
http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user


[Qgis-user] Project Projection

2007-11-05 Thread Agustin Lobo
I'm using QGis 0.9.0 fro Win.

I follow the manual section 7.2.1. Specifying a Projection.
I open a the spearfish mapset and display the raster layer spot.image,
then select Project Properties/Projection and enable OTF.
Click OK and the displayed raster vanishes. I open the
Projection menu and the selected projection is still
the one by default (lonlat) instead of the one of
spot.image (utm). This seems in contradiction with the manual:
One
way to specify the map projection is to first load a layer with the 
projection you want for the entire
map. Then open the Project Properties dialog and click on the Enable on 
the fly projection checkbox.
You can now close the Project Properties dialog and add additional 
layers to the map.

If I do select the utm settings of spot.image in Project 
Properties/Projection, the display seems to work fine.

BTW, if I were displaying now another layer for the same
geographic area but in another projection with OTF enabled, could
I save the layer in the new projection? In other words, can QGis be
used to reproject layers and save them with the new projections?

Thanks,

Agus

-- 
Dr. Agustin Lobo
Institut de Ciencies de la Terra Jaume Almera (CSIC)
LLuis Sole Sabaris s/n
08028 Barcelona
Spain
Tel. 34 934095410
Fax. 34 934110012
email: [EMAIL PROTECTED]
http://www.ija.csic.es/gt/obster
___
Qgis-user mailing list
Qgis-user@lists.qgis.org
http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user


[Qgis-user] Automatic translation of menus

2007-11-05 Thread Lubos Balazovic
Hi Agus
in Windows there is only one way how to set language used in QGIS -- it is
necessary to set English language (or ither preffered language) in Regional
and Language Options window from Control panel (or set in directly in
Registry). Command line parameter lang works only in Linux and language
which you have chosen during the install process is used in Install wizard
only.

Lubos

Agustin Lobo [EMAIL PROTECTED] wrote:

 You are right, sorry about it: I'm using the Windows version
 for 0.9.0

 Agus

 Hans Cats escribi?:
  You don't say what platform you are on, but if you are on Linux start
  qgis from the command line with the command 'LC_ALL=en_US qgis'.
 
  Hans
 
  2007/11/5, Agustin Lobo  [EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED]:
 
  A problem related with translation.
  I've found that even if I select English during install
  I get the QGis gui in Spanish, probably because of the locale.
  There should be a way of actually selecting the language
  in the Options. I want to present some data using QGis to a
  group of international students and having the menus in
  Spanish is a problem. It is also a problem
  for reporting bugs and problems to this list.
 
  Is there any way of having the menus in English?
 
  Thanks!
 
  Agus
  --
  Dr. Agustin Lobo
  Institut de Ciencies de la Terra Jaume Almera (CSIC)
  LLuis Sole Sabaris s/n
  08028 Barcelona
  Spain
  Tel. 34 934095410
  Fax. 34 934110012
  email: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
  http://www.ija.csic.es/gt/obster
  ___
  Qgis-user mailing list
  Qgis-user@lists.qgis.org mailto:Qgis-user@lists.qgis.org
  http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
 
 

 --
 Dr. Agustin Lobo
 Institut de Ciencies de la Terra Jaume Almera (CSIC)
 LLuis Sole Sabaris s/n
 08028 Barcelona
 Spain
 Tel. 34 934095410
 Fax. 34 934110012
 email: [EMAIL PROTECTED]
 http://www.ija.csic.es/gt/obster


 --

 ___
 Qgis-user mailing list
 Qgis-user@lists.qgis.org
 http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user


 End of Qgis-user Digest, Vol 21, Issue 8
 

___
Qgis-user mailing list
Qgis-user@lists.qgis.org
http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user


Re: [Qgis-user] [Qgis-developer] 'Publish to web' plugin for QGIS mapserver

2007-11-05 Thread Paolo Cavallini
Marco Hugentobler ha scritto:

 On the QGIS mapserver page 
 (http://karlinapp.ethz.ch/qgis_wms/download/index.html) there are sources and 
 binary packages available, both for 'QGIS mapserver' and the 'publish to web' 
 Plugin.

Hi Marco.
Have you thought of making a real deb package of it? It would be great
to allow more users to install it and test it.
The DebianGIS project is here to help.
All the best.
pc
-- 
Paolo Cavallini, see: http://www.faunalia.it/pc



signature.asc
Description: OpenPGP digital signature
___
Qgis-user mailing list
Qgis-user@lists.qgis.org
http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user