Skip to content
← Back to QGIS from first project to capstone
QGIS · Part 01 of 20Beginner· 13 min readSources

QGIS Basics: Interface, Plugins and Raster Handling

Install QGIS, find your way around the interface, add plugins, and work with real Sentinel-2 and Landsat 8 rasters: load, inspect, style, stack bands, mosaic, clip, reproject and calculate.

Data used in this tutorial

All of it is free and open. Nothing needs a paid licence.

DataSceneWhy we use it
Sentinel-2 L2A, tile 43PGQ15 March 2025, 0% cloudMain image, 10 m bands
Sentinel-2 L2A, tile 43PHQ15 March 2025, 0% cloudNeighbouring tile, used for mosaicking
Landsat 8 Collection 2 Level-2, path 144 / row 05129 March 2025Second sensor, 30 m, used later for image-to-image georeferencing

The area is southern India, around Bengaluru. Both Sentinel-2 tiles and the Landsat scene use EPSG:32643 (WGS 84 / UTM zone 43N), so they line up without reprojection.

Bands used:

  • Sentinel-2: B02 (blue), B03 (green), B04 (red), B08 (near-infrared), B11 and B12 (shortwave infrared, 20 m), TCI (true-colour preview), SCL (scene classification)
  • Landsat 8: SR_B2 to SR_B7 (blue to SWIR 2), ST_B10 (thermal), QA_PIXEL, and the MTL metadata file

Folder layout:

timeandspatial-tutorial-data/
  sentinel2/43PGQ/   B02.tif B03.tif B04.tif B08.tif B11.tif B12.tif TCI.tif SCL.tif
  sentinel2/43PHQ/   (same files)
  landsat8/          LC08_..._SR_B2.TIF ... MTL.txt

1. Install QGIS

  1. Go to qgis.org/download and pick the Long Term Release (LTR). LTR changes less often, which keeps screenshots and steps stable.
  2. Run the installer and keep the default options. It also installs GDAL and GRASS, which the Processing Toolbox uses. SAGA is not part of every release, so open the Processing Toolbox and see which providers you have.
  3. Open QGIS Desktop. Do not start the "QGIS with GRASS" shortcut for now.
QGIS opening screen with the empty project
Figure 1.1. QGIS opening screen with the empty project

2. The QGIS interface

Learn these areas first. Everything else in the tutorial uses them.

AreaWhereWhat it does
Menu barTopProject, Layer, Vector, Raster, Processing, Plugins, Settings
ToolbarsUnder the menuPan, zoom, identify, select, measure, digitizing
Browser panelLeftBrowse folders and add data by drag and drop
Layers panelLeftOrder, visibility and properties of the layers in the project
Map canvasCentreThe map itself
Processing ToolboxRight (Ctrl+Alt+T)Every analysis tool, searchable
Status barBottomCoordinates, scale, rotation and the project CRS
Full interface with each area labelled 1 to 7
Figure 1.2. Full interface with each area labelled 1 to 7

You can switch panels on by right-clicking an empty spot on the toolbar area, or from View > Panels. Layer Styling (F7), Identify Results and Statistics are the useful ones.

Save your project early with Project > Save As, name it qgis_basics.qgz, and keep it next to the data. The project stores layer paths, styles and the project CRS, not the data itself.

Set the project CRS

The project CRS is the coordinate system the map canvas draws in. QGIS reprojects layers on the fly to match it. It does not change the CRS of the files themselves.

  1. Click the CRS button at the bottom right of the status bar (it shows something like EPSG:4326).
  2. Search 32643, select WGS 84 / UTM zone 43N, then OK.
Project Properties, CRS tab with EPSG:32643 selected
Figure 1.3. Project Properties, CRS tab with EPSG:32643 selected

3. Plugins

A plugin adds tools to QGIS. Core plugins ship with QGIS (for example the Georeferencer). Community plugins come from the official plugin repository.

Install a plugin

  1. Plugins > Manage and Install Plugins.
  2. Open the All tab and type the plugin name in the search box.
  3. Select it and press Install Plugin.
  4. Check it appears under the Installed tab with its box ticked. Untick to disable it.
