This chapter is focused on a specific use case or user. QGIS can be used in many different ways, and the GIS user is an eclectic user who has many different ways to interact with data and QGIS tools. The main focus of this chapter is a user who has an algorithm and wants to integrate it with QGIS.
An algorithm can be an external program, such as a water-modeling tool, or a Processing Toolbox's set of instructions.
It's possible to interact with QGIS in many different ways, from experimenting with PyQGIS in the Python console, to creating plugins that control events generated by QGIS. This chapter will give you an overview of the following topics:
This chapter is not intended to give you an introduction to Python programming. There are a lot of free online resources and Massive Open Online Course (MOOC) (http://en.wikipedia.org/wiki/Massive_open_online_course) courses on the Web.
The main resources can be obtained directly from the Python homepage at https://www.python.org/about/gettingstarted/, where there is a big collection of guides, free books, and tutorials.
When programming in Python, it's important to give special attention to editing code with correct indentation. Avoid mixing spaces and tabs because it can generate errors that can be difficult to understand, especially for someone who is a beginner at Python programming. The official PEP8 Python standard recommends using spaces.
18.189.193.172