[Qgis-developer] Few improvements in PyQGIS

Martin Dobias wonder.sk at gmail.com
Fri Feb 5 09:07:39 EST 2010


On Fri, Feb 5, 2010 at 7:47 AM,  <luca_manganelli at comune.trento.it> wrote:
>> Btw. fetching a list of values in an column gets this simple:
>> >>> lst = [ feat[1] for feat in layer ]
>> (just don't forget a select() call before iterating)
>
> lst = [ feat["FIELDNAME"] for feat in layer ]
>
> it would be a really nice feature!

Yes, the problem is that currently QgsFeature doesn't know how names
of the fields. It would need some more changes within QGIS core
library.

Martin


More information about the Qgis-developer mailing list