[Qgis-developer] R: Re: attributeMap()

Martin Dobias wonder.sk at gmail.com
Mon Feb 4 00:05:07 PST 2013


On Sun, Feb 3, 2013 at 9:40 PM, francescoboccacci at libero.it
<francescoboccacci at libero.it> wrote:
> Hi Nathan,
>
> i tired with the name of the field:
>
> idVar = inFeat[field]
> KeyError: 'type'
>
> field is the name of field (in this case 'type').

Both access by index and by field name should work - if not, the
attribute is probably not loaded. How do you get the feature - what is
the select() / getFeatures() command?

Martin


More information about the Qgis-developer mailing list