QGIS Module 1

71
GIS Workshop Concepts and Practice Nancy Warren, MPH With Contributions from: Nathan Heard, DSc Hilary Spindler, MPH Sarah Gutin Ryan Keating

description

Module 1: GIS Workshop Concept and Practice

Transcript of QGIS Module 1

Page 1: QGIS Module 1

GIS Workshop

Concepts and Practice

Nancy Warren, MPH

With Contributions from:

Nathan Heard, DSc

Hilary Spindler, MPH

Sarah Gutin

Ryan Keating

Page 2: QGIS Module 1

Goal

• Understand important GIS concepts and

how to utilize them through Quantum

GIS (QGIS), an open source software

package

Page 3: QGIS Module 1

Objectives:

• Understand basic GIS concepts

• Navigate GIS interface

• Locate GIS data on the web and

identify reliable data sources

• Add data to GIS software and

prepare vector GIS data

• Convert text-based data to a GIS

format

Page 4: QGIS Module 1

Objectives (cont’d)

• Create thematic maps with multiple

variables

• “Clip” map sections

• Test maps with Google raster data

• Demonstrate competency with basic

QGIS

Page 5: QGIS Module 1

Session one:

• Overview

• Basic QGIS installation and navigation

• Loading shapefiles and navigating

shapefiles

Page 6: QGIS Module 1

Definition of GIS

• Geographical Information System

– A map connected to a database

• A computerized database management

system for analysis and display of spatial data

• A system of data and tools

Page 7: QGIS Module 1

Why GIS?

Isn’t this chart enough?

Province HIV prev: women Cabo delgado 9.5 Gaza 29.9 Inhambane 10 Manica 15.6 Maputo 20 Nampula 5.5 Niassa 3.3 Sofala 17.8 Tete 8 Zambezia 15.3

Page 8: QGIS Module 1

Why GIS? see it to understand it:

HIV prevalence in women

Page 9: QGIS Module 1

Functions of GIS

• Visualization and Mapping

• Spatial database management

• Spatial Analysis

Page 10: QGIS Module 1

What GIS Applications Do:

• Automate geographic data

– Produce maps

– Calculate areas, distances, route lengths

• Integrate data (i.e. property maps and satellite photos)

• Communicate complex spatial patterns

Page 11: QGIS Module 1

What GIS Applications Do

• Answer spatial queries

– (how many HIV+ people live further than 10 km

from the PMTCT clinic 24 de Julho in the

Zambezia province?)

• Perform complex spatial modeling

– (“what if” scenarios for resource management –

where to put new sites, transportation – how to get

resources to people in need, etc.)

Page 12: QGIS Module 1

Difficulties

• Difficulty of database creation

• Integration of data from diverse sources can

result in poor overall accuracy if not well

managed

• Representation of dynamic data – flows,

dispersion, people, time can be problematic

Page 13: QGIS Module 1

The GIS Data Model: Implementation Geographic Integration of Information

Layers

By

Organized

Is

Data

Page 14: QGIS Module 1

Data Organization in GIS

• Each layer contains

one specific type of

information.

• Layers are

integrated using

their geographic

location on the

earth’s surface as

the organizing

principle

Page 15: QGIS Module 1

Layers can be represented as Rasters or

Vectors:

•Vector create feature layers

– Point

– Lines (direction and length)

– Polygons (area, centroids,

and perimeter)

•Raster create surface layers

– Records information about

each element on a fixed grid

as pixels (E.g.: Satellite

images, aerial photos)

Page 16: QGIS Module 1

Vector vs. Raster

Page 17: QGIS Module 1

Table or attribute data

Tables - contain data for places that can

be converted to GIS files and mapped

• If each data record contains unique ID

codes for each place, those records can

be joined to their corresponding

features in a GIS file and mapped.

• If the data contains coordinates like

latitude and longitude, the data can be

plotted and converted to a vector file.

Page 18: QGIS Module 1

Geodatabase •A geodatabase

(short for geographic

database) is a

physical store of

geographic

information in the

form of features and

classes inside a

database

management system

(DBMS).

Page 19: QGIS Module 1

Linking data: JOIN

GIS systems maintain

• spatial and

• attribute data separately,

