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

Implementing the algorithm


Now, when we know how to define input and output, we are ready to develop Python scripts for Processing.

There are two ways to create a script:

  • Use your favorite text editor or IDE

  • Use Processing's built-in code editor

Which method to use is a matter of taste and habits. In this book, we will use the built-in script editor. You can open it from the Processing toolbox. Locate and expand the Scripts group, expand the Tools subgroup, and double-click on the Create new script item. Alternatively, you can start typing Create new script in the filter field. The toolbox's content will be filtered, and you can easily locate the corresponding item.

The Script editor looks like an ordinary text editor as shown in the preceding screenshot. There is a toolbar at the top, and all of the remaining area is used up by the editor itself.

Now we will see how to create Processing Python scripts by developing a script to find the shortest path between two points on the road network. Such...