Welcome to QGIS. There has never been a better time to start using QGIS, you have made a great choice! You may have already started using QGIS 3.4, you may have experience with older versions, or you may be familiar with other GIS software. No matter where you are on your learning journey, the first time you install any software can be a little daunting.
This chapter is all about getting a feel for the software, building your confidence, and developing the urge to explore. By the end of this chapter, you will grasped some of the basic ideas and concepts.You will be in the perfect position to begin working with data, designing and styling it, and working toward creating a map.
In this chapter, we will cover the following topics:
- Installing QGIS
- What has changed since QGIS 2.x?
- Toolbars and GUI
- Getting help
- Setting up
- Community of users
QGIS runs on all operating systems; it is even possible to install it on a Raspberry Pi. The QGIS project provides ready-to-use packages as well as instructions to build from source code at http://download.qgis.org. Here, we will cover how to install QGIS on two systems: Windows and Ubuntu.
Like many other open source projects, QGIS offers you a choice between different releases. For the tutorials in this book, we will use the QGIS 3.4 long term release (LTR) version. We recommend installing this version in order to follow this book with ease. As you build familiarity and confidence, you may wish to work with different versions. The core QGIS functionality generally remains the same. Newer versions will include the latest release (LR), which is normally updated every four months, or the developer version (DEV) for which you can get nightly builds, if needed. While exciting, the DEV version should not be relied on for anything other than testing or inspecting new features.
For an overview of the changes between releases, check out the visual change logs at http://www.qgis.org/en/site/forusers/visualchangelogs.html.
On Windows, we have two different options for installing QGIS. These are the OSGeo4W and the standalone installer.
The OSGeo4W installer is a small, flexible installation tool that makes it possible to download and install QGIS and many more OSGeo tools with all their dependencies. The main advantage of this installer over the standalone installer is that it makes updating QGIS and its dependencies very easy. I recommend that you use OSGeo4W where practical. You can download the 32-bit and/or the 64-bit OSGeo4W installers from http://osgeo4w.osgeo.org . You can download directly from http://download.osgeo.org/osgeo4w/osgeo4w-setup-x86.exe for the 32-bit version. If you have a 64-bit version of Windows, you can also download from http://download.osgeo.org/osgeo4w/osgeo4w-setup-x86_64.exe. Download the version that matches your operating system and keep it. In the future, whenever you want to change or update your system, just run it again.
If you prefer, you can use the standalone installer. This is one file to download (approximately 400 MB in size). It contains a QGIS release, the Geographic Resources Analysis Support System (GRASS) GIS, and the System for Automated Geoscientific Analyses (SAGA) GIS in one package. For a beginning, this is the easiest installation option.
In this section, we will focus on installing QGIS using the OSGeo4W installer. This is a convenient way to install QGIS and a host of other open source GIS tools.
Start by double-clicking on OSGeo4W executable. This will lead you to the following screenshot:
Select the Express Desktop Install radio button. This may not install QGIS 3.4. If you wish to specify a version, please see the next section on Advanced Installers. The Advanced Install radio button is useful if you want to customize your installation, or choose your installation version or perhaps by install the development version of QGIS:
Accept the defaults and click on the Next button. This will set off the download process. Progress will be displayed as each component is downloaded. Having these installed will provide you with more tools to perform Geospatial analysis. After a short period of time, you should see OSGeo4W in your programs menu along with all the other installed software, similar to the following screenshot:
If QGIS is appearing in your programs menu, then it is now installed on your machine.
Select the radio button next to Advanced Install, as shown in the following screenshot:
Step through the installation wizard. When you get to the Select Packages, choose the version you require. In the following screenshot I have selected the 3.4.0-1 release:
You can select other packages if required. Once you have chosen the software, click on the Next button. Step through the wizard by accepting the defaults and the installation will begin.
On Ubuntu, the QGIS project provides packages for the LTR, LR, and DEV versions. For this book, we recommend installing the LTR version of 3.4 if available (release date: February 2019).
To avoid conflicts that may occur due to incompatible packages, make sure that you only add one of the following package source options. The specific lines that you have to add to the source list depend on your Ubuntu version. The following version is latest release for Debian stretch:
deb https://qgis.org/debian stretch main deb-src https://qgis.org/debian stretch main
After choosing the repository, we will add the qgis.org repository's public key to our apt keyring. This will avoid the warnings that you might otherwise get when installing from a non-default repository. Run the following command in the terminal:
wget -O - https://qgis.org/downloads/qgis-2017.gpg.key | gpg --import
gpg --fingerprint CAEB3DC3BDF7FB45
gpg --export --armor CAEB3DC3BDF7FB45 | sudo apt-key add -
Finally, to install QGIS, run the following commands. The first will fetch any updates to packages on your system, and the second will install QGIS, the python library, and the grass plugins:
sudo apt-get update
sudo apt-get install qgis python-qgis qgis-plugin-grass
In recent years, QGIS has become the most popular open source desktop GIS software. Some people are using it just to view and query data, while others are using it for much deeper analyses. Maybe you are an ecologist or a town planner needing to use GIS as part of your job. Maybe you have a background in proprietary GIS software and want to migrate some of your common workflows to open source. Or maybe you are a student that needs to use GIS for a project. Whatever your driving reason is for opening this book, welcome to an amazing community that is passionate about open source and GIS.
The following screenshot shows how QGIS 3.4 will look when it is first opened. In this case, there are no recent projects here and the interface is uncustomized:
On the first run, not all toolbars are enabled. You can enable all the default toolbars (meaning the ones not associated with any additional plugins) via Toolbars in the View menu. Set up the QGIS environment according to your personal preferences via the Toolbars option shown in the following screenshot:
Plugins are a unique feature of QGIS. In Chapter 6, Extending QGIS with Python, we will cover how to build your own. Plugins are available to be installed as you need them to enable further analysis. If what you want to do is not available within your current QGIS setup, search in the plugins as someone may have developed a tool to help you reach your solution. To access the Plugins, navigate to Plugins in the menu and then select Manage and Install Plugins:
By clicking on the preceding option, the following window will be displayed:
The Plugins window will display the number of plugins installed in parentheses. In the preceding example, 272 are shown. You can search for plugins in the search box, install or upgrade individual plugins, or Upgrade All. Plugins are activated by ticking the check boxes beside their names. In QGIS 3.4, an icon will appear in the bottom-right corner of the information bar if there are any updates available for the your installed plugins.
QGIS 3 has been ported to support Python 3, so if you are familiar with previous versions of QGIS, some of the older plugins may not be compatible. These will either have been updated or will be in the process of being updated, some are also obsolete (because their functionality is now part of QGIS core) or abandoned by the original developer. In terms of the GUI, not a great deal has changed. If you have previous experience, it should be mostly familiar to you.
Some of the major changes that have taken place for QGIS 3 include processing in the background. This enables you to continue working while processing continues, rather than waiting for QGIS to complete tasks. The processing toolbox has been updated, meaning that many of the tools now execute faster than in QGIS 2.x. There has also been a significant update in the way maps are authored and data is styled. We will be covering this in detail in Chapter 3, Visualizing Data. There is a really useful search feature in the bottom-left corner of the QGIS information bar, allowing you to search for tools, layers, and features. Finally, QGIS now supports GeoPackage and is using it as its default GIS format.
We will cover all of these new features in this book using examples to bring QGIS to life.
Now that we have set up QGIS, let's get accustomed to the interface. The following screenshot shows a breakdown of QGIS. The main part of the screen is dominated by the map display, which can be adjusted as needed.
The Processing Toolbox can be added by clicking View | Panels | Processing Toolbox:
The biggest area is reserved for the map. To the left of the map, there are the Layers and Browser panels. Under the map, we can see the information bar, which includes (from left to right):
- Search box
- The current map Coordinate
- Map scale
- A checkbox for render
- The project coordinate reference system (CRS)
- Messages (logs)
- Updates available for plugins
In this screenshot, EPSG:4326 is shown. On the right side is the Processing Toolbox, which also has a search function. Finally, at the top of QGIS, you can see the project title (as yet unnamed), menus, and toolbars.
Options in the menu bar are frequently repeated in buttons contained in the toolbars. As you explore these menus, you will notice icons next to some of the options. These shortcut buttons on toolbars often become the easiest way to interact with QGIS. The following is a screenshot of the menu bar:
The Vector and Raster menus are worth exploring, and we will do this in Chapter 5, Spatial Analysis. You will often find that new plugins insert additional options within these menus or even create new menus. As we move through this book, we will often refer to the menu bar by just the name of the menu. For example, Database | DB Manager means click on Database menu and then the DB Manager option within that menu.
There are multiple toolbars to explore; let's take a look at some of the main ones. Toolbars are fully adjustable and dockable. The faint upright dots (in Windows) indicate the start of a toolbar and a faint vertical line indicates the end of a toolbar.
- Project: This toolbar contains the tools needed to create, open, save, and access the print layout (two buttons) and the style manger:
- Map Navigation: This toolbar contains the pan and zoom tools, as well as bookmarks (customized zoom) and map refresh:
- Attributes: These tools are used to identify, select, open attribute tables, and measure:
- Label: These tools are used to add, configure, and modify labels
- Plugins: This currently only contains the Python Console tool, but will be filled in by additional Python plugins
- Database: Currently, this toolbar only contains DB Manager
- Raster: This toolbar includes histogram stretch, and brightness and contrast control
- Vector: This currently only contains the Coordinate Capture tool, but it will be filled in by additional Python plugins
- Web: This is currently empty, but it will also be filled in by additional Python plugins
- Help: This toolbar points to the option for downloading the user manual
All these toolbars are shown in the following screenshot:
On the left screen border, we place the Manage Layers toolbar. This toolbar contains the tools for adding layers from the vector or raster files, databases, web services, and text files. It also contains the tools for creating new layers:
- Digitizing: The tools in this toolbar enable basic feature-creation and editing.
- Shape Digitizing: Useful for quickly building different shapes when editing.
- Advanced Digitizing: This toolbar contains the Undo/Redo option, advanced editing tools, the geometry-simplification tool, and so on. When activated, the right part of the screenshot is accessible:
- The data source manager toolbar contains buttons to quickly create new geopackage files and shapefiles, as well as calling the data source manager and creating temporary scratch layers:
Toolbars can be accessed by right-clicking on a menu or toolbar, which will open a context menu with all the available toolbars and panels. All the tools on the toolbars can also be accessed via the menu. If you deactivate the Manage Layers Toolbar, for example, you will still be able to add layers using the Layer menu.
As you might have guessed by now, QGIS is highly customizable. You can increase your productivity by assigning shortcuts to the tools you use regularly. You can do this by going to Settings | Configure Shortcuts. Similarly, if you realize that you never use a certain toolbar button or menu entry, you can hide it by going to Settings | Interface Customization:
The information bar is useful for finding out about the projection and navigation of the map. The information bar also contains icons about any log messages (potential errors) and any plugins with updates pending. It is shown in the following screenshot, and is located at the bottom of the QGIS window:
The search function is one of the new features in QGIS 3 and this helps to find processing tools or layers. You can use the shortcut keys shown in the following screenshot:
Alternatively, you can search directly for what you are looking for. For example, you can simply search for a buffer in the information bar search and the results will be similar to the following screenshot:
Browser and Layers panels describe where data is stored and how that data is displayed. Now is a great time to download some sample data. Head over to https://qgis.org/downloads/data/ and download training_manual_execise_data.zip. Extract it in a folder of your choice and then navigate to that folder in the Browser window.
I have located the basic_map.tif and forest_stands_2012.shp files and dragged them both into the Layers window. We will look at styling layers in Chapter 3, Visualizing Data, and then cover how to create a map in Chapter 4, Creating Great Maps.Lets take a look at Browser and Layers Panels in the following screenshot:
Now that we have added some data to the Layers window, the data will appear in the map. The following screenshot shows two layers that I have added to the map: one vector (forest_stands_2012) and one raster (basic_map):
The data has appeared! Notice that the projection in the information bar has changed; QGIS 3 supports on-the-fly projections. Finally, we have to save the project.The new default format is .qgz. Select Project | Save, and the window shown in the following screenshot will appear:
If you now click Project | New, you should see your saved project in the Browser window:
To load the project again, double-click on the project name.
The QGIS community offers a variety of different community-based support options. These include the following:
- GIS StackExchange: One of the most popular support channels is http://gis.stackexchange.com/. This is a general-purpose GIS question-and-answer site. If you use the tag qgis, you will see all QGIS-related questions and answers at http://gis.stackexchange.com/questions/tagged/qgis.
- Mailing lists: The most important mailing list for user questions is qgis-user. For a full list of available mailing lists and links to sign up to, visit http://www.qgis.org/en/site/getinvolved/mailinglists.html#qgis-mailinglists. To comfortably search for existing mailing list threads, you can use Nabble (http://osgeo-org.1560.x6.nabble.com/Quantum-GIS-User-f4125267.html).
- Chat: A lot of developer communication runs through IRC. There is a #qgis channel on www.freenode.net. You can visit it using, for example, the web interface at http://webchat.freenode.net/?channels=#qgis.
If you prefer commercial support, you can find a list of companies that provide support and custom development at http://www.qgis.org/en/site/forusers/commercial_support.html#qgis-commercial-support.
If you find a bug, please report it because the QGIS developers can only fix the bugs that they are aware of. For details on how to report bugs, visit http://www.qgis.org/en/site/getinvolved/development/bugreporting.html.
In this chapter, we installed QGIS 3.4 and took a first look at the interface. We highlighted some of the exciting new features in the QGIS 3.4 release and looked at how they will impact us. We also explored the panels, toolbars, and menus that make up the QGIS user interface. At the end of the chapter, we interacted with the browser and the layers panel by dragging our data in and looking at how to save a project. Finally, we covered where to find help and report issues. In the next chapter, we will use QGIS to work with data.