7. Clip and reproject the DEM

The SRTM tile is added to the map canvas. If you zoom to the S25E018.hgt layer you can see that it covers a much larger area. Also the projection is in Geographic Coordinate System (GCS) with latitude/longitude coordinates in degrees (EPSG:4326).

So we have to clip and reproject the DEM and add it to our GeoPackage.

1. In the Layers panel click right on S25E018.hgt and choose Export | Save As...

2. In the Save Raster Layer as... dialogue choose GeoPackage as the output Format. Browse to the Stampriet_Data.gpkg file and choose DEM as Layer name. Change the CRS to the Project CRS: EPSG:32734.
Under Extent choose Calculate from Layer and select Stampriet study area.
Under Resolution change the Horizontal and Vertical resolution to 30 m.
Check the No data values box and add -9999 under From and To. This is an out of range value for cells that are outside the study  area after clipping and reprojection.


3. Leave other settings as default and click OK.

4. Remove the S25E018.hgt layer from the Layers panel and zoom to the study area boundary to see the result.

In the next section we're going to style the DEM.