Book Image

Learning QGIS - Third Edition

By : Anita Graser
Book Image

Learning QGIS - Third Edition

By: Anita Graser

Overview of this book

QGIS is a user-friendly open source geographic information system (GIS) that runs on Linux, Unix, Mac OS X, and Windows. The popularity of open source geographic information systems and QGIS in particular has been growing rapidly over the last few years. Learning QGIS Third Edition is a practical, hands-on guide updated for QGIS 2.14 that provides you with clear, step-by-step exercises to help you apply your GIS knowledge to QGIS. Through clear, practical exercises, this book will introduce you to working with QGIS quickly and painlessly. This book takes you from installing and configuring QGIS to handling spatial data to creating great maps. You will learn how to load and visualize existing spatial data and create data from scratch. You will get to know important plugins, perform common geoprocessing and spatial analysis tasks and automate them with Processing. We will cover how to achieve great cartographic output and print maps. Finally, you will learn how to extend QGIS using Python and even create your own plugin.
Table of Contents (13 chapters)
Learning QGIS Third Edition
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

Adding functionality using actions


Actions are a convenient way of adding custom functionality to QGIS. Actions are created for specific layers, for example, our populated places dataset, popp.shp. Therefore, to create actions, we go to Layer Properties | Actions. There are different types of actions, such as the following:

  • Generic actions start external processes; for example, you run command-line applications such as ogr2ogr

    Note

    ogr2ogr is a command-line tool that can be used to convert file formats and, at the same time, perform operations such as spatial or attribute selections and reprojecting.

  • Python actions execute Python scripts

  • Open actions open a file using your computer's configured default application, that is, your PDF viewing application for .pdf files or your browser for websites

  • Operating system (Mac, Windows, and Unix) actions work like generic actions but are restricted to the respective operating system

Configuring your first Python action

Click on the Add default actions...