Re: [Qgis-developer] [Python] QgsFeatureIterator for geometryless PostgreSQL-Layer

2013-10-02 Thread Matthias Kuhn
Hi On 12.04.2013 09:51, Martin Dobias wrote: On Fri, Apr 12, 2013 at 9:25 AM, Jürgen E. j...@norbit.de wrote: Hi Martin, On Thu, 11. Apr 2013 at 22:30:57 +0200, Martin Dobias wrote: I have a feeling that we should call that a bug: the NoGeometry flag tells that it is not necessary to fetch

Re: [Qgis-developer] [Python] QgsFeatureIterator for geometryless PostgreSQL-Layer

2013-04-29 Thread Jürgen E . Fischer
Hi Martin, On Wed, 24. Apr 2013 at 00:21:53 +0200, Martin Dobias wrote: Which only moves the problem upward. Maybe we should handle setFilterFid requests like the old featureAtId. Could you be more specific what would that mean implementation-wise? Handling the setFilterFid requests so

Re: [Qgis-developer] [Python] QgsFeatureIterator for geometryless PostgreSQL-Layer

2013-04-23 Thread Jürgen E . Fischer
Hi Martin, On Tue, 16. Apr 2013 at 09:32:08 +0200, Martin Dobias wrote: IMHO that's not ok. If the provider doesn't support multiple iterators, the second on should be rejected - forcing the caller to close the other one first. You're right - when thinking about it again, it makes more

Re: [Qgis-developer] [Python] QgsFeatureIterator for geometryless PostgreSQL-Layer

2013-04-23 Thread Martin Dobias
On Tue, Apr 23, 2013 at 11:38 AM, Jürgen E. j...@norbit.de wrote: Hi Martin, On Tue, 16. Apr 2013 at 09:32:08 +0200, Martin Dobias wrote: IMHO that's not ok. If the provider doesn't support multiple iterators, the second on should be rejected - forcing the caller to close the other one

Re: [Qgis-developer] [Python] QgsFeatureIterator for geometryless PostgreSQL-Layer

2013-04-16 Thread Jürgen E . Fischer
Hi Martin, On Mon, 15. Apr 2013 at 23:45:20 +0200, Martin Dobias wrote: BTW what about parallel iterators? I suppose there were problems and thats why you added the active iterators - do you recall which providers were affected and how? I have modified providers to have pointers to

Re: [Qgis-developer] [Python] QgsFeatureIterator for geometryless PostgreSQL-Layer

2013-04-16 Thread Martin Dobias
On Tue, Apr 16, 2013 at 8:27 AM, Jürgen E. j...@norbit.de wrote: Hi Martin, On Mon, 15. Apr 2013 at 23:45:20 +0200, Martin Dobias wrote: BTW what about parallel iterators? I suppose there were problems and thats why you added the active iterators - do you recall which providers were

Re: [Qgis-developer] [Python] QgsFeatureIterator for geometryless PostgreSQL-Layer

2013-04-15 Thread Martin Dobias
On Fri, Apr 12, 2013 at 10:33 AM, Jürgen E. j...@norbit.de wrote: Recently I have been wondering whether it would not be better to actually stop using flags and replace them by usual getter/setter functions. My main concern is the setSubsetOfAttributes() function: it also sets the flag, so the

Re: [Qgis-developer] [Python] QgsFeatureIterator for geometryless PostgreSQL-Layer

2013-04-12 Thread Jürgen E . Fischer
Hi Martin, On Thu, 11. Apr 2013 at 22:30:57 +0200, Martin Dobias wrote: I have a feeling that we should call that a bug: the NoGeometry flag tells that it is not necessary to fetch geometry... so even if the flag is not set, the feature should be fetched. Ok, then it's also misleading. Should

Re: [Qgis-developer] [Python] QgsFeatureIterator for geometryless PostgreSQL-Layer

2013-04-12 Thread Martin Dobias
On Fri, Apr 12, 2013 at 9:25 AM, Jürgen E. j...@norbit.de wrote: Hi Martin, On Thu, 11. Apr 2013 at 22:30:57 +0200, Martin Dobias wrote: I have a feeling that we should call that a bug: the NoGeometry flag tells that it is not necessary to fetch geometry... so even if the flag is not set,

Re: [Qgis-developer] [Python] QgsFeatureIterator for geometryless PostgreSQL-Layer

2013-04-11 Thread Martin Dobias
Hi Juergen On Tue, Apr 9, 2013 at 6:10 PM, Jürgen E. j...@norbit.de wrote: if I do feat = QgsFeature() iter = myLayer.getFeatures(QgsFeatureRequest().setFilterFid(myFid)) iter.nextFeature(feat) returns False and I get a message in the PostgreSQL message tab stating Trying to fetch geometry

[Qgis-developer] [Python] QgsFeatureIterator for geometryless PostgreSQL-Layer

2013-04-09 Thread Bernhard Ströbl
Hi, I am trying to access features of a geometryless layer derived from a PostgreSQL table in current master. if I do feat = QgsFeature() iter = myLayer.getFeatures(QgsFeatureRequest().setFilterFid(myFid)) iter.nextFeature(feat) returns False and I get a message in the PostgreSQL message tab

Re: [Qgis-developer] [Python] QgsFeatureIterator for geometryless PostgreSQL-Layer

2013-04-09 Thread Bernhard Ströbl
Jürgen, this works! I checked the docs for QgsVectorLayer.getFeatures and QgsFeatureIterator but not for QgsFeatureRequest thank you and all the best Bernhard Am 09.04.2013 18:10, schrieb Jürgen E. Fischer: Hi Bernhard, On Tue, 09. Apr 2013 at 15:09:31 +0200, Bernhard Ströbl wrote: I am