QGIS/C2/Coordinate-Reference-Systems/English

From Script | Spoken-Tutorial
Jump to: navigation, search
Visual Cue Narration
Slide Number 1

Title Slide

Welcome to this tutorial on Coordinate Reference System in QGIS.
Slide Number 2

Learning Objectives

In this tutorial, we will learn to,
  • Add layers to projections in QGIS.
  • View metadata information for layers.
  • Save selected features from a layer to a new layer.
  • Re-project and overlay data layers of different projections together.
Slide Number 3

System Requirement

To record this tutorial I am using,
  • Ubuntu Linux OS version 16.04
  • QGIS version 2.18
Slide Number 4

Pre-requisites

  • Basic knowledge about GIS.
  • Please view pre-requisite tutorial in this series.
To follow this tutorial you should have basic knowledge about GIS.

Please view previous tutorial in this series.

Slide Number 5

Coordinate Reference systems

About Coordinate Reference Systems,

Coordinate Reference Systems are of two types,

  • Geographic coordinate system, and
  • Projected Coordinate System
Slide Number 5

Coordinate Reference systems

Most widely used geographic coordinate system is WGS 84.

Most widely used projected coordinate system is UTM.

Click on QGIS icon to open the interface.

Cursor on Canvas.

Here I have opened QGIS interface.

On the canvas, world map with country administration boundaries is displayed.

Slide Number 6

World Map File

Demonstration on how to download the map and display in QGIS is explained in the prerequisite tutorial.

Please view the pre-requisite tutorial.

This file can also be downloaded from the Code files link.

Cursor on layers panel on name of the map file. On the left-side of the canvas, you will see Layers Panel, with file name of the world map as a layer.
Cursor on the canvas. By default Layers Panel is enabled here.

If not, we can enable or disable the Layers Panel using View menu.

Click on View tool on the Tool bar. Click on View menu on the menu bar.

Scroll down and select Panels option.

Scroll down and select Panels option.

From the sub-menu, click on Layer Panel.

Sub-menu shows a list of panel names.

Click on Layer Panel option to enable or disable the panel.

Drag the boundary with the mouse. We can adjust the size of the panel by dragging the boundary.
Right-click on the layer name in Layers Panel. If you wish to change the color of the map, right-click on the layer name in the Layers Panel.
Scroll-down the context menu >> select Styles option. Scroll-down the context menu and select Styles option.
Rotate the vertex of the color triangle to choose the color. Sub-menu shows a color triangle .

Choose the color by rotating the vertex of the color triangle.

Click anywhere on the canvas. Click anywhere on the canvas to close the context menu.
Cursor on Coordinate label and text box. At the bottom-left corner, on the status bar of QGIS window, you will notice the label Coordinate and a text box with numbers.
Highlight X and Y coordinates. (Editing stage) Values of X and Y coordinates for a particular location are shown in this text box.
Move the cursor over the map. Move the cursor over the map.

Observe, that the values of X and Y coordinates change with location of the cursor.

Cursor on Render option. By default Render option is checked on the status bar.


Leave it as such.

Point towards EPSG:4326(OTF) at the bottom-right corner of the status bar. On the status bar, at the bottom-right corner, you will see another label, Current CRS


This code represents the current Projection Coordinate Reference System.

To determine a layer’s projection, we can look into the metadata.
Right click on the Layers Panel, ne_10m_admin_0_countries On the Layers Panel, right-click on the layer name.
From the context menu, select Properties. From the context menu, select Properties.


Layer Properties dialog-box opens.

Click on Metadata option in Layer dialog-box.


Click on back arrow next to properties.

Scroll down.

In the dialog-box, on the left-side panel, click on Metadata option.


Under Properties section, scroll down the slider.

Point to heading, Layer Spatial Reference System.

Point to WGS84.

At the bottom,

under heading, Layer Spatial Reference System, you will see the definition for this projection.

It shows WGS84 as geographic coordinate system.

Click Ok button Click on Ok button at the bottom, to close the dialog box.
Let us now add layers to the map and change the projection.
Slide Number 7

Data layers

About data layers.
  • Usually geographical data is stored in layers in a GIS workspace.
  • Each layer has data stored in its attribute table.
  • Many layers can represent data of the same geographical location.
Back to the QGIS interface.
Cursor on the QGIS canvas. Now let us see how we can change the layer’s projection.


This operation is called Re-Projection.

Instead of re-projecting the entire layer, we will re-project some features.

On top-right corner of the tool bar >> click on Select features by area or single click tool. On top-right corner of the tool bar, click on Select features by area or single click tool.
Click on the black triangle next to this tool. Click on the black triangle next to this tool.
Drop down >> choose Select features. From the drop down choose Select features.
On the canvas, on the world map, click on United States of America. On the world map displayed on canvas, click on the United States of America feature to select it.


Note that, the United States of America is shown in a different color.

Cursor on the map. We will now change the projected coordinate system of this layer and save.
Right click on,
ne_10m_admin_0_countries
Right-click on the layer name in the Layers Panel.
Click on Save As option Scroll down, select Save As option.
Save Vector Layer as dialog box opens. Save Vector Layer as... dialog box opens.


The default format option is ESRI Shapefile.

Leave it as such.

