Have a personal or library account? Click to login
QGIS Python Programming Cookbook, Second Edition Cover

QGIS Python Programming Cookbook, Second Edition

Automating geospatial development

Paid access
|Sep 2025
Product purchase options

Master over 170 recipes that will help you turn QGIS from a desktop GIS tool into a powerful automated geospatial framework

Key Features

  • Delve into the undocumented features of the QGIS API
  • Get a set of user-friendly recipes that can automate entire geospatial workflows by connecting Python GIS building blocks into comprehensive processes
  • This book has a complete code upgrade to QGIS 2.18 and 30 new, valuable recipes

Book Description

QGIS is a desktop geographic information system that facilitates data viewing, editing, and analysis. Paired with the most efficient scripting language—Python, we can write effective scripts that extend the core functionality of QGIS.
Based on version QGIS 2.18, this book will teach you how to write Python code that works with spatial data to automate geoprocessing tasks in QGIS. It will cover topics such as querying and editing vector data and using raster data. You will also learn to create, edit, and optimize a vector layer for faster queries, reproject a vector layer, reduce the number of vertices in a vector layer without losing critical data, and convert a raster to a vector. Following this, you will work through recipes that will help you compose static maps, create heavily customized maps, and add specialized labels and annotations. As well as this, we’ll also share a few tips and tricks based on different aspects of QGIS.

What you will learn

  • Use Python and QGIS to produce captivating GIS visualizations and build complex map layouts
  • Find out how to effectively use the poorly-documented and undocumented features of the QGIS Python API
  • Automate entire geospatial workflows by connecting Python GIS building blocks into comprehensive processes
  • Create, import, and edit geospatial data on disk or in-memory
  • Change QGIS settings programmatically to control default behavior
  • Automatically generate PDF map books
  • Build dynamic forms for field input

Who this book is for

This book is for geospatial analysts who want to learn more about automating everyday GIS tasks as well as programmers responsible for building GIS applications. The short, reusable recipes make concepts easy to understand and combine so you can build larger applications that are easy to maintain.

Table of Contents

  1. AUTOMATING QGIS
  2. QUERYING VECTOR DATA
  3. EDITING VECTOR DATA
  4. USING RASTER DATA
  5. CREATING DYNAMIC MAPS
  6. COMPOSING STATIC MAPS
  7. INTERACTING WITH THE USER
  8. QGIS WORKFLOWS
  9. OTHER TIPS AND TRICKS
https://github.com/packtpublishing/qgis-python-programming-cookbook-second-edition
PDF ISBN: 978-1-78712-110-2
Publisher: Packt Publishing Limited
Copyright owner: © 2017 Packt Publishing Limited
Publication date: 2025
Language: English
Pages: 464