You are on page 1of 30

IIRS Outreach Program

Demonstration of QGIS
Software Session 02:
Plugins, Projections and
Geo-referencing
Prasun Kumar Gupta
Geoinformatics Department, Indian Institute of Remote Sensing

Overview
Table of Content

- Geo-referencer & OpenLayers Plugin

Georeferencing Topographic Sheet


Image Re-projection

Page 2

www.qgis.org

QGIS Plugin Architecture

Data for todays demo

Toposheet
- http://www.lib.utexas.edu/maps/ams/india/
- Dehra Dun Area (nh-44-05.jpg)

Software
- QGIS 2.4 Chugiak
- www.qgis.org

Page 3

Plugin architecture

Remove
extra menus

3
2

Page 4

- 1.Processing
Toolbox
- 2. Shortest
Path

3. Click on
Plugins

Plugin architecture - Georeferencer


1

Page 5

Make sure
Georeferencer plugin
is ON
- 1. Click on Manage and
Install Plugins
- 2. Type in the Search
Box georef
- 3. Make sure x sign is
there next to
Georeferencer GDAL

Plugin architecture - OpenLayers

Make sure Open


Layers plugin is ON

2
3

- 1. Type in the Search


Box openlayer
- 2. Click on OpenLayers
Plugin
- 3. Click on Install
Plugin *
* This step requires internet connection

Page 6

Plugin architecture - Troubleshooting

Without internet connection - You will get a message


saying plugins.qgis.org not found
However, please note internet connection is ONLY
required for installing this plugin and not anymore
throughout the exercise.
Page 7

Plugin architecture - Open

1
2

Page 8

1. Click on Close
to close the
manage plugins
dialog
2. Click on Raster
Georeferencer
Georeferencer to
open the plugin

Georefencing - Definition

To georeference means to associate


something with locations in physical space
The term is commonly used in the GIS field to
describe the process of associating a physical
map or raster image of a map with spatial
locations

Page 9

Georefencing - Some basic concepts


Different terms for same Conversion from DMS
process:
(degree minute second) to
DD (degree decimal)
Projection System
Coordinate Reference 1 DEGREE = 60 MINUTES
System (CRS)
Spatial Reference
E.g., 10O30 = 10.5O
System (SRS)
20O15 = 20.25O
and more
30O45 = 30.75O

Page 10

Georeferencing - Toposheet - Adding Data


1

2
3
4

Here comes your footer Page 11

1. Click on File - Open


Raster on the
Georeferencer plugin
2. Navigate to the folder
containing todays
demo dataset in the
Open raster dialog
3. Click on the nh-44-05cut.jpg file
4. Click on Open

Georeferencing - Toposheet - Setting source CRS


1
2

Page 12

Either of the 2 may happen:


1.You get a dialog asking to
select a CRS, or
2.The image gets added with a
warning that the CRS has been
defaulted to the system CRS
(follow A&B)
A. In the Georeferencer dialog,
click on Settings - Raster
properties
B. Select General in Layer
Properties dialog & click on
Specify in CRS section

Georeferencing - EPSG Codes

There are multiple ways to


define a Projection system
(CRS).
Most commonly:
- EPSG:n format
- Proj.4 format
- OGCs Well Known Text
(WKT) format
OGC = Open Geospatial Consortium
EPSG = European Petroleum Survey Group

Page 13

Georeferencing - EPSG Codes

There are multiple ways to


define a Projection system
(CRS).
Most commonly:
- EPSG:n format
- Proj.4 format
- OGCs Well Known Text
(WKT) format
OGC = Open Geospatial Consortium
EPSG = European Petroleum Survey Group

Page 14

Georeferencing - EPSG Codes

There are multiple ways to


define a Projection system
(CRS).
Most commonly:
- EPSG:n format
- Proj.4 format
- OGCs Well Known Text
(WKT) format
OGC = Open Geospatial Consortium
EPSG = European Petroleum Survey Group

Page 15

Georeferencing - Select source CRS


1

Page 16

The tie-points given in the


toposheet are in lat/long.
However the datum was
not specified. We assume
the datum for this sheet to
be WGS84
The EPSG code for
lat/long WGS84 is 4326
1. Click on Filter and type
4326
2. Select the CRS displayed
3. Click on OK

Georeferencing - Assigning Coordinates


2

4
5
Page 17

Also called Tie-points or Control


Points
Get acquaint with zoom/pan
controls to navigate around in
the map space
1. Zoom to the point marked as
P1
2. Click on Edit / Add point
3. Click precisely at the center
of the intersection lines
4. Type the coordinates 78 and
30 in the X / East and Y /
North boxes respectively
5. Click OK

Selection of Tie-points or Control Points

Invariant features only


- Avoid natural boundaries & intersections such as
forest boundary, agriculture plot boundary or river
bend etc.
- Take man-made features such as road / rail / canal
intersections, building boundary etc.

Minimum of 4 points are required


