Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
QGIS By Example
QGIS By Example

QGIS By Example: Leverage the power of QGIS in real-world applications to become a powerful user in cartography and GIS analysis

eBook
€20.98 €29.99
Paperback
€36.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with Print?

Product feature icon Instant access to your digital copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Redeem a companion digital copy on all Print orders
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Table of content icon View table of contents Preview book icon Preview Book

QGIS By Example

Chapter 2. Visualizing and Styling the Data

Collecting and organizing data from different sources is only half of the story. The next step is to present it on a map, accurately disclosing thematic content and features. For this purpose, various techniques of visual design, or styling layers based on their attributes, are used in GIS. QGIS has incredibly broad and flexible capabilities of cartographic visualization and data styling.

In this chapter, we will go through the following topics and skills:

  • Good practices with respect to data organization within a single working document (project)
  • Visual representation of data, revealing its thematic and spatial features
  • Layer labeling, which is done to enhance data readability
  • Control over styles
  • Base maps used to provide spatial context and a background for your data

The main result of this chapter will be a project, designed according to the basic requirements of cartographic visualization.

Loading layers from the spatial database

Throughout this chapter, we will use the database that we created earlier. As you remember, this is a SpatiaLite file database. In order to work with it, we must first establish a connection and then load the data. As always, there are a few alternative ways of doing this in QGIS:

  • From the menu, go to Layer | Add Layer | Add SpatiaLite Layer
  • Click on Loading layers from the spatial database, the Add SpatiaLite Layer button, in the Manage Layers toolbar
  • Use the Ctrl + Shift + L keyboard shortcut

In the opened window, define the database you want to connect to by following these steps:

  1. If you have created the database as was described in the previous chapter, you are likely to notice that it has already been connected. If it is not, then click on the New button and navigate to the .sqlite file you want to work with.
  2. After the database file is selected, click on the Connect button to see the list of available layers. You will see the layers' names and geometry types.
  3. Select the necessary...

Grouping and reordering layers

By default, layers are loaded in alphabetical order (reversely if you add them from the browser panel). Each new layer is laid on top of the previous layer and covers it. By default, all layers are turned on, styled with simple uniform symbols, and randomly assigned colors. The order of layers can be changed by simply dragging and dropping them up and down the legend. Also, it is strongly advisable to order and arrange layers in some logical groups, as it simplifies the navigation and understanding of data.

To manage and rearrange layers and maintain their visibility, use the Layer toolbar in the Layers panel, which is shown in the following screenshot and contains the buttons described afterwards (in the order of appearance from left to right):

Grouping and reordering layers
  • Add Group: This creates an empty layers group.
  • Manage Layer Visibility: This allows us to quickly show and hide layers and also customize their visibility with predefined layer combinations—so-called presets.
  • Filter...

Developing your own styles

In QGIS, a style is a way of cartographic visualization that takes into account a layer's individual and thematic features. It encompasses basic characteristics of symbology, such as the color and presence of fill, outline parameters, the use of markers, scale-dependent rendering, layer transparency, interactions with other layers, and labels.

A well-chosen style greatly simplifies data perception and readability, so it is important to learn how to work with styles in order to be capable of representing your data in the best way. In this section, we will discuss vector and raster layers separately, as their stylization has some unique features.

Developing styles for vector layers

The Style menu from the Layer Properties dialog provides you with all the necessary tools to symbolize and style your data. To open it, double-click on a layer name in the Layers panel, or use the Properties right-click contextual shortcut, and select the Style section. You will see...

Adding labels

Labeling is an important part of cartographic visualization. It significantly enhances data readability and understanding. Note that labeling is applicable only for vector layers because they contain landmarks and attributes (usually names) to be shown on the map. You can reach the Labels section from the Layer Properties dialog or by going to Layer | Labeling menu. Also, there is a Label toolbar that you can turn on or off by right-clicking on the toolbars panel contextual menu and use for fast access to the labeling options.

If you want to add labels to your layer quickly, just turn on the Label this layer with option, select the attribute field to be used for labeling from the drop-down list beside it, and click on OK. Labels will be added immediately to the layer. While this works well for personal and temporary use, there are many more labeling options available for the following label properties:

  • Text: This defines the main properties of the text style, such as Font, Size...

