Book Image

Mastering QGIS - Second Edition

By : Kurt Menke, GISP, Paolo Corti, Richard Smith Jr., GISP, Luigi Pirelli, John Van Hoesen, GISP
Book Image

Mastering QGIS - Second Edition

By: Kurt Menke, GISP, Paolo Corti, Richard Smith Jr., GISP, Luigi Pirelli, John Van Hoesen, GISP

Overview of this book

QGIS is an open source solution to GIS. It is widely used by GIS professionals all over the world. It is the leading alternative to the proprietary GIS software. Although QGIS is described as intuitive, it is also by default complex. Knowing which tools to use and how to apply them is essential to producing valuable deliverables on time. Starting with a refresher on the QGIS basics, this book will take you all the way through to creating your first custom QGIS plugin. From the refresher, we will recap how to create, populate, and manage a spatial database. You’ll also walk through styling GIS data, from creating custom symbols and color ramps to using blending modes. In the next section, you will discover how to prepare vector, heat maps, and create live layer effects, labeling, and raster data for processing. You’ll also discover advanced data creation and editing techniques. The last third of the book covers the more technical aspects of QGIS such as using LAStools and GRASS GIS’s integration with the Processing Toolbox, how to automate workflows with batch processing, and how to create graphical models. Finally, you will see how to create and run Python data processing scripts and write your own QGIS plugin with pyqgis. By the end of the book, you will understand how to work with all the aspects of QGIS, and will be ready to use it for any type of GIS work.
Table of Contents (19 chapters)
Mastering QGIS - Second Edition
Credits
Foreword
About the Authors
About the Reviewer
www.PacktPub.com
Preface
Index

Tour of QGIS


QGIS is composed of two programs: QGIS Desktop and QGIS Browser. Desktop is used for managing, displaying, analyzing, and styling data. Browser is used to manage and preview data. This section will give you a brief tour of the graphical user interface components of both QGIS Desktop and QGIS Browser.

Familiarizing yourself with QGIS Desktop

The QGIS interface is divided into four interface types: Menu Bar, Toolbars, Panel, and Map Display. The following screenshot shows QGIS Desktop with all four interface types displayed:

The map display shows the styled data added to the QGIS project and, by default, takes up the majority of the space in QGIS Desktop. The menu bar, displayed across the top, provides access to most of QGIS Desktop's functionality. The toolbars provide quick access to QGIS Desktop functionality. The toolbars can be arranged to either float independently or dock at the top, bottom, left, or right sides of the application. The panels, such as Browser and Layers, provide a variety of functionality and can be arranged to either float independently or dock above, below, right, or left of the map display.

There are four toolbars that are particularly useful, and it is recommended that you enable them:

  • The File toolbar provides quick access to create, open, and save QGIS projects and create and manage print composers

  • The Manage Layers toolbar contains tools to add vectors, rasters, databases, web services, and text layers, and also create new layers

  • The Map Navigation toolbar contains tools that are useful for panning, zooming, and refreshing the map display

  • The Attributes toolbar provides access to information, selection, field calculator, measuring, bookmarking, and annotation tools

QGIS Desktop offers a number of customization options. You can toggle the visibility of toolbars by navigating to View | Toolbars, or by right-clicking on the Menu Bar or the enabled Toolbars button, which will open a context menu allowing you to toggle toolbar and panel visibility. You can assign shortcut keys to operations by navigating to Settings | Configure shortcuts. You can also change application options such as interface language and rendering options by navigating to Settings | Options.

User interface themes

A new feature of QGIS Desktop is user interface themes. These are similar to skins for the application. These can be found by clicking Settings on the Menu bar and choosing Options. On the General tab, there is an option for UI Theme. If you are doing some late-night mapping, you might experience eye fatigue from the normal bright interface. Click the dropdown arrow and choose Night Mapping. The QGIS interface will switch to a dark skin.

You can also create your own themes. Start by reviewing the QSS style file that creates the Night Mapping theme from GitHub: https://github.com/qgis/QGIS/tree/master/resources/themes. To create a new theme, modify this file and save it to your .qgis2\themes folder.

Familiarizing yourself with QGIS Browser

The QGIS Browser interface (shown in the following screenshot) is composed of three parts: Toolbar, Data Tree view, and Information Panel:

The data tree view is an expandable tree listing of all geospatial data files on your computer and through connections. The information display, which takes most of the space on the application, contains four tabs that provide different views of the selected data in the data tree listing, and they are as follows:

  • Param: This tab displays details of data that is accessed through connections, such as a database or WMS.

  • Metadata: This tab displays the metadata (if any) of the selected data.

  • Preview: This tab renders the selected data. You can zoom into the data using your mouse wheel and pan using the arrow keys on your keyboard.

  • Attributes: This tab displays the attribute table associated with the selected data. You can sort the columns by clicking on the column headings. This tab is only available for vector data.

The toolbar provides access to four functions. The Refresh function reloads the data tree view, while the Manage WMS function opens the WMS management screen allowing you to manage the WMS connections. The New Shapefile function opens the new vector layer dialog, allowing new shapefiles to be created. Finally, the Set layer CRS function allows you to define the coordinate reference system of the geospatial data file that is selected in the data tree view.