<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>
<div>Thank you</div>

<div> </div>

<div>i have done it but struggeld. but wil have a second try</div>

<div> </div>

<div>thanks</div>

<div> 
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Gesendet:</b> Donnerstag, 19. Oktober 2017 um 18:14 Uhr<br/>
<b>Von:</b> "Luigi Pirelli" <luipir@gmail.com><br/>
<b>An:</b> "Pat Hin" <phi73@gmx.de><br/>
<b>Cc:</b> "qgis-userlists.osgeo.org" <qgis-user@lists.osgeo.org><br/>
<b>Betreff:</b> Re: [Qgis-user] Select QGSFeature with given ID</div>

<div name="quoted-content">explore documentation about QgsFreatureRequest<br/>
<br/>
QgsVectorLayer.getFeatures(QgsFreatureRequest(...))<br/>
<br/>
regards<br/>
Luigi Pirelli<br/>
<br/>
**************************************************************************************************<br/>
* Boundless QGIS Support/Development: lpirelli AT boundlessgeo DOT com<br/>
* LinkedIn: <a href="https://www.linkedin.com/in/luigipirelli" target="_blank">https://www.linkedin.com/in/luigipirelli</a><br/>
* Stackexchange: <a href="http://gis.stackexchange.com/users/19667/luigi-pirelli" target="_blank">http://gis.stackexchange.com/users/19667/luigi-pirelli</a><br/>
* GitHub: <a href="https://github.com/luipir" target="_blank">https://github.com/luipir</a><br/>
* Mastering QGIS 2nd Edition:<br/>
* <a href="https://www.packtpub.com/big-data-and-business-intelligence/mastering-qgis-second-edition" target="_blank">https://www.packtpub.com/big-data-and-business-intelligence/mastering-qgis-second-edition</a><br/>
**************************************************************************************************<br/>
<br/>
<br/>
On 19 October 2017 at 15:45, Pat Hin <phi73@gmx.de> wrote:<br/>
> Hello,<br/>
><br/>
> i have a vector layer with more than 25k QGSFeature elements in it.<br/>
> By now i run over it by a loop and stop at the Feature with the given ID.<br/>
> But i know this amateurish and worser very slow if i need to run for it<br/>
> several times.<br/>
> So how could i do this more elegant and faster?<br/>
><br/>
> Many thanks<br/>
> Pat<br/>
><br/>
> _______________________________________________<br/>
> Qgis-user mailing list<br/>
> Qgis-user@lists.osgeo.org<br/>
> List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br/>
> Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a></div>
</div>
</div>
</div></div></body></html>