Assignment 02

Processing gDEMs

Deadline is 2023-12-07@17:00

Late submission? 10% will be removed for each day that you are late (3 days max)

This is an individual assignment

=> How I mark, the slides I used



Overview

In this assignment, you have to process one area of the Netherlands stored in the gDEM Copernicus GLO-30.

You have to perform the following three tasks:

  1. extract/generate the aspect (one component of the slope)
  2. extract/generate the hillshade
  3. assess how good are the elevation values, when compared to our ground truth (AHN4)

The first two tasks will require you to write one Python software that reads a GeoTIFF, and outputs a new one (either the hillshade or the aspect). This software should work for any terrain stored in GeoTIFF located in the Netherlands (ie having a CRS of EPSG:7415).

Step 1: select an area in the Netherlands and download the GeoTIFF

Downloading Copernicus GLO-30 from the official EU website is rather complex, so instead we propose you use OpenTopography.

You can freely download one part of the Netherlands (you will need to compare with AHN4!) and you must:

  1. select an area >=10km^2
  2. water shouldn’t cover more than 30% of the area
  3. download the region in the GeoTIFF format

Step 2: Convert that GeoTIFF to EPSG:7415

The GeoTIFF you downloaded is in WGS84 but we want it in EPSG:7415, so you need to reproject it (both horizontally and vertically).

To convert a gridded terrain to another CRS means handling both the 2D CRS and the elevation CRS. The simplest way is, I believe, to use gdalwarp. As explained during the lecture, you can not use the QGIS GUI for this since it cannot handle CRS that are not compounded (that is they have 2D+z).

So you need to install the program “gdalwarp” (or all the GDAL programs actually), and it is explained there how. For macOS and Linux it is very easy. For Windows, the best it seems is to install GDAL in Anaconda and then use the ‘Anaconda Powershell Prompt’, see below the 3 main steps:

And then you can use EPSG:28992+5709 to refer to a 2D CRS having an elevation component.

Thus something like: gdalwarp input.tif output.tif -s_srs EPSG:4326+1234 -t_srs EPSG:28992+5709

Step 3: Write a Python program for extracting hillshade+aspect

Your Python program should follow those rules:

The help code is in the /hw/02/ folder of the GitLab repository of the course and implements that behaviour, just use it.

Aspect

The output should be an azimuth in degrees: 0 is the North, 90 is East, 180 is South, 270 is West, etc.

To calculate the value, you can implement any of the 4 methods described in the book (“Slopes in grids.” on p.85).

Hillshade

It should be calculated as explained in the book, and the default values of GDAL/QGIS should be used.

Step 4: Compare the elevations to those of AHN4

You need to compare and analyse the elevations as given in the Copernicus GLO-30 dataset.

For this you will compare with the “ground truth” that we have in the Netherlands: AHN4.

You need to download the relevant AHN4 tiles, the best is to choose is the raster DSM 5m.

You can download the AHN4 at:

  1. the official AHN4 download page (through ESRI website),
  2. the better option is GeoTiles: tiles are smaller, and the points have the RGB from the orthophotos added (useful, although not for this assignment). It’s developed and maintained by a PhD student at TUDelft ❤️

Then it is up to you to analyse and report on the discrepancies and issues you will discover.

And you are free to use the tool you want, just specify what you used in the report.

Step 5: Write a short report

You are asked to prepare a simple report outlining:

  1. which region in the Netherlands you picked
  2. how you reprojected the input Copernicus GLO-30 dataset
  3. an analysis of elevation comparison, including all processing/analysis you did.
  4. (you do not need to write anything about the aspect/hillshade part of the assignment, I just need the code)

I expect a report of 4-5 pages, more is not necessary.

Marking

Criterion Points
followed all rules and compiles/runs without modifications 1.0
hillshade results 2.0
slope results 2.0
comparison (including report) 5.0

What to submit and how to submit it

You have to submit two files:

  1. geo1015_hw02.py (write your name at the top of the file where it’s indicated)
  2. your report in PDF (no Word file please)

Those 2 files need to be zipped and the name of the file is your studentID, for example 4123169.zip.

Upload this zip to this Dropbox page.

[last updated: 2023-11-29 11:38]