O'Reilly logo

QGIS Python Programming Cookbook by Joel Lawhead

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating tiles from a QGIS map

This recipe creates a set of Internet web map tiles from your QGIS map. What's interesting about this recipe is that once the static map tiles are generated, you can serve them up locally or from any web-accessible directory using the client-side browser's JavaScript without the need of a map server, or you can serve them (for example, distribute them on a portable USB drive).

Getting ready

You will need to download the zipped shapefile from https://geospatialpython.googlecode.com/svn/countries.zip.

Unzip the shapefile to a directory named shapes in your qgis_data directory. Next, create a directory called tilecache in your qgis_data directory. You will also need to install the QTiles plugin using the QGIS Plugin Manager ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required