Beginners QGIS Workflow

last updated: March 27, 2024

Beginners QGIS Workflow with NICFI data

Introduction

This tutorial will cover basic raster operations in QGIS. You will first mosaic two basemap quads and then clip the mosaic to an area of interest. After clip, you are going to use Raster Calcualtor to perform NIDVI. The steps in this workflow are

  1. Mosaic basemap quads
  2. Clip to an AOI
  3. Create NDVI Raster

You can choose to follow all three of the steps, or only follow one step. The workflow is meant for beginners starting to work with NICFI data.

Before you start

  • You will need QGIS installed on your machine to perform the raster operations in this tutorial. This tutorial is using QGIS version 3.12 but the raster operations should be available in all QGIS versions.
  • You will need to download at least two basemap quads from Planet.
  • You will need an area of interest that you want to clip the mosaic. Area of interest can be in GeoJSON or shapefile, and should work with all QGIS supported vector formats.

While this is a simple tutorial, it is recommended that you have basic familiarity with GIS concepts. You can find more on working with raster data in QGIS here.

1. Mosaic Basemap Quads

To start, open a QGIS project and add your GeoTiff basemap quads (It is assumed that you have the two basemap quads stored locally in your machine).

Loading Raster Data:

Layer > Add Layer > Add Raster Layer

On the pop up window, under source, click the "..." and choose your GeoTiff quads. More than one layer can be loaded at the same time by holding down the Ctrl and Shift key and clicking on multiple items. Click Add to add the quads to your project.

1.1 Merge two quads together:

  1. Click on Raster
  2. Hover over Miscellaneous
  3. Click on Merge
  4. On the Merge dialogue
    1. In the Input Layers click on ...
    2. In the Output data type choose Int16
    3. Click Run

merge.gif

Good Job! You have merged multpile quads together!

1.2 Save the Merge output:

  1. Right click on the Merge output
  2. Export
  3. Click Save As
  4. Navigate to where you want to save your Merged GeoTiff and provide name
  5. Choose CRS (Planet mosaic quads are ESPG:3857 - WGS 84 / Pseudo)
  6. Click OK

2. Clip to an AOI

In this step, you are are going to clip the merged GeoTIFF to a area of interst (e.g. shapefile or GeoJSON).

Loading Shapefile Data:

Layer > Add Layer > Add Vector Layer

On the pop up window, under source, click the "..." and choose your clip file. As with the GeoTIFFs, more than one vector layer can be loaded at the same time by holding down the Ctrl and Shift key and clicking on multiple items. Click Add to add the quads to your project.

Example of merged quads before clip.

before_clip.png

2.1 Clip the merged raster to features

  1. Right click on Raster
  2. Hover over Extraction
  3. Click on Clip Raster by Mask Layer
  4. On the Clip Raster By Extent dialogue
    1. Select Input Layer (merged_quads.tif)
    2. Selet Mask Layer (clip_features.shp)
    3. Click Run

clip.gif

2.2 Save the Merge output:

  1. Right click on the Clipped (mask) output
  2. Export
  3. Click Save As
  4. Navigate to where you want to save your Merged GeoTiff and provide name
  5. Choose CRS (Planet mosaic quads are ESPG:3857 - WGS 84 / Pseudo)
  6. Click OK

Example of merged quads after clip.

after_clip.png

3. Create NDVI Raster

Finally, you will calculate NDVI (Normalized Difference Vegetation Index) and create a new raster with these values.

3.1 NDVI Overview

NDVI, developed by a NASA scientist named Compton Tucker in 1977, is commonly used to assess whether an area contains live green vegetation or not. It can show the difference between water and plants, bare soil and grass, whether plants are under stress, and what lifecycle stage a crop is in.

It compares how much more near-infrared light is reflected by chlorophyll vs visible red light and is given as the following equation:

ndvi_equation.png

3.2 Calculating NDVI in QGIS

  1. Click on Raster
  2. Choose Raster Calculator
  3. In the Raster Calculator Expression
    1. Type ( "clipped_quads@4" - "clipped_quads@3" ) / ( "clipped_quads@4" + "clipped_quads@3" ) where clipped_quads is the raster image you want to perfrom NDVI.
  4. Save your NDVI by choosing the path in Output layer

ndvi_calc.png

Nice work! The final step is to make the color ramp vegetation friendly.

3.3 Edit Color Ramp

  1. Right click on the NDVI layer
  2. Choose Properties
  3. On the left side click Symbology
  4. In the Render Type choose singleband pseudocolor
  5. For mode pick equal interval
  6. Click Apply and then OK

color_ndvi.gif

Good work! You have finished the whole workflow!


Rate this guide: