Re: [Qgis-developer] Fwd: Threads in sextante

2012-05-14 Thread kimaidou
Hi all

+1 for using QProcess. I am using it in Lizmap Plugin to run external
librairies (winSCP on windows, lftp on linux), and it works great. You can
easily connect signals like readyReadStandardOutput(),
readyReadStandardError() and finished(int, QProcess::ExitStatus) to your
plugin methods.

Michael

2012/5/13 Etienne Tourigny etourigny@gmail.com

 Victor,

 I agree on all your points.

 May I suggest to have a unique interface/approach that other existing
 interfaces can benefit from (i.e. standalone gdaltools and ftools).

 It seems that QProcess is an interesting candidate (and QThread when
 not using external app.), because it works in both c++ and in pyqt
 (ref. gdaltools) - plus there is already code inside qgis that uses
 it.

 my 2 centavos
 Etienne

 On Sun, May 13, 2012 at 6:13 PM, Victor Olaya vola...@gmail.com wrote:
  Here is my opinion on all that, in short:
 
  -The main idea of using threads is not now to execute multiplep
  algorithms at the same time, so we can remove a lot of complexity
  (like 2 processes writing the same file, as it was mentioned)
 
  -Implementing a canceling mechanism is going to be the greatest
  improvement once we have the threading stuff
 
  -So, for me, this is what should be done:
 
   1)implementing the threading part
   2) implement the cancelling mechanism (a responsive cancel button, etc)
   3) modifying algorithm to respond to cancellin events.
 
  I think that would be more than enough for a first part, and it would
  be a great improvement for SEXTANTE
 
  Regards
 
  p.s. Just to let you know, I am leaving for Honduras tomorrow, and
  will be there working for 2 weeks, so I not might be very active on
  the lists during the next 15 days or so
 
  2012/5/13 Marco Hugentobler marco.hugentob...@sourcepole.ch:
  Hi Alex
 
 
 Also I think about rewritting fTools in C++ and integrating its
 algorithms into QGIS
 analysis library. This makes tools a bit faster and will allow to use
 algorithms in
 plugins
 
  That would be a great enhancement and leverage the analysis library as a
  whole.
 
  Regards,
  Marco
 
 
 
 
  On 13.05.2012 09:23, Alexander Bruy wrote:
 
  Hi Etienne,
 
  2012/5/12 Etienne Tourignyetourigny@gmail.com:
 
  I stand corrected then - I guess I was confusing it with ftools, which
  is blocking and does not spawn a process.
  Any way ftools could be adapted to use the same approach as gdaltools?
 
  most fTools functions already implemented as threaded, but there are
 some
  minor issues. I work on improving processes handing in fTools, and
 several
  tools already don't block main QGIS window, has non-modal dialogs and
  allows
  to cancel running process.
 
  Also I think about rewritting fTools in C++ and integrating its
  algorithms into QGIS
  analysis library. This makes tools a bit faster and will allow to use
  algorithms in
  plugins
 
 
 
  --
  Dr. Marco Hugentobler
  Sourcepole -  Linux  Open Source Solutions
  Churerstrasse 22, CH-8808 Pfäffikon SZ, Switzerland
  marco.hugentob...@sourcepole.ch http://www.sourcepole.ch
  Technical Advisor QGIS Project Steering Committee
 
 
  ___
  Qgis-developer mailing list
  Qgis-developer@lists.osgeo.org
  http://lists.osgeo.org/mailman/listinfo/qgis-developer
  ___
  Qgis-developer mailing list
  Qgis-developer@lists.osgeo.org
  http://lists.osgeo.org/mailman/listinfo/qgis-developer
 ___
 Qgis-developer mailing list
 Qgis-developer@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/qgis-developer

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] show grid on map canvas (similiar to grid used in composer) - strategy?

2012-05-14 Thread Etienne Tourigny
Hi Bob,

Output looks really nice but I see 2 issues:

1 - grass is optional, not part of qgis core
2 - made for PS output, may not fit nicely with the composer nor the map canvas

Perhaps there is a workaround for 2 ?

Etienne

On Mon, May 14, 2012 at 2:47 AM, Bob and Deb bobd...@gmail.com wrote:
 I wonder if http://grass.osgeo.org/wiki/Ps.output might give good ideas for
 drawing a grid on the map canvas.

 On Wed, May 9, 2012 at 2:00 PM, Etienne Tourigny etourigny@gmail.com
 wrote:

 Hi all,

 I would like to add support to draw a grid on the map canvas, in a way
 similar to what is done in the map composer (although perhaps without
 the annotations on the borders).

 What should be the approach used?

 1) plugin or core?
 2) rubberbands or basic plot functions triggered after mapCanvas update?

 I think both drawing strategies are possible using a plugin.

 It would be best to write in the core, assuming there is sufficient
 interest in this, but it will take time to trickle down to the stable
 version (an argument for making it a plugin).

 I know the current workaround is to create a vector grid with ftools,
 but that is a little clunky.

 Any thoughts?
 Etienne
 ___
 Qgis-developer mailing list
 Qgis-developer@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/qgis-developer


