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)

Labeling


We can activate labeling by going to Layer Properties | Labels, checking Label this layer with, and selecting the attribute field that we want to use for the labels. This is all we need to do to display labels with default settings. While default labels are great for a quick preview, we usually want to customize the labels if we create visualizations for reports or stand-alone maps.

Using Expressions (the button that is right beside the attribute drop-down list), we can format the label text to suit our needs. For example, the NAME field in our sample airports.shp file contains text in uppercase. To display the airport names in mixed case instead, we can set the expression title(NAME), which will reformat the name text in title case. We can also use multiple fields to create the label, for example, combining name and elevation in brackets using the concatenation operator || as follows:

title(NAME) || ' (' || "ELEV" || ')'

Note the use of simple quotation marks around text such as...