Creating a mapbook

A mapbook is an automatically generated document, which can also be called an atlas. A mapbook takes a dataset and breaks it down into smaller, detailed maps based on a coverage layer that zooms the larger map to each feature in the coverage in order to make a page of the mapbook. The coverage layer may or may not be the same as the map layer featured on each page of the mapbook. In this recipe, we'll create a mapbook that features all the countries in the world.

Getting ready

For this recipe, you need to download the world countries dataset and put it in a directory named shapes within your qgis_data directory from https://github.com/GeospatialPython/Learn/raw/master/countries.zip.

Next, you'll need to install the PyPDF2 library. ...

Get QGIS Python Programming Cookbook - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.