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 input/output of your Python program
- Libraries allowed
- What you need to do
- Good to know
- Marking
- What to submit and how to submit it
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:
- reads a AHN4 LAZ file;
- output a gridded DTM by interpolating, with linear in TIN interpolation, the points classified as ground
- output a gridded DTM by interpolating, with Laplace interpolation, the points classified as ground
- 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:
--input_thinning
: Thinning of the input LAZ file (default=100)--resolution
: GFTIN resolution for the ground grid (default=20)--max_dist
: GFTIN max distance parameter (default=0.5)--max_angle
: GFTIN max angle parameter (default=20.0)
And outputs 3 files in the same folder:
dtm_c_linear.tiff
: a 1mX1m GeoTIFF covering the spatial extent ofmyfile.laz
and created by using the AHN4 classification (ground==2
) and liner in TIN interpolation.dtm_c_laplace.tiff
: a 1mX1m GeoTIFF covering the spatial extent ofmyfile.laz
and created by using the AHN4 classification (ground==2
) and Laplace interpolation.dtm_gftin.tiff
: a 1mX1m GeoTIFF covering the spatial extent ofmyfile.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
:
interpolate_linear(dt, x, y)
interpolate_laplace(dt, x, y)
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
- all your code goes into
my_code_hw02.py
; you can add other functions to that unit - the time it takes for your program to terminate has no influence on the marks you’ll get
- you cannot import nor use functions that solve the problem for you
- the function
startinpy.DT.interpolate()
cannot be used, you have to code yourself the interpolation steps (but you can use the DT of startinpy).
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]