Re: [Qgis-developer] $id not working as default value

2016-12-23 Thread Junior
Yes I saw it. Type the formula.
Give a look to hub.qgis.org/issues/15935 btw

Envoyé depuis mon HTC

- Reply message -
De : "Paolo Cavallini" 
Pour : "DelazJ" 
Cc : "qgis-developer" 
Objet : [Qgis-developer] $id not working as default value
Date : ven., déc. 23, 2016 13:19

Il 23/12/2016 13:15, DelazJ ha scritto:
> Hi Paolo,
> I recall a discussion on gitter about adding a serial expression but not
> sure it's implemented.
> A workaround could be using maximum("field") + 1

thanks, but see my other message:
Default value in forms: field names not available in expressions
all the best.
-- 
Paolo Cavallini - www.faunalia.eu
QGIS & PostGIS courses: http://www.faunalia.eu/training.html
https://www.google.com/trends/explore?date=all=IT=qgis,arcgis___
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] $id not working as default value

2016-12-23 Thread Junior
Yes I saw it. Type the formula.
Give a look to hub.qgis.org/issues/15935 btw

Envoyé depuis mon HTC

- Reply message -
De : "Paolo Cavallini" 
Pour : "DelazJ" 
Cc : "qgis-developer" 
Objet : [Qgis-developer] $id not working as default value
Date : ven., déc. 23, 2016 13:19

Il 23/12/2016 13:15, DelazJ ha scritto:
> Hi Paolo,
> I recall a discussion on gitter about adding a serial expression but not
> sure it's implemented.
> A workaround could be using maximum("field") + 1

thanks, but see my other message:
Default value in forms: field names not available in expressions
all the best.
-- 
Paolo Cavallini - www.faunalia.eu
QGIS & PostGIS courses: http://www.faunalia.eu/training.html
https://www.google.com/trends/explore?date=all=IT=qgis,arcgis___
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] QEP - Proposal for QGIS 3.0 after 2.14

2015-10-24 Thread Junior
Hi,
i think that 3.0 should Also be the occasion to reorganize plugins world. Not 
just upgrade them, it should be the time to say no to redundant plugins and 
find a way to somehow oblige developers to put their energy on a single plugin, 
instead of three almost identical with sometimes buggy features. It would a 
great step in consistency and coherence for users.

Envoyé depuis mon HTC

- Reply message -
De : "Nyall Dawson" 
Pour : "Paolo Cavallini" 
Cc : "qgis-developer" 
Objet : [Qgis-developer] QEP - Proposal for QGIS 3.0 after 2.14
Date : sam., oct. 24, 2015 13:20

On 24 Oct 2015 22:06, "Paolo Cavallini"  wrote:

>

> Il 24/10/2015 12:57, Nyall Dawson ha scritto:

>

> > We do have to keep SOME say in the release plans/schedule... I don't

> > think we can satisfy everyone and even sponsors need to fit in with the

> > bigger picture.

> >

> > I'm also sure there's a lot of commercial sponsors out there who would

> > love the idea of a go-slow leading up to the next LTR and final 2.0

> > series release.

>

> OK, got it.

> All the best, and thanks!

BTW I don't think there's any need for a second alternative QEP. The plans seem 
to be solidifying well and everyone seems to be satisfied with the general 
direction this discussion is going. So I'll update my original QEP to reflect 
this and then we can hopefully move it up to voting.
Nyall

>

> --

> Paolo Cavallini - www.faunalia.eu

> QGIS & PostGIS courses: http://www.faunalia.eu/training.html___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] QEP - Proposal for QGIS 3.0 after 2.14

2015-10-24 Thread Junior
Hi,
i think that 3.0 should Also be the occasion to reorganize plugins world. Not 
just upgrade them, it should be the time to say no to redundant plugins and 
find a way to somehow oblige developers to put their energy on a single plugin, 
instead of three almost identical with sometimes buggy features. It would a 
great step in consistency and coherence for users.

Envoyé depuis mon HTC

- Reply message -
De : "Nyall Dawson" 
Pour : "Paolo Cavallini" 
Cc : "qgis-developer" 
Objet : [Qgis-developer] QEP - Proposal for QGIS 3.0 after 2.14
Date : sam., oct. 24, 2015 13:20

On 24 Oct 2015 22:06, "Paolo Cavallini"  wrote:

>

> Il 24/10/2015 12:57, Nyall Dawson ha scritto:

>

> > We do have to keep SOME say in the release plans/schedule... I don't

> > think we can satisfy everyone and even sponsors need to fit in with the

> > bigger picture.

> >

> > I'm also sure there's a lot of commercial sponsors out there who would

> > love the idea of a go-slow leading up to the next LTR and final 2.0

> > series release.

>

> OK, got it.

> All the best, and thanks!

BTW I don't think there's any need for a second alternative QEP. The plans seem 
to be solidifying well and everyone seems to be satisfied with the general 
direction this discussion is going. So I'll update my original QEP to reflect 
this and then we can hopefully move it up to voting.
Nyall

>

> --

> Paolo Cavallini - www.faunalia.eu

> QGIS & PostGIS courses: http://www.faunalia.eu/training.html___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] QEP - Proposal for QGIS 3.0 after 2.14

2015-10-24 Thread Junior
Hi,
i think that 3.0 should Also be the occasion to reorganize plugins world. Not 
just upgrade them, it should be the time to say no to redundant plugins and 
find a way to somehow oblige developers to put their energy on a single plugin, 
instead of three almost identical with sometimes buggy features. It would a 
great step in consistency and coherence for users.

Envoyé depuis mon HTC

- Reply message -
De : "Nyall Dawson" 
Pour : "Paolo Cavallini" 
Cc : "qgis-developer" 
Objet : [Qgis-developer] QEP - Proposal for QGIS 3.0 after 2.14
Date : sam., oct. 24, 2015 13:20

On 24 Oct 2015 22:06, "Paolo Cavallini"  wrote:

>

> Il 24/10/2015 12:57, Nyall Dawson ha scritto:

>

> > We do have to keep SOME say in the release plans/schedule... I don't

> > think we can satisfy everyone and even sponsors need to fit in with the

> > bigger picture.

> >

> > I'm also sure there's a lot of commercial sponsors out there who would

> > love the idea of a go-slow leading up to the next LTR and final 2.0

> > series release.

>

> OK, got it.

> All the best, and thanks!

BTW I don't think there's any need for a second alternative QEP. The plans seem 
to be solidifying well and everyone seems to be satisfied with the general 
direction this discussion is going. So I'll update my original QEP to reflect 
this and then we can hopefully move it up to voting.
Nyall

>

> --

> Paolo Cavallini - www.faunalia.eu

> QGIS & PostGIS courses: http://www.faunalia.eu/training.html___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] [QGIS-UX] Composer Legend items: what are the differences between "auto-update" and "update all" options?

2015-10-14 Thread Junior
Bernd,
see http://hub.qgis.org/issues/13575

Envoyé depuis mon HTC

- Reply message -
De : "Bernd Vogelgesang" 
Pour : 
Objet : [Qgis-developer] [QGIS-UX] Composer Legend items: what are the 
differences between "auto-update" and "update all" options?
Date : mer., oct. 14, 2015 23:23

Hi,
I'm more missing a discussion about why in fact all loaded layers are displayed 
in the legend, and not only those activated in the canvas.
There is a reason why a deactivate layers: I want to produce a map only with 
those active ones = shown in the map. 
So why do I have to manually remove unneeded (in my cases often dozens of 
layers) from the legend, or, even worse, delete them from the project just to 
re-add them when I produce the next map?

It would be much smarter to add just those active in the moment of creating the 
legend. In case I forgot one I need, I will be happy to add this one manually.

Or did I miss sth obvious?

Cheers
Bernd

Am 14.10.2015, 20:29 Uhr, schrieb Anita Graser :



On Wed, Oct 14, 2015 at 2:20 PM, Andreas Neumann  wrote:





Hi,



I am adding the UX (user interface) list about this legend
discussion.



The whole situation about legend updates and the current legend GUI
in composer is indeed a bit confusing and changed quite a bit in the
last one (or two? releases). I also think that the "Auto update"
checkbox and the "Update all" button next to it are almost
redundant.

​Do we have a ticket for this issue yet? 
I'm afraid I haven't had time yet to look into this and form an opinion or even 
a suggestion for how the UI should be improved.
It would be great if the users interested in enhancing this part of QGIS could 
come up with a draft and open a ticket where it can be discussed in detail and 
with images :)
Thanks a lot!
Best wishes,
Anita​








-- 
Bernd Vogelgesang
Siedlerstraße 2
91083 Baiersdorf/Igelsdorf
Tel: 09133-825374___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] [QGIS-UX] Composer Legend items: what are the differences between "auto-update" and "update all" options?

2015-10-14 Thread Junior
Bernd,
see http://hub.qgis.org/issues/13575

Envoyé depuis mon HTC

- Reply message -
De : "Bernd Vogelgesang" 
Pour : 
Objet : [Qgis-developer] [QGIS-UX] Composer Legend items: what are the 
differences between "auto-update" and "update all" options?
Date : mer., oct. 14, 2015 23:23

Hi,
I'm more missing a discussion about why in fact all loaded layers are displayed 
in the legend, and not only those activated in the canvas.
There is a reason why a deactivate layers: I want to produce a map only with 
those active ones = shown in the map. 
So why do I have to manually remove unneeded (in my cases often dozens of 
layers) from the legend, or, even worse, delete them from the project just to 
re-add them when I produce the next map?

It would be much smarter to add just those active in the moment of creating the 
legend. In case I forgot one I need, I will be happy to add this one manually.

Or did I miss sth obvious?

Cheers
Bernd

Am 14.10.2015, 20:29 Uhr, schrieb Anita Graser :



On Wed, Oct 14, 2015 at 2:20 PM, Andreas Neumann  wrote:





Hi,



I am adding the UX (user interface) list about this legend
discussion.



The whole situation about legend updates and the current legend GUI
in composer is indeed a bit confusing and changed quite a bit in the
last one (or two? releases). I also think that the "Auto update"
checkbox and the "Update all" button next to it are almost
redundant.

​Do we have a ticket for this issue yet? 
I'm afraid I haven't had time yet to look into this and form an opinion or even 
a suggestion for how the UI should be improved.
It would be great if the users interested in enhancing this part of QGIS could 
come up with a draft and open a ticket where it can be discussed in detail and 
with images :)
Thanks a lot!
Best wishes,
Anita​








-- 
Bernd Vogelgesang
Siedlerstraße 2
91083 Baiersdorf/Igelsdorf
Tel: 09133-825374___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] [QGIS-UX] Composer Legend items: what are the differences between "auto-update" and "update all" options?

2015-10-14 Thread Junior
Bernd,
see http://hub.qgis.org/issues/13575

Envoyé depuis mon HTC

