Book Image

QGIS By Example

By : Alexander Bruy, Daria Svidzinska
Book Image

QGIS By Example

By: Alexander Bruy, Daria Svidzinska

Overview of this book

Table of Contents (17 chapters)
QGIS By Example
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Preface

Welcome to QGIS By Example. This book will help you understand the capabilities of QGIS, show you how to work with spatial data and perform the most common analyses, and bring your productivity to a new level with the Processing framework.

QGIS is a very popular and user-friendly open source desktop GIS. It provides many useful capabilities and features and their number is continuously growing. It supports a wide range of raster and vector formats, as well as databases and OGC services. It also integrates seamlessly with other FOSSGIS applications. More and more users all over the world choose QGIS as their primary GIS software.

The book will introduce QGIS 2.8.x, and show you how to properly prepare your data for comfortable work, design beautiful maps, and share them with others. It will also show you how to perform different types of analysis and interpret their results. In the final chapters, you will learn how to become more productive by automating repetitive tasks with the QGIS Processing framework, and how to extend the QGIS functionality by developing a Python plugin.

What this book covers

Chapter 1, Handling Your Data, covers the installation of QGIS, introduces its user interface, and shows you how to customize it. In this chapter, you also get to know how to load data from different sources and assemble it in a spatial database.

Chapter 2, Visualizing and Styling the Data, covers the styling of vector and raster data for displaying. Starting from the basic styling options, we go to the more advanced topics, including rule-based rendering and labeling.

Chapter 3, Presenting Data on a Print Map, shows the QGIS functionality that helps us design beautiful and easy-to-read print maps. You get to know about the print composer and learn how to use its capabilities to create great maps and map books (also known as atlases).

Chapter 4, Publishing the Map Online, explains the preparation of the QGIS project for publishing on the cloud service. This includes creating an account in the QGIS Cloud service, adjusting the project settings, uploading data, and publishing the project.

Chapter 5, Answering Questions with Density Analysis, covers techniques useful when working with large and dense point datasets. In this chapter, you learn how to create raster heat maps from point data, and how to use them to detect the hottest regions and examine spatial distribution patterns. You also get to know another technique called binning, which is an alternative approach to heat maps.

Chapter 6, Answering Questions with Visibility Analysis, demonstrates the techniques and tools used for visibility analysis. You get to know which data is necessary for visibility analysis and how to prepare it to get precise and meaningful results. You also learn how to compute viewsheds and present final results in 3D format.

Chapter 7, Answering Questions with Suitability Analysis, covers approaches and techniques used in suitability analysis. We start by interpreting spatial relationships between different objects, and you learn how to express them in the GIS language. Then you get to know how to perform suitability analysis using raster data. Finally, you learn how to interpret the results of the analysis.

Chapter 8, Automating Analysis with Processing Models, teaches you the functionality of the Processing Graphical Modeler. We start with a general overview of the Graphical Modeler. Then we go through the process of model creation, from the very beginning to the final result—a ready-to-use model.

Chapter 9, Automating Analysis with Processing Scripts, covers scripting with the QGIS Processing framework. We start from basic topics, such as using existing Processing algorithms from the QGIS Python Console. Then we see how to create our own Processing scripts with the required functionality.

Chapter 10, Developing a Python Plugin – Select by Radius, contains the topics required to develop your own Python plugin for QGIS. We start with the basic plugin template, then extend it, and finally explain how to design a plugin GUI with Qt Designer. Also, you get to know how to prepare your plugin for publishing.

What you need for this book

You will need the following software to follow all the examples in this book:

  • QGIS 2.8.0 or any later version

  • Python 2.7.6 (usually installed with QGIS under Windows or the version available in your system under Unix-like OS)

  • Qt and PyQt developer tools

  • All of this software can be freely downloaded and works under Linux, Mac OS X, and Windows

Who this book is for

If you are either a beginner or an intermediate GIS user, this book is for you. It is ideal for practitioners, data analysts, and application developers who have very little or no familiarity with geospatial data and software. It will open the doors to the wonderful world of QGIS and teach you how to solve the most common GIS tasks with QGIS.

Conventions

In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "We can include other contexts through the use of the include directive."

A block of code is set as follows:

( 1) SOURCES = __init__.py \
( 2)           selectradius_plugin.py \
( 3)           gui/selectradiusdialog.py \
( 4)           gui/aboutdialog.py \
( 5)

Any command-line input or output is written as follows:

Calculator------------------------------------------->modelertools:calculator
Raster layer bounds---------------------------------->modelertools:rasterlayerbounds
Vector layer bounds---------------------------------->modelertools:vectorlayerbounds

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "Clicking on the Next button moves you to the next screen."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.

To send us general feedback, simply e-mail , and mention the book's title in the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files from your account at http://www.packtpub.com for all the Packt Publishing books you have purchased. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Downloading the color images of this book

We also provide you with a PDF file that has color images of the screenshots/diagrams used in this book. The color images will help you better understand the changes in the output. You can download this file from https://www.packtpub.com/sites/default/files/downloads/4677OS_ColoredImages.pdf.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at , and we will do our best to address the problem.