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
Mastering QGIS

You're reading from   Mastering QGIS Go beyond the basics and unleash the full power of QGIS with practical, step-by-step examples

Arrow left icon
Product type Paperback
Published in Mar 2015
Publisher
ISBN-13 9781784398682
Length 420 pages
Edition 1st Edition
Tools
Arrow right icon
Toc

Table of Contents (12) Chapters Close

Preface 1. A Refreshing Look at QGIS FREE CHAPTER 2. Creating Spatial Databases 3. Styling Raster and Vector Data 4. Preparing Vector Data for Processing 5. Preparing Raster Data for Processing 6. Advanced Data Creation and Editing 7. The Processing Toolbox 8. Automating Workflows with the Graphical Modeler 9. Creating QGIS Plugins with PyQGIS and Problem Solving 10. PyQGIS Scripting Index

Executing model algorithms iteratively


Models, like all QGIS algorithms, can be executed iteratively. Here, we will demonstrate this feature with one of the QGIS example models: DEMs_Clipped_to_Watersheds.model. We will use two inputs, a DEM covering Taos, New Mexico and a watersheds polygon layer for the area. The elevation.tif and watersheds.shp sample data will be used.

Input data: watersheds and a DEM

The model has just one algorithm. It uses the Clip grid with polygon tool to clip the DEM to watersheds. There are 21 watersheds covering this area.

If the model is run normally, it will clip the DEM to the extent of all 21 watersheds and produce one output elevation raster. However, if the Iterate over this layer button () is clicked (see the following screenshot), the model will cycle through each feature in the watershed layer and output a DEM that covers each individual watershed. This will result in 21 individual elevation rasters. This sort of automation is very easy to generate and...

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