Re: [QGIS-Developer] SIP coverage test removal and Travis optimization

2017-06-02 Thread Rouzaud Denis
Hi
> On 2 Jun 2017, at 11:48, Matthias Kuhn 🌍  wrote:
> 
> Hi Denis
> 
> On 06/02/2017 11:17 AM, Denis Rouzaud wrote:
>> Hi Nyall,
>> 
>> Thanks for the feedback.
>> 
>> Le mer. 31 mai 2017 Ă  23:14, Nyall Dawson > 
>> >> a Ă©crit :
>> 
>>On 31 May 2017 at 22:15, Denis Rouzaud > 
>>>> wrote:
>>> Dear all,
>>> 
>>> Our automatic SIP files generation is almost there and I would like to
>>> remove the SIP coverage test from running on Travis.
>> 
>>> Is this acceptable?
>> 
>>In general, but...
>> 
>>> Is there any reason to keep the test (running on Travis)?
>> 
>>There's 2 extra things the sip coverage test does which the sipify
>>test doesn't:
>> 
>>1. Flags if a class is totally missing from the bindings. The sipify
>>test can't detect when someone's added a new header to the project
>>without adding a corresponding .sip include to the
>>core/gui/server/analysis.sip files. Ideally this would be fixed with
>>some cmake magic which avoids the need to even manually build the
>>core.sip/gui.sip/etc files...
>> 
>> 
>> So, we have 3 types of headers in core:
>> 1) automatic SIP file creation
>> 2) manual SIP file creation (might be not needed anymore at some point)
>> 3) no SIP file creation
> 
> How do you intend to handle additional files like `conversion.sip`?
> 
> Something like this?
> 
> core.sip.template:
> 
> ...
> %Include conversion.sip
> [auto_generated_files] // Some kind of placeholder
> …


Or something like 
%Include auto_generated_files.sip
with a file with all of them.

Anyway, something like this, yes.

Would you prefer the CMake or the script approach?
I find it weird that CMake would output files which would be written in the 
source, so I would vote for the script.


> 
> Matthias
> 
>> 
>> What I would propose is to use some macro definition in the header for
>> case 2) and 3), like:
>> #define SIP_MANUALLY_CREATED
>> or
>> #define SIP_NOT_GENERATED
>> 
>> By default, the SIP file would be automatically created.
>> 
>> The core/gui/etc.sip could then automatically be generated either by
>> CMake or by a script. 
>> 
>> This would depend if we want to keep the SIP files in the source. I tend
>> to think they're quite useful there for inspection and that the sipify
>> script is (still?) too fragile to fully trust it.
>> If we keep them in source, does it make sense to use CMake to build the
>> core.sip file? or a script run by prepare-commit.sh as it is now?
>> 
>> What do you think?
>> 
>> 
>> 
>> 
>> 
>>2. Checks that the methods *are* actually accessible in the Python
>>bindings. Occasionally there'll be weird things where even though a
>>method is correctly listed in the .sip files, it just doesn't exist in
>>the Python library. There's no pattern here - it happens differently
>>on different platforms. But this is a sip bug, so I don't really care
>>if we lose this extra check.
>> 
>>For me 1 would need to be addressed before we can drop the test.
>> 
>>Nyall
>> 
>> 
>> 
>> ___
>> QGIS-Developer mailing list
>> QGIS-Developer@lists.osgeo.org 
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer 
>> 
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer 
>> 
>> 
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org 
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer 
> 
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer 
> 
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] QGIS Custom Widget in Qt Designer

2016-12-07 Thread Rouzaud Denis
Hi Marco,

This doesn’t sound like a QGIS custom widget issue since QWebView is not 
related to QGIS.
It seems that QWebView is well defined in PyQt4 compatibility layer [0].
The issue is probably that you try to run system uic instead of qgis.PyQt.uic.

This make me thunk of the reply to Matteo as well….try to run qgis.PyQt.uic 
instead of uic

I hope this helps

Denis

[0] 
https://github.com/qgis/QGIS/blob/release-2_18/python/PyQt/PyQt4/QtWebKitWidgets.py#L32
 