- Reply message -
De : "Bernd Vogelgesang" 
Pour : 
Objet : [Qgis-developer] [QGIS-UX] Composer Legend items: what are the 
differences between "auto-update" and "update all" options?
Date : mer., oct. 14, 2015 23:23

Hi,
I'm more missing a discussion about why in fact all loaded layers are displayed 
in the legend, and not only those activated in the canvas.
There is a reason why a deactivate layers: I want to produce a map only with 
those active ones = shown in the map. 
So why do I have to manually remove unneeded (in my cases often dozens of 
layers) from the legend, or, even worse, delete them from the project just to 
re-add them when I produce the next map?

It would be much smarter to add just those active in the moment of creating the 
legend. In case I forgot one I need, I will be happy to add this one manually.

Or did I miss sth obvious?

Cheers
Bernd

Am 14.10.2015, 20:29 Uhr, schrieb Anita Graser :



On Wed, Oct 14, 2015 at 2:20 PM, Andreas Neumann  wrote:





Hi,



I am adding the UX (user interface) list about this legend
discussion.



The whole situation about legend updates and the current legend GUI
in composer is indeed a bit confusing and changed quite a bit in the
last one (or two? releases). I also think that the "Auto update"
checkbox and the "Update all" button next to it are almost
redundant.

​Do we have a ticket for this issue yet? 
I'm afraid I haven't had time yet to look into this and form an opinion or even 
a suggestion for how the UI should be improved.
It would be great if the users interested in enhancing this part of QGIS could 
come up with a draft and open a ticket where it can be discussed in detail and 
with images :)
Thanks a lot!
Best wishes,
Anita​








-- 
Bernd Vogelgesang
Siedlerstraße 2
91083 Baiersdorf/Igelsdorf
Tel: 09133-825374___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

[Qgis-developer] Re : view only current feature in atlas maps

2015-09-11 Thread Junior
Hi,
i don't know if there is a work around but a big +1 for your UI proposal.

Envoyé depuis mon HTC

- Reply message -
De : "Enrico Ferreguti" 
Pour : "qgis-developer" , 
"qgis-u...@lists.osgeo.org" 
Objet : [Qgis-developer] view only current feature in atlas maps
Date : ven., sept. 11, 2015 10:49

Hi list,

when I need to isolate the current atlas feature in map views I currently 
enable the rule based feature style and I set the rule to "$atlasfeatureid = 
$id" following this tutorial: 
http://nathanw.net/2013/12/02/waiting-for-qgis-2-2-highlighting-current-atlas-feature/
I'm wondering if there is an easier method, accessible for the common gis user, 
to do this avoiding expressions and complex styling methods, and if it's 
possible to control this behaviour directly from "controlled by altas" slot in 
map item properties tab as from the attached sample image.

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

[Qgis-developer] Re : getting list of available QgsComposer

2015-08-02 Thread Junior
Hi Victor,
for cview in iface.activeComposers() :# will retrieve list of composers
print cview.composerWindow().windowTitle() # To print their name

HTH,
DelazJ

- Reply message -
De : Victor Olaya vola...@gmail.com
Pour : qgis-developer qgis-developer@lists.osgeo.org
Objet : [Qgis-developer] getting list of available QgsComposer
Date : dim., août 2, 2015 08:41

Hi all,

Can anyone tell me how to get the list of the current composers in a project?

there is a activeCompositions() method in the QgsInterface class, but
it returns a list of QgsComposerView. The problem with that is that
those views do not seem to have a name (the constructor of the class
actually gets a name, but it is not used...)

I need the name to list the composers as part of a plugin, so I guess
i would need the QgsComposer object instead. I could just get the name
from the menu items, but I am sure there must be a cleaner solution...

There seems to be a printComposers() method in the QgisApp class...but
that class is not available from Python.

Any idea?

Thanks in advance!
___
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] Re : Bug priority for release

2015-06-15 Thread Junior
Hi,
what I've understood is that Github should be the main place to report 
documentation and website issues since Alexandre (if I'm not wrong) has moved 
and closed all(?) related issues from Redmine and because the fix me links at 
the bottom of web pages lead to Github repo.
So Redmine is used for application issues and Doc Github is preferable for 
web/doc issues. Maybe, this distinction should also be added to the 
Documentation?


Envoyé depuis mon HTC

- Reply message -
De : Paolo Cavallini cavall...@faunalia.it
Pour : Junior del...@gmail.com, qgis-developer@lists.osgeo.org
Objet : [Qgis-developer] Bug priority for release
Date : lun., juin 15, 2015 07:38

Il 14/06/2015 15:38, Junior ha scritto:
 Hi,
 Paolo, better fill a ticket on QGIS-Documentation repo... 

Done:
https://hub.qgis.org/issues/12964
or it should be done on GH? (duplication still puzzles me).
Thanks.

-- 
Paolo Cavallini - www.faunalia.eu
QGIS  PostGIS courses: http://www.faunalia.eu/training.html___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

[Qgis-developer] Re : Bug priority for release

2015-06-14 Thread Junior
Hi,
Paolo, better fill a ticket on QGIS-Documentation repo... 

Envoyé depuis mon HTC

- Reply message -
De : Paolo Cavallini cavall...@faunalia.it
Pour : qgis-developer@lists.osgeo.org
Objet : [Qgis-developer] Bug priority for release
Date : sam., juin 13, 2015 11:30

Il 12/06/2015 15:02, Jürgen E. Fischer ha scritto:

 The workaround for this (see 86d08b6c) - until the sql expression are there -
 is to set the initial mode for the attribute table to only visible on map in
 options.  That will request only the features in the current canvas.
 
 Note that this is different from what you can set in the attribute table
 itself.  If set in options the attribute table will always be tied to canvas
 extent it was opened with - so show all within such a table will again only
 show the features in the initial canvas extent - show only visible will 
 still
 have an effect if you zoom in.

Thanks a lot, clear now.
Documenters: better adding a note on the manual? This is not very
obvious for users.
All the best.

-- 
Paolo Cavallini - www.faunalia.eu
QGIS  PostGIS courses: http://www.faunalia.eu/training.html___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

[Qgis-developer] Re : Cannot create Processing model help files

2015-06-07 Thread Junior
Hi,
No, Processing plugin latest release is 2.9.3

Envoyé depuis mon HTC

- Reply message -
De : Kari Salovaara kari.salova...@pp1.inet.fi
Pour : qgis-developer qgis-developer@lists.osgeo.org
Objet : [Qgis-developer] Cannot create Processing model help files
Date : dim., juin 7, 2015 13:23

Do You mean 2.9.0-93  ?  ;)



Happy Sunday,

Kari



On 06/07/2015 01:43 PM, Paolo Cavallini wrote:



I confirm, fixed in processing 2.9.3.

All the best.



Il 07 giugno 2015 12:34:00 CEST, Matteo
Ghetta matteo.ghe...@gmail.com ha scritto:




Hi Anita,



this has been fixed during the Danish HF for the master
branch. 

Are you working with 2.8.2? 





Cheers





Matteo





2015-06-07 11:35 GMT+02:00 Anita
Graser anitagra...@gmx.at:



Hi,





When
trying to create help files for custom Processing
models using the help editor, the entered
information is not saved and everything is lost on
closing the dialog.





If
you can confirm, I can open a ticket.





Thanks
and best wishes,

Anita





___

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





-- 

http://faunalia.eu/

Sent from mobile, sorry for being short





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





-- 
Kari Salovaara
Hanko, Finland

Volunteers do not necessarily have the time; they just have the heart.
~ Elizabeth Andrew___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

[Qgis-developer] Re : Re : [Qgis-user] Pyqt4 : which signal is sent when dialog comes to foreground?

2015-04-09 Thread Junior Delaz
 Ok thank you for the feedbaxk

Envoyé depuis mon HTC

- Reply message -
De : Matthias Kuhn matth...@opengis.ch
Pour : Junior Delaz del...@gmail.com
Cc : qgis-developer qgis-developer@lists.osgeo.org
Objet : [Qgis-developer] Re : [Qgis-user] Pyqt4 : which signal is sent when
dialog comes to foreground?
Date : mer., avr. 8, 2015 23:22

On 04/08/2015 06:05 PM, Junior Delaz wrote:
 Ahh indeed, you are right... I should have paid attention to the Class
 in which I found the signal. But I was too obsessed by
 composerWillBeRemoved that I thought I was still in QgisInterface.
 If it can be added to QgisInterface, why 
 not?https://github.com/qgis/QGIS/pull/1978

 Any idea about my remark on Qt.QueuedConnection and architecture
 64bits vs 32bits?

No I guess it's an issue of some different version or some low-level
compiler differences. If it crashes on one platform, don't use it. It's
probably trying to access a deleted object. It's not a bug but likely
rather a misuse.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Re : [Qgis-user] Pyqt4 : which signal is sent when dialog comes to foreground?

2015-04-08 Thread Junior Delaz
Ahh indeed, you are right... I should have paid attention to the Class in
which I found the signal. But I was too obsessed by composerWillBeRemoved
that I thought I was still in QgisInterface.
If it can be added to QgisInterface, why not?
Any idea about my remark on Qt.QueuedConnection and architecture 64bits vs
32bits?

In the meantime, I think I'll keep the refresh button and find a simple way
to deal with the case user doesn't refresh before executing (it might not
be that hard :) ). And in this case, I also keep compatibility with all 2.x
releases.

