Yes, I will do that
Sylvain
-Message d'origine-
De : Martin Dobias [mailto:wonder...@gmail.com]
Envoyé : mardi 18 février 2014 16:05
À : PIERRE Sylvain
Cc : qgis-developer@lists.osgeo.org
Objet : Re: [Qgis-developer] iterating over fields an values API 2.0
On Tue, Feb 18, 2014
On Tue, Feb 18, 2014 at 9:53 PM, PIERRE Sylvain wrote:
>
>
> Yes!
> That's it
>
> Thanks
>
> PS: Don't you think it should be clearly documented in the pyqgis cookbook?
Agreed. Would you mind preparing a pull request to fix that?
Thanks
Martin
___
Qgis
jet : Re: [Qgis-developer] iterating over fields an values API 2.0
On Mon, Feb 17, 2014 at 10:36 PM, PIERRE Sylvain wrote:
>
>
> When iterating over vector features like this:
>
> fields = layer.pendingFields()
> field_names = [field.name() for field in fields]
> for elem in
On Mon, Feb 17, 2014 at 10:36 PM, PIERRE Sylvain wrote:
>
>
> When iterating over vector features like this:
>
> fields = layer.pendingFields()
> field_names = [field.name() for field in fields]
> for elem in layer.getFeatures():
> atr = dict(zip(field_names, elem.attributes()))
>
>
Hi,
I'm working on porting a standalone app from 1.8 to 2.0 API
When iterating over vector features like this:
fields = layer.pendingFields()
field_names = [field.name() for field in fields]
for elem in layer.getFeatures():
atr = dict(zip(field_names, elem.attributes()))
returns t