Plugin manager, All tab, search box showing "QuickOSM" with Install Plugin button
Figure 1.4. Plugin manager, All tab, search box showing "QuickOSM" with Install Plugin button

Plugins used across this tutorial series:

PluginUsed for
QuickMapServicesAdd Google, Bing, OpenStreetMap and other basemaps
QuickOSMDownload OpenStreetMap data by key and value
Freehand raster georeferencerOptional alternative for rubber-sheet style georeferencing
Semi-Automatic Classification PluginOptional, for Sentinel-2 and Landsat preprocessing

In QGIS 3.44, the Installed tab lists the core plugins Processing, DB Manager, MetaSearch Catalog Client and GRASS. The Georeferencer and the GDAL tools are built into QGIS and do not appear as plugins any more.

4. Load a raster

A raster is a grid of cells, and each cell holds a value. A single-band file holds one value per cell. A true-colour image combines three bands.

Add one band

  1. Layer > Add Layer > Add Raster Layer (Ctrl+Shift+R).
  2. Click the ... button, go to sentinel2/43PGQ/ and select B04.tif.
  3. Click Add, then Close.

You can also drag the file from the Browser panel into the canvas.

B04.tif shown in grey, Layers panel visible
Figure 1.5. B04.tif shown in grey, Layers panel visible

Add B03.tif, B02.tif and B08.tif the same way. You now have four layers.

Zoom, pan and navigate

ActionHow
Zoom in or outScroll wheel
PanHold the space bar and move the mouse, or use the Pan tool
Zoom to a layerRight-click the layer > Zoom to Layer(s)
Zoom to a scaleType a scale (for example 1:25000) in the status bar scale box
Previous viewView > Zoom Last

5. Inspect a raster

Layer properties

Double-click B04 to open Layer Properties, then check the Information tab. Note down:

  • CRS: EPSG:32643
  • Extent: the coordinates of the corners
  • Width and height in pixels: 10980 x 10980
  • Pixel size: 10 m x 10 m
  • Data type: UInt16
  • Band count and NoData value
Information tab of Layer Properties for B04.tif
Figure 1.6. Information tab of Layer Properties for B04.tif

Pixel values with Identify

  1. Click the Identify Features tool (Ctrl+Shift+I).
  2. Click on a pixel. The Identify Results panel lists the value of each raster band at that point.
  3. Change Mode to Top down if you want values from all layers under the cursor.

For quick checks, open View > Statistics Panel, or press the Value Tool plugin if you have installed it.

Identify Results panel with a pixel value on B04
Figure 1.7. Identify Results panel with a pixel value on B04

Statistics and histogram

In Layer Properties > Histogram, click Compute Histogram. A histogram shows how many pixels have each value. A sharp spike at the low end is often water or shadow. Use it when you decide how to stretch contrast.

6. Style and visualise a raster

Single band, grey

Layer Properties > Symbology > Render type: Singleband gray. Choose the Min / Max values and a Contrast enhancement.

SettingMeaning
Min / MaxValues mapped to black and white
Cumulative count cut (2% to 98%)Ignores the extreme tails, usually looks better
Stretch to MinMaxUses the real minimum and maximum, often looks flat
B04 with Min/Max stretch vs 2-98% cumulative count cut, side by side
Figure 1.8. B04 with Min/Max stretch vs 2-98% cumulative count cut, side by side

Single band, colour ramp

Use Singleband pseudocolor to show values as a colour ramp. Good for DEMs, indices and temperature.

Multiband colour, with a band combination

A band combination assigns three bands to red, green and blue. Which bands you pick decides what stands out.

First you need one multi-band layer. See step 7. After stacking, choose Render type: Multiband color and set:

CombinationRedGreenBlueWhat it shows
True colourB04B03B02The scene as the eye sees it
False colour (vegetation)B08B04B03Healthy vegetation in bright red
SWIR false colourB12B08B04Moisture, burned areas, bare soil and built-up areas
Three panels of the same area: true colour, false colour, SWIR
Figure 1.9. Three panels of the same area: true colour, false colour, SWIR

7. Raster processing

You can find every tool below in the Processing Toolbox (search by name) or in the Raster menu.

7.1 Stack bands into one file (layer stacking)

