QGIS Module 1

Post on 29-Nov-2014

495 views 3 download

description

Module 1: GIS Workshop Concept and Practice

Transcript of QGIS Module 1

GIS Workshop

Concepts and Practice

Nancy Warren, MPH

With Contributions from:

Nathan Heard, DSc

Hilary Spindler, MPH

Sarah Gutin

Ryan Keating

Goal

• Understand important GIS concepts and

how to utilize them through Quantum

GIS (QGIS), an open source software

package

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

Objectives (cont’d)

• Create thematic maps with multiple

variables

• “Clip” map sections

• Test maps with Google raster data

• Demonstrate competency with basic

QGIS

Session one:

• Overview

• Basic QGIS installation and navigation

• Loading shapefiles and navigating

shapefiles

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

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

Why GIS? see it to understand it:

HIV prevalence in women

Functions of GIS

• Visualization and Mapping

• Spatial database management

• Spatial Analysis

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

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.)

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

The GIS Data Model: Implementation Geographic Integration of Information

Layers

By

Organized

Is

Data

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

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)

Vector vs. Raster

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.

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).

Linking data: JOIN

GIS systems maintain

• spatial and

• attribute data separately,

• then “join” them for display or analysis

JOINing our data:

Geographic data links

• Spatial data

Attribute data

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

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

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)

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

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

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

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

5 minute QGIS Tour

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….

This!

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

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

This is where our data will be visually represented.

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

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

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

What do we need before

starting?

1. QGIS Software

2. Data (Shapefiles)

3. Plug-ins

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

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

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

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

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

How to Add Plug-ins

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

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

Optional depends on your web

access/connection

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

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

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

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”

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.

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

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

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)

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

Now you explore!

• Plug ins

• Toolbars

• General interface

Loading Pre-existing

Shapefiles: Vectors

Download shapefiles: Diva

Choose administrative areas

Note the definitions of the layers are

down below the pull down menu

Click “ok”

Map pops up on next page:

bottom of page - hit download

Drag the files to new folder:

zambia shapefiles

Loading Pre-existing

Shapefiles: Vectors

Click add Vector Layer to add shapefile.

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

Highlight all .shp files & “open”

And again click “open”

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

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

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…?

You can also

simply move the

layer up – the

layer at the top is

the one that

shows in the

screen

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!

End session one:

THANK YOU!