I'm using QGIS 2.14.3 – Essen (but have also tried 2.18.12 Las Palmas)
Using 2.14.3, if I select one feature in a vector layer, and then use [Vector][Research][Select by Location], I have the option to check the 'Only selected features' option (this feature is not available in 2.18.12). The analysis behaves as one would expect if only the selected feature is used.
In newer releases, the dialogue box doesn't have an option to only analyse selected features and the outcome is different to case 1 above (in that all features in the layer are processed, irrespective of how many may be selected)
I can see that in [Processing][Options][General], there is an option to 'only use selected features' but it appears to me that this is not used – irrespective of whether this box is checked or unchecked, the select by location algorithm uses all features, not selected features.
Best Answer
Not sure if still actual but recently I have found a solution with no settings correction. I needed to iterate some selected features and get all intersections from other layers. Then make a pack of folders with same layers containing different features.
When you want to specify
only selected
option the processing script is written in a bit another way. Firstly you have to get an id string of your layer. Then put that string into a processing script but wrapped inQgsProcessingFeatureSourceDefinition
withTrue
parameter and then you are ready to perform a selection using only selected input features.