I built a model and use the tool "Extract by location". I would like to define the geometric predicate as a variable, so the user can choose between different predicates when he/she runs the model. How can I do that?
Asked
Active
Viewed 623 times
1 Answers
12
The geometric predicate input expects an index, starting from 0 as input as array or comma separated string. E.g. '1,3' or [1,3] for contains and touches. Since using numbers is not quite intuitive, I suggest to use an Enum-Input: As already mentioned, the important thing is the order of the items within this input. It has to be the same as it would it be, if you directly choose it from the tool:
So the Enum-Input has the same order (you can also allow multiple input):
So your model looks like this:
And the tool:
MrXsquared
- 34,292
- 21
- 67
- 117





