0% found this document useful (0 votes)
10 views32 pages

Advanced QGIS Geospatial Data Guide

Uploaded by

classbep
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views32 pages

Advanced QGIS Geospatial Data Guide

Uploaded by

classbep
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Introduction to

Advanced
Geospatial Data
Science

2
Tools and Software
01

Coordinate Reference System


02

Learning
Working with QGIS Objectives
03

Adding Vector layers and text data


04

05 Joining attribute tables and Spatial joins


Tools and Software
Tools and Software

These are tools and applications that


provide the functionalities for data
processing, analysis, and visualization.

Desktop GIS: QGIS, ArcGIS, GRASS GIS

Cloud-based platform: Google Earth


Engine ,ArcGIS Online,Carto.
Specialized tools: ERDAS Imagine and ENVI
for remote sensing.
Coordinate
Reference System
Co-ordinate Reference System

A Coordinate Reference System defines


how spatial data is represented in terms
of geographic coordinates (latitude and
longitude) or projected coordinates
(e.g., meters or feet).

It helps to define how the two-


dimensional, projected map corresponds
to real-world locations

Source: [Link]
Co-ordinate Reference System

Types of Co-ordinate Reference System

01 Geographic Coordinate System (GCS)-


Based on a spherical model (e.g., WGS 84
Units: Degrees (latitude, longitude).

Projected Coordinate System (PCS)-

02 Translates the spherical model to a flat


surface, Examples: UTM, State Plane
Coordinate System

Source: [Link]
Use Cases
Use Case Illustration

For this course, we will focus on QGIS as our preferred GIS software
QGIS and free data should be downloaded from the links provided below:

Geodata- Nigerian Geodata –Nigerian Geodata –Nigeria


administrative ward Settlement extent Health facility data
boundary
Click to download Click to download
Click to download

Software-QGIS
Nigeria population data
Click to download
Click to download

The links above would be required for the assignments.


Vector data format used in QGIS

This is the most commonly used vector format in GIS and it requires multiple
Shapfile
01 (.shp)
associated files (.shp, .shx, .dbf, .prj, etc.), it is easy to use but has limitations, such as
a 2 GB file size limit and no support for UTF-8

GeoPackage This is frequently used in remote sensing, it supports various raster data types,
02 (.gpkg) including multispectral and hyperspectral.

GeoJSON This is a lightweight format for encoding geographic data in JSON, commonly used for
03 (.geojson) web applications and APIs.
Vector data format used in QGIS

CSV This stores tabular data with latitude and longitude columns for mapping point data,
04 (.csv) it requires careful formatting for spatial data.

Emma Olivia 03
Raster and Database format

GeoTIFF This is the preferred raster format for QGIS, supports


01 (.tif) georeferencing and metadata storage
Raster
data
format Erdas This is a modern alternative to shapefiles, it supports
02 Imagine multiple vector layers, raster layers, and tabular data in a
(.img) single file, it is compact and efficient with no file size limit

Database 01 Spatialite Spatialite (.splite) This is a lightweight geospatial database


(.splite) format based on SQLite
format
Emma Olivia

Note: The preferred data format


GROWTH usage in this course is Spatialite
MANAGER
Introduction to QGIS
Introduction to QGIS

QGIS is a GIS QGIS is used for mapping,


software that is free spatial data processing,
and open source. and spatial analysis.
QGIS Graphical User Interface

When QGIS starts, you are presented with the


GUI divided into 5 areas as shown in the figure: Menu Bar: Provides access to various QGIS
features using a standard hierarchical menu.
Toolbar: Provides access to most of the functions
as the menus, plus additional tools for interacting
with the map.
Map Legend: Lists all the data layers in the
project. This area also allows to change style or
label the layer.
Map View: Shows the vector, raster data and
tables you choose to load.
Status Bar: Shows you your current position in
map coordinates as the mouse pointer is moved
across the map view

Using these five areas, you can add a data layers, zoom to a
specific area in the data, hide or show relevant layers and see
the coordinates, scale and projection of your displayed map.
Adding Layers - Vector

4
1. Select the “add
Vector Layer” 3. Select layer(s) you
want to add
2. Browse to navigate 4. Click “Open” to add
to the folder where
the layer(s) are
saved
Adding a Layer

To load a dataset, start QGIS and click


on the Layer>Add Layer and, Add
Vector Layer or press ctrl+shift+v
(cmd+shift+v).

This will bring up a new dialog:


When File option is selected as Source
type, hit Browse, and look for the state
boundary data you downloaded
Adding a Layer

 After selecting the *shp file,


Add Layer menu should look
line the following

 Hit Open. After opening the file,


state boundary data for Nigeria
should be presented like as
shown
Adding a Layer - Text Layers

To add a spreadsheet into


QGIS, click on the Layer>Add
Layer and click Add Delimited
Text Layer This will

Let’s add the health facility


data downloaded
Adding a Layer- Text Layer

To This dialog allows you to select a wide range


of properties for your layer. Even though most
common usage of the delimited

File is comma, there are always different


options. If your file using another delimiter
rather than a comma, you can define

Your custom delimiter from Custom delimiters

Hit OK to add your data into QGIS


Attribute Data

3
Attribute Table is divided into three main areas:
Toolbar: This bar holds the functions you can execute to the data in attribute table.

Field Names: Field name, in other words column name defines the attribute of the feature.

Number of the Feature: Shows the number of the entry


Spatial Join

Spatial Join is a classic GIS problem -


transferring attributes from one layer
to another based on their spatial
relationship

In QGIS, this functionality is available through


the Join attributes by location Processing
algorithm.

We will be transferring the attribute data of LGA


to the settlement extent.
Download settlement extent for Nigeria from
GRID3 website Click Here
Join Spreadsheet

There might be a need to join a table in a spreadsheet


to a spatial data for use in your map. This operation is
known as a Table Join. A unique code is needed to be
used to join a table to spatial data.

As you may notice, every LGA has its own name


which is unique to it

To join a spreadsheet, double-click to open


properties of the administrative boundaries layer (LGA)
and select Joins from menu at the left-hand side.

Download the Nigeria LGA population as CSV from


Click to download
It requires signing it before you can download
Join Spreadsheet
For attribute join to work well, the
Hit plus (+) sign to select a layer. join field must be unique and the
Select the related field as follows characters of join layers must be
and hit OK the same as that of target layer

For this dataset, you can use the


district names as a unique field to Congratulations, you have
join as shown here. However, not successfully joined a non-spatial
every dataset allows you to join data to a spatial data
very easily.
Styling

Now let us work on styling to reflect


the population data to the map.
 Save the LGA layer as a new data
and ensure the data type for the
population columns are numeric
 Double-click/right-click to the
LGA boundaries layer to open the
properties
Styling

 Select Style from left-hand menu


 Select Graduated from the top
dropdown menu
 Select Population in column menu
 Select a color ramp you like from color
ramp menu
 Select Quantile (Equal Count) from
Mode and select classes (we choose 7)
in classes menu
 Hit classify
 Hit okay to see your map
Styling

This is a choropleth map, showing


highly dense districts according to
the population.

Tip:
Choropleth maps works well
with ranged set of data.
Styling

As a second phase of styling, let us


change the style of the districts
centers and make some labels.

Double-click to the province centers


layer (district_pt) to open the
properties.

Select Symbology from left-hand


menu

Select city from the symbols menu


Labeling

 Select Labels from left-hand menu to


enable labeling
 Change No Labels to Show labels for
this layer from top drop-down menu to
enable settings.
 Select NAME for Label with drop-down
menu
 Change Font, Style and Size as you like
(We choose Arial, regular and 8)
 Select Style from left-hand menu
 Hit okay to see your map with province
labels!
 As a final step, let us look some legends,
titles, and graphical adjustments for the
map.
Summary

In this course we learned the importance of the Coordinate Reference


System (CRS) in ensuring accurate and aligned spatial data

We got hands-on with QGIS, diving into how to add vector


layers and text data effectively

We practiced joining attribute tables and performing spatial


joins and explored some basic geospatial functions.
Assignment
 Download the population data from geopode
 Download health facility data from GRID3
 Download Nigeria boundary data (State and LGA) from GRID3
 Download the QGIS software
 Download the Nigeria settlement extent data from GRDI3
 Perform a Spatial join of the settlement extent with the LGA layer
 Perform an attribute join of the LGA layer to the downloaded population
data from Geopode
 Generate a map showing the population density of each LGA by
symbolizing the LGA layers and classifying the population value into 7
classes
 Download all spatial data as a .sqlite file and tabular data as .csv for
future use
 Save the map document for future use and submit your map as an
image

You might also like