<div dir="ltr">Probably I'm not using it correctly.<div>I want to retrieve the features within a bbox and obtain one field only. Im' doing the following:</div><div><br></div><div>request = QgsFeatureRequest(bbox).setSubestOfAttributes(['id'],mylayer.pendingFields())</div>
<div>for feat in mylayer.geFeatures(request):</div><div>   for fields in feat.fields():</div><div>       print <a href="http://field.name">field.name</a>()</div><div><br></div><div>and I get all the field names printed while I thought I would get only 'id'.</div>
<div>What am I doing wrong?</div><div><br></div><div>giovanni</div><div><br></div><div>-- <br>Giovanni Allegri<br><a href="http://about.me/giovanniallegri" target="_blank">http://about.me/giovanniallegri</a><br>blog: <a href="http://blog.spaziogis.it" target="_blank">http://blog.spaziogis.it</a><br>
GEO+ geomatica in Italia <a href="http://bit.ly/GEOplus" target="_blank">http://bit.ly/GEOplus</a>
</div></div>