Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
QGIS By Example

You're reading from   QGIS By Example Leverage the power of QGIS in real-world applications to become a powerful user in cartography and GIS analysis

Arrow left icon
Product type Paperback
Published in Jun 2015
Publisher
ISBN-13 9781782174677
Length 316 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Toc

Table of Contents (12) Chapters Close

Preface 1. Handling Your Data FREE CHAPTER 2. Visualizing and Styling the Data 3. Presenting Data on a Print Map 4. Publishing the Map Online 5. Answering Questions with Density Analysis 6. Answering Questions with Visibility Analysis 7. Answering Questions with Suitability Analysis 8. Automating Analysis with Processing Models 9. Automating Analysis with Processing Scripts 10. Developing a Python Plugin – Select by Radius 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...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image