Tutorial Stream and Catchment Delineation using PCRaster in QGIS
5. Reproject DEM
The DEM is in its original Lat/Lon Geographic Coordinate System (GCS) with datum WGS 84 (EPSG: 4326). It is not recommended to use a GCS for DEM analysis, because the z units (e.g. meters) are different than the x and y units (degrees). We need to choose a projection for our project. If the project covers one country we can choose a national projection. In our case, however, the project covers multiple countries (Germany, the Netherlands, and Belgium). Therefore we will use a global projection: UTM Zone 32 North, with WGS-84 as datum.
We can find the EPSG codes at http://www.spatialreference.org
1. Use the website to search for UTM 32N wgs 84
. You can leave QGIS running and open a browser.
The figure below shows the result.
We need to take a look at the EPSG codes. We will use EPSG: 32632 throughout this project - clicking on it will provide more details.
Now we are going to reproject the DEM from unprojected GCS (Lat/Lon WGS 84 - EPSG: 4326) to UTM Zone 32 North / WGS 84 (EPSG: 32632).
2. From the main menu choose Raster | Projections | Warp (Reproject).
3. In the Warp (reproject) window, click to choose the Target CRS.
4. In the dialogue that opens type 32632
at Filter and select WGS EPSG: 32632 in the middle of the dialogue window and click OK.
5. Now complete the dialogue:
- For the Resampling method we choose
Nearest Neighbor
to preserve the elevation values of the original files. - Set the No data value for output bands to
-9999
because when the raster layer is reprojected there will be "no data" at the borders. In this way we define that "no data" has a value -9999 and will not be visualised and treated as "data". - Set the Output file resolution to
30
m. - Browse to your exercise folder and name the output file
dem_reprojected.tif
The dialog should now look like the figure below.
Note the gdalwarp
command that will be executed in the background.
6. Click Run to run the algorithm. After running, click Close to close the window.
The re-projected DEM now appears in the list of Layers. The DEM may seem distorted due to the fact that the Map Canvas Projection is still in Lat/Lon, as indicated by the coordinates in the lower part of the Map Canvas and the EPSG code of the Map Canvas in the lower right corner. This is due to the on-the-fly projection, which causes a difference between the projection in the file and the one that is visualised.
7. To complete this operation, and properly display the new dataset, we need to change the on-the-fly projection of the Project. To do so click on the EPSG:4326 in the lower right of the screen.
8. In the new dialogue window select the EPSG:32632 projection that is already in the list of Recently used coordinate reference systems, as shown in the figure below , and click OK.
In the Map Canvas the DEM is now displayed in the correct position (with north pointing up), as shown in the figure below. The coordinates of the new display are also in meters as we want.
9. You can now remove the layer dem_mosaic.
This is a good time to save your project.