Learning Path: PyQGIS: Conquer the Geospatial World
3.8 (90 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
861 students enrolled

Learning Path: PyQGIS: Conquer the Geospatial World

Work your way through QGIS using the most popular scripting language - Python
3.8 (90 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
861 students enrolled
Created by Packt Publishing
Last updated 6/2017
English [Auto]
Current price: $129.99 Original price: $199.99 Discount: 35% off
13 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 13.5 hours on-demand video
  • 1 downloadable resource
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • Explore the different ways to interact with QGIS with Python
  • Implement a complete turnkey mapping application called ForestTrails
  • Use Python and QGIS to produce captivating GIS visualizations and build complex map layouts
  • Generate PDF map books automatically
Course content
Expand all 195 lectures 13:16:32
+ Introduction to QGIS Python Programming
28 lectures 03:32:41
This video provides an overview of the entire course.
Preview 03:30
Prepare your system to develop applications using Python and QGIS.
Installing QGIS and Python
Because you don't need to have prior knowledge of QGIS to complete this course, in this video, we introduce the QGIS system itself.
Preview 07:10
This video is an introduction to the three ways in which Python can be used with QGIS.
Using Python with QGIS

Using the QGIS Python Console, learn more about the QGIS programming environment.

Using the Python Console as a Window into the QGIS Environment

See how QGIS Python plugins work to extend the functionality of the QGIS system.

Examining a Python Plugin
Learn how to write a standalone Python program that uses the QGIS Python APIs.
Using the QGIS Python API within an External Application
Learn how to use the QGIS Python Console to explore the QGIS environment and to write and run Python scripts.
Preview 07:58
Learn how to write a Python program that reads and analyses geospatial data using the QGIS console.
Working with Geospatial Data in the Console

Learn how to write Python programs that interact with the user using various QGIS user interface elements.

Scripting the QGIS User Interface
Before you can work with the QGIS Python API, you have to understand how the API was developed, how it is organized, and how to learn more about it.
Preview 08:32
The qgis.core package contains fundamental classes that are used throughout the QGIS system. You will need to become familiar with these to use the PyQGIS API.
Important Core Classes
The qgis.gui package defines a number of user interface widgets that you will want to include in your programs.
Important GUI Classes

Learn how to analyze the contents of a raster file containing elevation data.

Preview 07:39

Learn how to read, write, and manipulate vector-format geospatial data.

Manipulating and Saving Vector Data
Using Different Symbols for Different Features
Using Different Symbols for Different Features
Learn how to create a map tool that lets the user identify two points within a map and displays the real-world distance between those two points.
Calculating the Distance between Two Points
Learn how to create your own QGIS plugin from scratch.
Preview 09:40

Learn how to effectively develop plugins for QGIS.

The Plugin Development Process

Learn how to prepare your plugin so that it can be shared with other people.

Distributing Plugins
Learn how to create a more useful QGIS plugin that displays information about a clicked-on geometry.
Writing a Useful Plugin
Understand what can and can't be done with QGIS plugins.
Possibilities and Limitations of Plugins
Design, prepare, and implement the Lex (Landmark Explorer) application.
Preview 07:01
Start to implement the Lex system by defining the structure for the application and creating the overall user-interface
Creating the Lex Application

Add a map view to a standalone PyQGIS-based mapping application.

Drawing the Map
Add features to the Lex application to allow the user to pan and zoom the map.
Implementing Panning and Zooming

Add a mode where the user can click on a landmark to display information about that landmark.

Implementing "Explore" Mode
Learn what can and can't be done with external applications using PyQGIS.
Possibilities and Limitations of External Applications
+ QGIS Python Programming Techniques
32 lectures 02:57:28
This video provides an overview of the entire course.
Preview 04:17
Prepare your system to work through the examples in this course
Installation and Setup
Learn to combine multiple "symbol layers" to create sophisticated types of symbols.
Working with Symbol Layers

Learn how to create a system layer that draws features in a way not supported by the built-in QGIS symbol layer classes.

Implementing Symbol Layers in Python

Learn how to create your own custom renderer classes using Python.

Implementing Renderers in Python
Learning how to create your own custom map layers to draw information can't easily be represented as a vector or raster map layer.
Working with Custom Map Layers
Learn how to create your own map canvas items that draw directly onto the map canvas.
Creating Custom Map Canvas Items
Learn how to work with memory-based map layers to produce effects not easily achieved using traditional vector layers.
Using Memory-Based Layers
Learn how to let the user select vector features within your PyQGIS-based programs, and identify the selected feature(s) so you can work with them.
Preview 05:17

Learn how Layer Editing Mode works and how to use it within your own PyQGIS-based programs.

Layer Editing Mode
Learn how to create map tools that let the user add and edit Point geometries.
Adding and Editing Points
Add functionality to a PyQGIS-based application that lets the user delete a feature by clicking on it.
Deleting Points and other Geospatial Features

Learn how to let the user create new LineStringand Polygon features by drawing them onto the map canvas.

Adding Lines and Polygons
Learn how to let the user edit a LineString or Polygon geometry by clicking and dragging.
Editing Lines and Polygons

In this video, we will understand what it does and how it will work.

Preview 03:31
In this video, we will design the application in more detail.
Designing the ForestTrails Application

Start implementing the ForestTrails system.

Preview 08:13
The application's user interface needs to be defined in a separate Python class. In this video, we will implement that UI class.
Defining the User Interface

This video continues to implement the ForestTrails system by fleshing out core Python sources files which make up the main program.

Implementing the Main Program

Check that all the code we have written so far is working properly, and investigate the application's user interface.

Testing the Application
In this video, we obtain and prepare the basemap for use within the application.
Preview 04:34
In this video, we need to show the basemap and vector-format data in the map canvas. And we need to setup the underlying database and then define the map layers and their associated renderers.
Defining the Map Layers
In this video, the user needs to be able to move the map around by clicking and dragging while in the "Pan" mode.
The 'Pan' Map Tool

In this video, we will integrate the layer editing mode into our application so the user can turn on and off the editing mode and is reminded to save their changes when they quit the program.

Implementing the Track Editing Mode
In this video, because all the track data in the ForestTrails system is created by the end user, we need a tool to let the user create a new track.
Preview 05:14
In this video, we will solve program’s very subtle problem which needs to be fixed.
Testing and Improving the Application
In this video, we will edit existing tracks.
The 'Edit Track' Map Tool

This section helps to round out the track-editing capabilities of the ForestTrails system; we need the ability to delete tracks.

The 'Delete Track' Map Tool
In this video, we help to get some way of allowing the user to enter the metadata about a track, including its name, type, and status.
Preview 07:31
In this video, before we can implement the Find Shortest Path feature, we need to let the user set the desired starting and ending points.
The Set Start Point and Set End Point Actions
In this video, we will see the ability to find the shortest path between two designated points.
The Find Shortest Path Action
No program is ever complete. There are some annoying UI quirks we need to fix before reviewing what we have done and looking at ways to make our program even better.
Finishing Off and Testing
+ Automated Data Processing with PyQGIS
58 lectures 03:36:11
This video gives an overview of the entire course.
Preview 06:30
QGIS needs to be installed properly for working on it. This video will help you do that.
Installing QGIS 2.18 for Development
The Python console is an interactive platform used for automation.
Using the QGIS Python Console for Interactive Control

In order to have the Python console always available, we will go through this video.

Automatically Starting the Python Console
The QGIS Python Script Runner plugin provides a middle ground for QGIS automation between the interactive console and the overhead of plugins.
Using the Python's Script Runner Plugin
QGIS IDE has advanced debugging tools and is very useful.
Setting Up Your QGIS IDE
Debugging programs that have processes in the foreground and background can be extremely difficult. This interactive debugging approach of QGIS makes the development of complex applications efficient.
Debugging QGIS Python Scripts
PyQGIS allows you to control virtually every aspect of QGIS. This video helps you to do that.
Navigating the PyQGIS API
Plugins are the best way to extend QGIS, as they can be easily updated and reused by other people. We will create a plugin in this video.
Creating a Traditional QGIS Plugin
The QGIS Processing Toolbox provides a powerful set of algorithms for QGIS Python Programming. Creating a plugin will help in easing the process.
Creating a Processing Toolbox Plugin
PyQGIS allows you to store application-level preferences and retrieve them. QGIS also has project-level preferences, which can override the application-level preferences in some cases. We will learn how to work with them in this video.
Storing and Reading Global and Project Preferences
Sometimes, you need to know exactly where the current working directory is so that you can access external resources. Accessing the script will enable that.
Accessing the Script Path from Within Your Script
Vector data stored in a local file is one of the most common geospatial data formats. We need to learn how to load the vector sample from a file.
Preview 04:07
The geodatabase provides powerful geospatial data management and operations. Hence it is important to learn about how to load a layer from a geodatabase.
Loading a Vector Layer from a Geodatabase
Once a vector layer is loaded, you may want to investigate the data. A true GIS layer contains both spatial geometry and non-spatial attributes. So we are going to examine vector layer attributes and features in this video.
Examining Vector Layer Features and Attributes

In this video, we'll perform a spatial operation to select the subset of a point layer based on the points contained in an overlapping polygon layer.

Filtering a Layer by Geometry
In addition to the spatial queries outlined previously, we can also subset a layer by its attributes. You will do that in this video.
Filtering a Layer by Attributes
Buffering a feature creates a polygon around a feature as a selection geometry or just a simple visualization.
Buffering a Feature
In the QgsDistanceArea object, PyQGIS has excellent capabilities for measuring the distance. We'll use this object measuring the distance between two points and along a line with multiple vertices.
Measuring the Distance between Two Points and Along a Line

Area calculation can be an end in itself to measure the size of a plot of land or a building. It can also be the input to other calculations such as land use maps. This video measures the area of a polygon.

Calculating the Area of a Polygon

A spatial index optimizes a layer for spatial queries by creating additional simpler geometries that can be used to narrow down the field of possibilities within the complex geometry. So let’s use that instead of geometry.

Creating a Spatial Index
Sometimes, you need to know the compass bearing of a line to create specialized symbology or to use as input in a spatial calculation. In this video, we'll calculate the bearing of the end points of a line.
Calculating the Bearing of a Line
Spreadsheets are one of the most common methods used to collect and store simple geographic data. So, it is very important to know how to load data from a spreadsheet.
Loading Data from a Spreadsheet
Metadata is an important tool for GIS analysts to understand a dataset. In this video, you'll extract the layer capabilities from a layer.
Accessing Layer Metadata
Sometimes you need to create a temporary dataset for a quick output, or as an intermediate step in a more complex operation without the overhead of actually writing a file to disk. You will learn just that in this video.
Preview 02:58
The simplest editing that can be done to a vector is adding a point feature. You will learn that in this video.
Adding a Point Feature to a Vector Layer

Previously we added a point feature to a vector layer. Taking this a step further, adding a line feature is adding more points.

Adding a Line Feature to a Vector Layer
A polygon is the most complex kind of geometry; however, in QGIS the API is very similar to a line. When you add a new attribute, the attribute value for all existing features are set to NULL for that field index. We will add polygon, field and other attributes.
Adding a Polygon Feature, Field, and Other Attributes to a Vector Layer

Joining attribute tables to other database tables allows you to use a spatial data set to reference a dataset without any geometry, using a common key between the data tables. Hence we will learn to do that in this video.

Joining a shapefile Attribute Table to a CSV File
To change the location and attribute of a feature PyQGIS provides a simple way. Learning that is important
Changing the Vector Layer Geometry and Feature’s Attribute
In this video we will remove features, attributes with features and reproject a vector layer using the Processign toolbox.
Removing Data from a Vector Layer, Deleting, and Re-projecting a Vector Layer
Files in the KML or GeoJSON format are better to work with than shapefiles. Therefore, it is a good practice to convert them to these file formats.
Converting a Shapefile to KML or GeoJSON
Merging datafiles with similar attributes and features leads to efficient use of memory. Alao sometimes it is necessary to split large datasets for ease of operation. Thus we will learn merging and splitting in this video.
Merging and Splitting Shapefiles
Generalization removes points from vector layer and reduces space.
Generalizing a Vector Layer
Dissolving helps in creating a single layer with common attributes.
Dissolving Vector Features
A union combines two overlapping vector shapes into one.
Performing a Union on Vector Shapes
A raster dataset is sometimes more efficient way of displaying data in the backdrop.
Rasterizing a Vector Layer

The GeoPackage format has the properties of both the file format and a geodatabase. It overcomes all the limitations of the shapefile format, such as file size limits, attribute name length limits, and many other inconveniences. Thus, we can use it in our videos.

Exporting a Layer to the GeoPackage Format
To use QGSRasterLayer API, we need to load a layer into QGIS. In this way we can work on the layer without adding it to the map.
Preview 04:56
NetCDF stands for Network Common Data Form and is an open geospatial and scientific data format. Features of the format include machine-independent data storage, the ability to store vector, raster, and statistical data, as well as multi-dimensional data, and widespread software read and write support.
Loading a NetCDF File
The first key element of a geospatial raster is the width and height in pixels. The second key element is the ground distance of each pixel, also called the pixel size. We need to find both these values to work with a raster.
Getting the Cell Size, Width and Height of a Raster Layer
Bands represent layers of information within a raster. Hence it is important to count them and also sometimes necessary to swap them to recombine bands to change RGB values.
Counting and Swapping Raster Bands
A common remote sensing operation is to get a raster value at a specified co-ordinate. In this video, we will calculate that.
Querying the Value of a Raster at a Specified Point
You can change the map projection of data to allow different layers to be displayed on the same map. Reprojection is required for that.
Reprojecting a Raster
A hillshade, or shaded relief, is a technique to visualize elevation data in order to make it Photo-realistic for presentation as a map. In this video, we will create an elevation hillshade.
Creating an Elevation hillshade
Contours provide an effective visualization of terrain data by tracing isolines along the same elevation to form a loop at set intervals in the dataset. So we will use the elevation data to create contours.
Creating vector contours from Elevation Data

Sometimes, you need to sample a raster dataset at regular intervals in order to provide summary statistics or for quality assurance purposes on the raster data. A common way to accomplish this regular sampling is to create a point grid over the dataset, query the grid at each point, and assign the results as attributes to those points.

Sampling a Raster Dataset Using a Regular Grid
If you have a transportation route through some terrain, it is useful to know the elevation profile of that route. This operation is accomplished in this video.
Adding Elevation Data to a Line Vertices Using a Digital Elevation Model
If you are trying to compare two raster images, it is important that they have the same extent and resolution. We are going to create a common extent for rasters in this video.
Creating a Common Extent for Rasters
Resampling an image allows you to change the current resolution of an image to a different resolution.
Resampling raster Resolution
The ability to run statistical algorithms on a dataset is the key to remote sensing. Mosaicking rasters is the process of fusing multiple geospatial images with the same resolution and map projection into one raster. In this video, we will count the number of unique combinations of pixels across multiple bands. And combine two overlapping images into a single dataset.
Counting the Unique Values in a Raster and Mosaicking Rasters
Image format conversion is a part of nearly every geospatial project. Hence it is important to learn how to do it.
Converting a TIFF Image to a JPEG Image

Pyramids, or overview images, sacrifice the disk space for map rendering speed by storing resampled, lower-resolution versions of images in the file alongside the full-resolution image. Thus it is essential to know how to create a pyramid.

Creating Pyramids for a raster
The ability to view rasters in a geospatial context relies on the conversion of pixel locations to coordinates on the ground. Similarly, when you receive a map coordinate as user input or from some other source, you must be able to convert it back to the appropriate pixel location on a raster. This video will enable you to do both things.
Converting a Pixel Location to a Map Coordinate and Vice Versa

The XML data format used by Google Earth for geospatial data is called KML. Converting rasters into a KML overlay compressed in a KMZ archive file is a very popular way to make data available to end users who know how to use Google Earth.

Creating a KML Image Overlay for a Raster

Raster datasets represent real-world features efficiently, but can have limited usage for geospatial analysis. Once you have classified an image into a manageable data set, you can convert those raster classes into a vector data set.

Converting a Raster to a Vector
Sometimes, a raster that represents features on the earth is just an image with no georeferencing information. Each change to an image holds the possibility of losing data, so georeferencing an image on demand is often the best approach.
Georeferencing a Raster from Control Points
Sometimes, you need to use a subset of an image which covers an area of interest for a project. Clipping a raster to a vector boundary allows you to only use the portions of the raster you need.
Clipping a Raster Using a Shapefile
+ Automated GIS Workflows with PyQGIS
77 lectures 03:10:12
This video gives overview of the entire course.
Preview 04:37

Maps in QGIS are controlled through the map canvas. So in this video, we'll be accessing the canvas and then will be checking one of its properties to ensure that we have control over the object.

Accessing the Map Canvas
Changing map units, is a very common operation, depending on the purpose of your map. In this video, we'll be reading the map units used by QGIS and then change them for our project.
Changing the Map Units
For many GIS operations, you need to loop through the map layers to look for specific information or to apply a change to all the layers. In this video, we'll be looping through the layers and get information about them.
Iterating Over Layers
The symbols describe properties, including color, shape, size, and line width. In this video, we’ll be loading a vector layer, change its symbology, and finally refresh the map.
Symbolizing a Vector Layer
In this video, we will load a polygon layer onto the map, and then interactively change it to just an outline of the polygon.
Setting a Transparent Layer Fill
Filled marker symbols allow for an endless set of options for rendering a polygon. In this video, we'll do a very simple filled marker symbol that paints a polygon with stars.
Using a Filled Marker Symbol

A color ramp allows you to render a raster using just a few colors to represent different ranges of cell values that have a similar meaning in order to group them. The approach that will be used in this video is the most common way to render elevation data.

Rendering a Single Band Raster Using a Color Ramp Algorithm

In this video, we'll load some points into QGIS from a CSV file and use one of the columns to determine the color of each point.

Setting a Feature's Color Using a Column in a CSV File
The true power of QGIS symbology lies in its ability to stack multiple symbols in order to create a single complex symbol. In this video, we'll merge two symbols to create a single symbol and begin unlocking the potential of complex symbols.
Creating a Complex Vector Layer Symbol

TrueType fonts are scalable vector graphics that can be used as point markers. In this video, we'll create a symbol of this type.

Using Icons as Vector Layer Symbols

Font markers open up broad possibilities for icons, but a single-color shape can be hard to see across a varied map background. In this video, we'll use font marker symbol methods to place an outline around the symbol to give it contrast and, therefore, visibility on any type of background.

Using an Outline for Font Markers
Sometimes you also need to convey a direction along a line. In this video, we'll symbolize some line features showing historical human migration routes around the world.
Using Arrow Symbols
Graduated vector layer symbol renderer is the vector equivalent of a raster color ramp. In this video, we'll render a graduated symbol using a polygon shapefile.
Creating a Graduated Vector Layer Symbol Renderer
A categorized vector layer symbol allows you to create distinct categories with colors and labels for unique features. In this video, we'll categorize a vector layer into three different categories.
Creating a Categorized Vector Layer Symbol

Live layer effects provide advanced cartographic effects for QGIS maps. In this video, we'll add the inner glow and drop shadow live layer effects to a polygon layer.

Using Live Layer Effects
Shapeburst fills are a type of symbol layer that allow you to create buffered gradient fills. In this video, We'll use a land shapefile and a water shapefile, and in the water feature, we'll color it to give the illusion of deeper water in the middle.
Preview 02:19
Map bookmarks allow you to save a location on a map in QGIS, so you can quickly jump to the points you need to view repeatedly without manually panning and zooming the map.
Creating a Map Bookmark
Map bookmarks store important locations on a map, so you can quickly find them later.
Navigating to a Map Bookmark
PyQGIS supports scale-based visibility to programmatically set the scale range, in which a layer is displayed. In this video, we'll investigate scale-dependent layers.
Setting Scale-Based Visibility for a layer
Scalable Vector Graphics (SVG) are an XML standard that defines vector graphics which can be scaled at any resolution. In this video, we'll use Python to apply one of the SVG symbols included with QGIS to a point layer.
Using SVG for Layer Symbols
QGIS has the ability to use dynamic pie charts as symbols describing the statistics in a given region. In this video, we'll use pie chart symbols on a polygon layer in QGIS.
Using Pie Charts for Symbols
The 2.5D renderer is a powerful new visualization for QGIS, which allows you to present buildings as three-dimensional shapes from a single angle. In this video, we'll render a small set of building footprints in 2.5D, with height values set as a shapefile attribute.
Using the 2.5D Renderer
A tiled map service allows you to efficiently display large raster data sets from web services. Also There are two types of Esri services: ArcGIS map services, which provide tiled map layers, and ArcGIS feature services, which provide vector layers. So in this video, we'll load the Open Street Map tiled map service and create a map with one of each type of Esri service.
Using XYZ Tiled and Esri ArcGIS Map Services

Once your map layers are styled, the next step to creating a complete map is labeling features. We'll explore the basics of labeling in this video.

Labeling a Feature
Null symbols are a tool that allow you to have a layer without any symbology In this video, we'll load a point layer and label it, but use null symbology.
Using Null Symbols
Map layer transparency allows you to change the opacity of a layer, so the items behind it are visible to some degree.
Change Map Layer Transparency
In order to turn a dynamic GIS map into a static map image or document, you must create a renderer to freeze the map view and create a graphic version of it. In this video, we'll render a map to a JPEG image and save it.
Preview 03:12

The QGIS Map Composer allows you to combine a map with non-spatial elements that enhance the understanding of the map. In this video, we'll be creating a basic map composition.

Using the Map Composer
The Q g s Composition object allows you to place arbitrary text anywhere in the composition. In this video, we'll demonstrate how to add a label to a map composition.
Adding Labels to a Map for Printing
In this video, we'll create a scale bar that increments in kilometers then we will be adding an arrow element that points to the north and finally we'll add a simple logo to the map.
Adding a Scale Bar, North Arrow and Logo to a Map
A map legend decodes the symbology used in a thematic GIS map for the reader. Legends are tightly integrated into QGIS, and in this video, we'll add the default legend from the map to the print composition and we'll add two layers set up the legend to run horizontally across the top of the map.
Adding a Vertical and a Horizontal Legend to the Map

The QGIS composer has an object for drawing and styling nonspatial shapes, including rectangles, ellipses, and triangles. In this video, we'll add some rectangles filled with different colors, which resemble a simple bar chart; then we will add grid for reference purpose. And finally add the table to the composition.

Adding a Custom Shape, Grid, and Table to the Map
Exporting a map as an image removes all of its spatial information. However, you can create an external text file, called a world file, which provides the georeferencing information. In this Video, we'll export a map composition as an image and create a world file along with it.
Adding a World File to a Map Image
Saving a project automatically can be useful for auto save features. In this video, we'll save a QGIS project to a .qgs project file.
Saving a Map to a Project
Loading a project will set up the map and project settings for a previously saved project within QGIS.This video demonstrates you to load a project from a .qgs XML file.
Loading a Map from a Project
Log files provide a way of tracking exactly what is going on in a Python plugin or script. These log messages make troubleshooting easier. In this video, we'll demonstrate two methods used for logging. actual log files and QGIS Log Messages Panel
Preview 03:15
In this video, we'll create a simple information dialog, a warning dialog to notify a user when an issue is detected, and an example of error dialog.
Creating a Simple Message, Warning and Error Dialog

A progress bar is a dynamic dialog that displays the percentage of completion bar for a running process that the user must wait for before continuing. In this video, we'll create a simple progress dialog based on a timer.

Displaying a Progress Bar
In this video, we demonstrate one of the simplest methods used for accepting input from a user: a text input dialog. And then we'll create a file dialog and print the chosen filename to the console.
Creating a Simple Text Input and a File Input Dialog
In this video we'll create a simple combobox, then we will proceed to create radio buttons then we'll create a dialog with checkboxes and some textboxes.
Creating a Combobox, Radio Buttons, Checkboxes, and a Dock Widget
The status bar in QGIS displays a variety of information in all sorts of contexts. In this video, we'll print the current time to the status bar.
Displaying a Message in the Status Bar
In this video we'll push a simple message to the status bar and then we'll display a progress bar in the message bar.
Pushing Messages and Widgets to the Message Bar
Tabs provide titles at the top of the window, which present an individual widget layout for each title when clicked. In this video, we'll create a simple tabbed interface.
Creating Tabs
Wizard is a series of dialogs that lead the user through a sequence of steps. In this video, we'll create a simple three-page wizard to collect some information from the user and display it back to them.
Stepping the User Through a Wizard

Qt has a window setting called hint, which allows you to force a window to stay on top. This type of dialog is called a modal dialog. In this video, we'll create a message dialog using hint.

Keeping Dialogs on Top
NDVI is used to detect green vegetation in an area of interest. So here in this video, we will use Python to control the QGIS raster calculator in order to create an NDVI using a multispectral image of a farm field
Preview 04:19
Geocoding is the process of turning an address into earth coordinates. In this video, we'll use this plugin to programmatically geocode an address.
Geocoding Addresses
The vector footprint files can be easily loaded in QGIS or served over the Web. This video demonstrates a method to create a footprint vector from a directory full of raster files
Creating Raster Footprints
Network analysis allows you to find the most efficient route between two points along a defined network of connected lines. In this video, we'll use a generic line network to perform analysis using the Dijkstra algorithm, to find the shortest path.
Performing Network Analysis
Street routing has now become so commonplace that we take it for granted. So here in this video we will perform routing operations in QGIS, we'll use the QGIS GeoSearch plugin
Routing Along Streets
QGIS has the ability to connect to a GPS .In this video, we'll use the QGIS API to process NMEA sentences and update a point on a global map
Tracking a GPS
Nearest neighbor analysis relates one point to the nearest point in one or more datasets. In this video, we'll relate one set of points to the closest point from another dataset.
Performing Nearest Neighbor Analysis
In this video, we will we'll convert a LAS point cloud file to a Digital Elevation Model (DEM). We’ll use earthquake point data to create a heat map of the impact of an earthquake and illustrate population density in some US census bureau tracts.
Creating a DEM from LIDAR and Dot Density Map

Collecting field observation data from the field into a GIS required hours of manual data entry. n this video, we'll use a simple GeoJSON-based framework to enter information and a map location from any Internet-connected device with a web browser to update a map in QGIS.

Collecting Field Data
A common geospatial workflow is to assign raster values to a coincident vector layer. This video will use this concept to illustrate the steepness of a road using color by mapping values to the road vector from a slope raster.
Computing Road Slope Using Elevation Data

In this video, we'll use EXIF tags to create locations on a map for some photos and provide links to open them.

Geolocating Photos on the Map
In this video, we'll do a simple difference change detection on two images, which are several years apart, to see the differences in urban development and the natural environment.
Image Change Detection
A common task in digitizing is to outline buildings in an image to make footprints for urban analysis. In this video we'll automatically transform some non-rectangular polygons into rectangles using a simple algorithm.
Adjusting Imprecise Building Footprints

In this video, we'll load a dataset that has multiple time steps, and use the well-designed TimeManager plugin to step through the data time steps in an animation.

Visualizing Multi-Temporal Data
In this video we are going to create Internet web map tiles from our QGIS map.
Preview 04:04
In this video demonstrates to use a service named geojson.io, which serves vector layers online which you can upload from QGIS using Python.
Adding a Layer to geojson.io
This video demonstrates how to use a rule-based renderer to color code a layer based on an attribute.
Rendering Map Layers Based on Rules

Layer styling is one of the most complex aspects of the QGIS Python API. Once you've developed the style for a layer, it is often useful to save the styling to the QGIS Markup Language (QML) XML format.

Creating a Layer-Definition File
Python uses None objects of type None instead of NULL values. In this video, we'll explore the implications of QGIS NULL values in Python.
Using NULL Values in PyQGIS
A simple Python QGIS query engine, uses generators to make fetching features from QGIS layers easier. We'll use this engine in this video, to query a layer.
Using Generators for Layer Queries
Thematic maps often use a color ramp based on a single color to show data density. In this video, you use some bear-sighting data to show concentrations of bears over an area.
Using Alpha Values to Show Data Density

The geo_interface is a newer protocol to provide a string representation of geographical data. In this video we will use this to to provide a code snippet, which you can put at the beginning of your Python scripts to retrofit QGIS feature.

Using the __geo_interface__ protocol
The processing framework is mostly very consistent, however the names of output variables vary. So in this video, we'll use PyQGIS to programmatically get the output variable name.
Getting the Output File Names from Processing Algorithms
You can generate points within a polygon fairly simply using a point in polygon method. In this video, we will demonstrate 2 methods to generate points along line.
Generating Points Along a Line
Expressions are a kind of mini-programming language or SQL-like language found throughout different QGIS functions. Here in this video, we will filter labels using expressions from within Python
Using Expression-Based Labels
If you need to calculate the total of a given dataset property such as length, the easiest thing to do is just use Python. In this video, we'll total the length of all of the railways in a dataset.
Calculating Length for all Selected Lines
Sometimes, you want to display a different coordinate system for the mouse coordinates in the status bar. With this video, you can set a different coordinate system without changing the data.
Using a Different Status Bar CRS than the Map –
OpenStreetMap has an API called Overpass that lets you access OSM data dynamically. In this video, we'll add some OSM tourism points of interest to a map.
Using OpenStreetMap Points of Interest in QGIS

QGIS displays data in a two dimensions even if the data is 3D. In this video, we'll use the Qgis2threejs plugin to display QGIS data in 3D in a browser.

Visualizing Data in 3D with WebGL and on a Globe
Since the release of Google Earth, spinning globe applications are a useful and popular method of geographical exploration. In this video, we'll display a layer in Google Earth.
Make a Globe-Like Azimuthal Orthographic Projection

QGIS increasingly supports cartographic visualizations that go beyond GIS analysis. In this video we'll animate hub lines generated from the nearest neighbor analysis of UFO sightings in major cities.

Animating a Layer
  • A basic knowledge of Python is a must
  • Knowledge of QGIS is not required as this course, starts right from the basics

You can be an excellent sculptor, but without the right tools, you would find it difficult to work. Similarly, even if you are very good at programming, building GIS application is a completely different ball game! The best tool you can go for while building GIS applications is QGIS. QGIS is a standalone geographical information system. It simplifies the process of building complex geospatial applications. It comprises of the tools that reduce the time and effort you spend on a typical application. If you are looking to create complex geospatial applications within a short span of time, then this Learning Path is the way to go.
Packt’s Video Learning Paths are a series of individual video products put together in a logical and stepwise manner such that each video builds on the skills learned in the video before it.
The main goal of this Learning Path is to make mold you into an expert GIS application developer.
In PyQGIS: Conquer the Geospatial World with QGIS, you will learn how to use the QGIS system with a specific focus on the PyQGIS library.
Before we begin learning, let’s draw attention towards the “roadmap of the course”.
It begins with understanding the QGIS system, the Python console, and the PyQGIS library. We then move on to learning how to create QGIS plugins and use them in external applications. We then dig deeper into QGIS Python API, concentrating on how this library can be used to display information on a map. We then look at how external applications that use the PyQGIS library can let the user select and edit geospatial features. We go on to use the knowledge we have gained to implement a sophisticated turnkey mapping system.
Then, we will look to create, edit, and optimize a vector layer for faster queries, reproject a vector layer, reduce the number of vertices in a vector layer without losing critical data, and convert a raster to a vector. Following this, you will work through recipes that will help you compose static maps, create heavily customized maps, and add specialized labels and annotations. As well as this, we'll also share a few tips and tricks based on different aspects of QGIS.
By the end of this Learning Path, you will have mastery over the QGIS tool and will find yourself capable of building complex applications with ease.

Who this course is for:
  • This course is aimed at experienced Python developers who want to create their own sophisticated geospatial applications with a minimum of fuss. No experience with the QGIS system or knowledge of geospatial concepts is required.