Details marks hw02

How did I mark?

Interpolations

I had a pytest unit test to test the specific cases with a simple hill samples.xyz. Download test_all.py to try:

  1. pip install pytest
  2. put test_all.py in the same folder as your my_code_hw02.py
  3. in the console, type pytest

I just compared your values to those obtained with startinpy interpolate(), including for outside the CH and directly on vertices.

The most common mistake was Laplace interpolation directly at a location where a vertex existsā€¦ This meant that you inserted no vertex and then deleted the vertex at the end of the code?! Which meant havoc, your TIN is ā€œcompromisedā€.

GFTIN

I didnā€™t use the dataset I gave you (as previously announced), but found a random place in Limburg with a few trees and buildings and some ā€œhillsā€, and tested with only that dataset (download d1.laz).

I couldnā€™t test exactly the GFTIN because you all handled the bbox/convexhull differently, so I ran your function with --input_thinning 1000 and then calculated the differences between your terrain and the one obtained with classification and linear TIN:

  print("=== DTM differences ===")
  grid3 = grid_gftin - grid_c_linear
  write_grid_to_disk("dtm_diff.tiff", grid3, (bbox[0], bbox[3]), 1.0) 

and then I visualised the differences to see if they are generally the same as a correct implementation.

I also verified that your number of vertices in the DT was similar to what I obtain (~5900); I was very lax here, if it was around 5900 it was fine.

Then I ran again with --input_thinning 1000 --max_dist 5.0, and verified that the error patterns are similar to mine and the number of vertices ~6400.

Some remarks in no particular order of importance