3

I am new to QGIS modeler and trying to write a script in which certain attributes are selected and written to a shapefile. See the attached image for the script and the select by attributes box.

In the final shapefile there are still values <1 available.

What am I doing wrong.

Modeler image

  • 1
    Hard to say. Could you give the settings in the other tools/steps? – Miron Mar 2 '16 at 11:11
  • As @Miron suggested, the tool before Select by attributes which you have called Calculate Snelheid is likely to be the culprit. Could you add a screenshot for the options used? – Joseph Mar 2 '16 at 14:42
  • Solved it by writing the output to a PostGIS DB instead of a shapefile. Thanks for your help. – Bob Mijwaard Mar 3 '16 at 11:24
  • Hm, still strange that the results were wrong using Sextante and the "select by attribute"... – Miron Mar 3 '16 at 16:23
4

I have been facing the same issue some time ago. For me, its not the 'Select by attribute' algorithm, but the 'Extract by attribute', that delivers the desired result. I think the reason is, that 'Select by attribute' only creates a selection in QGIS, but does not return any data. 'Extract by attribute' creates a new dataset, which can be used for further processing in the modeler.

Here comes a screeshot illustrating the difference:

enter image description here

  • Hmm, you are correct in that the Select by attribute algorithm does not have an output but you can still select it as an input for further processing. But good catch on suggesting the Extract by attribute tool, +1! – Joseph Mar 31 '16 at 12:16

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.