Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

There's a plugin called "create mask" for qGIS and trying out some simple scripting from the Python console.

I would like to call it after I select the vector features I want, then do more related tasks afterwards. So, how does one run "create mask" from the console?

share|improve this question

I have no solution for doing this in python (you can easily call plugins with Sextante support, but i don't know how to call qgis plugins in general), but i highly advise you to take a look at the Sextante toolbox and its modeler. The SAGA extension for Sextante has a similar Mask creation function (Create Grid Mask). Using the Sextante modeler you can build processing chains without any script use.

share|improve this answer
@ Thanks for suggesting this. I'm trying it out but couldn't find this "create grid mask" from the SAGA extension of Sextante. Am I supposed to install anything else? – n1kn0k Mar 7 '13 at 22:59
If you installed Sextante and SAGA and have correctly linked the SAGA-Install dir in the Sextante options, then the function should appear as "Grid Masking". Is this what you want? I am not so sure anymore and the word mask has been used in many different contexts. – Curlew Mar 7 '13 at 23:02
I can see that now "Grid Masking" but I'm encountering problems with SAGA and Ubuntu 12.04. An error pops out: "It seems that SAGA is not correctly installed in your system. Please install it before running SAGA algorithms." When I ran saga_cmd, I found: error: Library does not contain executable modules [] – n1kn0k Mar 8 '13 at 11:56
did you compile it yourself or use a pre-compiled binary? On linux Sextante should be able to automatically determine your saga install folder, therefore there is a problem with your saga install. Download the latest src and compile it / install systemwide – Curlew Mar 8 '13 at 12:09
i used a package i found from the ubuntu Precise repos, version 2.07b – n1kn0k Mar 8 '13 at 12:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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