Table Of ContentPractical GIS
(cid:54)(cid:84)(cid:70)(cid:2)(cid:85)(cid:80)(cid:80)(cid:77)(cid:84)(cid:2)(cid:84)(cid:86)(cid:68)(cid:73)(cid:2)(cid:66)(cid:84)(cid:2)(cid:50)(cid:40)(cid:42)(cid:52)(cid:14)(cid:2)(cid:49)(cid:80)(cid:84)(cid:85)(cid:40)(cid:42)(cid:52)(cid:14)(cid:2)(cid:66)(cid:79)(cid:69)(cid:2)(cid:40)(cid:70)(cid:80)(cid:52)(cid:70)(cid:83)(cid:87)(cid:70)(cid:83)(cid:2)(cid:85)(cid:80)(cid:2)(cid:67)(cid:86)(cid:74)(cid:77)(cid:69)
(cid:81)(cid:80)(cid:88)(cid:70)(cid:83)(cid:71)(cid:86)(cid:77)(cid:2)(cid:40)(cid:42)(cid:52)(cid:2)(cid:84)(cid:80)(cid:77)(cid:86)(cid:85)(cid:74)(cid:80)(cid:79)(cid:84)
Gábor Farkas
BIRMINGHAM - MUMBAI
Practical GIS
Copyright © 2017 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 author, 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: June 2017
Production reference: 1080617
(cid:49)(cid:86)(cid:67)(cid:77)(cid:74)(cid:84)(cid:73)(cid:70)(cid:69)(cid:2)(cid:67)(cid:90)(cid:2)(cid:49)(cid:66)(cid:68)(cid:76)(cid:85)(cid:2)(cid:49)(cid:86)(cid:67)(cid:77)(cid:74)(cid:84)(cid:73)(cid:74)(cid:79)(cid:72)(cid:2)(cid:45)(cid:85)(cid:69)(cid:16)
(cid:45)(cid:74)(cid:87)(cid:70)(cid:83)(cid:90)(cid:2)(cid:49)(cid:77)(cid:66)(cid:68)(cid:70)
(cid:21)(cid:23)(cid:2)(cid:45)(cid:74)(cid:87)(cid:70)(cid:83)(cid:90)(cid:2)(cid:52)(cid:85)(cid:83)(cid:70)(cid:70)(cid:85)
(cid:35)(cid:74)(cid:83)(cid:78)(cid:74)(cid:79)(cid:72)(cid:73)(cid:66)(cid:78)(cid:2)
(cid:35)(cid:21)(cid:2)(cid:20)(cid:49)(cid:35)(cid:14)(cid:2)(cid:54)(cid:44)(cid:16)
ISBN 978-1-78712-332-8
(cid:88)(cid:88)(cid:88)(cid:16)(cid:81)(cid:66)(cid:68)(cid:76)(cid:85)(cid:81)(cid:86)(cid:67)(cid:16)(cid:68)(cid:80)(cid:78)
Credits
Author Copy Editor
Gábor Farkas Sonia Mathur
Reviewers Project Coordinator
Mark Lewin Prajakta Naik
David Bianco
Commissioning Editor Proofreader
Aaron Lazar Safis Editing
Acquisition Editor Indexer
Angad Singh Mariammal Chettiyar
Content Development Editor Graphics
Lawrence Veigas Abhinash Sahu
Technical Editor Production Coordinator
Abhishek Sharma Shantanu Zagade
About the Author
Gábor Farkas is a PhD student in the University of Pécs's Institute of Geography. He holds
a master's degree in geography, although he moved from traditional geography to pure
geoinformatics in his early studies. He often studies geoinformatical solutions in his free
time, keeps up with the latest trends, and is an open source enthusiast. He loves to work
with GRASS GIS, PostGIS, and QGIS, but his all time favorite is Web GIS, which mostly
covers his main research interest.
About the Reviewer
Mark Lewin has been developing, teaching, and writing about software for over 16 years.
His main interest is GIS and web mapping. Working for ESRI, the world's largest GIS
company, he acted as a consultant, trainer, course author, and a frequent speaker at
industry events. He has subsequently expanded his knowledge to include a wide variety of
open source mapping technologies and a handful of relevant JavaScript frameworks
including Node.js, Dojo, and JQuery.
Mark now works for Oracle’s MySQL curriculum team, focusing on creating great learning
experiences for DBAs and developers, but remains crazy about web mapping.
He is the author of books such as Leaflet.js Succinctly, Go Succinctly, and Go Web Development
Succinctly for Syncfusion. He is also the co-author of the forthcoming second edition of
Building Web and Mobile ArcGIS Server Applications with JavaScript, which is to be published
by Packt.
I would like to thank the production team at Packt for keeping me on schedule, and also
my wonderful children who have seen less of me during the process than they would have
done otherwise!
www.PacktPub.com
For support files and downloads related to your book, please visit (cid:88)(cid:88)(cid:88)(cid:16)(cid:49)(cid:66)(cid:68)(cid:76)(cid:85)(cid:49)(cid:86)(cid:67)(cid:16)(cid:68)(cid:80)(cid:78).
Did you know that Packt offers eBook versions of every book published, with PDF and
ePub files available? You can upgrade to the eBook version at (cid:88)(cid:88)(cid:88)(cid:16)(cid:49)(cid:66)(cid:68)(cid:76)(cid:85)(cid:49)(cid:86)(cid:67)(cid:16)(cid:68)(cid:80)(cid:78) and as a
print book customer, you are entitled to a discount on the eBook copy. Get in touch with us
at (cid:84)(cid:70)(cid:83)(cid:87)(cid:74)(cid:68)(cid:70)(cid:33)(cid:81)(cid:66)(cid:68)(cid:76)(cid:85)(cid:81)(cid:86)(cid:67)(cid:16)(cid:68)(cid:80)(cid:78) for more details.
At (cid:88)(cid:88)(cid:88)(cid:16)(cid:49)(cid:66)(cid:68)(cid:76)(cid:85)(cid:49)(cid:86)(cid:67)(cid:16)(cid:68)(cid:80)(cid:78), you can also read a collection of free technical articles, sign up for a
range of free newsletters and receive exclusive discounts and offers on Packt books and
eBooks.
(cid:73)(cid:85)(cid:85)(cid:81)(cid:84)(cid:28)(cid:17)(cid:17)(cid:88)(cid:88)(cid:88)(cid:16)(cid:81)(cid:66)(cid:68)(cid:76)(cid:85)(cid:81)(cid:86)(cid:67)(cid:16)(cid:68)(cid:80)(cid:78)(cid:17)(cid:78)(cid:66)(cid:81)(cid:85)
(cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2)
Get the most in-demand software skills with Mapt. Mapt gives you full access to all Packt
books and video courses, as well as industry-leading tools to help you plan your personal
development and advance your career.
Why subscribe?
Fully searchable across every book published by Packt
Copy and paste, print, and bookmark content
On demand and accessible via a web browser
Customer Feedback
Thanks for purchasing this Packt book. At Packt, quality is at the heart of our editorial
process. To help us improve, please leave us an honest review on this book's Amazon page
at (cid:73)(cid:85)(cid:85)(cid:81)(cid:84)(cid:28)(cid:17)(cid:17)(cid:88)(cid:88)(cid:88)(cid:16)(cid:66)(cid:78)(cid:66)(cid:91)(cid:80)(cid:79)(cid:16)(cid:68)(cid:80)(cid:78)(cid:17)(cid:69)(cid:81)(cid:17)(cid:19)(cid:25)(cid:26)(cid:25)(cid:19)(cid:20)(cid:21)(cid:21)(cid:20)(cid:22).
(cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2) (cid:2)
If you'd like to join our team of regular reviewers, you can e-mail us at
(cid:68)(cid:86)(cid:84)(cid:85)(cid:80)(cid:78)(cid:70)(cid:83)(cid:83)(cid:70)(cid:87)(cid:74)(cid:70)(cid:88)(cid:84)(cid:33)(cid:81)(cid:66)(cid:68)(cid:76)(cid:85)(cid:81)(cid:86)(cid:67)(cid:16)(cid:68)(cid:80)(cid:78). We award our regular reviewers with free eBooks and
videos in exchange for their valuable feedback. Help us be relentless in improving our
products!
I'm dedicating this book to every open source contributor, researcher, and teacher using
and promoting open source technologies. It is your mentality, curiosity, and willingness to
put aside proprietary solutions, which makes knowledge and technology more accessible. It
is your work that really makes a difference, by letting everyone eager to learn and willing
to look under the hood develop themselves.
Table of Contents
Preface
1
Chapter 1: Setting Up Your Environment
7
Understanding GIS 7
Setting up the tools 8
Installing on Linux 9
Installing on Windows 12
Installing on macOS 13
Getting familiar with the software 14
About the software licenses 18
Collecting some data 19
Getting basic data 20
Licenses 22
Accessing satellite data 22
Active remote sensing 23
Passive remote sensing 24
Licenses 27
Using OpenStreetMap 27
OpenStreetMap license 28
Summary 29
Chapter 2: Accessing GIS Data With QGIS
30
Accessing raster data 30
Raster data model 33
Rasters are boring 35
Accessing vector data 37
Vector data model 39
Vector topology - the right way 41
Opening tabular layers 44
Understanding map scales 46
Summary 48
Chapter 3: Using Vector Data Effectively
49
Using the attribute table 49
SQL in GIS 50
Selecting features in QGIS 50
Preparing our data 52