Book Image

Mastering Geospatial Development with QGIS 3.x - Third Edition

By : Shammunul Islam, Simon Miles, Kurt Menke, GISP, Richard Smith Jr., GISP, Luigi Pirelli, John Van Hoesen, GISP
Book Image

Mastering Geospatial Development with QGIS 3.x - Third Edition

By: Shammunul Islam, Simon Miles, Kurt Menke, GISP, Richard Smith Jr., GISP, Luigi Pirelli, John Van Hoesen, GISP

Overview of this book

QGIS is an open source solution to GIS and widely used by GIS professionals all over the world. It is the leading alternative to 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 and getting you acquainted with the latest QGIS 3.6 updates, this book will take you all the way through to teaching you how to create a spatial database and a GeoPackage. Next, you will learn how to style raster and vector data by choosing and managing different colors. The book will then focus on processing raster and vector data. You will be then taught advanced applications, such as creating and editing vector data. Along with that, you will also learn about the newly updated Processing Toolbox, which will help you develop the advanced data visualizations. The book will then explain to you the graphic modeler, how to create QGIS plugins with PyQGIS, and how to integrate Python analysis scripts with QGIS. By the end of the book, you will understand how to work with all aspects of QGIS and will be ready to use it for any type of GIS work.
Table of Contents (18 chapters)
Title Page
Copyright and Credits
About Packt
Contributors
Preface
Index

QGIS downloading and installation


QGIS can be installed on Windows, macOS, 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, macOS, and Ubuntu Linux. For the most up-to-date installation instructions, refer to the QGIS website.

Installing QGIS on Windows

On the QGIS website, download the correct version of QGIS for your Windows machine. Downloadable executable files come in 32-bit and 64-bit flavors. We recommend downloading the latest release as advertised on the QGIS website download page. 

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. This is also the ideal installation method for organizations or businesses wishing to deploy QGIS to multiple users.
  • 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.

If you are unsure on how to install QGIS, the QGIS website contains details on how to do this.

Installing QGIS on macOS

The QGIS website provides download mac installer packages for macOS, that contain readme files for the installation of QGIS. Documentation and support for QGIS on macOS has greatly improved, and while it is beyond the scope of this chapter to detail the install process and document any possible issues that might incur during installation, the GIS Stack Exchange (https://gis.stackexchange.com/) is a great refresh resource.

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 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

QGIS on Android

At the time of writing, there is really only one Android QGIS application available on Google Play, called QField, developed by OPENGIS.ch from Switzerland. Users of QGIS can save their projects to their Android device and then reopen them in QField. The application comes with Geolocation capabilities, data editing, and photos captured, to name just a few of its features.

Note

Further information on QField can be found at http://www.qfield.org/docs/index.html.

While QField may currently (at the time of writing) be one of the main Android QGIS applications available, the underlying architecture of QGIS, namely QT5 and Python3, mean that development and deployment of user-created Android applications is not far away, thanks to crowdfunding opportunities organized by such companies as Lutra Consultancy and North Road.

Installing QGIS on a Chromebook

It is possible to install the Ubuntu Linux operating system on a Chromebook via Crouton (https://chromebook.guide/crouton/). This essentially creates a dual boot environment allowing you to switch between the Chrome OS and Ubuntu very quickly with some keyboard strokes. Once Crouton is set up, QGIS can be installed via the preceding Ubuntu QGIS install processes. 

Note

While Chromebooks are relatively cheap, they are weak, if not lacking, in hardware such as graphic cards. Therefore, while it is possible to install QGIS on a Chromebook, we would suggest that doing so is for hobbyists looking to explore/test the capabilities of this union and that it would not be suitable for production environments.

QGIS in a browser

Using the RollApp website (https://www.rollapp.com), you can access QGIS, plus a range of other open source software in your web browser. This means that for Chromebook and iPad (for example), users can access QGIS without physically installing any software or making system configuration changes. RollApp is designed around using cloud base storage, such as Google Drive, Dropbox, and Box. This makes sharing data and projects very easy.