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)

Converting between rasters and vectors


Tools for converting between raster and vector formats are available in Raster | Conversion and are called Rasterize and Polygonize. Like the raster clipper tool we used before, this tool is also based on GDAL and displays the command at the bottom of the dialog.

Polygonize converts a raster into a polygon layer; depending on the size of the raster, the conversion can take some time. When the process is finished, QGIS will notify us with a pop up. For a quick test, we can, for example, convert the reclassified landcover raster to polygons. The resulting vector polygon layer contains multiple polygon features with a single attribute we called lc, which depends on the original raster value, as shown in the following screenshot:

The Rasterize tool is very similar to the Polygonize tool. The only difference is that we get to specify the size of the resulting raster in pixels/cells. We can also specify the attribute field, which will provide input for the...