[GRASS-user] gridding ASCII xyz data using near neighbour technique

Moritz Lennert mlennert at club.worldonline.be
Tue May 19 03:27:18 EDT 2009


On 18/05/09 22:47, Seb wrote:
> Hi,
> 
> I'm trying to emulate what GMT's nearneighbor algorithm does (or closely
> enough) in GRASS.  This core of the algorithm assigns an average value
> for each node in the raster using the values in a neighborhood within a
> user-supplied radius.  The XYZ data are "almost" gridded, but not
> exactly, so they need to be gridded using an algorithm like that,
> without doing any sort of interpolation across null values of the
> surface.  AFAICS in the docs, 'r.neighbors' seems to do this, but it
> already needs a raster as input, so I'm not sure how best to proceed.
> Any feedback welcome.  Thanks.

r.in.xyz is probably what you need, but it doesn't allow you to supply a 
specific radius (it calculates the mean of all the points falling into a 
cell in a given resolution). I would imagine that it should be possible 
to add a radius option to r.in.xyz.

How about a combination of v.in.ascii + v.to.rast + r.neighbors ?

Moritz


More information about the grass-user mailing list