Adding a world file to a map image
Exporting a map as an image removes all of its spatial information. However, you can create an external text file, called a world file, which provides the georeferencing information for the raster image so that it can be used by GIS software, including QGIS, as a raster layer. In this recipe, we'll export a map composition as an image and create a world file along with it.
Getting ready
You will need to download the zipped shapefile from https://github.com/GeospatialPython/Learn/raw/master/MapComposer.py.
This file must be accessible from the QGIS Python console; for this, you need to ensure that it is in the Python...