Book Image

QGIS By Example

By : Alexander Bruy, Daria Svidzinska
Book Image

QGIS By Example

By: Alexander Bruy, Daria Svidzinska

Overview of this book

Table of Contents (17 chapters)
QGIS By Example
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

QGIS plugins


From the very beginning, QGIS was developed with the extensible and modular architecture. Originally, it allowed us to extend its functionality only with C++ plugins. But, starting from version 0.9, when Python support was added, users and developers were able to create plugins using the Python programming language as well.

Every QGIS Python plugin is just a set of the Python modules and additional files bundled into a single Python package. These packages should be placed in separate subdirectories under a special directory in the QGIS home path. Usually, this is ~/.qgis2/python/plugins, where ~ is a user home (profile) directory. In Windows, it is C:\Users\your_profile, and in UNIX-like systems, it is /home/your_profile.

The minimal working plugin should contain two files in this directory:

  • __init__.py: This is the package initialization file and the plugin's entry point. It should contain the classFactory() method.

  • metadata.txt: This contains plugin metadata used by Plugin Manager...