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
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
QGIS 2 Cookbook

You're reading from   QGIS 2 Cookbook Become a QGIS power user and master QGIS data management, visualization, and spatial analysis techniques

Arrow left icon
Product type Paperback
Published in Apr 2016
Publisher
ISBN-13 9781783984961
Length 390 pages
Edition 1st Edition
Tools
Arrow right icon
Authors (3):
Arrow left icon
Anita Graser Anita Graser
Author Profile Icon Anita Graser
Anita Graser
Víctor Olaya Ferrero Víctor Olaya Ferrero
Author Profile Icon Víctor Olaya Ferrero
Víctor Olaya Ferrero
Alex Mandel Alex Mandel
Author Profile Icon Alex Mandel
Alex Mandel
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Preface 1. Data Input and Output FREE CHAPTER 2. Data Management 3. Common Data Preprocessing Steps 4. Data Exploration 5. Classic Vector Analysis 6. Network Analysis 7. Raster Analysis I 8. Raster Analysis II 9. QGIS and the Web 10. Cartography Tips 11. Extending QGIS 12. Up and Coming Index

Finding geospatial data on your computer

This recipe shows you how to use the QGIS browser to locate and open spatial data.

Getting ready

Before you start working, make sure that you have copied the sample dataset to your filesystem and you have it located.

How to do it…

There are several ways of locating and opening a data file to open it in QGIS, but the most convenient of these is the QGIS browser:

  1. To enable this, go to the View | Panels menu and enable the Browser checkbox in it. The browser will be shown by default in the left-hand side of the QGIS window, as shown in the following screenshot:
    How to do it…

    Browser contains a tree with all the available sources of spatial data. This includes data files in your filesystem, databases, and remote services.

  2. Navigate to the folder where you copied the sample dataset, and you will see a list of available data files, as shown in the following screenshot:
    How to do it…

    Note

    Not all files are shown but just the ones that are identified as valid data sources.

  3. To add a file to your project, just right-click on it and select Add Layer:
    How to do it…
  4. Multiple selections are allowed. In that case, select the Add selected layer menu.

    Another way of opening a file is by just dragging it and dropping it into the QGIS canvas. Dragging multiple files is allowed, as well, as shown in the following screenshot:

    How to do it…

How it works…

The browser acts as a file explorer that is directly linked to QGIS, which only shows valid data files and can be used to easily add them to a QGIS project.

There's more…

There are a few more things that you need to know that are related to this recipe. They are explained in the following sections.

Adding layers with the Layer menu

As an alternative to the browser, the Layer menu contains a set of entries. Each of them deals with a different type of data. They give you some additional options, and they might allow you to work with formats that are not directly supported by the browser.

Adding a folder to Favorites

Navigating to the folder where your data is located can be tedious. If you use a given folder regularly, you can right-click on it and select Add as favorite. The folder will appear on the Favorites section at the top of the browser tree.

Nonfile data sources

The browser also shows non-file data, such as remote services. Services have to be defined before they appear on the corresponding section in the browser. To add a service, right-click on the service name and select New connection.... A dialog will appear to define the service connection parameters.

As an example, try adding the following WMS service, using the WMS entry in the browser, as shown in the following screenshot:

Nonfile data sources

A new entry will appear, containing the layers offered by the service, as shown in the following screenshot:

Nonfile data sources
You have been reading a chapter from
QGIS 2 Cookbook
Published in: Apr 2016
Publisher:
ISBN-13: 9781783984961
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image