> On 7 Dec 2016, at 12:51, Marco Bernasocchi  wrote:
> 
> Salut Denis,
> 
> I'm a bit lost, I see in plugins like the resources sharing tool [0]
> 
> 
>  
>   QWebView
>   QWidget
>   QtWebKitWidgets/QWebView
>  
> 
> 
> and when I install the plugin I see:
> 
> This plugin is broken
> No module named QtWebKitWidgets.QWebView
> 
> this plugins also use the uic.loadUi approach
> 
> I've qgis installed from packages and also self build:
> marco@placebo:~/dev/QGIS/master/python/custom_widgets$ locate
> libqgis_customwidgets.so
> /usr/lib/x86_64-linux-gnu/qt4/plugins/designer/libqgis_customwidgets.so
> /usr/lib/x86_64-linux-gnu/qt4/plugins/designer/libqgis_customwidgets.so.2.18.1
> marco@placebo:~/dev/QGIS/master/python/custom_widgets$ locate
> qgis_customwidgets.py
> /home/marco/dev/QGIS/master/python/custom_widgets/qgis_customwidgets.py
> /home/marco/gis_data/pacsafe/QGIS/python/custom_widgets/qgis_customwidgets.py
> /usr/lib/python2.7/dist-packages/PyQt4/uic/widget-plugins/qgis_customwidgets.py
> /usr/lib/python2.7/dist-packages/PyQt4/uic/widget-plugins/qgis_customwidgets.pyc
> 
> 
> 
> Am I missing some magic somewhere? QtWebKitWidgets exists only from Qt5.
> in Qt4 it should still be QtwebKit.
> 
> ciao
> Marco
> 
> 
> [0]
> https://github.com/akbargumbira/qgis_resources_sharing/blob/master/resource_sharing/gui/ui/resource_sharing_dialog_base.ui#L598
> 
> 
> On 07.12.2016 22:58, Denis Rouzaud wrote:
>> Hi Matteo,
>> 
>> The file is not present simply because you did not install QGIS.
>> 
>> See here https://github.com/qgis/QGIS/blob/master/python/CMakeLists.txt#L287
>> 
>> 
>> Having it documented somewhere would be nice:
>> 
>> * Approach when installing
>> 
>> * Without installing: were to put libqgis_customwidget and
>> qgis_customwidgets.py, how to run pyuic.
>> 
>> 
>> Cheers,
>> 
>> Denis
>> 
>> On 12/07/2016 10:41 AM, matteo wrote:
>>> Hold on.. I should have manage it..
>>> 
>>> I discovered that my machine was missing the file
>>> 
>>> qgis_customwidgets.py
>>> 
>>> in the folder
>>> 
>>> /usr/lib/python2.7/dist-packages/PyQt4/uic/widget-plugins/
>>> 
>>> 
>>> in another machine I found that file and I copied it in the right folder
>>> (the above one) and now it seems working, that is the plugin with the
>>> custom widget is now correctly loaded without any more issues..
>>> 
>>> So many thanks Denis for the assistance..
>>> 
>>> 
>>> My question is now.. why was that file missing in the folder?
>>> In the other machine I ran Ubuntu and I was used to compile QGIS with
>>> debian rules.
>>> In this new machine I compile QGIS with make and run it directly from
>>> the output folder (so QGIS has never been installed with repository
>>> packages and/or deb files, don't know if this could be related to the
>>> problem)
>>> 
>>> I have some confusion on my mind..
>>> 
>>> If this is worth I can put this solution (if you think it is a solution
>>> and not a workaround) somewhere in the website or another place so that
>>> other people facing the same problem could solve the issue.
>>> 
>>> Many many thanks to all
>>> 
>>> Matteo
>> 
>> 
>> 
>> ___
>> Qgis-developer mailing list
>> Qgis-developer@lists.osgeo.org
>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>> 
> 
> -- 
> Marco Bernasocchi
> OPENGIS.ch - berna.io - 27summits.ch
> 

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

Re: [Qgis-developer] QGIS setup with Qt 5 on mac

2016-11-08 Thread Rouzaud Denis
Hi Larry,

Thanks a lot for tackling this!
Glad to read it’ll land soon, but no pressure ;)

Cheers,
Denis


> On 8 Nov 2016, at 18:13, Larry Shaffer  wrote:
> 
> Hi,
> 
> On Sun, Nov 6, 2016 at 7:23 PM, Etienne Trimaille 
> mailto:etienne.trimai...@gmail.com>> wrote:
> Thanks David and Matthias for providing some feedbacks about QGIS 3 on mac.
> I also would like QGIS 3 compiling on mac.
> 
> I hope you will update the install.md  on the repo when 
> you will have a working workflow ? Thanks
> 
> I have been preparing Homebrew and OSGeo4Mac 'taps' for this move and am now 
> focusing on QGIS 3 formulae, probably starting on Thursday or Friday. I hope 
> to have everything building and docs completed by the end of the weekend.
> 
> The new formulae will not be hosted in OSGeo4Mac or Homebrew (at least not 
> until there are stable releases), but in a specific tap for QGIS development 
> and Travis CI support:
> 
> https://github.com/qgis/homebrew-qgisdev 
> 
> 
> So, look for changes there as things progress. Please contribute or post bug 
> reports there for those dev formulae or docs, once they are available.
> 
> Regards,
> 
> Larry Shaffer
> Dakota Cartography
> Black Hills, South Dakota
>  
> 2016-11-01 1:22 GMT+07:00 Matthias Kuhn  >:
> Hi Diane and welcome aboard,
> 
> I also didn't manage to compile master on osx yet.
> 
> Some more information can be found here also:
> 
> https://github.com/OSGeo/homebrew-osgeo4mac/pull/146#issuecomment-254011621 
> 
> 
> I think most of the dependencies should meanwhile be available on
> homebrew (but not sure).
> 
> Regards
> Matthias
> 
> On 10/31/2016 06:56 PM, David Marteau wrote:
> > Hi
> >
> > I will speak with my own experience using and compiling Qgis on Mac (El 
> > capitan and Maverick):
> >
> > First I use Macport: MacPort use clang/libc++ by default (at least with 
> > XCode 5.3 on Maverick, 7.3 on El capitan) so this should solve one of your 
> > problems.
> > I have installed qt5 from MacPort without problems.
> >
> > The problems arise with some ports that do not fully support qt5 variants 
> > and you need to tweak some portfiles: qscintilla and py-qscintilla are one 
> > of them and are required by Qgis.
> > If you are interested I can give you my diff files for portfiles.
> >
> > I had to build qwt directly from sources because tweaking Macport portfiles 
> > was too painful, but I did not encounter any serious problems as far as I 
> > can remember.
> >
> > No source code was needed to be patched, only compilation configurations.
> >
> > Once you get all dependencies you need to set the cmake options accordingly 
> > to the path of your installation:
> >
> > Here is my defines:
> >
> > »   »   -DCMAKE_INSTALL_PREFIX:PATH=/Applications \
> > »   »   -DWITH_SERVER=ON \
> > »   »   -DWITH_PYSPATIALITE=ON \
> > »   »   
> > -DPYTHON_CUSTOM_FRAMEWORK:PATH=/opt/local/Library/Frameworks/Python.framework
> >   \
> > »   »   -DEXPAT_INCLUDE_DIR:PATH=/opt/local/include \
> > »   »   -DEXPAT_LIBRARY:FILEPATH=/opt/local/lib/libexpat.dylib \
> > »   »   -DSQLITE3_INCLUDE_DIR:PATH=/opt/local/include \
> > »   »   -DSQLITE3_LIBRARY:FILEPATH=/opt/local/lib/libsqlite3.dylib \
> > »   »   -DQT_QMAKE_EXECUTABLE:FILEPATH=/opt/local/libexec/qt5/bin/qmake \
> > »   »   
> > -DQWT_INCLUDE_DIR:PATH=/usr/local/qwt-6.1.3/lib/qwt.framework/Versions/6/Headers
> >  \
> > »   »   
> > -DQWT_LIBRARY:FILEPATH=/usr/local/qwt-6.1.3/lib/qwt.framework/Versions/6/qwt
> >  \
> > »   »   -DQCA_INCLUDE_DIR:PATH=/opt/local/include/qca \
> > »   »   -DQCA_LIBRARY:FILEPATH=/opt/local/lib/libqca.dylib \
> > »   »   -DQSCINTILLA_INCLUDE_DIR:PATH=/opt/local/libexec/qt5/include \
> > »   »   
> > -DQSCINTILLA_LIBRARY:FILEPATH=/opt/local/libexec/qt5/lib/libqscintilla2.dylib
> >  \
> > »   »   
> > -DQT_LRELEASE_EXECUTABLE:FILEPATH=/opt/local/libexec/qt5/bin/lrelease \
> >
> > I hope that full support for qt5 will be available from Macport soon, but 
> > for now I have managed to compile Qgis from the master branch without 
> > struggling too much.
> >
> > Best,
> > David
> >
> >> Le 31 oct. 2016 Ă  16:12, Diane Perez  >> > a Ă©crit :
> >>
> >> Dear QGIS developers,
> >>
> >> First of all, thank you very much for the great job, I have been a very 
> >> happy user for years !
> >>
> >> I would like to contribute now to the development, but I found myself 
> >> stuck at the installation of dependencies.
> >>
> >> According to the instructions of the INSTALL file provided with the source 
> >> code, mac users should use Qt 4 and compile and install a bunch of 
> >> dependencies for which binaries are not available (mainly Spatialindex, 
> >> SIP, QScintilla2, PyQt, Qwt and bison) before being able to compile QGIS. 
> >> I followed the instructions and got stuck at compiling QGIS as the master 
> >> now requi

Re: [Qgis-developer] QgsFieldExpressionWidget return the results of the expression

2016-05-10 Thread Rouzaud Denis
HI Matteo,


> On 10 May 2016, at 18:14, matteo  wrote:
> 
> Hi devs,
> 
> I'm struggling with a maybe simple issue..
> 
> In a plugin I have added a QgsFieldExpressionWidget connected to a 
> QgsMapLayerComboBox..
> 
> What I am currently trying to do without any result is to get a list of the 
> field values filtered with the result of the expression added
> 
> In a *normal* QgsFieldComboBox I achive it as follows:
> 
> # QgsMapLayerComboBox
> lay1 = self.Field1.layer()
> # QgsFieldComboBox
> lay1_f = self.Field1.currentField()
> 
> 
> # create the list of the selected fields
> f1 = []
>for i in lay1.getFeatures():
>f1.append(i[lay1_f])

You’re doing feature[field_name] which is fine, but doing feature[expression] 
is not valid because there is no index corresponding.
You need to evaluate the expression.

So basically, just test if currentField returns an expression or not.
If not, keep your line.
If it is, evaluate the expression 
https://qgis.org/api/classQgsExpression.html#a279785f0a59cc4ac977022797599bdc6 


I hope this helps!

Denis___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Begging for some fixes before LTR release

2016-02-23 Thread Rouzaud Denis

> On 23 Feb 2016, at 14:22, DelazJ  wrote:
> 
> Hi developers,
> 
> At less than a week for the release of the second LTR version (QGIS 2.14), 
> I'd like to draw your attention on two main issues that are not set as 
> blockers but I'd beg you to solve them:
> 
> #13575 (http://hub.qgis.org/issues/13575 ): 
> adds all the available layers to the legend in print composer instead of just 
> adding those that are visible in the map canvas. Not set as blocker (it 
> should imho) but AFAICT this behaviour was introduced in LTR 2.8 and it's not 
> optimal at all when you have a very big project.
> 
> #13418 (http://hub.qgis.org/issues/13418 ): 
> it makes preset visibility pretty unusable with print composers in (large) 
> project with multiple print composers. For any change you do to a preset, you 
> need to manually echo it in the map composer properties if you want your maps 
> to be up to date. It's just unmanageable in, once again, big project (since 
> 2.10 if I'm not wrong).

+1 this is indeed very painful.

> 
> I know that there are currently some blocking issues, maybe more sensitive 
> but these ones just block me (and surely many other people) in my daily work. 
> I'd be grateful to you if someone can give a look to these issues.
> 
> Thanks for the fixes :) and thanks for the great work you're doing with QGIS.
> 
> DelazJ
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

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

Re: [Qgis-developer] Vertex editor

2015-09-13 Thread Rouzaud Denis

> On 13 Sep 2015, at 15:00, Richard Duivenvoorde  wrote:
> 
> On 13-09-15 13:13, Radim Blazek wrote:
>> Is there a possibility to suppress vertex editor popup whenever a node
>> is selected?
> 
> Mmm, nice addition though!
> But maybe it lacks an option to not use it :-)
> 
> Another observation: when I create a line, and use the nodetool to edit
> one line, after clicking on a node, it immediately 'sticks' to the mouse
> and moves. In 2.8 the vertex only get's 'selected' and after this
> selecting you can move it. Is this intended behaviour?

Yes it is. Although, there will be another pre-selection state which will 
correspond to 2.8 behavior.
Although, on first click it will free the node.
The idea is that you don’t need to keep mouse button pressed while moving the 
node to allow using advanced digitising.

Marco has still some work to do in the node tool, you can follow discussion 
here:
http://hub.qgis.org/issues/13276 

Regarding the table view, I don’t know if Marco will allow disabling it. At 
least, it would be nice to just hide it.

Denis


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

Re: [Qgis-developer] refresh joined layers cache through python

2015-03-08 Thread Rouzaud Denis
Hi,

There is a PR open for this
https://github.com/qgis/QGIS/pull/771 

Open for quite a long time though.

Denis


> On 08 Mar 2015, at 18:54, Olivier Dalang  wrote:
> 
> Dear List,
> 
> I'm posting this to qgis-dev since I got no answer on qgis-user and it's a 
> bit technical.
> 
> 
> I'm using layers joins in my projects, and need to use the memory cache for 
> performance reasons.
> 
> This means that when I'm making changes on the joined layers, they won't 
> appear on the base layer until the project is reloaded.
> 
> Is there a way to trigger a refresh of the joined layer cache "manually" 
> through python ?
> 
> I looked at the API, but didn't find how to do so...
> 
> I found this class : QgsVectorLayerJoinBuffer which has a createJoinCaches 
> method, but I couldn't find how to get a reference to it from the VectorLayer.
> 
> There's also the createJoinCaches method of QgsVectorLayer, but it seem it 
> has no effect if the cache was already created (and that's what the docstring 
> says as well).
> 
> If there's no way to do it, does anyone have a workaround, hopefully a bit 
> lighter than reloading the project ?
>  
> Thanks a lot !
> 
> Olivier
> 
> ___
> 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] Snapping tolerance

