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. 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 ge

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

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. 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 firs

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

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. 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 >> > affec

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

2013-04-15 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

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. 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 users

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

2013-04-12 Thread Jürgen E . Fischer
Hi Martin, On Fri, 12. Apr 2013 at 09:51:15 +0200, Martin Dobias wrote: > On Fri, Apr 12, 2013 at 9:25 AM, Jürgen E. 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

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. 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, the feat

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. Shou

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. 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 on

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 t

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

2013-04-09 Thread Jürgen E . Fischer
Hi Bernhard, On Tue, 09. Apr 2013 at 15:09:31 +0200, Bernhard Ströbl wrote: > 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

[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 s