#933: v.delaunay gives wrong z coordinate values if input data has duplicate
points
----------------------+-----------------------------------------------------
Reporter: jarim | Owner: grass-dev@lists.osgeo.org
Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Vector | Version: svn-trunk
Keywords: delaunay | Platform: All
Cpu: x86-32 |
----------------------+-----------------------------------------------------
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.
#933: v.delaunay gives wrong z coordinate values if input data has duplicate
points
---------------------+------------------------------------------------------
Reporter: jarim | Owner: grass-dev@lists.osgeo.org
Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Vector | Version: svn-trunk
Resolution: | Keywords: delaunay
Platform: All | Cpu: x86-32
---------------------+------------------------------------------------------
Comment (by pkelly):
Well spotted - that looks to me, too, fairly obviously like a bug. I think
a simpler way of removing it though would be to copy the whole site
structure by assignment rather than copying the individual members across
- can you try the attached patch (in_outv2.patch) as well? I guess if it
was done like this in the first place then extension to support 3-D points
would not have resulted in this bug!