Book Image

Mastering QGIS - Second Edition

By : Kurt Menke, GISP, Paolo Corti, Richard Smith Jr., GISP, Luigi Pirelli, John Van Hoesen, GISP
Book Image

Mastering QGIS - Second Edition

By: Kurt Menke, GISP, Paolo Corti, Richard Smith Jr., GISP, Luigi Pirelli, John Van Hoesen, GISP

Overview of this book

QGIS is an open source solution to GIS. It is widely used by GIS professionals all over the world. It is the leading alternative to the proprietary GIS software. Although QGIS is described as intuitive, it is also by default complex. Knowing which tools to use and how to apply them is essential to producing valuable deliverables on time. Starting with a refresher on the QGIS basics, this book will take you all the way through to creating your first custom QGIS plugin. From the refresher, we will recap how to create, populate, and manage a spatial database. You’ll also walk through styling GIS data, from creating custom symbols and color ramps to using blending modes. In the next section, you will discover how to prepare vector, heat maps, and create live layer effects, labeling, and raster data for processing. You’ll also discover advanced data creation and editing techniques. The last third of the book covers the more technical aspects of QGIS such as using LAStools and GRASS GIS’s integration with the Processing Toolbox, how to automate workflows with batch processing, and how to create graphical models. Finally, you will see how to create and run Python data processing scripts and write your own QGIS plugin with pyqgis. By the end of the book, you will understand how to work with all the aspects of QGIS, and will be ready to use it for any type of GIS work.
Table of Contents (19 chapters)
Mastering QGIS - Second Edition
Credits
Foreword
About the Authors
About the Reviewer
www.PacktPub.com
Preface
Index

QGIS download and installation


QGIS can be installed on Windows, Mac OS X, Unix, Linux, and Android operating systems, making it a very flexible software package. Both the binary installers and source code can be downloaded from download.qgis.org. In this section, we will briefly cover how to install QGIS on Windows, Mac OS X, and Ubuntu Linux. For the most up-to-date installation instructions, refer to the QGIS website.

Installing QGIS on Windows

For Windows, there are two installation options, which are as follows:

  • QGIS Standalone Installer: The standalone installer installs the binary version of QGIS and the Geographic Resource Analysis Support System (GRASS) using a standard Windows installation tool. You should choose this option if you want an easy installation experience of QGIS.

  • OSGeo4W Network Installer: This provides you with the opportunity to download either the binary or source code version of QGIS, as well as experimental releases of QGIS. Additionally, the OSGeo4W installer allows you to install other open source tools and their dependencies.

Installing QGIS on Mac OS X

Follow these steps to install QGIS on a Mac:

  1. As an initial step, it is often necessary to change your Mac security preferences to Allow apps downloaded from: Anywhere.

  2. The Mac QGIS installation files are available from http://www.kyngchaos.com/software/qgis.

  3. Download and install the GDAL Complete 1.11 framework package.

  4. Download and install NumPy: http://www.kyngchaos.com/software/python.

  5. Download and install the Matplotlib Python module.

  6. Download and install the QGIS Mac OSX Installer.

  7. Navigate to your applications folder and locate the QGIS.app. Double click to launch.

  8. At this point, you can change your Mac security settings back to Allow apps downloaded from: Mac App Store and Identified Developers.

    Tip

    Note: QGIS requires the following versions of the MAC operating system: OS X Mavericks (10.9), Mountain Lion (10.8), or Lion (10.7).

Installing QGIS on Ubuntu Linux

There are two options when installing QGIS on Ubuntu: installing QGIS only, or installing QGIS as well as other Free and Open Source Software for Geographical Information Systems (FOSSGIS) packages. Either of these methods requires the use of the command line, sudo rights, and the apt-get package manager.

Installing QGIS only

Depending on whether you want to install a stable release or an experimental release, you will need to add the appropriate repository to the /etc/apt/sources.list file.

With sudo access, edit /etc/apt/sources.list and add the following line to install the current stable release or the current release's source code respectively:

deb        http://qgis.org/debian trusty main
deb-src    http://qgis.org.debian trusty main

Depending on the release version of Ubuntu you are using, you will need to specify the release name as trusty, saucy, or precise. For the latest list of QGIS releases for Ubuntu versions, visit download.qgis.org.

With the appropriate repository added, you can proceed with the QGIS installation by running the following commands:

sudo apt-get update
sudo apt-get install qgis python-qgis

To install the GRASS plugin (recommended), install the optional package by running this command:

sudo apt-get install qgis-plugin-grass

Installing QGIS and other FOSSGIS packages

The ubuntugis project installs QGIS and other FOSSGIS packages, such as GRASS, on Ubuntu. To install the ubuntugis package, remove the http://qgis.org/debian lines from the /etc/apt/sources.list file and run the following commands:

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt-get update
sudo apt-get install qgis python-qgis qgis-plugin-grass

The following information box describes QGIS options for Android devices.

Note

There is an experimental version of QGIS available in the Google Play Store (https://play.google.com/store/apps/details?id=org.qgis.qgis). You can find more information about this at http://hub.qgis.org/projects/android-qgis.

The download page is available at http://qgis.org/downloads/android/.

A related data collection app has recently been announced and it is named QField. It is described as a field data capture and management app that is compatible with QGIS. It is available in the Google Play Store. You can find more information on this app at http://www.opengis.ch/android-gis/qfield/.

Installing QGIS on a Chromebook

It is possible to install Ubuntu Linux on a Chromebook via Crouton. This essentially creates a dual boot environment allowing you to switch between the Chrome OS and Ubuntu very quickly with some keyboard strokes. At that point, QGIS can also be installed normally on the Ubuntu OS. There are very thorough instructions for installing Ubuntu at the following link: http://www.voltron00x.com/?p=1091. If you would like to try this, it is best to purchase a Chromebook with the Intel Core i3 processor and 4 GB of RAM.