Assignment 02

Constructing DTMs from AHN4

Deadline is 2024-12-19@18:00

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

It’s worth 15% of the final mark

This is an individual assignment




The aim of the assignment is to create three DTMs from an input AHN(4) lidar dataset (using different methods). You have to (partly, see below!) develop a Python program that:

  1. reads a AHN4 LAZ file;
  2. output a gridded DTM by interpolating, with linear in TIN interpolation, the points classified as ground
  3. output a gridded DTM by interpolating, with Laplace interpolation, the points classified as ground
  4. output a gridded DTM by first extracting the ground with the GFTIN algorithm and then interpolate with the linear in TIN method

The linear in TIN and Laplace interpolations, and the GFTIN algorithm, need to be entirely develop by you.

The input/output of your Python program

Code is in the /hw/02/ folder of the TUDelft GitLab repository of the course (you need to login with your NetID).

The program reads one dataset in LAZ format as input:

python geo1015_hw02.py myfile.laz 

To install the dependencies required:

pip install -r requirements.txt

and accepts 4 optional parameters:

  1. --input_thinning: Thinning of the input LAZ file (default=100)
  2. --resolution: GFTIN resolution for the ground grid (default=20)
  3. --max_dist: GFTIN max distance parameter (default=0.5)
  4. --max_angle: GFTIN max angle parameter (default=20.0)

And outputs 3 files in the same folder:

  1. dtm_c_linear.tiff: a 1mX1m GeoTIFF covering the spatial extent of myfile.laz and created by using the AHN4 classification (ground==2) and liner in TIN interpolation.
  2. dtm_c_laplace.tiff: a 1mX1m GeoTIFF covering the spatial extent of myfile.laz and created by using the AHN4 classification (ground==2) and Laplace interpolation.
  3. dtm_gftin.tiff: a 1mX1m GeoTIFF covering the spatial extent of myfile.laz and created with GFTIN to extract the ground points and linear in TIN interpolation.

Libraries allowed

No external libraries can be used, except the ones listed in the file requirements.txt. Everything from the Python standard library is fine: math, json, sys, etc.

What you need to do

First, do not modify the main file (geo1015_hw02.py), I will make my own main to test your code. You can of course modify it to develop the code and test things, but you can’t write the functions taking into account a different main.

You need to complete these 3 functions in my_code_hw02.py:

  1. interpolate_linear(dt, x, y)
  2. interpolate_laplace(dt, x, y)
  3. gftin(pts, resolution, max_dist, max_angle)

It’s explained in the code what they do. Watch out: you cannot change their API/signature.

Good to know

Marking

Criterion Points
followed all rules and compiles/runs without modifications 2.0
Linear in TIN interpolation implementation 1.0
Laplace interpolation implementation 3.0
GFTIN implementation 4.0

What to submit and how to submit it

You have to submit one file: my_code_hw02.py.

Don’t forget to add your name and student-number at the top of the tile, as the comments tell you.

Oh, and no report is necessary.

Upload the file to this Dropbox page.

You can also, alternatively to uploading the Python unit, create a private GitHub repository, add me as a collaborator (I’m @hugoledoux), and upload a simple text file with your name, student number, and URL of the repository. I will use the latest version of the file my_code_hw02.py to mark.

[last updated: 2024-11-29 07:37]