Click on Browse button. Click on Browse button next to File name text box.
Save layer as... dialog-box opens.

In the name text box, type the layer as USA-1.shp.

Save layer as... dialog-box opens.


Name the output layer as USA-1.shp.

Click on Desktop option.


Click on Save button.

Find a suitable location to save.

I will save it on Desktop

Click on Save button at the bottom.

In the Save Vector Layer as... dialog-box.


Point to File name text box.

In the Save Vector Layer as.... dialog-box, the file path appears in the File name text box.
Click select CRS button next to CRS text box. We will choose the new projection for this layer.


Next to the CRS drop down box, click on Select CRS button.

In the Coordinate Reference System Selector dialog box, type North America In the Coordinate Reference System Selector,

in the Filter search box, enter North America

Click

North_America_Albers_Equal_Area_Conic

Under Coordinate reference systems of the world,

under heading Projected Coordinate System, scroll through the results.


Select,

North_America_Albers_Equal_Area_Conic (EPSG:102008) projection.

Click on OK button. Click on OK button at the bottom.
In the Save vector layer as... dialog-box, cursor on CRS drop down box. In the CRS drop down box, the newly selected CRS is shown.
In the Save Vector Layer as dialog-box,


Click on the check box next to Save only selected features.

Click on the check box to check Save only selected features option.


This will ensure that only the selected feature gets re-projected and exported.

Cursor on , Add saved file to map. Here, by default, Add saved file to map option is checked.


If not, click on the check box to check this option.

In the Save Vector Layer as... dialog-box, click on OK button Click on OK button.
Point on united states outline.


Cursor on Layers panel.

The re-projected layer gets loaded, in a different color.


These two layers are now in different projections.


Observe that, on Layers Panel, you can now see 2 entries.

uncheck enable on the fly CRS transformation


Point to OTF next to EPSG:4326.

Notice that the new United States layer overlays perfectly on top of the world map layer.


This is because QGIS has a feature called On-the-fly CRS transformation.


The projection text at the bottom-right corner of QGIS window has the words, OTF next to EPSG:4326.

At the bottom-right corner, click on EPSG:4326. Select the United-States layer in the Layers Panel by clicking on it.

Click on the Current CRS text, EPSG:4326, at the bottom-right corner of the status bar.

Cursor on Project Properties CRS dialog-box. Project Properties CRS dialog-box opens.


Let us turn-off the Enable on-the-fly CRS transformation and see what happens.

Uncheck Enable on the fly CRS transformation check box, Uncheck the Enable on the fly CRS transformation check box, by clicking on it.


Click on OK button at the bottom.

Cursor on the map. Back in the main QGIS window, you will see the world map disappear.


You can see only the United States map on the canvas.


This is because the Projected CRS for this layer changed to Albers Projection.

Right click on USA-1.shp layer.


Select zoom to layer

The coordinates and scale are different now.


Right-click the United States layer in the Layers Panel.


Select Zoom to Layer option.


Now you will see the United States in the selected projection.

Click on EPSG


Tick Enable on the fly CRS transformation.

Again, click on the Current CRS text to open Project Properties dialog-box.


Turn-on the Enable ‘on the fly’ CRS transformation option.

Under the heading Recently used Coordinate Reference Systems, select WGS 84.


Click on OK button.

Under the heading Recently used Coordinate Reference Systems, select WGS 84.

At the bottom, click on OK button.


The display on the canvas will return to its previous state with world map.

Right-click on USA-1.shp in Layers panel. To delete the vector layer from the dataset, right-click on the name in the Layers panel.
Click on Remove option from the context menu.

Click on OK button in the dialog-box (Remove Layers or Groups)

From the context menu, click on Remove option.


A prompt appears to confirm the action.

Click on OK button.

Cursor on the layers panel. Observe that the layer is removed from the dataset.
Slide Number 8

Summary

Let us summarize,

In this tutorial we have learnt to

  • Add layers to projections in QGIS.
  • View metadata information for layers.
  • Save selected features from a layer to a new layer.
  • Re-project and overlay data layers of different projections together.
Slide Number 9

Assignment

As an Assignment:
  • Project The United States with North_America_Lambert_Conformal_Conic projection
  • and observe the difference.
  • Re-project the entire world map layer into World Mercator projection system.
Show completed assignments. Your completed assignment should look like this.
Slide Number 10

About Spoken Tutorial project

The video at the following link summarizes the Spoken Tutorial project.

Please download and watch it.

Slide Number 11

Spoken Tutorial workshops

The Spoken Tutorial Project team:

conducts workshops and

gives certificates on passing online tests.

For more details, please write to us.

Slide number 12

Forum for specific questions:


  • Do you have questions in THIS Spoken Tutorial?
  • Please visit this site
  • Choose the minute and second where you have the question
  • Explain your question briefly
  • Someone from our team will answer them


Please post your timed queries on this forum.
Slide Number 13:

Acknowledgement

Spoken Tutorial Project is funded by NMEICT, MHRD, Government of India.

More information on this mission is available at this link.

This tutorial is contributed by Prajwal. M from Sahyadri college of Engineering and Snehalatha from IIT Bombay.

Thank you for joining

Contributors and Content Editors

Madhurig, Nancyvarkey, Snehalathak