[GRASS-dev] Nearest neighbour

Glynn Clements glynn at gclements.plus.com
Sat Jun 6 06:32:27 EDT 2009


Francesco P. Lovergine wrote:

> I noted that both r.proj/r.proj.seg use floor() in the NN method 
> (at least in 6.4). Should not be a proper rounding to the nearest integer 
> more appropriate?

No.

If a projected point has grid coordinates (2.99, 3.99), the cell with
indices (2,3) contains that point, and its centre is the closest to
that point.

If the value of cell represents a sample taken at a point, the sample
point is the cell's centre, not its top-left corner.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-dev mailing list