• then “join” them for display or analysis

Page 20: QGIS Module 1

JOINing our data:

Geographic data links

• Spatial data

Attribute data

Page 21: QGIS Module 1

Metadata: an important

part of GIS infrastructure

• Describes information resources

• Enables data exchange, efficient use of

(existing) resources

Source: http://www.esi.utexas.edu/gk12/workshops/gis/ppts.php

Page 22: QGIS Module 1

Quantum GIS (QGIS) - freeware

• Open Source GIS software that runs on Linux, Mac, Unix and Windows

• First released in 2002 – Mature program – Strong Online Community

• Regular updates and releases

• Compatible with: MySQL, SQLite,

• Freestanding module that can be linked

Page 23: QGIS Module 1

QGIS • View and explore spatial data

– Can use files from other programs: Google

maps, Open Street Maps, WMS, GRASS

• Map Data (e.g., prevalence, population)

• Create/edit spatial data (e.g., from GPS

unit)

• Perform Spatial Analysis (e.g., network

analysis)

Page 24: QGIS Module 1

QGIS: Disadvantages

• Learning curve is higher

• No raster or vector data already

included -- must import

• No raster or vector data integrated --

must ensure quality

• Importing table (attribute) data is a two

step process

Page 25: QGIS Module 1

QGIS relies on other sources

for map layers

• User needs to import mapping layers

into the system from their own sources

and

• user needs to ensure quality of layers

-DIVA GIS

-QGIS

Page 26: QGIS Module 1

Open Streets Maps and

Google Maps – These offer layers that can be imported

and used with all the other GIS software

we will discuss today

– Can be manipulated to show a variety of

features

Page 27: QGIS Module 1

Google Maps and Google

Earth

• Disadvantages:

– No static layers that can be imported and

used, because layers are constantly being

updated

– Requires strong connection to web in order

to import layers

Page 28: QGIS Module 1

5 minute QGIS Tour

Page 29: QGIS Module 1

When you first start up QGIS, this is what you will see.

This is called the QGIS Graphical User Interface, or GUI

It may look bare now, but by the end of this week, the GUI will look a little more like….

Page 30: QGIS Module 1

This!

Page 31: QGIS Module 1

Lets take a moment before going any further and go through the front-end components of QGIS.

Becoming familiar and comfortable will make learning the ins-and-outs of QGIS a little easier

Page 32: QGIS Module 1

We can think about QGIS in terms of a geodatabase.

We can see all of our vector and raster data in the left hand layers window

Whenever we load or create a new layer, it will appear in this window

Page 33: QGIS Module 1

This is where our data will be visually represented.

In this example we can see two types of spatial data. Raster and Vector.

Page 34: QGIS Module 1

In terms of vector data we can see two types: line and point data.

Both of these visual data elements are also visible in the Layers window

Page 35: QGIS Module 1

The raster data we can see here is this large satellite image of Vilankulos.

Page 36: QGIS Module 1

What do we need before

starting?

1. QGIS Software

2. Data (Shapefiles)

3. Plug-ins

Page 37: QGIS Module 1

QGIS: Required Software

• QGIS Desktop (Standalone Installer)

This tutorial was designed with version 1.7.3 WROCLAW. In an effort to improve quality control, QGIS next version (LISBOA) has made access to some of the 3rd party plugins very difficult so we recommend downloading this first and getting your plugins.

http://qgis.org/downloads

Page 38: QGIS Module 1

Data = Shapefiles

• Like most GIS software, QGIS

organizes its data along raster and

vector layers.

• These layers can also be referred to as

Shapefiles.

• Shapefiles can either be created by the

user or found on Online Spatial Data

Repositories

Page 39: QGIS Module 1

Online Spatial Data

Repositories • DIVA – Free Spatial Data (Solid source of

administrative boundaries, rails, roads &

inland water)

– http://www.diva-gis.org/gdata

• CloudMade – Downloads (Excellent open

source repository)

– http://downloads.cloudmade.com

Page 40: QGIS Module 1

Essential Plug-ins

• Open Streets Plug-in: Allows you to

directly download Open Streets Map data

(Vector and Raster) to QGIS

• Open Layers: Allows you to view Google,

