Develop your QGIS plugin

Licencia (CC BY-SA 3.0)

III QGIS User Conference
7 August 2017 - Nødebo

Luigi Pirelli


Who am I

15 years working on Satellite Ground Segments for

Landsat, Cryosat, MODIS, Sentinel...


Since 2006 in QGIS/GRASS

QGIS Plugin y Core developer



Since 2015 part of Boundless Desktop Team

Commercial solution base on QGIS (and more)



Founder of

Italian OSGEO Local Chapter

Coautor of "Mastering QGIS"


QGIS Python Programming Cookbook

More PyQGIS books




docker pull kartoza/qgis-desktop

docker pull kartoza/qgis-server


Example data:


Free as Freedom - mainly GPL2

Open - Anyone can participate

Trasparent - PSC coordination list is also open

How to Participate

Issues -

Helps - In ML o en freenode #qgis channel

Bug fix:

Translates -

other languages e.g QGIS-es:


but best part is particpating to...


every 6 months

When your user group?

Having right vote on using QGIS funds... and more


QGIS is wrote in:

C++ (almos all)

Python (some core plugins)

Javascript (some parts in Plugin Manager)

C++ -

Python -



Ask help to the QGIS

The core Python console


IPython Console plugin

by A.Pasotti

  • Exploring commands
    • help(...)
    • dir(...)
  • To test command
  • To test code

Help each other

Ice break

coding in python console


95% of C++ API can be accessed by Python thanks to SIP wrappers


PyQGIS Cookbook


The better school is to install end read plugins code

Let's build a plugin

with QGIS Plugin Builder (versión 2.16)

What we need

  • Python editor (vi, Atom, Eric4, Eclipse, PyCharm,...)
  • Optional: if we need Graphical User Interface (GUI)
    • *.ui file editors (Qt Creator, Qt Designer)
    • Resource builder pyrcc4 (pyqt4-dev-tools)
  • Optional:
    • project builder "make" (build-essential)



  • Import plugin code project


  • Plugin structure


  • add instruction in


  • Do debug


A simple run() code

Plugins for QGIS2 and QGIS3

Luigi Pirelli




Licence: (CC BY-SA 3.0)

Made with