2014-12-14 Thread Rouzaud Denis
Hi,

I would say +1 for map units.

Regarding Marco’s use case, using the 50cm limit should be equivalent in map 
units, no?

From my point of view, the settings of snapping are far too advanced for 95% of 
the usage. Let’s not make them even more complicated, just for a very specific 
use case.

My 2 ct.

Denis


> On 13 Dec 2014, at 07:02, Martin Dobias  wrote:
> 
> Hi
> 
> Recently I have been working on some snapping improvements (more about that 
> later) and I have found one slightly surprising thing about the configuration 
> of tolerances: if the tolerance unit is set to "map units", it actually means 
> "layer units" - i.e. units in layer's CRS and not in project's CRS. Recently 
> there was even a bug report filed for that: https://hub.qgis.org/issues/11634 
> 
> 
> I would like to change the behavior so that the "map units" in snapping 
> config dialog would mean units in project's CRS. Would there be any 
> objections?
> 
> Alternatively we could just rename "map units" to "layer units" to make it 
> less surprising (and eventually add a third option to use project's units).
> 
> Cheers
> Martin
> 
> ___
> 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] PostGIS warning details in QGIS master

2014-10-03 Thread Rouzaud Denis
QGIS is not pasting the field of the primary key to avoid conflict.

I am not sure to understand your problem.

I tested with two postgis layers having a primary key. In both layers, I have a 
feature with pkey = 1. I copy/paste from layer 1 to layer 2, and at end I have 
two features in layer 2, one with pkey= 1 and the second with pkwy =2.

paste was successful.

Could you provide a small dump of your postgis layers and the exact steps to 
reproduce?





On 03 Oct 2014, at 01:48, Pedro Venâncio  wrote:

> Hi Denis,
> 
> I just tested on Linux, with two simple shapefiles (attached), with only two 
> lines each. Making a copy of the shapefiles, all goes well.
> 
> If you import the shapefiles to postgis (with dbmanager) to multilinestring, 
> they stay with equal pkeys. When I do the copy / paste (which worked fine 
> with the same data in shapefile format), QGIS shows the warning message 
> "Paste features: no features could be successfully pasted.". Running QGIS 
> with GNU gdb, does not appear any error at the time the warning is shown.
> 
> I also tested this with points, multipoints, and Multipolygons, and the same 
> happens.
> 
> The proof that I believe show that the problem is in primary key is:
> 
> importing the two layers attached to the postgis with dbmanager, you get
> 
> layer_1
> id_0* | id | desc
> 1 | 1 | 1
> 2 | 2 | 2
> 
> layer_2
> id_0* | id | desc
> 1 | 1 | 1
> 2 | 2 | 2
> 
> *pkey
> 
> If I delete the second line of layer_2, and copy the second line of layer_1 
> and paste on layer_2, it already works, and layer_2 becomes:
> 
> layer_2
> id_0* | id | desc
> 1 | 1 | 1
> 3 | 2 | 2
> 
> (id_0 is 3 because of the sequence).
> 
> The only explanation I find for this behavior is QGIS verify the violation of 
> unique constraint of pkey field id_0, and launch the warning and prevent the 
> pasting.
> 
> What do you think?
> 
> Thanks!
> 
> Best regards,
> Pedro
> 
> 
> 
> 
> 2014-10-02 14:42 GMT+01:00 Rouzaud Denis :
> Hi Pedro,
> 
> As said, copy/paste only tries to convert geometries and will paste if 
> possible.
> 
> Foreign key violation is only detected by Postgis, so the reason why QGIS is 
> not actually pasting is not due to a FKey violation.
> 
> Do you have a debugging environment or can you provide some demo data?
> 
> Best wishes,
> 
> Denis
> 

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

Re: [Qgis-developer] PostGIS warning details in QGIS master

2014-10-02 Thread Rouzaud Denis
Hi Pedro,

As said, copy/paste only tries to convert geometries and will paste if possible.

Foreign key violation is only detected by Postgis, so the reason why QGIS is 
not actually pasting is not due to a FKey violation.

Do you have a debugging environment or can you provide some demo data?

Best wishes,

Denis


On 01 Oct 2014, at 17:23, Pedro Venâncio  wrote:

