v.delaunay gives wrong z coordinate values if input data has duplicate points
|Reported by:||jarim||Owned by:|
v.delaunay output triangles can have wrong z coordinate values if the input data has duplicate points in it.
The internal array of points within v.delaunay will get corrupted if at lest one duplicate point exists.
Duplicate points are removed in remove_duplicates function in in_out.c in vector/v.delaunay/. It looks like the programmer has forgot to add the handling for z coordinates. If a duplicate is found then all subsequent points will not explicitly get assigned a z coordinate, and they will implicitly have a z coordinate that belongs to another point in the input data set.
A patch for this is attached. I have only been able to do very limited testing on Linux but this seems to fix the issue that I had with my dataset.