Table Of ContentMastering QGIS
Second Edition
Go beyond the basics and unleash the full power of
QGIS with practical, step-by-step examples
Kurt Menke, GISP
Dr. Richard Smith Jr., GISP
Dr. Luigi Pirelli
Dr. John Van Hoesen, GISP
BIRMINGHAM - MUMBAI
Mastering QGIS
Second Edition
Copyright © 2016 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval
system, or transmitted in any form or by any means, without the prior written
permission of the publisher, except in the case of brief quotations embedded in
critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy
of the information presented. However, the information contained in this book is
sold without warranty, either express or implied. Neither the authors, nor Packt
Publishing, and its dealers and distributors will be held liable for any damages
caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the
companies and products mentioned in this book by the appropriate use of capitals.
However, Packt Publishing cannot guarantee the accuracy of this information.
First published: March 2015
Second edition: September 2016
Production reference: 1270916
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78646-037-0
www.packtpub.com
Credits
Authors Project Coordinator
Kurt Menke, GISP Nidhi Joshi
Dr. Richard Smith Jr., GISP
Dr. Luigi Pirelli Proofreader
Safis Editing
Dr. John Van Hoesen, GISP
Indexer
Reviewer
Mariammal Chettiyar
Paolo Corti
Graphics
Commissioning Editor
Disha Haria
Veena Pagare
Production Coordinator
Acquisition Editor
Nilesh Mohite
Vinay Argekar
Cover Work
Content Development Editor
Nilesh Mohite
Aishwarya Pandere
Technical Editor
Suwarna Patil
Copy Editors
Vikrant Phadke
Safis Editing
Foreword
Since the QGIS project was started in 2002 by Gary Sherman, the project has
done what many people would have thought to be impossible—provide a viable
alternative to the incumbent de facto GIS applications that is free, open source,
and accessible to everyone on this planet who owns a computer. One of the joys of
contributing to and participating in the QGIS project has been watching how the
community of people and the body of knowledge have grown up around the project.
There are few better examples of this than the work Kurt, Rick, John, and Luigi (the
four co-authors of this book) have put into Mastering QGIS.
Writing a book about QGIS is no easy task, partly because of the sheer depth of
functionality that QGIS offers, and partly because of the fact that QGIS is rapidly
evolving. In creating this second edition of Mastering QGIS, the authors have added
some great new content to cover some of the important new functionality that has
been added to QGIS. They have also revised the existing content to ensure thay
everything is still fresh and relevant to QGIS 2.14.
Having such an in-depth book about QGIS really lowers the barrier of entry to
learning, and mastering, QGIS. I am looking forward to the day when GIS is used
as commonly and routinely as a spreadsheet or a word processor. Being able to
visualize and analyze the world around us is the most basic necessity if we are to
promote good stewardship of the earth, responsible decision making, and humane
and equitable conditions for the people that inhabit the earth. QGIS is a key element
in this equation—being free and open source software really does make QGIS
something that can be used by anyone on this planet who has access to a computer.
Mastering QGIS provides a fantastic resource for those who wish to take full
advantage of the opportunity offered by QGIS by having someone to guide them in
their learning endeavors.
As you delve deeper into the world of QGIS and all the great things that the authors
have to show you, take a moment to join our community (http://qgis.org), or
start your own local community in your country. We welcome your participation
and contribution of ideas, bug reports, code, and documentation, and we welcome
you to the diverse and ever-growing group of people all around the world who are
using QGIS to make the world a better place!
Happy QGISing!
Tim Sutton,
QGIS Project Chairman
About the Authors
A former archaeologist, Kurt Menke, GISP is based out of Albuquerque,
New Mexico, USA. He received a master's degree in geography from the
University of New Mexico in 2000. That same year, he founded Bird's Eye View
(http://www.BirdsEyeViewGIS.com) to apply his expertise with GIS technology
towards ecological conservation. Along with conservation, his other focus areas are
public health and education.
He is an avid open source GIS proponent since he began writing MapServer
applications in 2002. He has used QGIS since 2007. Recently he also authored
Discover QGIS for Locate Press. In 2015, Kurt was honored to be voted in as an
OsGeo Charter Member. He is an experienced FOSS4G educator and a co-author of
the GeoAcademy. In 2015 he was awarded the Global Educator of the Year Team
Award by GeoForAll as part of the GeoAcademy team. Kurt authors an award
winning blog on FOSS4G technologies and their use in community health mapping
(http://communityhealthmaps.nlm.nih.gov/).
Special thanks go to the QGIS development team and the QGIS
community for their continued dedication and work that makes
QGIS what it is. I would like to thank all my co-authors for being
such a joy to work with. I'd also like to acknowledge Karl Benedict
for originally introducing me to the world of FOSS4G and Jeffery
Cavner for his ongoing camaraderie. Finally I'd like to thank my
beautiful wife, Sarah, for her steady support and encouragement.
Dr. Richard Smith Jr., GISP is an assistant professor of geographic information
science in the School of Engineering and Computing Sciences at Texas A&M
University – Corpus Christi. He has a PhD in geography from the University
of Georgia and holds a master of science in computer science and a bachelor of
science in geographic information science from Texas A&M University – Corpus
Christi. Richard actively researches in cartography, systems integration, and the
use of geospatial technology for disaster response. He is an advocate for FOSS4G
and building FOSS4G curriculum. He is also one of the co-authors of the FOSS4G
Academy (http://foss4geo.org).
He has collaborated with other writers in his field, but Mastering QGIS is his first
book effort.
I would like to thank my wife and daughter for putting up with my
late-night and weekend writing sessions. I would also like to thank
my co-author Kurt Menke for being patient with my edits.
Outside those directly involved or affected by the writing of the
book, I'd like to thank my academic and life mentors Dr. Stacey Lyle,
Dr. Thomas Hodler, Dr. Gary Jeffress, and Dr. Robin Murphy for
providing support and well-wishes as I work through the beginnings
of my career. In addition to teaching me more than you know, you
have inspired me to have the confidence to teach and write. To those
of you reading this, I hope I do my mentors justice by providing a
clear and useful text to assist you in Mastering QGIS.
Dr. Luigi Pirelli is a freelance software analyst and developer with a degree with
honors in computer science at Bari University.
He worked for 15 years in the Satellite Ground Segment and Direct Ingestion for
the European Space Agency. Since 2006, he has been involved in the GFOSS world,
contributing in QGIS, GRASS, and Mapserver core, and developing and maintaining
many QGIS plugins. He actively participates in QGIS Hackmeetings.
Luigi is the founder of the OSGEO Italian local GFOSS chapter. Now, he lives in
Spain contributing to this GFOSS community. During the last few years, he started
teaching PyQGIS, organizing training from basic to advanced level, and supporting
companies to develop their specific QGIS plugins.
He is also the founder the local hackerspace group Bricolabs.cc, focused on open
hardware. He likes cycling, repairing everything, and training groups on conflict
resolution. Other than this book, he has also contributed to the Lonely Planet guide
Cycling Italy.
A special thanks to the QGIS developer community and core
developers because the project is managed in a really open way,
allowing contribution from everyone.
I want to thank everyone I worked with. From every one of them
I learned, and without them, I wouldn't be here making my
contributions to free software and this book.
Special thanks to my friends and neighbors who helped me with my
son during writing this pages.
I would like to dedicate this book to my partner and especially to
my son for the patience he had seeing me hours sitting in front of a
computer without playing with him.
Dr. John Van Hoesen, GISP is an associate professor of geology and
environmental studies at Green Mountain College in rural west-central Vermont, USA.
He earned an MS and a PhD in geology from the University of Nevada, Las Vegas, in
2000 and 2003. He is a certified GIS Professional (GISP) with a broad background in
the geosciences and has used some flavor of GIS to evaluate and explore geological
processes and environmental issues since 1997. John has used and taught some
variants of FOSS GIS since 2003 and over the last three years has taught graduate,
undergraduate, and continuing education courses using only FOSS GIS software.