“QGIS provides various ways to clip a raster layer. In this worksheet we will look at one approach.”
If you have a raster that is larger than the area needed for your map or analysis, you can clip it to a smaller size using QGIS. In addition, you can 'mask' the layer using a polygon in order to assign no data values to pixels outside of your target area.
Goal: To explore ways in which to clip rasters acoording to AOI.
Clip by Extent
Clip by Mask
settlement
and boundary
layer.SP_Name
Marloth Nature reserve SPno-data
value set to 0Additional Question
How can you clip the raster layer to match each row in the intersection layer? If you wanted to generate a raster for each polygon from the intersection layer.
Name | Expectation |
---|---|
Clip by extent ❗ |
|
Clipping Extent ❗ |
Draw on Canvas |
Creation options ❗ |
High Compression |
Clip by mask ❗ |
|
Mask Layer ❗ |
Intersection with the option selected features activated |
Raster data contains cells which are organised into rows and columns where each cell contains values representing information. Because raster images are generally very big and contain a lot of pixels (information), it is sometimes imperative to clip them. This can be achieved by either using a shapefile as a mask layer or by specifying an extent.
When clipping a raster layer we can change the other characteristics of the output layer like no-data values, spatial resolution and adding an alpha band to the output raster.
The spatial resolution of a raster defines the smallest possible feature that can be detected. No-data values are used to represent areas of a raster that have no data or areas in the raster that you do not want to show based on the pixel values in the raster.
An alpha band acts as a transparency mask, providing a transparency value for each pixel.
DEM is an abbreviation for:❗
Which of these represents a derivative of a digital elevation model:❗
Plugins are extensions in QGIS:❗
Download the sample data for the lesson.