I’ve been debating how to write this up. I wanted to compare it to ArcGIS Mode Builder but comparing model writing on Arc/QGIS would push this post way longer than what anyone wants to read.
If you’ve been watching the GIS world for a while you’ve heard of sextante. I became familiar with it in QGIS 1.8 when it was a plugin. In QGIS 2.0 it became a core component. Sextante ties together different geospatial tools into one toolbox. So you can open Sextante in QGIS and find a tool and execute it much like you would in ArcGIS’s Model Builder: buffers, clips, unions, etc. For those of you who have installed QGIS 2.0 (or 1.8) you have more than just that program installed – you have GRASS, SAGA, and ORFEO. With those tools and with QGIS you’ve got probably well over 400 tools accessible though sextante.
You can also create a model/process. Sextante’s framework allows you to combine tools from the different programs. You can use the tools in QGIS to create an aspect tif from a Digital Elevation Model and then feed the resulting image into GRASS to convert it from Raster to Vector. Imagine taking a spreadsheet in Google Docs and Feeding that into Microsoft Word and using WordPerfect for printing (I know that made absolutely no sense but you should get the point).
So lets start out with a hypothetical problem. You want to buffer some points and then use the buffer to clip a another layer.
1. In QGIS, Click on the Processing menu and select the graphical modeler.
2. You will want to name your model and provide it a group name. The group name provides a placeholder in Sextante for your model. If you plan on building several models you might want to use your project as the group name. Click save and provide it a file name. Once you save it the group name will appear under the models menu.
3. Since you are wanting to buffer a point layer, add a vector file by double clicking on it and specifying a name (inputs tab). You can also specify whether it’s a point, line, or polygon and whether it’s required for the model to run. Click OK.
4. Decide what algorithm you need to use. Since we proposed to buffer a point layer, search for buffer by clicking on the algorithm tab and type Buffer. In this case I’m going with the buffer command provided by QGIS. Click on the buffer command and set your parameters and save – notice you have the option of picking an input. In this case your input is the name you gave your vector file in 3.
5. We want to clip a data layer – so I need to do two things. Add a vector layer to clip and add clip algorithm. When you add clip it will take the output from the buffer command. I added another input from the vector inputs to provide a clip layer.
6. When you have everything that you think you need put into the model. Save it. Click Run.
So with any luck you’ve created a model (I know this was rushed). I’ve always said that with any project that involved a lot of processes the power of a model or script is that you’ve saved the process. It’s not the idea of writing the perfect program – it’s writing the repeatable process.
The nice thing with Sextante in QGIS is you have a pile of tools at your disposal. The problem is going to be finding what you want – there are about 5 different buffer commands. If you are used to ArcGIS’s Model Builder this one will feel a bit different and at times can feel less polished – but it does work and work well.
So for those of you who have downloaded QGIS – build a model and run it. Amaze your friends – scare your significant others.