___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] show grid on map canvas (similiar to grid used in composer) - strategy?

2012-05-14 Thread Bob and Deb
I was mostly interested in seeing qgis having similar grid symbology to
ps.output.
On May 14, 2012 9:51 AM, Etienne Tourigny etourigny@gmail.com wrote:

 Hi Bob,

 Output looks really nice but I see 2 issues:

 1 - grass is optional, not part of qgis core
 2 - made for PS output, may not fit nicely with the composer nor the map
 canvas

 Perhaps there is a workaround for 2 ?

 Etienne

 On Mon, May 14, 2012 at 2:47 AM, Bob and Deb bobd...@gmail.com wrote:
  I wonder if http://grass.osgeo.org/wiki/Ps.output might give good ideas
 for
  drawing a grid on the map canvas.
 
  On Wed, May 9, 2012 at 2:00 PM, Etienne Tourigny 
 etourigny@gmail.com
  wrote:
 
  Hi all,
 
  I would like to add support to draw a grid on the map canvas, in a way
  similar to what is done in the map composer (although perhaps without
  the annotations on the borders).
 
  What should be the approach used?
 
  1) plugin or core?
  2) rubberbands or basic plot functions triggered after mapCanvas update?
 
  I think both drawing strategies are possible using a plugin.
 
  It would be best to write in the core, assuming there is sufficient
  interest in this, but it will take time to trickle down to the stable
  version (an argument for making it a plugin).
 
  I know the current workaround is to create a vector grid with ftools,
  but that is a little clunky.
 
  Any thoughts?
  Etienne
  ___
  Qgis-developer mailing list
  Qgis-developer@lists.osgeo.org
  http://lists.osgeo.org/mailman/listinfo/qgis-developer
 
 

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Re: show grid on map canvas (similiar to grid used in composer) - strategy?

2012-05-14 Thread Larry Shaffer
Hi John,

On Mon, May 14, 2012 at 5:43 AM, John Donovan mersey.vik...@gmail.comwrote:

 On 13 May 2012 22:49, Etienne Tourigny etourigny@gmail.com wrote:
 ...
 
  Basically I think there could be 2 concurrent and complementary ways
  to implement grids:
 
  1) basic grid in core, similar to what is already in the composer map
  (and in my branch)
  2) more refined grid(s) as plugin/vector layers, whose rendering order
  can be fine-tuned

 Nice work Etienne! Over the weekend, I've knocked up a little plugin
 of the second type - a plugin layer that uses the new symbology
 system.

 It's marked as experimental, and there are a few things on the TODO
 list, but it can be found in my plugin repo:
 http://109.123.122.13/qgis/plugins.xml

 One of the todo's is saving the styling information - I can't find
 where I can get the XML of the symbol for my writeXml() function. Any
 ideas?
 ...


I tried your Grid Overlay plugin and this is what I found.

Same error as Etienne reported:

Traceback (most recent call last):
 File /home/tourigny/.qgis/python/
plugins/grid_overlay/gridpluginlayer.py,
line 63, in draw
   self.symbol.renderPolyline(polyline, renderContext)
...

it also occurs when I cancel the dialog. The plugin layer is made
regardless of cancelling dialog on initial plugin launch.


When I click the 'Set Style...' button I get this error:

 Traceback (most recent call last):
  File
/Users/larrys/.qgis/python/plugins/grid_overlay/gridpropertiesdialog.py,
line 42, in chooseStyle
self, False)
TypeError: QgsSymbolV2SelectorDialog(QgsSymbolV2, QgsStyleV2,
QgsVectorLayer, QWidget parent=None, bool embedded=False): argument 3 has
unexpected type 'GridPropertiesDialog'

Is that not implemented yet?


I noticed in your metadata.txt and __init__.py you assigned the Layers
category, but the action doesn't show up there. Does it need to use the
following to be added to/removed from the Layer menu? (worked when I edited
gridoverlay.py):

self.iface.insertAddLayerAction(self.action_newGrid)
self.iface.removeAddLayerAction(self.action_newGrid)


Tested with QGIS 1.8 rev.69ef4de on Mac 10.6.8.

