On Sat, Oct 27, 2012 at 7:37 PM, Tim Sutton <li...@linfiniti.com> wrote: >>> >>> while myProvider.nextFeature(myFeature): # or equivalent in new api >>> myGeometry = myFeature.geometry() >>> myFooValue = myFeature['foo'] >>> .... do stuff ..... >> >> Good news, that's on the branch already ;-) > > Wohooo! Does that work for C++ api too?
For now the support for attribute fetching by field name is like this: value = feature.attribute("foo"); But I guess there's no problem to implement operator[], too: value = feature["foo"]; Martin _______________________________________________ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer