Hello everyone, welcome to another QGIS Tutorial for Beginners. In this article, we will learn how to clip raster against polygon in QGIS. QGIS comes with so many tools that allow us to do many things. Clipping raster (DEM) can be done quickly in QGIS. In this example, I have a topography DEM and I want to cut or clip the raster against a polygon.
As you can see above, we have a topography DEM and a black line (polygon) on top of it. We will clip the DEM against the black polygon. And the final result will look like this.
You can have any shape of polygon to clip against. Let’s see how to do it.
Steps to Clip Raster Against Polygon in QGIS
Step 1. Open the Raster Layer
First, let’s open the raster in QGIS canvas. And then, open the polygon layer or create a new polygon layer if you don’t have it yet.
Step 2. Clip Raster by mask layer
Now, search the “clip raster by mask layer” from the Processing Toolbox. This tool is located under GDAL>>Raster extraction
Double-click the tool and then the following window will appear.
On the Input layer, select the raster layer we want to clip. And then on the Mask layer, select the polygon we use to clip the raster. You can also specify the source and target CRS. Don’t forget to enable the option that says “Match the extent of the clipped raster to the extent of the mask layer”. Click Run.
That’s it. I hope you enjoy the article. See you next time.