Introduction to QGIS Python Programming
This video provides an overview of the entire course.
Installing QGIS and Python
Prepare your system to develop applications using Python and QGIS.
Because you don't need to have prior knowledge of QGIS to complete this course, in this video, we introduce the QGIS system itself.
This video is an introduction to the three ways in which Python can be used with QGIS.
Using the Python Console as a Window into the QGIS Environment
Using the QGIS Python Console, learn more about the QGIS programming environment.
Examining a Python Plugin
See how QGIS Python plugins work to extend the functionality of the QGIS system.
Using the QGIS Python API within an External Application
Learn how to write a standalone Python program that uses the QGIS Python APIs.
Learn how to use the QGIS Python Console to explore the QGIS environment and to write and run Python scripts.
Working with Geospatial Data in the Console
Learn how to write a Python program that reads and analyses geospatial data using the QGIS console.
Scripting the QGIS User Interface
Learn how to write Python programs that interact with the user using various QGIS user interface elements.
Discovering the QGIS Python API
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.
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.
The qgis.gui package defines a number of user interface widgets that you will want to include in your programs.
Learn how to analyze the contents of a raster file containing elevation data.
Manipulating and Saving Vector Data
Learn how to read, write, and manipulate vector-format geospatial data.
Using Different Symbols for Different Features
Using Different Symbols for Different Features
Calculating the Distance between Two Points
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.
Learn how to create your own QGIS plugin from scratch.
The Plugin Development Process
Learn how to effectively develop plugins for QGIS.
Learn how to prepare your plugin so that it can be shared with other people.
Learn how to create a more useful QGIS plugin that displays information about a clicked-on geometry.
Possibilities and Limitations of Plugins
Understand what can and can't be done with QGIS plugins.
Designing a Turnkey Mapping Application
Design, prepare, and implement the Lex (Landmark Explorer) application.
Creating the Lex Application
Start to implement the Lex system by defining the structure for the application and creating the overall user-interface
Add a map view to a standalone PyQGIS-based mapping application.
Implementing Panning and Zooming
Add features to the Lex application to allow the user to pan and zoom the map.
Implementing "Explore" Mode
Add a mode where the user can click on a landmark to display information about that landmark.
Possibilities and Limitations of External Applications
Learn what can and can't be done with external applications using PyQGIS.
QGIS Python Programming Techniques
This video provides an overview of the entire course.
Prepare your system to work through the examples in this course
Working with Symbol Layers
Learn to combine multiple "symbol layers" to create sophisticated types of symbols.
Implementing Symbol Layers in Python
Learn how to create a system layer that draws features in a way not supported by the built-in QGIS symbol layer classes.
Implementing Renderers in Python
Learn how to create your own custom renderer classes using Python.
Working with Custom Map Layers
Learning how to create your own custom map layers to draw information can't easily be represented as a vector or raster map layer.
Creating Custom Map Canvas Items
Learn how to create your own map canvas items that draw directly onto the map canvas.
Using Memory-Based Layers
Learn how to work with memory-based map layers to produce effects not easily achieved using traditional vector 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.
Learn how Layer Editing Mode works and how to use it within your own PyQGIS-based programs.
Adding and Editing Points
Learn how to create map tools that let the user add and edit Point geometries.
Deleting Points and other Geospatial Features
Add functionality to a PyQGIS-based application that lets the user delete a feature by clicking on it.
Adding Lines and Polygons
Learn how to let the user create new LineStringand Polygon features by drawing them onto the map canvas.
Editing Lines and Polygons
Learn how to let the user edit a LineString or Polygon geometry by clicking and dragging.
Introducing the ForestTrails Application
In this video, we will understand what it does and how it will work.
Designing the ForestTrails Application
In this video, we will design the application in more detail.
Laying Out the Application
Start implementing the ForestTrails system.
Defining the User Interface
The application's user interface needs to be defined in a separate Python class. In this video, we will implement that UI class.
Implementing the Main Program
This video continues to implement the ForestTrails system by fleshing out core Python sources files which make up the main program.
Check that all the code we have written so far is working properly, and investigate the application's user interface.
In this video, we obtain and prepare the basemap for use within the application.
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.
In this video, the user needs to be able to move the map around by clicking and dragging while in the "Pan" mode.
Implementing the Track Editing Mode
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.
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.
Testing and Improving the Application
In this video, we will solve program’s very subtle problem which needs to be fixed.
The 'Edit Track' Map Tool
In this video, we will edit existing tracks.
The 'Delete Track' Map Tool
This section helps to round out the track-editing capabilities of the ForestTrails system; we need the ability to delete tracks.
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.
The Set Start Point and Set End Point Actions
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 Find Shortest Path Action
In this video, we will see the ability to find the shortest path between two designated points.
Finishing Off and Testing
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.
Automated Data Processing with PyQGIS
This video gives an overview of the entire course.
Installing QGIS 2.18 for Development
QGIS needs to be installed properly for working on it. This video will help you do that.
Using the QGIS Python Console for Interactive Control
The Python console is an interactive platform used for automation.
Automatically Starting the Python Console
In order to have the Python console always available, we will go through this video.
Using the Python's Script Runner Plugin
The QGIS Python Script Runner plugin provides a middle ground for QGIS automation between the interactive console and the overhead of plugins.
QGIS IDE has advanced debugging tools and is very useful.
Debugging QGIS Python Scripts
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.
Navigating the PyQGIS API
PyQGIS allows you to control virtually every aspect of QGIS. This video helps you to do that.
Creating a Traditional QGIS Plugin
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 Processing Toolbox Plugin
The QGIS Processing Toolbox provides a powerful set of algorithms for QGIS Python Programming. Creating a plugin will help in easing the process.
Storing and Reading Global and Project Preferences
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.
Accessing the Script Path from Within Your Script
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.
Loading a Vector Layer from a File Sample
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.
Loading a Vector Layer from a Geodatabase
The geodatabase provides powerful geospatial data management and operations. Hence it is important to learn about how to load a layer from a geodatabase.
Examining Vector Layer Features and Attributes
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.
Filtering a Layer by Geometry
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 Attributes
In addition to the spatial queries outlined previously, we can also subset a layer by its attributes. You will do that in this video.
Buffering a feature creates a polygon around a feature as a selection geometry or just a simple visualization.
Measuring the Distance between Two Points and Along a Line
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.
Calculating the Area of a Polygon
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.
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.
Calculating the Bearing of a Line
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.
Loading Data from a Spreadsheet
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.
Metadata is an important tool for GIS analysts to understand a dataset. In this video, you'll extract the layer capabilities from a layer.
Creating a Vector Layer in Memory
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.
Adding a Point Feature to a Vector Layer
The simplest editing that can be done to a vector is adding a point feature. You will learn that in this video.
Adding a Line 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 Polygon Feature, Field, and Other Attributes 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.
Joining a shapefile Attribute Table to a CSV File
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.
Changing the Vector Layer Geometry and Feature’s Attribute
To change the location and attribute of a feature PyQGIS provides a simple way. Learning that is important
Removing Data from a Vector Layer, Deleting, and Re-projecting a Vector Layer
In this video we will remove features, attributes with features and reproject a vector layer using the Processign toolbox.
Converting a Shapefile to KML or GeoJSON
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.
Merging and Splitting Shapefiles
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.
Generalizing a Vector Layer
Generalization removes points from vector layer and reduces space.
Dissolving Vector Features
Dissolving helps in creating a single layer with common attributes.
Performing a Union on Vector Shapes
A union combines two overlapping vector shapes into one.
Rasterizing a Vector Layer
A raster dataset is sometimes more efficient way of displaying data in the backdrop.