> Hi Denis,
> 
> Now copy/paste tries to convert geometries to match layer destination. So, 
> you probably had incompatible geometries like trying to paste lines in a 
> point layer.
> 
> 
> 
> Not in this case. Both layers were geometry (MultiLineString,20790). 
> 
> In previous versions the only problem that the warning message showed was a 
> violation of the PK constraint (as you can see in the images). And, in fact, 
> after that I did the job in QGIS master DB Manager, with an insert into and 
> select, skiping the PK field (serial), and it worked well.
> 
> Tested with today's QGIS master from OSGeo4W (64bits).
> 
> Thanks!
> 
> Pedro

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

[Qgis-developer] 'Qsci/qsciapis.h' file not found

2014-10-01 Thread Rouzaud Denis
Hi all,

I am trying to build QGIS on Mac OS Mavericks and I am having troubles with 
QScintilla.

While compiling, I reach this error

/Users/denis/Documents/code/QGIS/src/app/../gui/qgscodeeditor.h:22:10: fatal 
error: 'Qsci/qsciapis.h' file not found
#include 

Although, it exists in /usr/local/include/Qsci

and I used the following in cmake: -D QSCI_SIP_DIR=/usr/local/include/Qsci

Anybody has an idea what to look for ?

Thanks a lot,q

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

Re: [Qgis-developer] QGIS 2.5 vs 2.4 rendering mode

2014-09-30 Thread Rouzaud Denis

On 30 Sep 2014, at 09:28, PIERRE Sylvain  wrote:

> In my case, parallel rendering is on
> 
> It takes 15 seconds to render an area.
> With 2.2 or 2.4 release there’s no step like this during rendering an it 
> takes 5 seconds for same area / same data…

What about simplification?
> 
> -Message d'origine-
> De : qgis-developer-boun...@lists.osgeo.org 
> [mailto:qgis-developer-boun...@lists.osgeo.org] De la part de RĂ©gis Haubourg
> Envoyé : lundi 29 septembre 2014 21:04
> À : qgis-developer@lists.osgeo.org
> Objet : Re: [Qgis-developer] QGIS 2.5 vs 2.4 rendering mode
> 
> Hi, same here, I don't get exactly what's different with 2.4, and didn't 
> notice that during testing. Do we need special settings (On the fly 
> simplification, parallel rendering?) RĂ©gis
> 
> 
> 
> --
> View this message in context: 
> http://osgeo-org.1560.x6.nabble.com/QGIS-2-5-vs-2-4-rendering-mode-tp5164698p5164805.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
> ___
> 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] Split lines at intersection

2014-06-11 Thread Rouzaud Denis
Hi,

splitLinearGeometry is private, you won’t have access to it.
You shall use splitGeometry which is public
http://qgis.org/api/classQgsGeometry.html#a4c03fb2b37ce94bcf2295ed7896f665b

Cheers,

Denis


On 11 Jun 2014, at 12:42, mattwalsh  wrote:

> Hello,
> 
> Using pyqgis I would like to split a line feature where it intersects with
> another line. I have tried using the splitLinearGeometry function with no
> success. 
> 
> new_f = geom_feat.splitLinearGeometry([geom_feat_sp])
> AttributeError: 'QgsGeometry' object has no attribute 'splitLinearGeometry'
> 
> My end goal is to split a number of selected line features against each
> other so that all the selected lines are split at all intersections.
> 
> Could anyone point me in the right direction?
> 
> thanks
> Matt
> 
> 
> 
> 
> --
> View this message in context: 
> http://osgeo-org.1560.x6.nabble.com/Split-lines-at-intersection-tp5145241.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

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

Re: [Qgis-developer] add rasterlayer to qgsmapcanvas

2014-06-05 Thread Rouzaud Denis
self.canvasRaster.refresh() at the end ?

On 05 Jun 2014, at 18:27, Felix Schmidt  wrote:

> 
> 
> 
> 
> Hello everyone,
> I try to load on signal, a rasterlayer to qgsmapcanvas. I try it like in
> the pycookbook:
> 
> @QtCore.pyqtSlot()
> def loadRasterImage(self):
> print "slot works"
> fileName = QFileDialog.getOpenFileName(None, "historical map",
> ".", "Image Files (*.png *.jpg *.bmp *.tiff)")
> fileInfo = QFileInfo(fileName)
> baseName = fileInfo.baseName()
> rlayer = QgsRasterLayer(fileName, baseName)
> if not rlayer.isValid():
> print "Layer failed to load!"
> QgsMapLayerRegistry.instance().addMapLayer(rlayer)
> print rlayer.extent().yMinimum()
> self.canvasRaster.setExtent(rlayer.extent())
> self.canvasRaster.setLayerSet( [ QgsMapCanvasLayer(rlayer) ] )
> 
> self.canvasRaster is defined in the gui . I search for 8h but I dont
> find a solutionen, because there are no errors.
> 
> It load the rasterlayer to the main program of qgis, but not in my
> qgsmapcanvas. it is still white.
> 
> please help me.
> 
> Felix
> 
> 
> 
> ___
> 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] Legend refactoring branch merged

