[Qgis-developer] vectordataprovider.rewind() problem?

Martin Dobias wonder.sk at gmail.com
Wed Nov 26 05:50:55 EST 2008

On Wed, Nov 26, 2008 at 12:48 AM, Carson Farmer <carson.farmer at gmail.com> wrote:
> Sorry I didn't include that in my last email:
>       vproviderA = vlayerA.dataProvider()
>       allAttrsA = vproviderA.attributeIndexes()
>       vproviderA.select( allAttrsA )
> and the same goes for vproviderB as well...


>> In first bit you use featureAtId() which is independent from the
>> select/nextFeature/(rewind) combination.
> Right, so I shouldn't really have to call rewind() in the first place should
> I?

Yup, it's not necessary to call rewind().

So, you say that for vproviderB, if you do:

vproviderB.select( ... )
while vproviderB.nextFeature(f):
  # do something

it exits the while block immediately without reading any features?


More information about the Qgis-developer mailing list