Working with Projections (QGIS3)¶
Map projections - or Coordinate Reference System (CRS) - often cause a lot of frustration when working with GIS data. But a proper understanding of the concepts and access to the right tools will make it much easier to deal with projections. In this tutorial, we will explore how projections work in QGIS and learn about tools available for vector and rasters data layers.
Overview of the task¶
The task is to re-project selected features of a layer and overlay data layers of different projections together in QGIS.
Get the data¶
Natural Earth has Admin 0 - Countries dataset. Download the countries
UK’s Ordnance Survey provides open data for download. Download the MiniScale raster product for Great Britain and extract it to a folder on your computer.
For convenience, you may directly download a copy of the dataset from the link below:
minisc_gb.zip (Contains only the files required for this tutorial)
Data Sources: [NATURALEARTH] [OSOPENDATA]
Procedure¶
Open QGIS. Go to
.
![../../_images/1148.png](../../_images/1148.png)
Click on … next to Source, Browse to the downloaded
ne_10m_admin_0_countries.shp
file and click Add.
![../../_images/2124.png](../../_images/2124.png)
At the bottom of QGIS window, you will notice the label Coordinate. As you move your cursor over the map, it will show you the X and Y coordinates at that location. At the bottom-right corner you will see EPSG:4326. This is the code for the current CRS (Projection) for the project - also known as the Project CRS.
![../../_images/360.png](../../_images/360.png)
To determine a layer’s projection, we can look into the metadata. Right click on
ne_10m_admin_0_countries
layer and select Properties.
![../../_images/432.png](../../_images/432.png)
Switch to the Information tab in the Layer Properties dialog. Expand the Information from provider section. At the bottom, you will see the name of the projection under CRS.
![../../_images/531.png](../../_images/531.png)
Now let’s see how we can change the layer’s projection. This operation is called Re-Projection. Rather than re-projecting the entire layer, we can also select a subset of features and re-project them to a new layer. Use the Select features by area or single click tool and click on United Kingdom feature to select it.
![../../_images/630.png](../../_images/630.png)
Search for and locate the
algorithm in Processing toolbox.
![../../_images/730.png](../../_images/730.png)
Select
ne_10m_admin_0_countries
as the Input layer, check Selected features only then click on the globe icon next to Target CRS, search and selectEPSG:27700 - OSGB 1936 / British National Grid
. In Reprojected, choose the...
and click Save to a file. Now choose the directory and enter the name asunited_kingdom.gkpg
and click Run.
![../../_images/829.png](../../_images/829.png)
A new layer
united_kingdom
will appear on the Layer Panel. As you see, both the layers still line up exactly with each other - even though they are in different CRSs. This is because QGIS supports On-The-Fly (OTF) CRS transformation. Which means that whenever a layer’s CRS doesn’t match the Project CRS, it will automatically be transformed to the Project CRS so it can be displayed correctly. Now let’s set the Project CRS to match the newly createdunited_kingdom
Layer’s CRS. Remove thene_10m_admin_0_countries
layer and, right click on theunited_kingdom
layer .
![../../_images/930.png](../../_images/930.png)
You will see the Project CRS is updated to
EPSG:27700
.
![../../_images/1037.png](../../_images/1037.png)
Now let’s add a Raster layer. Go to
.
![../../_images/1149.png](../../_images/1149.png)
Click on the
...
next to Source, select the layerMiniScale_(standard)_R23.tif
. Click Add.
![../../_images/1240.png](../../_images/1240.png)
Now a new layer
MiniScale_(standard)_R23
is added to the canvas.
![../../_images/1338.png](../../_images/1338.png)
To make both layers visible, switch the order of the layer by dragging the
MiniScale_(standard)_R23
to the bottom in the Layers panel.
![../../_images/1435.png](../../_images/1435.png)
Right-click on the
MiniScale_(standard)_R23
layer and click on Properties.
![../../_images/1532.png](../../_images/1532.png)
In the Layer Properties, switch to Information, the CRS is
EPSG:27700 - OSBG 1935 / British National Grid - Projected
. This confirms that the raster layer’s CRS is the same as the Project CRS.
Note
If you want to re-project a raster layer, you can use
algorithm in Processing toolbox.![../../_images/1630.png](../../_images/1630.png)
If you want to report any issues with this tutorial, please comment below. (requires GitHub account)