Managing styles

As you can see from the previous section, developing styles is a time-consuming task. But the good thing is that once developed, styles are not lost. They can be saved, applied to other layers, and imported from and exported to external sources.

The main style management options are available from the Style button at the bottom row of the Style section under Properties as shown. The menu is divided into sections separated by horizontal lines. The first section is responsible for loading and saving styles. The second and third are for managing multiple styles for the layer, and at the bottom is the toggle for activating different styles (inactive and grayed out by default, when there's only one style available).

Managing styles

Tip

You can get access to some of these options by right-clicking on the layer's Styles contextual shortcut. For example, you can copy and paste a style from one layer to another, add a new style, or rename an existing style. Also, this is very convenient for...

Loading layers from the spatial database


Throughout this chapter, we will use the database that we created earlier. As you remember, this is a SpatiaLite file database. In order to work with it, we must first establish a connection and then load the data. As always, there are a few alternative ways of doing this in QGIS:

  • From the menu, go to Layer | Add Layer | Add SpatiaLite Layer

  • Click on , the Add SpatiaLite Layer button, in the Manage Layers toolbar
  • Use the Ctrl + Shift + L keyboard shortcut

In the opened window, define the database you want to connect to by following these steps:

  1. If you have created the database as was described in the previous chapter, you are likely to notice that it has already been connected. If it is not, then click on the New button and navigate to the .sqlite file you want to work with.

  2. After the database file is selected, click on the Connect button to see the list of available layers. You will see the layers' names and geometry types.

  3. Select the necessary layer...

Grouping and reordering layers


By default, layers are loaded in alphabetical order (reversely if you add them from the browser panel). Each new layer is laid on top of the previous layer and covers it. By default, all layers are turned on, styled with simple uniform symbols, and randomly assigned colors. The order of layers can be changed by simply dragging and dropping them up and down the legend. Also, it is strongly advisable to order and arrange layers in some logical groups, as it simplifies the navigation and understanding of data.

To manage and rearrange layers and maintain their visibility, use the Layer toolbar in the Layers panel, which is shown in the following screenshot and contains the buttons described afterwards (in the order of appearance from left to right):

  • Add Group: This creates an empty layers group.

  • Manage Layer Visibility: This allows us to quickly show and hide layers and also customize their visibility with predefined layer combinations—so-called presets.

  • Filter Legend...

Left arrow icon Right arrow icon

Description

If you are 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.

Who is this book for?

If you are 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.
Estimated delivery fee Deliver to Hungary

Premium delivery 7 - 10 business days

€25.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Jun 29, 2015
Length: 316 pages
Edition : 1st
Language : English
ISBN-13 : 9781782174677
Vendor :
QGIS Development Team
Category :
Languages :
Tools :

What do you get with Print?

Product feature icon Instant access to your digital copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Redeem a companion digital copy on all Print orders
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to Hungary

Premium delivery 7 - 10 business days

€25.95
(Includes tracking information)

Product Details

Publication date : Jun 29, 2015
Length: 316 pages
Edition : 1st
Language : English
ISBN-13 : 9781782174677
Vendor :
QGIS Development Team
Category :
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 108.97
QGIS By Example
€36.99
Learning QGIS, Third Edition
€29.99
Mastering QGIS
€41.99
Total 108.97 Stars icon

Table of Contents

11 Chapters
1. Handling Your Data Chevron down icon Chevron up icon
2. Visualizing and Styling the Data Chevron down icon Chevron up icon
3. Presenting Data on a Print Map Chevron down icon Chevron up icon
4. Publishing the Map Online Chevron down icon Chevron up icon
5. Answering Questions with Density Analysis Chevron down icon Chevron up icon
6. Answering Questions with Visibility Analysis Chevron down icon Chevron up icon
7. Answering Questions with Suitability Analysis Chevron down icon Chevron up icon
8. Automating Analysis with Processing Models Chevron down icon Chevron up icon
9. Automating Analysis with Processing Scripts Chevron down icon Chevron up icon
10. Developing a Python Plugin – Select by Radius Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.5
(4 Ratings)
5 star 75%
4 star 0%
3 star 25%
2 star 0%
1 star 0%
James Oct 12, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
QGIS is known as a great open source Desktop GIS application but for years good instructional books for it were hard to come by. QGIS by Example is a great new addition to anyone's library, no matter if they know little about QGIS or are an expert. Early chapters help newbies download, install, configure and start working with GIS layers, while later chapters are a great reference for users with experience who want to get more out of QGIS.The step by step chapters are a great refresher for those who want a better understanding on how to perform GIS analysis and are littered with great screenshots, shortcuts and tips on advanced topics. Esri ArcGIS Desktop users will appreciate the detailed raster and vector analysis sections where they'll quickly pick up on how they can perform GIS processes that don't require expensive extension licenses.There is an excellent section on scripting QGIS with Python which will help automate processes. The book even goes into how to create your own Python plugins for QGIS which is much easier than you think. But it isn't all about scripting and analysis, the book will also help you make great looking cartographic decisions and printable maps. It will even walk you through publishing your maps on the web easily without the need of expensive hosting options.I've been recommending that GIS professionals take a long look at QGIS and many have. With QGIS by Example, they'll be able to have a desk reference book to help them learn, use and excel at QGIS. QGIS by Example is the QGIS book to buy if you're a QGIS user or want to become one.I was provided a review copy of this book by Packt Publishing.
Amazon Verified review Amazon
Jonathan Gross Aug 22, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
QGIS by Example is extremely well written compared to other technical, QGIS, and GIS books. The authors use a conversational tone while maintaining an economy of words. The bottom line: It is probably the single best book about QGIS currently out!The book also features easy-to-read screenshots and maps to help illustrate key points. Often in similar texts, screenshots are cramped or hard to read. However, this is not the case here.The book is specifically geared towards common tasks that all GIS professionals and open source will appreciate--whether beginner or intermediate. Highlights include:Downloading and installing QGIS via OSGEO4WDownloading OpenStreetMap data with the Quick OSM PluginLayer blending effects with examplesPrint Composer, including combining several maps within the same composer, overview/extent maps, atlas/map book generationQGIS Cloud Plugin - online web map publishing via this free cloud serviceBinning/Quadrats/Grids with hexagons - summing points within an equal areaLine of Sight / Visibility Analysis with 3D visualizationSuitability analysisProcessing models (automating tasks)Building a pluginIn addition, the book features cartographic tips along the way to help you make great looking maps! Lastly, the book was reviewed by two open source QGIS stalwarts / gurus so you know the text is as good as possible!Disclosures: I received a free copy of the e-book from the publisher and served as a reviewer for a past book about QGIS by the same publisher.-Author of the Open Source GIS Blog
Amazon Verified review Amazon
K. König E. Fisel Aug 25, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Sehr gut gewählte Beispiele; insbesondere bei den Powerfunktionen von QGIS. Hier zu zählen für meinen Bedarf die Erstellung von Kartenserien (=Atlas), Sichtbarkeitsanalysen (=Viewsheds) und die Verwendung der regelbasierten Symbolisierung.
Amazon Verified review Amazon
artemisia Apr 06, 2017
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
I purchased this book because it specifically says that it is for beginners. However, even though I consider myself as having enough computer skills to approach learning this software on my own, I found it not really suitable for beginners. I even found some places in the book where the explanation does not match the software's content, or that of the exercise file you download to use with the book. The publishers have been responsive to my queries about these, but this is not the way to do things if the book is recommended for beginners.I can see why this book is a good one for those with a background in GIS, but if you want to teach yourself and have things better explained, I would advise you to look elsewhere. This book is a bit too frustrating for the novice.I have since ordered a different self-tutorial book on QGIS - will put up a review when I get it.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the digital copy I get with my Print order? Chevron down icon Chevron up icon

When you buy any Print edition of our Books, you can redeem (for free) the eBook edition of the Print Book you’ve purchased. This gives you instant access to your book when you make an order via PDF, EPUB or our online Reader experience.

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela