2

I have two shapefiles (polygones) - referentiebestand and oudejaren

-> the first step is to calculate the centroids of each shapefile (gives a good result), then a create a buffer around one of this shapefiles, referentiebestand (gives a good result).

But then i receive a problem: The goal is find the points that lies outside the buffer, I tried it with the tool 'Select by location' (see figure 1). But it gives nothing... select by location

The complete model (figure 2)Complete model

If i use the tool 'select by location' outside the model, in the intergraph And choose 'new selection' it select the points, so that works well.

enter image description here

But when i choose 'remove selection' instead of new selection the result is empty, nothing changed...

When i try 'new selection' 'add to current selection' or 'remove selection' , nothing changed...

3
  • Does it work if you do those processes individually (ie. via the QGIS interface)? If it does then we can narrow down the issue being connected to the modeler.
    – Joseph
    Commented Feb 19, 2015 at 13:17
  • I just noticed that when you use the Select by location function, you are selecting to remove the selected features. You then use the Save selected features which would have been removed previously. Perhaps this is the issue?
    – Joseph
    Commented Feb 19, 2015 at 13:19
  • Via the interface -> the option new selection is worked, but not the option remove selection. In the model nothing works of the options.., also when a deactive the tool 'save selected features'
    – niels
    Commented Feb 19, 2015 at 13:38

1 Answer 1

1

Since you want to save to points outside the buffers, I would recommend to use the Difference operator instead of select and then save.

Of course it's still interesting to check if select by location works correctly in models but it's not necessary for this use case I think.


Update:

Try setting the input of Save selected features to be the output of the buffering operation.

enter image description here

If I interpret the behavior correctly, the output of select by location makes no sense since it does not actually contain the selected features.

I've tried to fix the script: https://github.com/qgis/QGIS/pull/1921

2
  • Thanks, With the tool Difference its works and i receive my expected result. But for the tool 'select by location'. How is it possible to setting the input of Save selected features to be the output of the buffering operation? Because it looks me impossible to connect the input of a tool with the output of another tool...
    – niels
    Commented Feb 23, 2015 at 8:24
  • I know it sounds weird. Maybe try the fixed version of the select by location tool. (Just replace your local copy with raw.githubusercontent.com/qgis/QGIS/…)
    – underdark
    Commented Feb 24, 2015 at 19:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.