A stack is one file with several bands.

  1. Raster > Miscellaneous > Build Virtual Raster.
  2. Input layers: select B02, B03, B04, B08. The order is the band order, so keep it blue, green, red, NIR.
  3. Tick Place each input file into a separate band.
  4. Run. The result is a virtual raster (.vrt), a small text file pointing to the original bands.
  5. To make a real GeoTIFF, right-click the layer > Export > Save As..., choose GeoTIFF, name it s2_43PGQ_stack.tif and OK.
Build Virtual Raster dialog with separate band ticked
Figure 1.10. Build Virtual Raster dialog with separate band ticked

B11 and B12 are 20 m, so do not stack them with the 10 m bands directly. Resample or warp them to 10 m first (see 7.4).

7.2 Mosaic two tiles

A mosaic joins neighbouring images into one.

  1. Load sentinel2/43PGQ/TCI.tif and sentinel2/43PHQ/TCI.tif. The two tiles should touch or overlap along an edge.
  2. Raster > Miscellaneous > Merge.
  3. Input layers: both TCI files. Leave Grab pseudocolor table off.
  4. Set the NoData value for output bands to 0.
  5. Choose an output file mosaic_tci.tif and Run.
The two TCI tiles before merging, with the shared edge visible
Figure 1.11. The two TCI tiles before merging, with the shared edge visible
The merged mosaic as one continuous image
Figure 1.12. The merged mosaic as one continuous image

7.3 Clip a raster

Two ways: by extent or by a polygon.

For a rectangle, clip by extent:

  1. Raster > Extraction > Clip Raster by Extent.
  2. Click Calculate from Layer / Map Canvas Extent or draw the box on the canvas.
  3. Run, saving to clip_extent.tif.

For an irregular area, clip by a polygon mask:

  1. Create a polygon layer for your area of interest: Layer > Create Layer > New GeoPackage Layer, geometry Polygon, CRS EPSG:32643. Digitize a polygon around Bengaluru.
  2. Raster > Extraction > Clip Raster by Mask Layer.
  3. Select the raster and the mask layer. Tick Match the extent of the clipped raster to the extent of the mask layer and set NoData to 0. Run.
Clip Raster by Mask Layer dialog, with the AOI polygon on the map
Figure 1.13. Clip Raster by Mask Layer dialog, with the AOI polygon on the map

7.4 Reproject or resample

  1. Raster > Projections > Warp (Reproject).
  2. Target CRS: for example EPSG:4326.
  3. Resampling method: use Nearest neighbour for classified data and Bilinear or Cubic for continuous data.
  4. Output file resolution: set a value in the target units. In EPSG:4326 that is degrees, so 0.0001 is about 11 m. In EPSG:32643 it is metres, so 10.
  5. Run.

To bring B11 (20 m) to 10 m, set the Target CRS to the same EPSG:32643 and the output resolution to 10.

7.5 Raster calculator

The Raster Calculator does maths on pixel values. Use it for indices.

  1. Raster > Raster Calculator.
  2. Type the expression for NDVI (the normalised difference vegetation index):
("B08@1" - "B04@1") / ("B08@1" + "B04@1")
  1. Set the output file ndvi.tif, the extent from B04, and OK.
  2. Style it with Singleband pseudocolor, the RdYlGn ramp, min -0.2, max 0.8.

Results run from -1 to 1. Dense vegetation is high, bare soil is near zero, and water is negative.

Raster Calculator with the NDVI expression
Figure 1.14. Raster Calculator with the NDVI expression
NDVI map styled red to green
Figure 1.15. NDVI map styled red to green

8. Save and export

To save a raster layer, right-click it and choose Export > Save As. Choose Raw data to keep the values, or Rendered image to keep the styled picture. Set a NoData value in the same dialog if you clipped the image.

Save the project with Ctrl+S. A .qgz file stores only paths to the data, so copy the data folder together with it when you move the project.

Common mistakes

  • Treating the project CRS as the file CRS. The project CRS only controls drawing.
  • Stacking bands of different resolutions without resampling first.
  • Judging a raster by how it looks on the first load. QGIS applies an automatic stretch.
  • Using Bilinear resampling on a classified raster. Class codes get invented values.
  • Storing the output in a path with spaces or special characters when a tool fails. Short folder names are safer.

Key takeaways