Re: [QGIS-Developer] Concatenating QgsFeatureRequest

2017-12-20 Thread matteo
Hi Etienne, yep Nyall's blog is really outstanding useful, thanks! Cheers Matteo ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mail

Re: [QGIS-Developer] Concatenating QgsFeatureRequest

2017-12-20 Thread matteo
Hi Matthias, thanks for the help! Matteo ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Concatenating QgsFeatureRequest

2017-12-19 Thread Etienne Trimaille
Hi, You should have a look to the blog post from Nyall: http://nyalldawson.net/2016/10/speeding-up-your-pyqgis-scripts/ So you can still use your `setFilterExpression` 1 2 3 request = QgsFeatureRequest().setFilterFids(vector_layer.selectedFeaturesIds()) for feature in vector_layer.getFeatures(req

Re: [QGIS-Developer] Concatenating QgsFeatureRequest

2017-12-19 Thread Matthias Kuhn
Hi Matteo, No, it's not possible to combine the two in the query itself. But sending the request with the filter expression and then checking if each feature's id is in selectedFeatureIds() should be straightforward. selcted_ids = layer.selectedFeatureIds() for feature in layer.getFeatures(reque

[QGIS-Developer] Concatenating QgsFeatureRequest

2017-12-19 Thread matteo
Hi devs, maybe the question can sound trivial but I didn't find a solution. Simply I would like to iterate only on selected features of a vector layer features with an expression. I know that the QgsFeatureRequest can be used with `setFilterExpression` and `setFilterFids`. Is it possible to com