2015-04-08 0:16 GMT+02:00 Matthias Kuhn matth...@opengis.ch:

  It's in QgisApp but not in QgisInterface.

 It is only used internally by the app (in the composermanager for exactly
 the same purpose as you are trying to use it for AFAICS).
 Anyway, I don't see any reason not to make this available on the public
 interface as well...


 On 04/07/2015 11:51 PM, Junior Delaz wrote:

 But why does composerRemoved not work? You can find it in the code on
 github repo but not on QGIS API website...

 2015-04-07 23:35 GMT+02:00 Matthias Kuhn matth...@opengis.ch:

  Oops,

 That should have been composerWillBeRemoved

 Sorry for that...

 Matthias


 On 04/07/2015 10:07 PM, Junior Delaz wrote:

  Thank you Matthias for your perseverance. It's very helpful and
 encouraging for beginners.
  I have already tried composerRemoved but when loading the plugin, QGIS
 complains :

 Impossible de charger l'extension MapsPrinter provoque une erreur lors de
 l'appel de sa méthode initGui()

 Traceback (most recent call last):
   File C:/OSGeo4W/apps/qgis/./python\qgis\utils.py, line 228, in 
 startPlugin
 plugins[packageName].initGui()
   File 
 C:/Users/harrissou/.qgis2/python/plugins\MapsPrinter\maps_printer.py, line 
 129, in initGui
 self.iface.composerRemoved.connect(self.refreshList)
 AttributeError: 'QgisInterface' object has no attribute 'composerRemoved'


 This happens with all the versions of QGIS I use :
 - osgeo4w 32bits (windows 8), osgeo4w 64bits (windows 7): either with QGIS 
 2.8, 2.8rel-dev and 2.9
 - and Mac OS 10.9 (it is a QGIS 2.4 but composerRemoved is supposed to have 
 been added since QGIS 2.3 [0])


 About Qt.QueuedConnection, my first tests were on the Mac OS (x86-64) and 
 Osgeo4w 64bits versions. But I never encountered crash with the 32 bits 
 version, using the same code. Can the bug be bound to the architecture?

 [0] https://github.com/qgis/QGIS/blob/master/src/app/qgisapp.h#L1260


 2015-04-06 22:11 GMT+02:00 Matthias Kuhn matth...@opengis.ch:

  Hi Junior,

 The following lines work for a short test-case.

 def compAdded( composer ):
   print composer

 def compRemoved( composer ):
   print composer

 iface.composerAdded.connect( compAdded )
 iface.composerRemoved.connect( compRemoved )

 It is possible that the QueuedConnection crashes because along with it a
 composer is emitted which at the time the slot is executed is already
 deleted. That was only a possible approach which I did not test and reading
 your report seems unstable.

 Matthias


 On 04/06/2015 12:33 AM, Junior Delaz wrote:

  Hi,
  I do understand nothing.
  After I read your message, Matthias, I told myself that using QT.
 QueuedConnection should be the easiest way. Then i wrote
 self.iface.composerWillBeRemoved.connect(self.refreshList,
 Qt.QueuedConnection)
 But each time i delete a composer, QGIS crashes.
  So I've spent the week on reading about Qt.QueuedConnection and then
 signal and slots, function partial, QSignalMapper, sender trying to
 understand how I can catch the sender and manage to update my list. All
 this without success in the code.
  And today, I tried again Qt.QueuedConnection, QGIS crashed. Without
 any changes, I tried again and it worked and continues to work. Adding and
 deleting composer in the composer manager echoes in my list.
  I hope it will remain like that.

  But now I realize that I didn't take into account the renaming of a
 composer. :(

  I think I'd wisely keep the refreshlist button unless someone tells me
 how I can reach the composer manager dialog programmatically. So that I
 will try to synchronize my list with its widgetlistitems...

  Thanks for all...


 2015-03-31 14:50 GMT+02:00 Matthias Kuhn matth...@opengis.ch:

  You should get a parameter containing the composer that is being
 deleted with composerWillBeRemoved signal. Try to use that to infer which
 composer has been removed. As the signal name indicates, at the time it is
 emitted, the composer is not deleted yet.
 As an alternative you may make the connection with Qt.QueuedConnection.
 It is possible that with this connection style you will receive the signal
 after deletion and are able to continue using your current update method.

 Best
 Matthias


 On 03/31/2015 02:04 PM, Junior Delaz wrote:

Matthias,
  Thanks. I just give it a try it and all goes well with composerAdded.
  But not really well with composerWillBeRemoved signal. The first
 deletion

Re: [Qgis-developer] Re : [Qgis-user] Pyqt4 : which signal is sent when dialog comes to foreground?

2015-04-07 Thread Junior Delaz
Thank you Matthias for your perseverance. It's very helpful and encouraging
for beginners.
I have already tried composerRemoved but when loading the plugin, QGIS
complains :

Impossible de charger l'extension MapsPrinter provoque une erreur lors de
l'appel de sa méthode initGui()

Traceback (most recent call last):
  File C:/OSGeo4W/apps/qgis/./python\qgis\utils.py, line 228, in startPlugin
plugins[packageName].initGui()
  File C:/Users/harrissou/.qgis2/python/plugins\MapsPrinter\maps_printer.py,
line 129, in initGui
self.iface.composerRemoved.connect(self.refreshList)
AttributeError: 'QgisInterface' object has no attribute 'composerRemoved'

This happens with all the versions of QGIS I use :
- osgeo4w 32bits (windows 8), osgeo4w 64bits (windows 7): either with
QGIS 2.8, 2.8rel-dev and 2.9
- and Mac OS 10.9 (it is a QGIS 2.4 but composerRemoved is supposed to
have been added since QGIS 2.3 [0])

About Qt.QueuedConnection, my first tests were on the Mac OS (x86-64)
and Osgeo4w 64bits versions. But I never encountered crash with the 32
bits version, using the same code. Can the bug be bound to the
architecture?

[0] https://github.com/qgis/QGIS/blob/master/src/app/qgisapp.h#L1260


2015-04-06 22:11 GMT+02:00 Matthias Kuhn matth...@opengis.ch:

  Hi Junior,

 The following lines work for a short test-case.

 def compAdded( composer ):
   print composer

 def compRemoved( composer ):
   print composer

 iface.composerAdded.connect( compAdded )
 iface.composerRemoved.connect( compRemoved )

 It is possible that the QueuedConnection crashes because along with it a
 composer is emitted which at the time the slot is executed is already
 deleted. That was only a possible approach which I did not test and reading
 your report seems unstable.

 Matthias


 On 04/06/2015 12:33 AM, Junior Delaz wrote:

  Hi,
  I do understand nothing.
  After I read your message, Matthias, I told myself that using QT.
 QueuedConnection should be the easiest way. Then i wrote
 self.iface.composerWillBeRemoved.connect(self.refreshList,
 Qt.QueuedConnection)
 But each time i delete a composer, QGIS crashes.
  So I've spent the week on reading about Qt.QueuedConnection and then
 signal and slots, function partial, QSignalMapper, sender trying to
 understand how I can catch the sender and manage to update my list. All
 this without success in the code.
  And today, I tried again Qt.QueuedConnection, QGIS crashed. Without any
 changes, I tried again and it worked and continues to work. Adding and
 deleting composer in the composer manager echoes in my list.
  I hope it will remain like that.

  But now I realize that I didn't take into account the renaming of a
 composer. :(

  I think I'd wisely keep the refreshlist button unless someone tells me
 how I can reach the composer manager dialog programmatically. So that I
 will try to synchronize my list with its widgetlistitems...

  Thanks for all...


 2015-03-31 14:50 GMT+02:00 Matthias Kuhn matth...@opengis.ch:

  You should get a parameter containing the composer that is being deleted
 with composerWillBeRemoved signal. Try to use that to infer which composer
 has been removed. As the signal name indicates, at the time it is emitted,
 the composer is not deleted yet.
 As an alternative you may make the connection with Qt.QueuedConnection.
 It is possible that with this connection style you will receive the signal
 after deletion and are able to continue using your current update method.

 Best
 Matthias


 On 03/31/2015 02:04 PM, Junior Delaz wrote:

Matthias,
  Thanks. I just give it a try it and all goes well with composerAdded.
  But not really well with composerWillBeRemoved signal. The first
 deletion in the composer manager does nothing and deleting a second
 composer does remove the first one in my list. and so on...
 My update function should be rewritten I think.  I'll try to see how
 improving it and may (surely) ask again for help (if needed).

  While seeking information about composerWillBeRemoved, I found a
 composerRemoved [1] [2] signal (that doesn't appear in the API doc) and
 without being able to use it. :(
 [1]
 https://github.com/qgis/QGIS/blob/master/src/app/composer/qgscomposermanager.cpp
 (line 48
 [2] https://github.com/qgis/QGIS/blob/master/src/app/qgisapp.cpp (line
 5601)

  Another thing that may not be related : what the deletePrintComposers
 function (https://github.com/qgis/QGIS/blob/master/src/app/qgisapp.cpp
 line 5698) is for?

 Thanks again for the clue.

 2015-03-31 9:43 GMT+02:00 Matthias Kuhn matth...@opengis.ch:

  QgisInterface (iface) has a composerAdded and composerWillBeRemoved
 signal.

 Did you try to connect to these?

 Best,
 Matthias


 On 03/31/2015 09:34 AM, Junior wrote:

  Hi all, Luca
 Thanks for answering. But i already have an update function that I
 linked to an update list button. I even linked it to the icon on the
 toolbar so that when user calls foreground the dialog it's already updated.
 The case I'd like to manage

Re: [Qgis-developer] Re : [Qgis-user] Pyqt4 : which signal is sent when dialog comes to foreground?

2015-04-07 Thread Junior Delaz
But why does composerRemoved not work? You can find it in the code on
github repo but not on QGIS API website...

2015-04-07 23:35 GMT+02:00 Matthias Kuhn matth...@opengis.ch:

  Oops,

 That should have been composerWillBeRemoved

 Sorry for that...

 Matthias


 On 04/07/2015 10:07 PM, Junior Delaz wrote:

  Thank you Matthias for your perseverance. It's very helpful and
 encouraging for beginners.
  I have already tried composerRemoved but when loading the plugin, QGIS
 complains :

 Impossible de charger l'extension MapsPrinter provoque une erreur lors de
 l'appel de sa méthode initGui()

 Traceback (most recent call last):
   File C:/OSGeo4W/apps/qgis/./python\qgis\utils.py, line 228, in startPlugin
 plugins[packageName].initGui()
   File 
 C:/Users/harrissou/.qgis2/python/plugins\MapsPrinter\maps_printer.py, line 
 129, in initGui
 self.iface.composerRemoved.connect(self.refreshList)
 AttributeError: 'QgisInterface' object has no attribute 'composerRemoved'


 This happens with all the versions of QGIS I use :
 - osgeo4w 32bits (windows 8), osgeo4w 64bits (windows 7): either with QGIS 
 2.8, 2.8rel-dev and 2.9
 - and Mac OS 10.9 (it is a QGIS 2.4 but composerRemoved is supposed to have 
 been added since QGIS 2.3 [0])


 About Qt.QueuedConnection, my first tests were on the Mac OS (x86-64) and 
 Osgeo4w 64bits versions. But I never encountered crash with the 32 bits 
 version, using the same code. Can the bug be bound to the architecture?

 [0] https://github.com/qgis/QGIS/blob/master/src/app/qgisapp.h#L1260


 2015-04-06 22:11 GMT+02:00 Matthias Kuhn matth...@opengis.ch:

  Hi Junior,

 The following lines work for a short test-case.

 def compAdded( composer ):
   print composer

 def compRemoved( composer ):
   print composer

 iface.composerAdded.connect( compAdded )
 iface.composerRemoved.connect( compRemoved )

 It is possible that the QueuedConnection crashes because along with it a
 composer is emitted which at the time the slot is executed is already
 deleted. That was only a possible approach which I did not test and reading
 your report seems unstable.

 Matthias


 On 04/06/2015 12:33 AM, Junior Delaz wrote:

  Hi,
  I do understand nothing.
  After I read your message, Matthias, I told myself that using QT.
 QueuedConnection should be the easiest way. Then i wrote
 self.iface.composerWillBeRemoved.connect(self.refreshList,
 Qt.QueuedConnection)
 But each time i delete a composer, QGIS crashes.
  So I've spent the week on reading about Qt.QueuedConnection and then
 signal and slots, function partial, QSignalMapper, sender trying to
 understand how I can catch the sender and manage to update my list. All
 this without success in the code.
  And today, I tried again Qt.QueuedConnection, QGIS crashed. Without any
 changes, I tried again and it worked and continues to work. Adding and
 deleting composer in the composer manager echoes in my list.
  I hope it will remain like that.

  But now I realize that I didn't take into account the renaming of a
 composer. :(

  I think I'd wisely keep the refreshlist button unless someone tells me
 how I can reach the composer manager dialog programmatically. So that I
 will try to synchronize my list with its widgetlistitems...

  Thanks for all...


 2015-03-31 14:50 GMT+02:00 Matthias Kuhn matth...@opengis.ch:

  You should get a parameter containing the composer that is being
 deleted with composerWillBeRemoved signal. Try to use that to infer which
 composer has been removed. As the signal name indicates, at the time it is
 emitted, the composer is not deleted yet.
 As an alternative you may make the connection with Qt.QueuedConnection.
 It is possible that with this connection style you will receive the signal
 after deletion and are able to continue using your current update method.

 Best
 Matthias


 On 03/31/2015 02:04 PM, Junior Delaz wrote:

Matthias,
  Thanks. I just give it a try it and all goes well with composerAdded.
  But not really well with composerWillBeRemoved signal. The first
 deletion in the composer manager does nothing and deleting a second
 composer does remove the first one in my list. and so on...
 My update function should be rewritten I think.  I'll try to see how
 improving it and may (surely) ask again for help (if needed).

  While seeking information about composerWillBeRemoved, I found a
 composerRemoved [1] [2] signal (that doesn't appear in the API doc) and
 without being able to use it. :(
 [1]
 https://github.com/qgis/QGIS/blob/master/src/app/composer/qgscomposermanager.cpp
 (line 48
 [2] https://github.com/qgis/QGIS/blob/master/src/app/qgisapp.cpp (line
 5601)

  Another thing that may not be related : what the deletePrintComposers
 function (https://github.com/qgis/QGIS/blob/master/src/app/qgisapp.cpp
 line 5698) is for?

 Thanks again for the clue.

 2015-03-31 9:43 GMT+02:00 Matthias Kuhn matth...@opengis.ch:

  QgisInterface (iface) has a composerAdded and composerWillBeRemoved
 signal.

 Did you

Re: [Qgis-developer] Re : [Qgis-user] Pyqt4 : which signal is sent when dialog comes to foreground?

2015-04-05 Thread Junior Delaz
Hi,
I do understand nothing.
After I read your message, Matthias, I told myself that using QT.
QueuedConnection should be the easiest way. Then i wrote
self.iface.composerWillBeRemoved.connect(self.refreshList,
Qt.QueuedConnection)
But each time i delete a composer, QGIS crashes.
So I've spent the week on reading about Qt.QueuedConnection and then signal
and slots, function partial, QSignalMapper, sender trying to understand how
I can catch the sender and manage to update my list. All this without
success in the code.
And today, I tried again Qt.QueuedConnection, QGIS crashed. Without any
changes, I tried again and it worked and continues to work. Adding and
deleting composer in the composer manager echoes in my list.
I hope it will remain like that.

But now I realize that I didn't take into account the renaming of a
composer. :(

I think I'd wisely keep the refreshlist button unless someone tells me how
I can reach the composer manager dialog programmatically. So that I will
try to synchronize my list with its widgetlistitems...

Thanks for all...


2015-03-31 14:50 GMT+02:00 Matthias Kuhn matth...@opengis.ch:

  You should get a parameter containing the composer that is being deleted
 with composerWillBeRemoved signal. Try to use that to infer which composer
 has been removed. As the signal name indicates, at the time it is emitted,
 the composer is not deleted yet.
 As an alternative you may make the connection with Qt.QueuedConnection. It
 is possible that with this connection style you will receive the signal
 after deletion and are able to continue using your current update method.

 Best
 Matthias


 On 03/31/2015 02:04 PM, Junior Delaz wrote:

Matthias,
  Thanks. I just give it a try it and all goes well with composerAdded.
  But not really well with composerWillBeRemoved signal. The first deletion
 in the composer manager does nothing and deleting a second composer does
 remove the first one in my list. and so on...
 My update function should be rewritten I think.  I'll try to see how
 improving it and may (surely) ask again for help (if needed).

  While seeking information about composerWillBeRemoved, I found a
 composerRemoved [1] [2] signal (that doesn't appear in the API doc) and
 without being able to use it. :(
 [1]
 https://github.com/qgis/QGIS/blob/master/src/app/composer/qgscomposermanager.cpp
 (line 48
 [2] https://github.com/qgis/QGIS/blob/master/src/app/qgisapp.cpp (line
 5601)

  Another thing that may not be related : what the deletePrintComposers
 function (https://github.com/qgis/QGIS/blob/master/src/app/qgisapp.cpp
 line 5698) is for?

 Thanks again for the clue.

 2015-03-31 9:43 GMT+02:00 Matthias Kuhn matth...@opengis.ch:

  QgisInterface (iface) has a composerAdded and composerWillBeRemoved
 signal.

 Did you try to connect to these?

 Best,
 Matthias


 On 03/31/2015 09:34 AM, Junior wrote:

  Hi all, Luca
 Thanks for answering. But i already have an update function that I linked
 to an update list button. I even linked it to the icon on the toolbar so
 that when user calls foreground the dialog it's already updated.
 The case I'd like to manage: user can open plugin dialog and composer
 manager. The two dialogs are visible (to the eyes) even though composer
 manager is the one at foreground. He makes changes and directly clicked on
 the plugin dialog. He should update list but if he forgets and executes,
 this may lead to bug I don't want to / can't yet manage.
 Reason why I want to ensure that list is always up to date when he
 interacts with the dialog

  Envoyé depuis mon HTC

 - Reply message -
 De : Luca Manganelli luc...@gmail.com luc...@gmail.com
 Pour :
 Cc : qgis-u...@lists.osgeo.org qgis-u...@lists.osgeo.org
 qgis-u...@lists.osgeo.org qgis-u...@lists.osgeo.org,
 qgis-developer qgis-developer@lists.osgeo.org
 qgis-developer@lists.osgeo.org
 Objet : [Qgis-developer] [Qgis-user] Pyqt4 : which signal is sent when
 dialog comes to foreground?
 Date : mar., mars 31, 2015 07:56

 On Mon, Mar 30, 2015 at 6:12 PM, Junior Delaz del...@gmail.com 
 del...@gmail.com wrote:
  I've read about defining a custom showEvent function but can't understand
  where to put it and what inside.
  If somebody can give some tips...

 You could add a Update list button
 ___
 Qgis-developer mailing 
 listQgis-developer@lists.osgeo.orghttp://lists.osgeo.org/mailman/listinfo/qgis-developer



 ___
 Qgis-developer mailing 
 listQgis-developer@lists.osgeo.orghttp://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] Re : [Qgis-user] Pyqt4 : which signal is sent when dialog comes to foreground?

2015-03-31 Thread Junior Delaz
Matthias,
Thanks. I just give it a try it and all goes well with composerAdded.
But not really well with composerWillBeRemoved signal. The first deletion
in the composer manager does nothing and deleting a second composer does
remove the first one in my list. and so on...
My update function should be rewritten I think.  I'll try to see how
improving it and may (surely) ask again for help (if needed).

While seeking information about composerWillBeRemoved, I found a
composerRemoved [1] [2] signal (that doesn't appear in the API doc) and
without being able to use it. :(
[1]
https://github.com/qgis/QGIS/blob/master/src/app/composer/qgscomposermanager.cpp
(line 48
[2] https://github.com/qgis/QGIS/blob/master/src/app/qgisapp.cpp (line 5601)

Another thing that may not be related : what the deletePrintComposers
function (https://github.com/qgis/QGIS/blob/master/src/app/qgisapp.cpp line
5698) is for?

Thanks again for the clue.

2015-03-31 9:43 GMT+02:00 Matthias Kuhn matth...@opengis.ch:

  QgisInterface (iface) has a composerAdded and composerWillBeRemoved
 signal.

 Did you try to connect to these?

 Best,
 Matthias


 On 03/31/2015 09:34 AM, Junior wrote:

  Hi all, Luca
 Thanks for answering. But i already have an update function that I linked
 to an update list button. I even linked it to the icon on the toolbar so
 that when user calls foreground the dialog it's already updated.
 The case I'd like to manage: user can open plugin dialog and composer
 manager. The two dialogs are visible (to the eyes) even though composer
 manager is the one at foreground. He makes changes and directly clicked on
 the plugin dialog. He should update list but if he forgets and executes,
 this may lead to bug I don't want to / can't yet manage.
 Reason why I want to ensure that list is always up to date when he
 interacts with the dialog

  Envoyé depuis mon HTC

 - Reply message -
 De : Luca Manganelli luc...@gmail.com luc...@gmail.com
 Pour :
 Cc : qgis-u...@lists.osgeo.org qgis-u...@lists.osgeo.org
 qgis-u...@lists.osgeo.org qgis-u...@lists.osgeo.org, qgis-developer
 qgis-developer@lists.osgeo.org qgis-developer@lists.osgeo.org
 Objet : [Qgis-developer] [Qgis-user] Pyqt4 : which signal is sent when
 dialog comes to foreground?
 Date : mar., mars 31, 2015 07:56

 On Mon, Mar 30, 2015 at 6:12 PM, Junior Delaz del...@gmail.com 
 del...@gmail.com wrote:
  I've read about defining a custom showEvent function but can't understand
  where to put it and what inside.
  If somebody can give some tips...

 You could add a Update list button
 ___
 Qgis-developer mailing 
 listQgis-developer@lists.osgeo.orghttp://lists.osgeo.org/mailman/listinfo/qgis-developer



 ___
 Qgis-developer mailing 
 listQgis-developer@lists.osgeo.orghttp://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] Pyqt4 : which signal is sent when dialog comes to foreground?

2015-03-30 Thread Junior Delaz
Hi,
I'm working on a Python plugin for QGIS and need your help to do something.
I'm a beginner in Python and C++ and just used plugin-builder for the
architecture.

My main dialog is a non modal one and does list print composers in the
project. It means that while it's opened, user can delete or create
composer. What I'd like is, when user calls back the dialog to foreground,
it automatically updates the list of composers. I already have the function
to update but don't find which signal to use. I can add a button to do this
but better if it can be done transparently...

I've read about defining a custom showEvent function but can't understand
where to put it and what inside.
If somebody can give some tips...

Thanks in advance,

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

Re: [Qgis-developer] wrong attribute values for postgis data in Feature attribute form

2015-03-26 Thread Junior Delaz
Hi,
Raymond, you can use the row_number function to add a primary key to your
view.
Something like :
CREATE OR REPLACE view myview as
SELECT row_number () over ()::integer as id, fieldA, Field ...
from mytable .
will add an unique integer field _id_ to your view. And this one can be
used in QGIS as primary key

2015-03-26 11:15 GMT+01:00 Raymond Nijssen r.nijs...@terglobo.nl:

 Thanks Bernhard. I just figured that. But my layer is not a table, it is a
 view. And it seems that PostgreSQL cannot have constraints on views.

 So, I think I just need to carefully select the right key field when
 loading it.

 (And maybe QGIS could be slightly smarter by not suggesting a boolean
 field by default?)



 On 26-03-15 11:07, Bernhard Ströbl wrote:

 Hi Raymond,

 Am 26.03.2015 10:57, schrieb Raymond Nijssen:

 Thanks Regis, that was exactly the issue. The (boolean!) field
 'inonderzoek' was used as a key. When I change that to 'gid' in the Add
 PostGIS Table dialog, everything works correctly.

 Can anyone tell me why QGIS picks that boolean field for most of my
 tables? Can I change that behaviour by changing my database structure?


 Maybe I can, but I would need the table definition statement for it. Can
 you post it here.
 Generally speaking you should define an integer field (use bigint if you
 expect _many_ datasets) as primary key for the table like:

 CREATE TABLE my_points
 (
gid integer NOT NULL,
the_geom geometry(Point,my_srid),
other_fields,
CONSTRAINT my_points_pkey PRIMARY KEY (gid)
 );

 Bernhard


 http://terglobo.nl/downloads/qgis_add_postgis_table_wrong_key.png

 And how can the identify results be correct anyway?

 Tnx,
 Raymond


 dbname='bag' host=localhost port=5432 user='postgres' sslmode=disable
 key='inonderzoek' estimatedmetadata=true srid=28992 type=POLYGON
 table=bagactueel.pandactueelbestaand (geovlak) sql=



 On 26-03-15 10:34, Régis Haubourg wrote:

 Hi, I have seen such troubles when the choosen primary key from qgis
 side is
 not unique .

 Symptoms: selecting one feature select severals unrelated features of
 the
 same layer. relation with attributes is broken also.

 Can you check in your layer's definition (general tab of layer
 properties)
 if you choose gid field as key, and check if it is really unique in
 postgis?

 Cheers
 Régis



 --
 View this message in context:
 http://osgeo-org.1560.x6.nabble.com/wrong-attribute-
 values-for-postgis-data-in-Feature-attribute-form-
 tp5195518p5195523.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





 __ Information from ESET Mail Security, version of virus
 signature database 11379 (20150326) __

 The message was checked by ESET Mail Security.
 http://www.eset.com


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


 --
 Terglobo
 Ampèrestraat 110
 5223 CT 's-Hertogenbosch
 06-25314983
 ___
 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] problem with 'toreal' in field calculator

2015-03-10 Thread Junior Delaz
hi,

If your field is recognized by QGIS as a string one, trying to overwrite
its values type will fail as they are intended to be string in THIS field.
This is why when you create a new numeric field and make conversion, it's
ok (this new field expect numeric values, so it'll recognize your
conversion).

2015-03-10 18:08 GMT+01:00 Matteo Ghetta matteo.ghe...@gmail.com:

 Hi all,
 I have a filed made up by numeric values but recognized as text (should be
 a WFS issue and not a QGIS problem).
 I've used the 'toreal' function of the field calculator in order to update
 the field but nothing changed (numbers are still read as text).
 Strange is that if I create a new field using the 'toreal' function,
 values are correctly read as numbers and not as text.

 Am I missing something or can be a bug?

 BTW: debian testing and QGIS 2.8.1

 Cheers

 Matteo


 ___
 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] Re : Problem when using spatial index

2015-01-22 Thread Junior
Hi,
Then fix the layer with duplicate nodes. As stated here [1], it can be done 
with the tool in vector menu  Geometry tools  Simplify geometry (setting the 
tolerance to 0)

[1] http://docs.qgis.org/2.2/en/docs/user_manual/plugins/plugins_ftools.html

Envoyé depuis mon HTC

- Reply message -
De : Nejia Ben Nasr nejia.benn...@spaceyes3d.com
Pour : 'Junior Delaz' del...@gmail.com
Objet : [Qgis-developer] Problem when using spatial index
Date : mer., janv. 21, 2015 16:11

To inderstant the source of problem, if it’s caused by invalid geometry I do 
this:-  I load only a shapefile containing geometry with duplicate 
nodes and I remove file .qix, here the problem appear: the spatial index is 
atomically created and I can’t see all feature when I zoom or navigate in the 
map. -  I have another shapefile containing some rows without geometry, 
I load only it in Qgis and I create a spatial index, here there is no problem   
De : Junior Delaz [mailto:del...@gmail.com] 
Envoyé : mercredi 21 janvier 2015 14:57
À : Nejia Ben Nasr
Objet : Re: [Qgis-developer] Problem when using spatial index I assume 
duplicate nodes invalidate geometry but I don't think such thing can create the 
current bug. OGR/GEOS guru?
But if I understand your second sentence, you have a shapefile containing some 
rows without geometry. Right? So, what do u mean by I don't have a problem 
with this file? Is it another file or the file on which you're creating the 
spatial index? 
You should :
- open a new project and add only the problematic file 
- or delete from your current project the file with empty geometry (if it's not 
the one you're creating spatial index on)
to see how it reacts when zooming in/out ...
2015-01-21 14:26 GMT+01:00 Nejia Ben Nasr nejia.benn...@spaceyes3d.com:The  
problem appears with vector layers that contain geometries that containing 
duplicate node(s), it’s considered as an invalid geometry ?When I select all 
features from the bounding box of the vector layer, lines of features that has 
a null geometry are not selected in the attribute table (I don’t have a problem 
with this shapefile). Thanks,NejiaDe : Junior [mailto:del...@gmail.com] 
Envoyé : mercredi 21 janvier 2015 13:47
À : Nejia Ben Nasr
Cc : 'qgis-developer'
Objet : Re : [Qgis-developer] Problem when using spatial index

weird, it worked for others. 
And if you spatially select all your features, are all the lines in the 
attribute table being selected?
You haven't answered about checking geometry validity...

Envoyé depuis mon HTC
- Reply message -
De : Nejia Ben Nasr nejia.benn...@spaceyes3d.com
Pour : 'Junior' del...@gmail.com
Cc : 'qgis-developer' qgis-developer@lists.osgeo.org
Objet : [Qgis-developer] Problem when using spatial index
Date : mer., janv. 21, 2015 13:30
Yes, even if I delete the .qix before saving !! Thanks,Nejia De : Junior 
[mailto:del...@gmail.com] 
Envoyé : mercredi 21 janvier 2015 13:23
À : Nejia Ben Nasr
Cc : 'qgis-developer'
Objet : Re : [Qgis-developer] Problem when using spatial index
And if you delete the .qix before saving? And then recreate it...

Envoyé depuis mon HTC
- Reply message -
De : Nejia Ben Nasr nejia.benn...@spaceyes3d.com
Pour : 'Junior Delaz' del...@gmail.com
Cc : 'qgis-developer' qgis-developer@lists.osgeo.org
Objet : [Qgis-developer] Problem when using spatial index
Date : mer., janv. 21, 2015 13:14
I already tried to save to anther shapefile and edit it (add, modify, remove 
features …) the .qix was automatically created and I get the same problem 
Thanks,Nejia De : Junior Delaz [mailto:del...@gmail.com] 
Envoyé : mercredi 21 janvier 2015 12:21
À : Nejia Ben Nasr
Cc : qgis-developer
Objet : Re: [Qgis-developer] Problem when using spatial index Some users [1] 
have already encountered this issue and i understood that it may be related to 
non correspondance between the number of rows in the .dbf file and number of 
geometry (some rows had no geometry). A simple Save As.. to another shapefile 
has solved the problem.
[1] http://georezo.net/forum/viewtopic.php?id=95143 (in french, sorry )
2015-01-21 9:16 GMT+01:00 Nejia Ben Nasr nejia.benn...@spaceyes3d.com:Hi, Do 
you think that this problem is often caused by geometry problems? Thanks,Nejia 
De : Junior [mailto:del...@gmail.com] 
Envoyé : mardi 20 janvier 2015 13:41
À : Nejia Ben Nasr; 'qgis-developer'
Objet : Re : [Qgis-developer] Problem when using spatial index
Hi,
Nejia, what about the validity of the geometry of your features? You can check 
with the tool in Vector menu  Geometry tools  check geometry validity

Envoyé depuis mon HTC
- Reply message -
De : Nejia Ben Nasr nejia.benn...@spaceyes3d.com
Pour : 'qgis-developer' qgis-developer@lists.osgeo.org
Objet : [Qgis-developer] Problem when using spatial index
Date : mar., janv. 20, 2015 13:03
I use QGIS 2.6.1 De : qgis-developer-boun...@lists.osgeo.org 
[mailto:qgis-developer-boun...@lists.osgeo.org] De la part de Nejia Ben Nasr
Envoyé : mardi 20 janvier

Re: [Qgis-developer] Problem when using spatial index

2015-01-21 Thread Junior Delaz
Some users [1] have already encountered this issue and i understood that it
may be related to non correspondance between the number of rows in the .dbf
file and number of geometry (some rows had no geometry). A simple Save
As.. to another shapefile has solved the problem.
[1] http://georezo.net/forum/viewtopic.php?id=95143 (in french, sorry )

2015-01-21 9:16 GMT+01:00 Nejia Ben Nasr nejia.benn...@spaceyes3d.com:

 Hi,



 Do you think that this problem is often caused by geometry problems?



 Thanks,

 Nejia



 *De :* Junior [mailto:del...@gmail.com]
 *Envoyé :* mardi 20 janvier 2015 13:41
 *À :* Nejia Ben Nasr; 'qgis-developer'
 *Objet :* Re : [Qgis-developer] Problem when using spatial index



 Hi,

 Nejia, what about the validity of the geometry of your features? You can
 check with the tool in Vector menu  Geometry tools  check geometry
 validity



 Envoyé depuis mon HTC



 - Reply message -
 De : Nejia Ben Nasr nejia.benn...@spaceyes3d.com
 Pour : 'qgis-developer' qgis-developer@lists.osgeo.org
 Objet : [Qgis-developer] Problem when using spatial index
 Date : mar., janv. 20, 2015 13:03



 I use QGIS 2.6.1



 *De :* qgis-developer-boun...@lists.osgeo.org [
 mailto:qgis-developer-boun...@lists.osgeo.org
 qgis-developer-boun...@lists.osgeo.org] *De la part de* Nejia Ben Nasr
 *Envoyé :* mardi 20 janvier 2015 09:39
 *À :* qgis-developer
 *Objet :* [Qgis-developer] Problem when using spatial index



 Hi all,



 I load a shapefile, then I create a spatial index to maximize speed of
 zoom and navigate in the map.

 The problem is: when I zoom to any area feature appear and other doesn’t.

 And it seems To me that the spatial index is automatically created even
 when I delete the .qix file





 Best regards,

 Nejia

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

[Qgis-developer] Re : Problem when using spatial index

2015-01-21 Thread Junior
And if you delete the .qix before saving? And then recreate it...

Envoyé depuis mon HTC

- Reply message -
De : Nejia Ben Nasr nejia.benn...@spaceyes3d.com
Pour : 'Junior Delaz' del...@gmail.com
Cc : 'qgis-developer' qgis-developer@lists.osgeo.org
Objet : [Qgis-developer] Problem when using spatial index
Date : mer., janv. 21, 2015 13:14

I already tried to save to anther shapefile and edit it (add, modify, remove 
features …) the .qix was automatically created and I get the same problem 
Thanks,Nejia De : Junior Delaz [mailto:del...@gmail.com] 
Envoyé : mercredi 21 janvier 2015 12:21
À : Nejia Ben Nasr
Cc : qgis-developer
Objet : Re: [Qgis-developer] Problem when using spatial index Some users [1] 
have already encountered this issue and i understood that it may be related to 
non correspondance between the number of rows in the .dbf file and number of 
geometry (some rows had no geometry). A simple Save As.. to another shapefile 
has solved the problem.
[1] http://georezo.net/forum/viewtopic.php?id=95143 (in french, sorry )
2015-01-21 9:16 GMT+01:00 Nejia Ben Nasr nejia.benn...@spaceyes3d.com:Hi, Do 
you think that this problem is often caused by geometry problems? Thanks,Nejia 
De : Junior [mailto:del...@gmail.com] 
Envoyé : mardi 20 janvier 2015 13:41
À : Nejia Ben Nasr; 'qgis-developer'
Objet : Re : [Qgis-developer] Problem when using spatial index
Hi,
Nejia, what about the validity of the geometry of your features? You can check 
with the tool in Vector menu  Geometry tools  check geometry validity

Envoyé depuis mon HTC
- Reply message -
De : Nejia Ben Nasr nejia.benn...@spaceyes3d.com
Pour : 'qgis-developer' qgis-developer@lists.osgeo.org
Objet : [Qgis-developer] Problem when using spatial index
Date : mar., janv. 20, 2015 13:03
I use QGIS 2.6.1 De : qgis-developer-boun...@lists.osgeo.org 
[mailto:qgis-developer-boun...@lists.osgeo.org] De la part de Nejia Ben Nasr
Envoyé : mardi 20 janvier 2015 09:39
À : qgis-developer
Objet : [Qgis-developer] Problem when using spatial index
Hi all, I load a shapefile, then I create a spatial index to maximize speed of 
zoom and navigate in the map.The problem is: when I zoom to any area feature 
appear and other doesn’t.And it seems To me that the spatial index is 
automatically created even when I delete the .qix file  Best regards,Nejia___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

[Qgis-developer] Re : Problem when using spatial index

2015-01-21 Thread Junior
weird, it worked for others. 
And if you spatially select all your features, are all the lines in the 
attribute table being selected?
You haven't answered about checking geometry validity...

Envoyé depuis mon HTC

- Reply message -
De : Nejia Ben Nasr nejia.benn...@spaceyes3d.com
Pour : 'Junior' del...@gmail.com
Cc : 'qgis-developer' qgis-developer@lists.osgeo.org
Objet : [Qgis-developer] Problem when using spatial index
Date : mer., janv. 21, 2015 13:30

Yes, even if I delete the .qix before saving !! Thanks,Nejia De : Junior 
[mailto:del...@gmail.com] 
Envoyé : mercredi 21 janvier 2015 13:23
À : Nejia Ben Nasr
Cc : 'qgis-developer'
Objet : Re : [Qgis-developer] Problem when using spatial index
And if you delete the .qix before saving? And then recreate it...

Envoyé depuis mon HTC
- Reply message -
De : Nejia Ben Nasr nejia.benn...@spaceyes3d.com
Pour : 'Junior Delaz' del...@gmail.com
Cc : 'qgis-developer' qgis-developer@lists.osgeo.org
Objet : [Qgis-developer] Problem when using spatial index
Date : mer., janv. 21, 2015 13:14
I already tried to save to anther shapefile and edit it (add, modify, remove 
features …) the .qix was automatically created and I get the same problem 
Thanks,Nejia De : Junior Delaz [mailto:del...@gmail.com] 
Envoyé : mercredi 21 janvier 2015 12:21
À : Nejia Ben Nasr
Cc : qgis-developer
Objet : Re: [Qgis-developer] Problem when using spatial index Some users [1] 
have already encountered this issue and i understood that it may be related to 
non correspondance between the number of rows in the .dbf file and number of 
geometry (some rows had no geometry). A simple Save As.. to another shapefile 
has solved the problem.
[1] http://georezo.net/forum/viewtopic.php?id=95143 (in french, sorry )
2015-01-21 9:16 GMT+01:00 Nejia Ben Nasr nejia.benn...@spaceyes3d.com:Hi, Do 
you think that this problem is often caused by geometry problems? Thanks,Nejia 
De : Junior [mailto:del...@gmail.com] 
Envoyé : mardi 20 janvier 2015 13:41
À : Nejia Ben Nasr; 'qgis-developer'
Objet : Re : [Qgis-developer] Problem when using spatial index
Hi,
Nejia, what about the validity of the geometry of your features? You can check 
with the tool in Vector menu  Geometry tools  check geometry validity

Envoyé depuis mon HTC
- Reply message -
De : Nejia Ben Nasr nejia.benn...@spaceyes3d.com
Pour : 'qgis-developer' qgis-developer@lists.osgeo.org
Objet : [Qgis-developer] Problem when using spatial index
Date : mar., janv. 20, 2015 13:03
I use QGIS 2.6.1 De : qgis-developer-boun...@lists.osgeo.org 
[mailto:qgis-developer-boun...@lists.osgeo.org] De la part de Nejia Ben Nasr
Envoyé : mardi 20 janvier 2015 09:39
À : qgis-developer
Objet : [Qgis-developer] Problem when using spatial index
Hi all, I load a shapefile, then I create a spatial index to maximize speed of 
zoom and navigate in the map.The problem is: when I zoom to any area feature 
appear and other doesn’t.And it seems To me that the spatial index is 
automatically created even when I delete the .qix file  Best regards,Nejia___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

[Qgis-developer] Re : Problem when using spatial index

2015-01-20 Thread Junior
Hi,
Nejia, what about the validity of the geometry of your features? You can check 
with the tool in Vector menu  Geometry tools  check geometry validity

Envoyé depuis mon HTC

- Reply message -
De : Nejia Ben Nasr nejia.benn...@spaceyes3d.com
Pour : 'qgis-developer' qgis-developer@lists.osgeo.org
Objet : [Qgis-developer] Problem when using spatial index
Date : mar., janv. 20, 2015 13:03

I use QGIS 2.6.1 De : qgis-developer-boun...@lists.osgeo.org 
[mailto:qgis-developer-boun...@lists.osgeo.org] De la part de Nejia Ben Nasr
Envoyé : mardi 20 janvier 2015 09:39
À : qgis-developer
Objet : [Qgis-developer] Problem when using spatial index
Hi all, I load a shapefile, then I create a spatial index to maximize speed of 
zoom and navigate in the map.The problem is: when I zoom to any area feature 
appear and other doesn’t.And it seems To me that the spatial index is 
automatically created even when I delete the .qix file  Best regards,Nejia___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] [Bulk] Re: [Qgis-user] Retrieve value from another layer related to its localisation

2015-01-15 Thread Junior Delaz
Ok, this is somehow what I did. With QChainage plugin, no need to create
new fields and csv table. It directly creates the point geometry layer
corresponding to xat(0)/yat(0) and xat(-1)/yat(-1) with $id field, when
well setting.
I also assume that what I was trying to do directly within the line layer
field calculator is not (yet) possible.

Thanks.



2015-01-15 15:54 GMT+01:00 Enrico Ferreguti enrico...@gmail.com:

 Ok. so i would proceed degrading line geometry to point geometry creating
 two X and Y fields in the original table with xat(0) and yat(0) functions.
 I would add a featureid field with $id function for  a following join. Then
 I would export everything in cvs and import back with Add Delimited Text
 Layer creatin geometry from X and Y fields.
 From the the degraded new table is now possible to apply geomnearest
 function joining the added fields with featureid field.
 ...a bit tricky but it should work.

 Regards




 2015-01-15 14:25 GMT+01:00 Junior Delaz del...@gmail.com:

 Thanks Enrico for your reply and for the plugin.

 I was aware of RefFunctions and has already used it for relational
 questions. And I agree with Jean that such functions (and others of your
 plugins) might be core functions. I've moreover reported a feature request
 to improve usability of all this #11680
 https://hub.qgis.org/issues/11680.
 And I tried it again this time. but the main problem is I don't want to
 retrieve field value of the nearest point to my line geometry. I want to
 retrieve field value of the nearest point *to the first vertex* of my
 line geometry. While using just geomnearest, i'll get only the nearest
 point to the whole line. It may be the point at the beginning or the one at
 the end of the line, I can't know.
 What I did is to create a point file containing my vertices and then use
 refFunctions to get the nearest station ID.

 But, isn't it possible to do the request without the step of creating new
 point file? Using in the condition being nearest to the geomfromWKT('POINT
 (xat(0) yat(0)) ') of line feature?
 How can I write in the field calculator of a line layer such function :
 dbquery ('mypointlayer', 'pointID', 'the condition is to be the nearest
 point to the first vertex of the line')? Or dbvalue? Is it possible to
 combine reference functions with others?

 And more generally, are Reference functions conditions intended to be
 only internal to the target layer or can I use values/fields from the
 source layer? If latter, how can I refer to the source layer in the
 expression?

 Thanks


 2015-01-15 12:05 GMT+01:00 Tijan49 tija...@yahoo.fr:

  Hi,
 I knew about those functions a few weeks ago, and I was really happy
 about that, because it is a lack in the basic function.
 For I, those new functions should really be in the core project in the
 next release ...
 Thanks to all the programmers.
 Jean

 Le 15/01/2015 11:59, Enrico Ferreguti a écrit :

   You can use refFunctions (
 http://plugins.qgis.org/plugins/refFunctions/) plugin that extends
 Field Calculator with a new Reference group.
  Within this group you will find a geomnearest and a geomdistance
 function that can help you.

  copy and paste from helper screen:

 geomnearest function


 Retrieve target field value from the nearest target feature in target
 layer

 Syntax

 geomnearest(targetLayer,targetField)

 Arguments

 targetLayer → the name of a currently loaded layer, for example
 'myLayer'.
 targetField → a field in target layer we want as result when source
 feature is within target feature, for example 'myField'.
 If targetField is equal to '$geometry' The WKT geometry of targetFeature
 willbe retrieved. If otherwise is equal to '$distance' the calculated
 distance between source and target features will be returned
 Number of feature tested is limited to 10 to avoid time wasting loops

 Example

 geomnearest('targetLayer','TargetField')
 geomnearest('targetLayer','$geometry')
 geomnearest('targetLayer','$distance')


 2015-01-15 11:19 GMT+01:00 Junior Delaz del...@gmail.com:

Hi all,

  I have two shapefiles : a line one (called section) and a point one
 (called station) shapefiles.
  The line shapefiles has fields like ID_section, ID_first, ID_last
  The point file has an ID_station.
  All these define a kind of network where a section begins on a
 station and ends up at another station.
  What I need to do is to fill :
 - section ID_first field with the ID_station of the station that is the
 closest to the beginning of the section
 - and section ID_last field with the ID_station of the closest station
 to the end of the line.

 I can obtain this result while combining many analysis tools and
 plugins (QChainage, Spatial_Join...). I know how I can do it. There might
 be a way with processing tools and if somebody has an idea, I'll be glad to
 know it however.

  But what I'm really wondering is if it isn't directly possible to
 fill these fields in the Field calculator using all the nice functions we

[Qgis-developer] Retrieve value from another layer related to its localisation

2015-01-15 Thread Junior Delaz
Hi all,

I have two shapefiles : a line one (called section) and a point one
(called station) shapefiles.
The line shapefiles has fields like ID_section, ID_first, ID_last
The point file has an ID_station.
All these define a kind of network where a section begins on a station and
ends up at another station.
What I need to do is to fill :
- section ID_first field with the ID_station of the station that is the
closest to the beginning of the section
- and section ID_last field with the ID_station of the closest station to
the end of the line.

I can obtain this result while combining many analysis tools and plugins
(QChainage, Spatial_Join...). I know how I can do it. There might be a way
with processing tools and if somebody has an idea, I'll be glad to know it
however.

But what I'm really wondering is if it isn't directly possible to fill
these fields in the Field calculator using all the nice functions we have.
Indeed, QGIS 2.6 and RefFunctions plugin give relational fonctions to
retrieve values on a specific layer according to its fields, features
values or localisation.
I tried many combinations with db_query, geomnearest, geomRedef, xat/yat,
buffer, geometry, within , attribute (not all at the same time :) ) I'm
pretty sure it's possible but I can't find. And I don't want to lose all my
hair...

Does anybody know how I can retrieve in a line shapefile's field the value
of the point feature that is the closest to the first vertex of this line,
within the field calculator?

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

Re: [Qgis-developer] [Bulk] Re: [Qgis-user] Retrieve value from another layer related to its localisation

2015-01-15 Thread Junior Delaz
Thanks Enrico for your reply and for the plugin.

I was aware of RefFunctions and has already used it for relational
questions. And I agree with Jean that such functions (and others of your
plugins) might be core functions. I've moreover reported a feature request
to improve usability of all this #11680 https://hub.qgis.org/issues/11680.
And I tried it again this time. but the main problem is I don't want to
retrieve field value of the nearest point to my line geometry. I want to
retrieve field value of the nearest point *to the first vertex* of my line
geometry. While using just geomnearest, i'll get only the nearest point to
the whole line. It may be the point at the beginning or the one at the end
of the line, I can't know.
What I did is to create a point file containing my vertices and then use
refFunctions to get the nearest station ID.

But, isn't it possible to do the request without the step of creating new
point file? Using in the condition being nearest to the geomfromWKT('POINT
(xat(0) yat(0)) ') of line feature?
How can I write in the field calculator of a line layer such function :
dbquery ('mypointlayer', 'pointID', 'the condition is to be the nearest
point to the first vertex of the line')? Or dbvalue? Is it possible to
combine reference functions with others?

And more generally, are Reference functions conditions intended to be only
internal to the target layer or can I use values/fields from the source
layer? If latter, how can I refer to the source layer in the expression?

Thanks


2015-01-15 12:05 GMT+01:00 Tijan49 tija...@yahoo.fr:

  Hi,
 I knew about those functions a few weeks ago, and I was really happy about
 that, because it is a lack in the basic function.
 For I, those new functions should really be in the core project in the
 next release ...
 Thanks to all the programmers.
 Jean

 Le 15/01/2015 11:59, Enrico Ferreguti a écrit :

   You can use refFunctions (http://plugins.qgis.org/plugins/refFunctions/)
 plugin that extends Field Calculator with a new Reference group.
  Within this group you will find a geomnearest and a geomdistance function
 that can help you.

  copy and paste from helper screen:

 geomnearest function


 Retrieve target field value from the nearest target feature in target
 layer

 Syntax

 geomnearest(targetLayer,targetField)

 Arguments

 targetLayer → the name of a currently loaded layer, for example 'myLayer'.
 targetField → a field in target layer we want as result when source
 feature is within target feature, for example 'myField'.
 If targetField is equal to '$geometry' The WKT geometry of targetFeature
 willbe retrieved. If otherwise is equal to '$distance' the calculated
 distance between source and target features will be returned
 Number of feature tested is limited to 10 to avoid time wasting loops

 Example

 geomnearest('targetLayer','TargetField')
 geomnearest('targetLayer','$geometry')
 geomnearest('targetLayer','$distance')


 2015-01-15 11:19 GMT+01:00 Junior Delaz del...@gmail.com:

Hi all,

  I have two shapefiles : a line one (called section) and a point one
 (called station) shapefiles.
  The line shapefiles has fields like ID_section, ID_first, ID_last
  The point file has an ID_station.
  All these define a kind of network where a section begins on a station
 and ends up at another station.
  What I need to do is to fill :
 - section ID_first field with the ID_station of the station that is the
 closest to the beginning of the section
 - and section ID_last field with the ID_station of the closest station to
 the end of the line.

 I can obtain this result while combining many analysis tools and plugins
 (QChainage, Spatial_Join...). I know how I can do it. There might be a way
 with processing tools and if somebody has an idea, I'll be glad to know it
 however.

  But what I'm really wondering is if it isn't directly possible to fill
 these fields in the Field calculator using all the nice functions we have.
 Indeed, QGIS 2.6 and RefFunctions plugin give relational fonctions to
 retrieve values on a specific layer according to its fields, features
 values or localisation.
  I tried many combinations with db_query, geomnearest, geomRedef,
 xat/yat, buffer, geometry, within , attribute (not all at the same time :)
 ) I'm pretty sure it's possible but I can't find. And I don't want to
 lose all my hair...

  Does anybody know how I can retrieve in a line shapefile's field the
 value of the point feature that is the closest to the first vertex of this
 line, within the field calculator?

  Thanks ...




 ___
 Qgis-user mailing 
 listQgis-user@lists.osgeo.orghttp://lists.osgeo.org/mailman/listinfo/qgis-user



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

Re: [Qgis-developer] Questions about Dialog for Select by Expression

2014-12-01 Thread Junior Delaz
Hi All

Lene,

The height of the expression frame should indeed have a minimum value, to
avoid closing it. But this is not a new behaviour. In QGIS 2.4, you could
already close totally this frame if you drag down enough. I think it's a
bug and you can fill a ticket unless it's an intended behaviour (and it
would be nice if the dev can explain why such choice - thanks).

About syntax coloring, I have it work as expected here but I'm on 2.6.1
(haven't tried 2.6.0). Maybe, it's already fixed or it's an OS issue (I'm
on Windows 7  64bits, Osgeo4w advanced install).

For the last one, I agree with you, we should have kept load unique
values and All instead of load  values and All unique. The first one
seems more comprehensive to me and everybody gets that the unique term
applies for All and 10 samples. It may be confusing now, having
unique only on All button. No?

2014-11-30 9:30 GMT+01:00 Lene Fischer l...@ign.ku.dk:

  Hi,

 In the dialog Select by expression there has been some changes in 2.6



 Window dragging in expressions must have a minimum vale so the express
 doesn’t disappear if you drag down.

 Secondly – before there was a syntax coloring – now it´s all the same
 color.

 At last – why does buttons change name – if there is no change in
 function? Here I refere to Load values.



 Please see the video http://screencast.com/t/VE4PvkT1 that explains the
 questions.

 Regards









 *Lene Fischer*

 Associate Professor



 *Department of Geosciences and Natural Resource Management*

 University of Copenhagen



 MOB +45 40115084

 l...@ign.ku.dk





 [image: SCIENCE_bomaerke_UK]





 ___
 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] Impossible to keep QGIS 2.4 while updating QGIS master (osgeo4W nightly build)

2014-11-26 Thread Junior Delaz
Hello,
I use OsGeo4W to install both QGIS stable and master releases.
Due to the bug of QGIS 2.6.0-1 that crashes QGIS and ruins some older
project file, I decided to not yet upgrade to 2.6 (and keep 2.4) but still
update nightly builds.
The first time I got 2.7, I choose to keep 2.4. After the install process,
I was unable to run QGis 2.4, getting the error message attached when
launching either the shortcut or the qgis.bat file in install directory.
Two days later, after updating nightly build , QGIS 2.4 worked fine and
stopped again at the next nightly build.
Since, reinstalling QGIS 2.4 in osgeo4w install process doesn't fix it, the
only usable release remains the Master.

Is this a bug or is it impossible to install both master and not the
latest stable releases through osgeo4W? If a bug, should I file a ticket
on qgis hub or elsewhere?
Any idea how I can get back a working QGIS 2.4?

I'm on Windows 7 64 bits but I got the same bug on Windows 8 32 bits.

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

[Qgis-developer] Re : 2.6: first overview

2014-11-02 Thread Junior
Hi,
About corrupted layers, yes this is the new behaviour. You can now directly 
write the good path. But there is also a browser button at the bottom of the 
dialog. Select the layer in the list and click on this button will open the 
explorer, as old double-click behaved.

Envoyé depuis mon HTC

- Reply message -
De : Werner Macho werner.ma...@gmail.com
Pour : Niccolò Marchi sciurusurba...@hotmail.it
Cc : qgis-developer@lists.osgeo.org qgis-developer@lists.osgeo.org
Objet : [Qgis-developer] 2.6: first overview
Date : dim., nov. 2, 2014 23:29

Hi!

Regarding translation it is now easier than ever before to contribute
and change the things yourself.
Just get an account on transifex [0] and apply for the italian
language - search for the typos and change them by yourself. That way
you make sure the correct string will find it's way into the next
release.

kind regards
Werner

[0] https://www.transifex.com/projects/p/QGIS

On Sun, Nov 2, 2014 at 11:11 PM, Niccolò Marchi
sciurusurba...@hotmail.it wrote:
 Hi all,

 just few things I'm experiencing with 2.6:


 Attribute Table: modifying the content of a cell, it needs to save and
 reopen the table to see it updated...normal behaviour?

 Crash: different types. Usually closing the project, QGIS ends up with a
 minidump or the MS error window The software stopped to work etc etc. This
 happens closing .qgs from 2.2 with or without saving to 2.6 version.
 Sometimes also while working. Attached you can find the .dmp (shall I upload
 them? I don't know how to deal with). Actually it's a quite annoying
 issue...

 Corrupt layers: the table appears but double-clicking the source it doesn't
 open the explorer as in 2.2; it only allows to modify the folder destination
 as text. Is that the new behavior?

 Translation (ITA): just few oversights:

 color selection panel: incolla collore

 modify widget properties: il widget di modica può...


 Is there anyone with the same issues? I'm working with W8.1 64bit and QGIS
 standalone.


 As always: thank you all for your work!


 All the best,


 Nic


 ___
 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] Re : Show area of a polygon while editing with node tool

2014-10-16 Thread Junior
Hi
Isn't there already such plugin? I haven't used it yet but you can give a look 
to CalcArea plugin and see how it deals with that.

Envoyé depuis mon HTC

- Reply message -
De : Michael Pfeiffer michael.pfeif...@bd.so.ch
Pour : qgis-developer@lists.osgeo.org
Objet : [Qgis-developer] Show area of a polygon while editing with node tool
Date : jeu., oct. 16, 2014 09:38

Hi everybody,

I'm developing a python plugin.
Now the users of the plugin want to see the area of a polygon while editing
it with the node tool because they need to have polygons with a specific
area.
Means they move a node and the area changes while moving the node.
Is there an easy way to manage this? Are there already any examples?

Thx for your help

regards

Michael



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Show-area-of-a-polygon-while-editing-with-node-tool-tp5167750.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] What does mean empty tables in attribute table item properties in a print composer?

2014-10-11 Thread Junior Delaz
Indeed, this a desirable behavior: user may want to show empty rows when
there are not enough matching features. This is what I was looking for when
using this option. But having this one working for a table and none among
the three other options is a bit confusing for the user. I spent at least
an hour on testing why these options didn't work and I'm afraid I won't be
the last.

Don't you think that draw empty rows can be a separate option (may be a
checkbox)? It'll have its effects on every frame with too higher rows for
the features.
The other three options in the combobox will work only when there is no row
(on real empty tables).

2014-10-09 13:28 GMT+02:00 Nyall Dawson nyall.daw...@gmail.com:

 On 9 October 2014 08:53, Junior Delaz del...@gmail.com wrote:
  Thanks Nyall. This is what I suspected.
  Then, none of the empty tables options should work on the frames in the
  example above, right?
  But actually, Draw empty cells option does have effect on them. Isn't
 it a
  bug?

 Well - possibly it's a little inconsistent, but I think this behaviour
 is desirable. If you're wanting to show empty cells, I think you'd
 also want to show them when the table is partially filled, rather than
 only when it's totally empty.

 Nyall

 
  2014-10-08 22:33 GMT+02:00 Nyall Dawson nyall.daw...@gmail.com:
 
 
  On 08/10/2014 10:20 pm, Junior Delaz del...@gmail.com wrote:
  
   Hi all,
   I try to understand the use case of empty tables in print composer and
   am still confused.
  
   Create a new print composer and add an attribute table item
   set its height enough to show more rows than the maximal values of
   features you set.
   Add a second frame to this item.
  
   Is this second frame considered as empty table (as no feature
   attribute will be displayed inside)?
 
  No. This behavior only triggers when the entire table is empty. It is
  designed for atlas prints, where the table's contents are being
 filtered by
  the atlas. In this scenario it's possible that no records match the
 filter
  for a particular atlas feature and you need to handle empty tables.
 
  Nyall
 
 
 ___
 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] What does mean empty tables in attribute table item properties in a print composer?

2014-10-08 Thread Junior Delaz
Hi all,
I try to understand the use case of empty tables in print composer and am
still confused.

Create a new print composer and add an attribute table item
set its height enough to show more rows than the maximal values of features
you set.
Add a second frame to this item.

Is this second frame considered as empty table (as no feature attribute
will be displayed inside)?
According to the answer, I think I'll have many other questions about the
options in empty tables combo box.

The only empty table I found in my tests is when the first frame displays
nothing (because maximal rows is set to 0 or show only visible features
within a map is checked and nothing matches). Is it the only situation?

Can somebody explain to me, please?

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

Re: [Qgis-developer] What does mean empty tables in attribute table item properties in a print composer?

2014-10-08 Thread Junior Delaz
Thanks Nyall. This is what I suspected.
Then, none of the empty tables options should work on the frames in the
example above, right?
But actually, Draw empty cells option does have effect on them. Isn't it
a bug?

2014-10-08 22:33 GMT+02:00 Nyall Dawson nyall.daw...@gmail.com:


 On 08/10/2014 10:20 pm, Junior Delaz del...@gmail.com wrote:
 
  Hi all,
  I try to understand the use case of empty tables in print composer and
 am still confused.
 
  Create a new print composer and add an attribute table item
  set its height enough to show more rows than the maximal values of
 features you set.
  Add a second frame to this item.
 
  Is this second frame considered as empty table (as no feature
 attribute will be displayed inside)?

 No. This behavior only triggers when the entire table is empty. It is
 designed for atlas prints, where the table's contents are being filtered by
 the atlas. In this scenario it's possible that no records match the filter
 for a particular atlas feature and you need to handle empty tables.

 Nyall

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

Re: [Qgis-developer] Get signal on edited feature ?

2014-07-31 Thread Junior Delaz
Hello,
For the first question, I think you have done something like
logFeaturesAdded(Idofmylayer, features) instead of doing
self.logFeaturesAdded(Idofmylayer, features).The function you created has
three args : self, layerId, addfeatures. When using it you should give him
three args. The second expression has three arguments not the first one.
Try that.

for your second question, give a look at self.iface.zoomToActiveLayer(),
after having activated your layer. There may be another way but...

I think one good way to learn how to use all this is to make tests with the
qgis Python Console and you'll quickly find the best functions to call.


2014-07-31 11:08 GMT+02:00 dandrigo lcel...@latitude-geosystems.com:

 Hello, thank for your reply.

 1/ For my pyqgis plugin 2.2, i try to
 ---
 def logFeatureAdded(self,layerId,addfeatures):
 message = str(layerId) +  has features added: 
 for feature in addedFeatures:
 message += str( feature.id() ) + , 
 QgsMessageLog.logMessage(message)
 QApplication.beep()
 

 When i try to add a feature, this following error message appears:

 TypeError : logFeaturesAdded() takes exactly 3 arguments (2 given).

 2/ Always for my plugin, i can load a vector layer succesfully. But when i
 try to zoom to the layer extent. But it does not work. How to do in order
 to
 zoom to the layer extent?



 --
 View this message in context:
 http://osgeo-org.1560.x6.nabble.com/Get-signal-on-edited-feature-tp5154173p5154364.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] Impossible to upload and share a plugin on QGIS plugin repository

2014-07-30 Thread Junior Delaz
Hi all
I'm tring to upload and share my first plugin at [1] but encountered an
error I don't really understand. It says:
*There were errors reading plugin package (please check also your plugin's
metadata). Cannot find __init__.py or metadata.txt in the compressed
package: this does not seems a valid plugin (I searched for
help/__init__.py and help/metadata.txt)*

I have __init__.py and metadata.txt files but they are in the main folder
(I use Plugin Builder plugin) and none of the plugin folders I looked at
has such files in help folder.
So, why is it looking for these files in the help folder?
What did I make wrong? Is it a bug? and if not, what should contain these
files?

Some help? Thanks a lot.

[1] http://plugins.qgis.org/plugins/add/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] [Qgis-user] Impossible to upload and share a plugin on QGIS plugin repository

2014-07-30 Thread Junior Delaz
Thanks a lot. You are right!!! I was packaging the contents of my plugin
folder instead of packaging the whole main folder.
It's ok now. all is uploaded.

Thank you!


2014-07-30 18:43 GMT+02:00 Siki Zoltan s...@agt.bme.hu:

 Dear Junior,

 in the zip file you have to use the same directory structure as in the
 .qgis2/python/plugins directory. If the name of your plugin is xxx then
 in the zip there sould be a xxx directory which contains the __init__.py
 and metadata.txt and the main python file xxx.py, you can use other
 subdirectories too.
 xxx.zip:
   xxx - __init__.py
 metadata.txt
 xxx.py
 ...
 help
 ...

 Try to download a plugin from plugins.qgis.org and check the structure of
 the zip file.
 I hope this helps you.

 Regards,
 Zoltan



 On Wed, 30 Jul 2014, Junior Delaz wrote:

  Hi all
 I'm tring to upload and share my first plugin at [1] but encountered an
 error I don't really understand. It says:
 *There were errors reading plugin package (please check also your plugin's

 metadata). Cannot find __init__.py or metadata.txt in the compressed
 package: this does not seems a valid plugin (I searched for
 help/__init__.py and help/metadata.txt)*


 I have __init__.py and metadata.txt files but they are in the main folder
 (I use Plugin Builder plugin) and none of the plugin folders I looked at
 has such files in help folder.
 So, why is it looking for these files in the help folder?
 What did I make wrong? Is it a bug? and if not, what should contain these
 files?

 Some help? Thanks a lot.

 [1] http://plugins.qgis.org/plugins/add/


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

[Qgis-developer] How to connect QToolButton to a QGisMap????

2011-07-07 Thread Ornélio Hinterholz Junior
Hi,

I'm developing a new plugin and I got to put a new QToolButton in a new
QToolBar that I created, but the problem is that I can't connect the
QToolButton to the QGis's default ButtonGroup  and neither connect the
action to QgsMapCanvas.

How do I add a new ToggleButton connected with QgsMapCanvas?

I want to get the coordinate clicked, ONLY THIS!

Any example code

Thanks,

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


[Qgis-developer] Jython with QGIS

2011-06-28 Thread Ornélio Hinterholz Junior
Hi guys,

Is there a way for developing in QGIS using Jython or Java?

Thanks,

Ornélio Hinterholz Junior
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] QGIS for water

2011-06-27 Thread Ornélio Hinterholz Junior
Hi,

When I posted here the topic about Water was for Water/Wastewater
distribution

There's no tools for creating and manipulating Networks/Graphs in QGIS
like EPANET does




Em Seg, 2011-06-27 às 15:27 +0100, Saber Razmjooei escreveu:

 Dear lists
 
 I have added a wiki page for hydrology and hydraulic (fluvial, coastal
 and urban drainage) modelling with QGIS:
 http://www.qgis.org/wiki/Hydrology_%26_Hydraulic_modelling#Hydraulics
 
 Feel free to add the software (proprietary or open source) you are using
 to carry out your water related modelling. 
 
 Once we have a list, we can look into ways of developing plugins/tools
 to be able to use QGIS as platform to pre and post process GIS elements.
 
 
 Cheers
 Saber
 
 
 ___
 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] QGIS for Water

2011-06-21 Thread Ornélio Hinterholz Junior
Hi guys,

I'd like to know if there is a project for hydraulic modelling using
QGIS, like InfoWater or WaterGEMS or EPANET???

Thanks in advance,

Ornélio Hinterholz Junior
BRAZIL

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