Looking forward to using your plugin on the current map I am working with.


Regards,

Larry Shaffer
Dakota Cartography
Black Hills, South Dakota
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Fw: [Qgis-developer] crash on startup

2012-05-14 Thread Pedro Venâncio
Hi,

Sorry to insist, but still unable to start QGIS on Debian Wheezy.

I appreciate any support.

Thank you very much!


Best regards,
Pedro




- Forwarded Message -
From: Pedro Venâncio 

Hi,

I'm also experiencing this problem after the last Debian (Wheezy) upgrade.

I tried this solution, creating a link, but still giving me this error:

   pedro@debian-amilo:~$ qgis
   Warning: loading of qgis translation failed 
[/usr/share/qgis/i18n//qgis_en_US]
   Warning: loading of qt translation failed 
[/usr/share/qt4/translations/qt_en_US]
   qgis.bin: /tmp/buildd/sip4-4.13.2/siplib/siplib.c:10938: sipEnumType_alloc: 
Assertiva `(((currentType)-td_flags  0x0007) == 0x0003)' falhou.
   Abortado

Here is the link that I created:

   pedro@debian-amilo:~$ ls -lh /usr/lib/x86_64-linux-gnu/libQtWebKit.so 
   lrwxrwxrwx 1 root root 23 Mai 13 00:11 
/usr/lib/x86_64-linux-gnu/libQtWebKit.so - /usr/lib/libQtWebKit.so

What am I doing wrong?

I've also tried to upgrade the libqtwebkit-dev and libqtwebkit4 with the sid 
repository, but QGIS continues to crash.

Thanks!

Best regards,
Pedro Venâncio

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] Re: Removing old labelling

2012-05-14 Thread kfj

Nathan Woodrow wrote
 
 
 Any objections for removing the old labelling stuff?
 Is there anything the old one can do the new one can't?
 

I have several issues with the new labelling engine.

- I can only set an angle if I also set x and y coordinates (which I have to
artificially add as fields to my data, since they are only in the geometry
initially)
- the labels aren't placed precisely where they should be
- and, finally, as I noted just now, I can't create upside-down labels, as I
have described in
  http://hub.qgis.org/issues/5593

I'd propose the new labelling engine is worked over. I have seen others
complain that it doesn't do as they expect. I can't use it for the reasons
given above, so I'd have a hard time if the old engine was removed.

Kay

--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/Removing-old-labelling-tp4546541p4974532.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Blocking issues?

2012-05-14 Thread Etienne Tourigny
Hi devs,

I was wondering what is the current status of 1.8 release.  I have a
number of new features I would like to create pull requests for, but I
guess it is better to wait until 1.8 release before that.

Etienne

On Fri, May 4, 2012 at 8:26 AM, Marco Hugentobler
marco.hugentob...@sourcepole.ch wrote:
 ok, then can we close the ticket? What about also adding a warning when
 a user on win tries to print a large format?


 Agreed, it is reasonable to add a warning for win32 (though I need to make a
 few experiments to figure out the pixel limit that works).

 Regards,
 Marco

 Am 04.05.2012 11:46, schrieb Giovanni Manghi:

 Hi Marco,

 I've just tried to print to A0 with QGIS 1.6 on win7 (64bit, but QGIS
 compiled on WoW 32 bit) and got the crash. For me, it looks like a
 memory problem, not like a regression.
 -QGIS on win7 compiled with msvc 64 bit: printing to A0 works
 -Linux 64bit: printing to A0 works (I remember it worked on 32bit Linux
 too, probably because gcc is able to use more memory than msvc 32bit).
 - No problem on Mac 64bit

 right, this is what it is reported in the tickets. The problem surfaces
 only on win32. I also made a few tests months ago (see the ticket) but
 for me as for other users qgis 1.6 seemed to work fine (but maybe it was
 a matter of the size/weight of the project).


 So the resolution is to use a 64bit compiled executable on Windows.
 Since at Sourcepole, we need to have a 64bit win version ready for our
 clients, we will also provide a public download for 1.8.

 ok, then can we close the ticket? What about also adding a warning when
 a user on win tries to print a large format?


 cheers

 -- Giovanni --



 --
 Dr. Marco Hugentobler
 Sourcepole -  Linux  Open Source Solutions
 Weberstrasse 5, CH-8004 Zürich, Switzerland

 marco.hugentob...@sourcepole.ch http://www.sourcepole.ch
 Technical Advisor QGIS Project Steering Committee

 ___
 Qgis-developer mailing list
 Qgis-developer@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/qgis-developer
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: Fw: [Qgis-developer] crash on startup

2012-05-14 Thread Salvatore Larosa
Il giorno lun, 14/05/2012 alle 10.51 -0700, Pedro Venâncio ha scritto:
 Hi,
 
 Sorry to insist, but still unable to start QGIS on Debian Wheezy.
 
 I appreciate any support.
 
 Thank you very much!


Hi Pedro,

probabily depends on the last Qt update in Debina wheezy!

Did you try to recompile?



-- 
Salvatore Larosa
linkedIn: http://linkedin.com/in/larosasalvatore
twitter: @lrssvt
skype: s.larosa
IRC: lrssvt

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Blocking issues?

2012-05-14 Thread Giovanni Manghi
Hi Etienne,

On Mon, 2012-05-14 at 16:17 -0300, Etienne Tourigny wrote:
 Hi devs,
 
 I was wondering what is the current status of 1.8 release.  I have a
 number of new features I would like to create pull requests for, but I
 guess it is better to wait until 1.8 release before that.


http://hub.qgis.org/projects/quantum-gis/issues?query_id=23

I recently spotted another bug that caused a crash but Alex promptly
fixed it. So far then the above 3 tickets are still the confirmed
regressions. Other things are surfacing but all stuff also confirmed in
1.7.4.

cheers

-- Giovanni --

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Re: show grid on map canvas (similiar to grid used in composer) - strategy?

2012-05-14 Thread John Donovan
Hi Larry and Etienne,
Thanks for being brave!

On 14 May 2012 18:48, Larry Shaffer lar...@dakotacarto.com wrote:

 I tried your Grid Overlay plugin and this is what I found.

 Same error as Etienne reported:


 Traceback (most recent call last):
  File /home/tourigny/.qgis/python/
 plugins/grid_overlay/gridpluginlayer.py,
 line 63, in draw
    self.symbol.renderPolyline(polyline, renderContext)
 ...

That's odd, I'm using 1.7.4 and Python 2.7.2, but I can't imagine the
API to have changed. It runs fine on both my Linux and Windows boxes.
Looking at the C++ docs, indeed RenderPolyline() takes a QgsFeature as
the second parameter, so I'm not sure why it should work for me!


 it also occurs when I cancel the dialog. The plugin layer is made regardless
 of cancelling dialog on initial plugin launch.

Mea culpa.

 When I click the 'Set Style...' button I get this error:

 Traceback (most recent call last):
   File
 /Users/larrys/.qgis/python/plugins/grid_overlay/gridpropertiesdialog.py,
 line 42, in chooseStyle
     self, False)
 TypeError: QgsSymbolV2SelectorDialog(QgsSymbolV2, QgsStyleV2,
 QgsVectorLayer, QWidget parent=None, bool embedded=False): argument 3 has
 unexpected type 'GridPropertiesDialog'


 Is that not implemented yet?

Another odd one. GridPropertiesDialog, the class in which this
function is defined, is inherited from QtGui.QDialog, so should make a
valid parent to the symbol selector dialog. I've set it to None on my
machine with no ill effects.



 I noticed in your metadata.txt and __init__.py you assigned the Layers
 category, but the action doesn't show up there. Does it need to use the
 following to be added to/removed from the Layer menu? (worked when I edited
 gridoverlay.py):

 self.iface.insertAddLayerAction(self.action_newGrid)
 self.iface.removeAddLayerAction(self.action_newGrid)

Ah yes, a copy-and-paste code bug. Ahem...



 Tested with QGIS 1.8 rev.69ef4de on Mac 10.6.8.

 Looking forward to using your plugin on the current map I am working with.

I'm glad to hear others will be using it, when it works.


Regards,
John


-- 
One of the advantages of being disorderly is that one is constantly
making exciting discoveries. - AA Milne
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] Trying to build qgis in Win

2012-05-14 Thread Anibal Alarcon
Hello, I'm trying to build qgis in my virtualized WinXP (with a little
change in a simple marker) and have one question and one problem... The
batch with the enviroment that both has the VC++ and the OSGeo4W variables
leave in blank PYTHONPATH is correct? And when I run the batch I get : The
system can not find the path specified
(_path=C:\OSGeo4W\apps\Python27\Scripts)...
I change in python.bat the line: set
_path=SGEO4W_ROOT%\apps\Python27\Tools\Scripts because this exist but I get
the same.
Do not know if these steps are OK

I continued to cmake-gui, configure and generate and no problem. Then in vc
load (from my build) the qgis1.8.0.sln and Build... How I know if this is
OK? Then the next step is not clear for my. I must close the proyect and
open Install target (which is the file?) and build? ...

That's why I like both Debian...
any idea...

Thanks

Anibal
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Re: show grid on map canvas (similiar to grid used in composer) - strategy?

2012-05-14 Thread Larry Shaffer
Hi John,

On Mon, May 14, 2012 at 1:36 PM, John Donovan mersey.vik...@gmail.comwrote:

 Hi Larry and Etienne,
 Thanks for being brave!

 On 14 May 2012 18:48, Larry Shaffer lar...@dakotacarto.com wrote:
 
  I tried your Grid Overlay plugin and this is what I found.
 
  Same error as Etienne reported:
 
 
  Traceback (most recent call last):
   File /home/tourigny/.qgis/python/
  plugins/grid_overlay/gridpluginlayer.py,
  line 63, in draw
 self.symbol.renderPolyline(polyline, renderContext)
  ...

 That's odd, I'm using 1.7.4 and Python 2.7.2, but I can't imagine the
 API to have changed. It runs fine on both my Linux and Windows boxes.
 Looking at the C++ docs, indeed RenderPolyline() takes a QgsFeature as
 the second parameter, so I'm not sure why it should work for me!


1.7.4 method:
QgsLineSymbolV2.renderPolyline(QPolygonF, QgsRenderContext, int layer=-1,
bool selected=False)

1.8 method:

QgsLineSymbolV2.renderPolyline(QPolygonF, QgsFeature, QgsRenderContext, int
layer=-1, bool selected=False)


  When I click the 'Set Style...' button I get this error:
 
  Traceback (most recent call last):
File
 
 /Users/larrys/.qgis/python/plugins/grid_overlay/gridpropertiesdialog.py,
  line 42, in chooseStyle
  self, False)
  TypeError: QgsSymbolV2SelectorDialog(QgsSymbolV2, QgsStyleV2,
  QgsVectorLayer, QWidget parent=None, bool embedded=False): argument 3 has
  unexpected type 'GridPropertiesDialog'
 
 
  Is that not implemented yet?

 Another odd one. GridPropertiesDialog, the class in which this
 function is defined, is inherited from QtGui.QDialog, so should make a
 valid parent to the symbol selector dialog. I've set it to None on my
 machine with no ill effects.


1.7.4 method:
QgsSymbolV2SelectorDialog(QgsSymbolV2, QgsStyleV2, QWidget parent=None,
bool embedded=False)

1.8 method:

QgsSymbolV2SelectorDialog(QgsSymbolV2, QgsStyleV2, QgsVectorLayer, QWidget
parent=None, bool embedded=False)

I can't even find this method in the current API docs. Just referenced in
the error dialog, and last seen in the 1.7.4 API docs.

Didn't see these documented in the API changes part of the wiki [0]. Maybe
there is a different, or more up-to-date, listing somewhere.


I tested your plugin with 1.7.4-4 on Mac 10.6.8 and it works fine. One
suggestion: maybe allow the rotation for be about a chosen point, instead
of only SE corner?

[0] http://hub.qgis.org/wiki/17/API_changes_for_version_20

Regards,

Larry Shaffer
Dakota Cartography
Black Hills, South Dakota
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] new regression on to-be 1.8: crs attribution on newly loaded layer broken

2012-05-14 Thread Mathieu Pellerin
Something's seriously wrong with CRS attribution for newly added layers in
qgis-master (soon to be 1.8). I have no idea what is happening, however the
steps below will reproduce the issue:

1) Add moeareas.shp (uploaded as attachment in issue 5598:
http://hub.qgis.org/issues/5598) to a QGIS project
2) Open the Properties dialog and go to the General tab
3) Take note of the custom CRS applied to the layer

The above shapefile's coordinate reference system is EPSG:3148, defined as
follow:
+proj=utm +zone=48 +a=6377276.345 +b=6356075.41314024
+towgs84=198,881,317,0,0,0,0 +units=m +no_defs

The custom CRS created by qgis 1.8 when loading the above shapefile:
+proj=utm +zone=48 +a=6377276.345 +b=6356075.41314024 +units=m +no_defs

QGIS 1.7.x correctly attributes the newly loaded layer its proper CRS
(EPSG:3148); QGIS 1.8 however creates the custom CRS with the exact same
projection settings (minus the +towgs84). Something must be wrong in the
CRS attribution algorithm / function.

This issue leads to misalignment with on-the-fly re-projection projects in
which WGS84 layers  UTM layers are mixed together.

It's a pretty serious regression from 1.7.x and it's present on windows and
linux. Issue reported: http://hub.qgis.org/issues/5598.

Math
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer