28

I wish to develop a simple plugin for QGIS, which will open some data, and perform some specific processing.

I tried searching on the QGIS wiki, but only found this link :

http://www.qgis.org/wiki/Writing_C++_Plugins

which seems to be obsolete. There were also a few blog posts from 2006.

I also saw something about Python plugins, but I am not sure whether I need to work with the C++ plugin or a Python plugin.

Where can I find documentation, or tutorials, that would help me get started?

locked by PolyGeo May 18 at 0:12

This question's answers are a collaborative effort: if you see something that can be improved, just edit the answer to improve it! No additional answers can be added here

Read more about locked posts here.

30

This question has been converted to Community Wiki and wiki locked because it is an example of a question that seeks a list of answers and appears to be popular enough to protect it from closure. It should be treated as a special case and should not be viewed as the type of question that is encouraged on this, or any Stack Exchange site, but if you wish to contribute more content to it then feel free to do so by editing this answer.


C++ plugins are less and less common these days. Most likely because they are more difficult to develop. Most documentation effort has been put into Python plugins. C++ still has it's place for performance critical things and functionality that is supposed to be merged into QGIS core (like new renderers for example).

There is a Plugin builder plugin which helps to create the basic plugin structure for you.

The PyQGIS Cookbook offers a lot of code snippets for Python plugins

The book PyQGIS Programmer's Guide is another good resource.

If you get stuck, the QGIS developer mailing list is there to help you.

8

Basically you need to know 3 things:

  1. Python : http://www.python.org/
  2. PyQT (to make the user interface, if you want one) : http://www.riverbankcomputing.co.uk/software/pyqt/intro
  3. Qgis API : http://doc.qgis.org/head/

They are all very well documented, to get started I recommend you to browse through the modules of the QGIS API and play with the python console doing basic things like accessing the features of a vector layer.

Later, after you get the feel of the api, you can ask more specific questions here on GIS SE e.g. Using QGIS API and Python, to return latitude and longitude of point?

5

There is also a QGIS Plugin Builder, which prepares a basic skeleton of a plugin to get you started. It creates all necessary files for you.

  • 1
    The link is 404. – Aaron May 18 at 1:53
  • Now the link is working. – dimitris Jun 3 at 11:35

Not the answer you're looking for? Browse other questions tagged or ask your own question.