Yahoo and OSM map in QGIS (Raster

only)

• Add Delimited Text Layer: Allow for easy

importing of a GIS-data-containing

spreadsheet

Page 41: QGIS Module 1

To begin we need to install

basic software:

1. QGIS

You want WROCLAW, version,

1.7.3 available here:

http://qgis.org/downloads/

2. LibreOffice http://www.libreoffice.org/download/

This program is required to add our data to existing spatial

data

Page 42: QGIS Module 1

How to Add Plug-ins

Page 43: QGIS Module 1

In order to add plug-ins first click on the “Plugins” Dropdown menu

Page 44: QGIS Module 1

In order to add plug-ins click “Fetch Python Plugins..”, highlight in the Installer window, and click “Install Plugin”

Page 45: QGIS Module 1
Page 46: QGIS Module 1

Optional depends on your web

access/connection

Page 47: QGIS Module 1

In order to add plug-ins click “Fetch Python Plugins”, highlight open streets and open layers in the Installer window, and click “Install Plugin”

The installed plugin will then be available in the same drop-down menu

Page 48: QGIS Module 1

Once installed, the plug-in will be available either on the dropdown menu or on the plugin Palette below

Page 49: QGIS Module 1

Now that our plug-ins are downloaded, we need to enable them. Click on “Manage Plugins…” in the Plugins drop-down menu

Page 50: QGIS Module 1

Make sure that the plugins you want to use are checked. For our purposes, check “Add Delimited Text Layer”, “Open Layers” and “Open Streets Plug-in”

Click “OK”

Page 51: QGIS Module 1

Exploring the Interface

• QGIS is very simple to navigate. It's

made up of a layout area where the

map is drawn surrounded by a toolbar,

layers panel and a status bar.

Page 52: QGIS Module 1

Len De Groot, UC Berkeley School of Journalism QGIS basics for journalists

http://multimedia.journalism.berkeley.edu/tutorials/qgis-basics-journalists/

Page 53: QGIS Module 1

Toolbars

• Toolbars can be controlled and turned

off or on in the Toolbars menu.

• Can arrange them by clicking and

dragging.

• Can configure the toolbars to your liking

(suggestion: aligning them so you have

only two rows of them at the top of the

screen and all buttons are visible)

Page 54: QGIS Module 1

QGIS has many toolbars, but they are grouped for easy identification

Page 55: QGIS Module 1

Now you explore!

• Plug ins

• Toolbars

• General interface

Page 56: QGIS Module 1

Loading Pre-existing

Shapefiles: Vectors

Page 57: QGIS Module 1

Download shapefiles: Diva

Page 58: QGIS Module 1

Choose administrative areas

Note the definitions of the layers are

down below the pull down menu

Page 59: QGIS Module 1

Click “ok”

Page 60: QGIS Module 1

Map pops up on next page:

bottom of page - hit download

Page 61: QGIS Module 1

Drag the files to new folder:

zambia shapefiles

Page 62: QGIS Module 1

Loading Pre-existing

Shapefiles: Vectors

Page 63: QGIS Module 1

Click add Vector Layer to add shapefile.

Page 64: QGIS Module 1

Once the “Add Vector Layer” dialog is open, click browse.

Page 65: QGIS Module 1

Highlight all .shp files & “open”

Page 66: QGIS Module 1

And again click “open”

You will see the directory and the file name of the shapefile you chose in the “Source” dialog box.

Page 67: QGIS Module 1

Now you see Zambia!

Notice that the layer appears in the map and the layer window.

As mentioned before, vector layers can either be points, lines, or areas. This is an area layer

Page 68: QGIS Module 1

Click through the diff layers

It is quite easy to change these boundaries with one click. Note how the previous layer 2 disappears and now we see layer one.

Note how the boundary levels change with the #s. 2 is “district” boundaries, 1 is province and 0 is…?

Page 69: QGIS Module 1

You can also

simply move the

layer up – the

layer at the top is

the one that

shows in the

screen

Page 70: QGIS Module 1

Notice that we have just added a point-type vector layer. By the end of the course you will take raw health facility data convert it into a shapefile and be able to place it in into existing map layers like this!

Page 71: QGIS Module 1

End session one:

THANK YOU!