An Introduction to QGIS

Opening QGIS and understanding the interface

General Introduction

QGIS is a free and open-source desktop geographic information system (GIS) application that supports viewing, editing and analysis of geospatial data.

Development started on QGIS in 2002 and version 1.0 was released in 2009. Although it had limited functionality in the early days, it has come a very long way and is now a major GIS software contender, with large organisations now relying on this free software.

It now has more functionality than most users could ever use and in these next few sections, we'll be getting the hang of the basics. Hopefully you can then go on and learn more about the software from the many online tutorial websites and forums.

The Interface

There are different ways to break up and describe the main interface of QGIS. The following image shows one way to split up the different elements.

  1. Menu Bar - provides access to QGIS functions using standard hierarchical menus

  2. Toolbars - provide access to most of the functions in the menus, plus additional tools for interacting with the map. Each toolbar item has pop-up help available. Hover your mouse over the item and a short description of the tool’s purpose will be displayed.

  3. Browser panel - one of the main ways to quickly and easily add your data to projects. It helps you navigate in your file system and manage geodata, regardless the type of layer (raster, vector, table), or the data-source format (plain or compressed files, databases, web services).

  4. Layers panel - lists all the layers in the project and helps you manage their visibility. 'Layers' in this context are datasets - one vector file or one raster are one 'layer'. You can show or hide the panel by pressing Ctrl+1. A layer can be selected and dragged up or down in the legend to change the order in which it is drawn in the map.

  5. Map view - the map view (also called Map canvas) is the “business end” of QGIS — maps are displayed in this area, in 2D. The map displayed in this window will reflect the rendering (symbology, labelling, visibilities
) you applied to the layers you have loaded.

  6. Status bar - provides you with general information about the map view and processed or available actions, and offers you tools to manage the map view.

Your window decorations (title bar, etc.) may appear different depending on your operating system and window manager.

QGIS Projects

Your QGIS 'session' is called a project. QGIS works on one project at a time. Settings can be project-specific or an application-wide default for new projects.

You can load existing projects into QGIS from the Browser panel or through the top-left Project tab 'Project, Open'. This is where you save your project as well - 'Project, Save'. It is a good idea to save your project at regular intervals when working on it.

Once you have multiple recent projects, a list of your recent projects are displayed on the opening screen whenever you open QGIS.

Information saved in a project file includes:

  • Layers added

  • Layer properties, including symbolisation and styles

  • Projection for the map view

  • Print layouts

  • and much more...

The extension for QGIS projects is .qgs but when saving from QGIS, the default is to save using a compressed format with the .qgz extension. The .qgs file is embedded in the .qgz file (a zip archive), together with its associated sqlite database (.qgd) for auxiliary data. You can get to these files by unzipping the .qgz file.

The data/layers that you are viewing in your QGIS project are not part of the project, ie if you send someone just the .qgz file, they will not be able to see any of the data in your project. They will be able to see what data should be there, and how it is styled, but they won't see the data. (There are ways to bundle the data up with the project and send it to someone, but that isn't the standard or automatic way that QGIS projects work.)

LIVE DEMO/SCREENSHARE OF QGIS INTERFACE AND OPENING/SAVING/CLOSING PROJECTS

Plugins

QGIS has been designed with a plugin architecture. This allows many new features and functions to be easily added to the application. Some of the features in QGIS are actually implemented as plugins.

QGIS plugins are implemented either as Core Plugins or External Plugins.

  • Core Plugins are maintained by the QGIS Development Team and are automatically part of every QGIS distribution. They are written in one of two languages: C++ or Python.

  • Most External Plugins are currently written in Python. They are stored either in the ‘Official’ QGIS Repository at https://plugins.qgis.org/plugins/ or in external repositories and are maintained by the individual authors. Detailed documentation about the usage, minimum QGIS version, home page, authors, and other important information are provided for the plugins in the Official repository.

  • From the Plugin panel, you can install and uninstall Plugins, check what you already have installed and update your Plugins if new versions have been installed

  • You might not use Plugins much to start with, but often if you search online for 'how to do x and y in QGIS', someone will let you know that a Plugin has been created to do exactly what you want to do! They can be very useful.

pyqgis: Python API

A really powerful feature of QGIS, is that it has a Python API, allowing users to perform most functions using Python code.

A full reference for the API is found here.

There are two ways you can use the Python API:

  1. Through the Python Console in the QGIS User Interface

  2. In a standalone script

Python Console

This is accessible, either via the icon on the toolbar, or via the Main Menu > Plugins > Python Console.

Standalone scripts

If you have a Python script saved in a file, you can either run these as standalone scripts, or load them directly in to a QGIS project to run them from there.

Further information on using Python with QGIS

If you wish to deep dive further in to using Python with QGIS, we recommend referring to the PyQGIS Cookbook: https://docs.qgis.org/3.28/en/docs/pyqgis_developer_cookbook/index.html

Sources:

https://docs.qgis.org/3.16/en/docs/user_manual/introduction/project_files.html

https://docs.qgis.org/3.16/en/docs/user_manual/introduction/qgis_gui.html

Last updated