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

Jürgen E. Fischer jef at norbit.de
Mon Apr 15 23:27:11 PDT 2013

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 active iterators because of two
> reasons: 1. if the user asks for a second iterator and the provider does not
> support multiple iterators, the first one has to be closed - they would not
> behave correctly if used together

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.

As we lost the ability to do featureAtId while iterating a layer, we now have a
couple of places, where stuff behaves strange and it's not really obvious that
it's causes by a setFilterFid request killing a surrounding iteration.

Rejecting it wouldn't cure that, but at least make is show (ok, that's what the
error message does also do that now).  And unless we get the parallel
setFilterFid request back, we'll need to identify and rewrite the looping code.


Jürgen E. Fischer         norBIT GmbH               Tel. +49-4931-918175-31
Dipl.-Inf. (FH)           Rheinstraße 13            Fax. +49-4931-918175-50
Software Engineer         D-26506 Norden               http://www.norbit.de
committ(ed|ing) to Quantum GIS                         IRC: jef on FreeNode                         

norBIT Gesellschaft fuer Unternehmensberatung und Informationssysteme mbH
Rheinstrasse 13, 26506 Norden
GF: Jelto Buurman, HR: Amtsgericht Emden, HRB 5502

More information about the Qgis-developer mailing list