[Qgis-user] Select QGSFeature with given ID

Luigi Pirelli luipir at gmail.com
Thu Oct 19 09:14:24 PDT 2017


explore documentation about QgsFreatureRequest

QgsVectorLayer.getFeatures(QgsFreatureRequest(...))

regards
Luigi Pirelli

**************************************************************************************************
* Boundless QGIS Support/Development: lpirelli AT boundlessgeo DOT com
* LinkedIn: https://www.linkedin.com/in/luigipirelli
* Stackexchange: http://gis.stackexchange.com/users/19667/luigi-pirelli
* GitHub: https://github.com/luipir
* Mastering QGIS 2nd Edition:
* https://www.packtpub.com/big-data-and-business-intelligence/mastering-qgis-second-edition
**************************************************************************************************


On 19 October 2017 at 15:45, Pat Hin <phi73 at gmx.de> wrote:
> Hello,
>
> i have a vector layer with more than 25k QGSFeature elements in it.
> By now i run over it by a loop and stop at the Feature with the given ID.
> But i know this amateurish and worser very slow if i need to run for it
> several times.
> So how could i do this more elegant and faster?
>
> Many thanks
> Pat
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user



More information about the Qgis-user mailing list