Creating raster footprints
A common way to catalog the raster datasets that consist of a large number of files is by creating a vector dataset with polygon footprints of the extent of each raster file. The vector footprint files can be easily loaded in QGIS or served over the Web. This recipe demonstrates a method to create a footprint vector from a directory full of raster files. We will build this program as a Processing Toolbox script, which is easier to build than a QGIS plugin and provides both a GUI and a clean programming API.
Getting ready
Download the sample raster image scenes from https://github.com/GeospatialPython/Learn/raw/master/scenes.zip. Unzip the scenes
directory into a directory named rasters
in your qgis_data
directory.
For this recipe, we will create a new Processing Toolbox script using the following steps:
- In the QGIS Processing Toolbox, expand the Scripts tree menu.
- Next, expand the Tools tree menu.
- Finally, double-click on the Create new script item to bring up the processing...