2014-05-21 Thread Rouzaud Denis
Congratulations for this big cleanup!

I am really glad we (SIGE) could help this project to come true.



On 21 May 2014, at 19:11, Martin Dobias  wrote:

> Hi everyone
> 
> I have just merged the first part of the legend refactoring work to
> master [1]. It does not really bring any new features for the end
> user, the changes are mainly under the hood. Things should ideally
> work as before, if not then probably it is a bug.
> 
> There will be second part of the work related mainly around improved
> layer symbology display in legend, more interactive legend and more
> options for customization. At Lutra Consulting we are still looking
> for funders willing to co-fund the work. At this point let me thank
> SIGE and Swiss QGIS User Group for supporting the project.
> 
> Please test thoroughly - the legend has received quite a lot of
> features over time, so there could be still some minor features I have
> missed to port to new implementation.
> 
> The format of the project file has changed, but there is backward
> compatibility with older projects which should allow seamless
> transition. Once saved with 2.4, the older versions of QGIS will loose
> the information about grouping.
> 
> If you are interested in studying the new code, there are two new
> folders of interest:
> - src/core/layertree
> - src/gui/layertree
> There is basic doxygen documentation for the new core classes, I plan
> to add more, add python bindings and unit tests.
> 
> Regards
> Martin
> 
> [1] 
> https://github.com/qgis/QGIS/commit/b2a4c765b4e8a3fa00385a56a358952f46a1957a
> ___
> 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] Cannot install libqgis_customwidgets.so

2014-05-19 Thread Rouzaud Denis
Hi,

The libqgis_customwidgets is a new library which allow using specific QGIS 
widgets directly in Qt Designer (if compiled with Qt4).
Now, this lib needs to be in Qt plugin’s directory to work properly. So this 
will require to run make as install as root.

You can disable this by running cmake with -DWITH_CUSTOM_WIDGETS=FALSE

Regarding the second problem described by Richard it should be fixed. pyuic 
will not bug anymore, even if QGIS is not installed.

I don’t know what’s the best default value for this library installation. 
But it might be better to reset it to false, if one wants that the default 
install can be run not being root.

Cheers,

Denis

On 19 May 2014, at 18:08, Richard Duivenvoorde  wrote:

> On 19-05-14 17:08, Radim Blazek wrote:
>> I am getting:
>> 
>> CMake Error at src/customwidgets/cmake_install.cmake:68 (FILE):
>>  file INSTALL cannot copy file
>>  "/home/radim/devel/qgis/build/output/lib/libqgis_customwidgets.so.2.3.0" to
>>  
>> "/usr/lib/x86_64-linux-gnu/qt4/plugins/designer/libqgis_customwidgets.so.2.3.0".
>> 
>> it seems to ignore CMAKE_INSTALL_PREFIX.
> 
> Hi Radim,
> 
> I had the same problem. It has something to do with the customwidgets
> from QGIS. Actually making them available for designer.
> 
> It is just changed from default not install to default install it.
> But (as you) I install only locally, so am not allowed to install .so
> files into the directory.
> 
> So I ran 'sudo make install', BUT then you get another problem: there is
> a new dependecy now on qgis.gui module (which I do not have globally) so
> this breaks your pyqt. So I would not do this.
> 
> Denis is aware of the problem, and looking for a solution.
> 
> (For me part of the solution would be to NOT default do this
> installation into my global system.)
> 
> Regards,
> 
> Richard Duivenvoorde
> 

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


Re: [Qgis-developer] Which compiler for a c++ QGIS custom app

2014-02-24 Thread Rouzaud Denis
Thanks a lot  Nathan, this brought me further!

On 24 Feb 2014, at 12:14, Nathan Woodrow  wrote:

> The supported version is VS 2008.  I have never tried building with anything 
> else.
> 
> - Nathan
> 
> 
> On Mon, Feb 24, 2014 at 9:10 PM, Rouzaud Denis  
> wrote:
> Hi JĂĽrgen,
> 
> On 21 Feb 2014, at 16:24, JĂĽrgen E. Fischer  wrote:
> 
>> But QGIS and Qt in OSGeo4W is built with Visual C++ not MinGW.  You can't use
>> OSGeo4W's Qt with MinGW.
> 
> I installed Visual Studio Express 2013, and it seems the compiler given with 
> (version 12.0) is not compliant with Qt libs from the osgeo package.
> 
> Do you know if I should I restrict to a given version of the compiler? Which 
> one has been used for building osgeo’s qt lib?
> I saw that Nathan is using version 9.0.
> 
> Thanks a lot,
> Denis
> 
> ___
> 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] Which compiler for a c++ QGIS custom app

