7

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?

enter image description here

enter image description here

11

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:

![enter image description here

So the Enum-Input has the same order (you can also allow multiple input):

enter image description here

So your model looks like this:

enter image description here

And the tool:

enter image description here

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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