As mentioned in my other posts on visualization, cartography, QGIS is easy-to-install,integrates with OpenGeo Suite, and has reliable support offerings, making it a viable alternative to proprietary desktop GIS software such as Esri ArcGIS for Desktop. I showed that it works very well for visualizing most formats of spatial data and creating beautiful maps, but how well does it perform GIS analysis?

Many of the analytical capabilities in QGIS will pleasantly surprise the seasoned GIS analyst. The tools are easy to find and are intuitive to use. For example, inputs self-populate with any data already loaded into the project and many of the processes run faster than on heavier-weight proprietary GIS software. Still, comparing some of the differences and similarities between QGIS and other GIS software with respect to commonly performed analytical tasks is helpful. To that end, I’ll discuss hillshading, attribute calculation, generalizing, and running multiple tasks via models.

Hillshading

In proprietary GIS software such as Esri ArcGIS, hillshades are created from elevation data either temporarily or permanently. Temporary hillshades help preserve disk space while permanent hillshades can be reused in other GIS projects just as with any saved dataset. A sometimes overlooked benefit of the temporary hillshade method is that, because it is dynamically tied to the original elevation data, the z factor is recalculated as the map is zoomed in or out, allowing for a more realistic visual effect. QGIS has much the same options for creating hillshades as other tools except that all hillshades are saved in permanent files, so the dynamic z factor is not possible. The creation of hillshades can be a very basic process of accepting defaults or a very complex process with many factors for the user to tweak.

Click for larger image

Software designed specifically for rich 3D visualization can ingest outputs from QGIS or other GIS software to create even more realistic hillshades. Blender is one such open source project that is not to be missed if you want to step up your hillshading a notch higher than what can be accomplished in GIS programs. (See also, Daniel Huffman’s Blender Tutorial.) However, the basic hillshading capabilites found in QGIS are directly comparable to that found in proprietary GIS.

Attribute Calculation

Working with tables in GIS is normally a bit difficult, no matter what GIS software you use. In proprietary products and in QGIS, the typical workflow is to load a dataset into the project, right-click the dataset name in the table of contents, select open table, and view the table of data in the separate window that pops up. Editing those attributes, adding columns, changing column names, and so on, has typically been quite difficult. QGIS, however, has made some improvements on this. Not only can column (field) names be changed, but there is now—as of QGIS 2.4—an easier way to calculate new field values than the field calculator. An Excel-like field bar with an expression box was created by Nathan Woodrow and is thoroughly explained in his post on the subject. Attribute calculation and manipulation is therefore directly comparable to that found in proprietary GIS, and with the new expression box, perhaps even easier.

Generalizing

Generalization of line and polygon geometry is considered an edit task in other software and is therefore included in the pricier editing versions of the software. There are two types of generalizing to consider: smoothing and simplifying. Smoothing decreases small curves (e.g., a river that generally follows a single arc but has many sinuous curves along the way could be smoothed such that the smaller curves are eliminated for small scale visualization). Simplifying decreases the number of vertices along a line or polygon such that the lines become more jagged but are faster to load and render. Smoothing in QGIS must be performed by installing the Generalizer plugin or by using the v.generalize plugin in the Processing menu. The Generalizer plugin works on line features while the v.generalize plugin also works on polygons.

For simplifying, QGIS’s Simplify Geometries tool is found under the Vector menu in the Geometry Tools section and is easy to use. Tests showed that it will simplify 4 million vertices by 97% in approximately 13 seconds (shown below). Generalizing in QGIS is therefore very similar to generalizing in proprietary GIS.

Click for larger image

Models

Analysts often string together a series of analyses together and want to test the resultant model out with different input datasets or different input parameters. This is fairly easy to do in both proprietary GIS software and with QGIS. In QGIS this capability is located in the graphical modeler, and while it does have some differences, it serves the same purpose and is flexible enough for even the most complicated models. Below is an example of a model from our Introduction to QGIS training course.

Click for larger image

Hidden Gem: Frequency Statistics

Frequency statistics can now be calculated from polygon-raster overlays in QGIS. This capability was developed as part of our new QGIS for Analysts workshop, first presented at FOSS4G 2014. The script, called FrequencyStats.py, is located on the QGIS GitHub Scripts page. The Frequency Statistics process takes a vector layer and a raster layer as inputs and outputs a new copy of the vector layer with some additional attributes that provide information on the most-common and least-common raster values within the vector layer polygons, noted as MAJ for “majority” and MIN for “minority” respectively. It also creates a table output which gives a detailed breakdown of all the different raster values for each feature.

Conclusion

For the common analytical workflows discussed above, we’ve shown that QGIS works quite well. For a free software product it may even be surprising that it includes many analytical procedures that are usually thought of as advanced and priced accordingly. My conclusion from conducting these tests is that the analytical capabilities in QGIS are such that, as with visualization, cartography and editing, it can absolutely be considered a viable alternative to your current GIS software.

Reprinted with permission from the Boundless Blog.