2014-02-24 Thread Rouzaud Denis
Hi JĂĽrgen,

On 21 Feb 2014, at 16:24, JĂĽrgen E. Fischer  wrote:

> But QGIS and Qt in OSGeo4W is built with Visual C++ not MinGW.  You can't use
> OSGeo4W's Qt with MinGW.

I installed Visual Studio Express 2013, and it seems the compiler given with 
(version 12.0) is not compliant with Qt libs from the osgeo package.

Do you know if I should I restrict to a given version of the compiler? Which 
one has been used for building osgeo’s qt lib?
I saw that Nathan is using version 9.0.

Thanks a lot,
Denis___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Which compiler for a c++ QGIS custom app

2014-02-21 Thread Rouzaud Denis
Hi JĂĽrgen,

Thanks a lot for your reply.

It seems I should finally use Visual C++.
I will give it a try this weekend!

Thanks again and happy release ;)

Denis

On 21 Feb 2014, at 16:24, JĂĽrgen E. Fischer  wrote:

> Hi Denis,
> 
> On Fri, 21. Feb 2014 at 15:20:19 +0100, Denis Rouzaud wrote:
>> I have installed QGIS libs, Qt libs and minGW using osgeo4w installer  
>> (thanks to Nathan's advices).
> 
> mingw using the osgeo4w installer?  That might be there for GRASS.
> 
> But QGIS and Qt in OSGeo4W is built with Visual C++ not MinGW.  You can't use
> OSGeo4W's Qt with MinGW.
> 
>> Does someone know which compiler to use? Can't I use one embedded in  
>> osgeo package?
> 
>> PS: I don't have visual studio installed, and I would like to avoid  
>> installing it.
> 
> Sorry, I didn't do that for years - should also be possible, but I suppose it
> takes some work.
> 
> 
> 
> JĂĽrgen
> 
> -- 
> JĂĽrgen E. Fischer norBIT GmbH   Tel. +49-4931-918175-31
> Dipl.-Inf. (FH)   RheinstraĂźe 13Fax. +49-4931-918175-50
> Software Engineer D-26506 Norden   http://www.norbit.de
> QGIS PSC member (RM)  Germany  IRC: jef on FreeNode   
>   
> 
> -- 
> norBIT Gesellschaft fuer Unternehmensberatung und Informationssysteme mbH
> Rheinstrasse 13, 26506 Norden
> GF: Jelto Buurman, HR: Amtsgericht Emden, HRB 5502
> 
> ___
> 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] iface.addToolBar but no iface.removeToolBar

2014-02-06 Thread Rouzaud Denis
Hi,

I have a toolbar in a plugin too.
I can remove the toolbar using:
del self.toolBar

Cheers,

Denis


On 06 Feb 2014, at 21:51, Richard Duivenvoorde  wrote:

> Hi devs,
> 
> python iface has a method addToolBar, to add a toolbar with buttons.
> But there is no way to remove the toolbar.
> 
> I've created a toolbar, with proper unload function. So disabling the
> plugin removes all from menu's, but I cannot remove the toolbar.
> Which would be ok, if not a second one pops up when you enable the
> plugin again.
> 
> Created an issue for it: http://hub.qgis.org/issues/9504
> 
> Would this be a bug or a feature ( :-)
> 
> Regards,
> 
> Richard Duivenvoorde
> ___
> 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] Paste as layer

2014-02-02 Thread Rouzaud Denis
You’re right, I will fix this.


On 02 Feb 2014, at 09:43, Ramon Andiñach  wrote:

> Hi,
> 
> Just wondered, if "Paste into a new layer" allows you to save as a memory 
> layer; why does it need a layer to be in edit mode to become active?
> 
> Is this expected behaviour?
> 
> Should I add a bug/feature request?
> 
> This is with QGIS self-compile e846521 on linux.
> 
> -ramon.
> ___
> 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] feature action

2013-04-11 Thread Rouzaud Denis
Hi,

Thanks to the hackers, solution's has been found:

while adding the action to the layer, we can give the layer id in the string, 
and the feature id is known with [% $id %].

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


[Qgis-developer] feature action

2013-04-11 Thread Rouzaud Denis
Hi,

I'd like to create actions from within a plugin.

Basically, the plugin would add an action for specified layers, and this action 
would trigger some method with layer and feature as argument.
Is this possible?

This would be used to perform a specific action on features. So I'd like to 
have that action available by a right-click in the feature form (which gives 
the actions of the layer).

The problem is that you can only have attributes values as argument, but not 
the layer id neither the feature id.

Someone has an idea on how to deal with this?

Thanks,

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