Lesson 7 Overview ================= .. figure:: img/L7-01-overview-01-pyqgis.svg :width: 500 px In this lesson we will take a quick tour on **how to use Python in QGIS**: 1. :doc:`Introduction to PyQGIS ` 2. :doc:`Creating QGIS plugins ` 3. :doc:`Additional PyQGIS functions ` *Credits to Tatu Leppämäki for compiling these materials!* Learning objectives ------------------- The aim of this lesson is to get started with using Python in QGIS. You will learn to run code from QGIS Python console, and learn how to create a simple QGIS plugin that applies Python functions. .. admonition:: Note There is no exercise in week 6! You can now continue to the **Final Assignment**. Also, please find additional materials related to **raster data processing** on these course pages. .. admonition:: Older course materials related to Desktop GIS software - `AutoGIS course materials from 2016 `_ on how to use the `arcpy `_ module for automating GIS processes. - `AutoGIS course materials from 2018 on how to run python scripts in the QGIS processing toolbox `__ Lecture videos -------------- .. admonition:: Lesson 7 - Python in QGIS; building a simple QGIS plugin .. raw:: html

Vuokko Heikinheimo & Tatu Leppämäki, University of Helsinki @ AutoGIS channel on Youtube.

**Contents:** - General intro for lesson 7 0:00 - Python in QGIS intro 4:10 - Opening a WFS layer in QGIS 7:00 - Changing the crs of the WFS layer 08:35 - Python console in QGIS 10:18 - Basic python commands in QGIS 11:20 - Python script files in QGIS 22:10 - Installing plugins for creating plugins 27:00 - QGIS plugin builder 30:35 - Compile required files using a batch file 37:50 - Restart QGIS and activate plugin 43:50 - Add a Python function to the plugin 46:35 - Design the graphical user interface of the plugin using qt designer 50:30 - Connect the Python function and the user interface 56:30 - Reload the plugin 1:00:35 - Run the plugin 1:01:05 - Summary 1:02:00 - Additional resources 1:03:10 - Additional PyQGIS functions 1:04:17 - Example of a more complicated plugin (GeoCubes): 1:06:30 .. admonition:: Lesson 7 - Final assignment instructions .. raw:: html

Vuokko Heikinheimo & Tatu Leppämäki, University of Helsinki @ AutoGIS channel on Youtube.

**Contents:** - Example student project 0:00 - Final assignment instructions 04:30 - Additional resources 23:30 - Final assignment repository 25:30 - Extra exercises 26:30