More points may be required for undulating
terrain
Page 18

Georeferencing - Add 3 more points


1
2

3
4
5

Page 19

1. Zoom out to full layer


and zoom into next point
marked as P2
2. Repeat the procedure as
per Pg 16 Steps 2 to 5;
this time write 78.5 & 30
in X & Y boxes
respectively

Georeferencing - GCP table

Do the same for P3 and P4 by giving points


78,30.5 and 78.5,30.5 respectively
The GCP table should look like this at the end
of adding all 4 points

Page 20

Georeferencing - Transformation Settings


In the Georeferencer dialog,
click on Settings Transformation settings
In the Transformation
settings dialog choose the
following:
- Transformation type = Thin
Plate Spline
- Output raster = modified.tif
- Target SRS = EPSG:4326
- The Load in QGIS option is
checked

Click OK
Page 21

Transformation Types
The Linear algorithm is used to create a world-file, and is different from the other
algorithms, as it does not actually transform the raster. This algorithm likely wont
be sufficient if you are dealing with scanned material.
The Helmert transformation performs simple scaling and rotation
transformations.
The Polynomial algorithms 1-3 are among the most widely used algorithms for
georeferencing, and each one differs by the degree of distortion introduced to
match source and destination ground control points. The most widely used
polynomial algorithm is the second order polynomial transformation, which allows
some curvature. First order polynomial transformation (affine) preserves
collinearity and allows scaling, translation and rotation only.
The Thin plate spline (TPS) algorithm is a more modern georeferencing
method, which is able to introduce local deformations in the data. This algorithm is
useful when very low quality originals are being georeferenced.
The Projective transformation is a linear rotation and translation of coordinates.
Source: http://docs.qgis.org/1.8/en/docs/user_manual/plugins/plugins_georeferencer.html

Page 22

Resampling Techniques
The type of resampling you choose will likely depending on your input data and
the ultimate objective of the exercise.
Nearest neighbor assignment is the fastest resampling technique and is
appropriate for categorical or thematic data, since it does not alter the value of the
input cells.
Since the output cell values remain the same, nearest neighbor assignment
should be used for nominal or ordinal data where each value represents a class,
member, or classificationthis may be categorical data such as a land-use, soil,
or forest type.
Bilinear interpolation uses the value of the four nearest input cell centers to
determine the value of the output raster. The new value for the output cell is a
weighted average of these four values, adjusted to account for their distance from
the center of the output cell in the input raster. This interpolation method results in
a smoother-looking surface than can be obtained using nearest neighbor.

Page 23

Resampling Techniques
Since the values for the output cells are calculated according to the relative
position and the value of the input cells, bilinear interpolation is preferred for data
where the location from a known point or phenomenon determines the value
assigned to the cellthat is, continuous surfaces. Elevation, slope, intensity of
noise from an airport, and salinity of the groundwater near an estuary are all
phenomena represented as continuous surfaces and are most appropriately
resampled using bilinear interpolation.
Cubic convolution is similar to bilinear interpolation, except the weighted average
is calculated from the 16 nearest input cell centers and their values. Cubic
convolution will have a tendency to sharpen the data more than bilinear
interpolation since more cells are involved in the calculation of the output value.
Therefore, this resampling method is often used when resampling imagery, such
as aerial photography and satellite imagery.
Bilinear interpolation or cubic convolution should not be used on categorical data
since the categories will not be maintained in the output raster dataset. However,
all three techniques can be applied to continuous data, with nearest neighbor
producing a blocky output, bilinear interpolation producing smoother results, and
cubic convolution producing the sharpest results.
Page 24

Georeferencing Final Steps


Click on File - Start Georeferencing
On completion - the georeferenced
toposheet will be added to your QGIS
map canvas
Close the Georeferencer (Optional:
You may wish to save the GCP
points)
To verify the output, click on Web
OpenLayers plugin OpenStreetMap
OpenStreetMap (requires internet
connection)
This will overlay the OpenStreetMap
on the georeferenced toposheet; You
may turn on and off the toposheet
layer to verify the validity of the
procedure
Page 25

Image Re-projection

In many applications, the


toposheet / imagery may need to
be in a projected coordinate
system (such as UTM etc.)
QGIS supports exporting the
image in multiple projection
systems.
Right click on the new layer
modified.tif and click on Save
as

Page 26

UTM Zones of the World

Source: http://tabs2.gerg.tamu.edu/gmt/GMT_Docs/GMT_utm_zones.jpg

Page 27

Image Re-projection (Steps)

Here comes your footer Page 28

Final Results
The resultant file projected.tif
will be used in the next
exercise on digitization
Create a new project, add the
projected.tif file, hover your
mouse over the image and
notice the coordinates on the
bottom pane.
Right click on the layer, click
on Properties, goto Metadata
tab, and expand Properties view the information.

Here comes your footer Page 29

THANK YOU
Q&A

PRASUN @ IIRS . GOV .IN

Page 30

You might also like