3


I am trying to make a QGIS model which includes an "Extract by Attribute" algorithm. One of the inputs for this function is the liminar value, simply called "Value". For some reason though, it is only possible to explicitly state that value, and not use a number variable that was inserted into the model.

Is this behaviour as expected or a bug? Is there a work around?

5

The Extract by attribute tool from the modeler accepts String inputs, not Number inputs. Here's a simple test which uses the following input parameters:

  • Input - Table Field
  • Layer - Vector layer
  • Value - String (with default value of 80)

Modeler

Now when I run this, the default value will show up automatically:

Running the modeler

I have tested this on various field attributes (integer, real etc.) and it works great! Hope this helps!

  • 1
    Perfect! Although I still disagree with QGIS developers! Doesn't make too much sense. – jhc Nov 18 '15 at 12:22
  • @jhc - Awesome, glad it works buddy! Haha, well the String parameter does allow for text aswell as numbers in attributes so it makes sense to me but it's personal opinion :) – Joseph Nov 19 '15 at 10:02

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.