Book Image

QGIS 2 Cookbook

By : Alex Mandel, Víctor Olaya Ferrero, Anita Graser, Alexander Bruy
Book Image

QGIS 2 Cookbook

By: Alex Mandel, Víctor Olaya Ferrero, Anita Graser, Alexander Bruy

Overview of this book

QGIS is a user-friendly, cross-platform desktop geographic information system used to make maps and analyze spatial data. QGIS allows users to understand, question, interpret, and visualize spatial data in many ways that reveal relationships, patterns, and trends in the form of maps. This book is a collection of simple to advanced techniques that are needed in everyday geospatial work, and shows how to accomplish them with QGIS. You will begin by understanding the different types of data management techniques, as well as how data exploration works. You will then learn how to perform classic vector and raster analysis with QGIS, apart from creating time-based visualizations. Finally, you will learn how to create interactive and visually appealing maps with custom cartography. By the end of this book, you will have all the necessary knowledge to handle spatial data management, exploration, and visualization tasks in QGIS.
Table of Contents (19 chapters)
QGIS 2 Cookbook
About the Authors
About the Reviewers

Describing data sources

You can get additional information about a data file before opening it. This recipe shows you how to explore the properties of a data origin.

Getting ready

Before you start working, make sure that you have copied the sample dataset to your filesystem and that you have it located.

How to do it…

  1. In the QGIS browser, navigate to the folder with your sample dataset. Select the elev_lid792_1m file and right-click on it. In the context menu, select Properties. A dialog like the one in the following screenshot will appear:

    This dialog displays the properties of a raster layer.

  2. Now, let's select a vector layer instead. Select the elev_lid792_randpts.shp file, right-click on it, and select Properties. The information dialog will look like the following:

How it works…

In the upper part of the description window, you will see a field named Provider. Provider defines the type or data origin and who takes care of reading the data and passing it to QGIS. For raster layers, you will see gdal as Provider. For most file-based vector layers, ogr will be the provider that will appear. They refer to the GDAL and OGR libraries, two open-source libraries that are used by many GIS programs to access both raster and vector data.

There's more…

If the data is already loaded in QGIS, you can access the information about it in the Properties section of the layer (right-click on the layer name to select the Properties entry in the context menu). In the sections displayed in the left-hand side, select the Metadata section. You will see a box containing all the information corresponding to the layer data origin:

Functionality provided by the GDAL library, which (mentioned earlier) acts as a provider for raster layers, is also available in the Raster menu. This includes processing and data analysis methods, but it also includes the information tool that is used to describe a raster data source. You will find it by navigating to Raster | Miscellaneous | Info:

See also

  • This is a more complex way to retrieve properties as you can call the tool by adjusting the parameters with more details to get additional information. To know more, check the gdalinfo help page at