Opened 11 years ago

Closed 11 years ago

Last modified 9 years ago

#2237 closed defect (fixed)

GDALGrid: nearest neighbor interpolation method does not work with empty search radius

Reported by: dron Owned by: dron
Priority: normal Milestone: 1.5.1
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords:


Nearest neighbor interpolation method does not handle search radius equal to zero properly. The documentation states that radius==0.0 uses the whole point array to search nearest value, but it doesn't.

This problem was fixed in 1.5 branch with r13815 and in trunk with r13816.

Change History (4)

comment:1 Changed 11 years ago by Even Rouault

Milestone: 1.5.1

comment:2 Changed 11 years ago by dron

Resolution: fixed
Status: newclosed

This problem has been fixed.

comment:3 Changed 11 years ago by dron

The fix for this problem introduced one regression. dfNearestR distance should be a square of largest semi-axis length. Fixed in trunk with the r15579 and in 1.5 with the r15580.

comment:4 Changed 9 years ago by dron

I just found a grave bug introduced by the previous fix. Under some circumstances (when the point array exactly corresponds to raster grid nodes and we are going through the array starting from that exactly corresponding point) the algorithm goes one step more than needed and returns the value in array which follows the correct one.

That should be fixed in trunk with r21129 and in 1.7 with r21131.

A number of appropriate tests were added with r21130.

Note: See TracTickets for help on using tickets.