Book Image

Learning QGIS 2.0

By : Anita Graser
Book Image

Learning QGIS 2.0

By: Anita Graser

Overview of this book

QGIS is a user friendly open source geographic information system (GIS) that runs on Linux, Unix, Mac OSX, and Windows. The popularity of open source geographic information systems and QGIS in particular has been growing rapidly over the last few years. More and more companies and institutions are adopting QGIS and even switching to QGIS as their main GIS. Learning QGIS 2.0 is a practical, hands-on guide that provides you with clear, step-by-step exercises that will help you to apply your GIS knowledge to QGIS. Containing a number of clear, practical exercises, this book will introduce you to working with QGIS, quickly and painlessly. If you want to take advantage of the wide range of functionalities that QGIS offers, then this is the book for you. This book takes you from installing and configuring QGIS, through handling spatial data to creating great maps. You will learn how to load and visualize existing spatial data and how to create data from scratch. You will perform common geoprocessing and spatial analysis tasks and automate them. We will cover how to achieve great cartographic output and print maps. You will learn everything you need to know to handle spatial data management, processing, and visualization tasks in QGIS.
Table of Contents (12 chapters)

Clipping rasters


A common task in raster processing is clipping a raster with a polygon. This task is well covered by the Clipper tool located in Raster | Extraction | Clipper. This tool supports clipping to a specified extent or clipping using a polygon mask layer, as follows:

  • The extent can be set manually or by selecting it in the map. To do that, we just drag open a rectangle in the map area of the main QGIS window.

  • A mask layer can be any polygon layer that is currently loaded in the project or any other polygon layer, which can be specified using Select….

    Tip

    If we only want to clip a raster to a certain extent (the current map view extent or any other), we can also use the raster Save as ..., as shown in Chapter 3, Data Creation and Editing.

For a quick exercise, we will clip the hillshade raster using the Alaska Shapefile (both from our sample data) as a mask layer. At the bottom of the window, we can see the concrete gdalwarp command that QGIS uses to clip the raster. This is very useful...