[GRASSLIST:5023] Re: Looking for something like r.grow, but that retains value..

Thomas Dewez thomas.dewez at brunel.ac.uk
Thu Nov 21 04:11:09 EST 2002


> Hi folks,
> 
> I'm looking to 'grow' a line in a raster much like r.grow would do,
> but have the new cells take on the value of its nearest tangential
> neighbor- not 1. Basically I have a thin line of varying data which I
> am trying to emphasize, to make it easier to see.
> 
> Any ideas?

I thought r.grow would have suited your purpose. The man pages 
say that the -b switch forces the output to be binary, by default 
though, the attribute of the source is preserved.

Here's the man page extract:
"-b 
Output a binary raster map layer having only zero-one category 
values, regardless of the category values in the input map layer. In 
this case, all cells with a non-zero category value in the input map 
layer are assigned to category 1 in the output map layer. If the -b 
flag is not used, these cells will retain their original non-zero 
category values. In either case, all cells whose category value is 
changed from 0 during the growing process are assigned a category 
value of 1 in the output map. "


Hope this helps

Thomas




More information about the grass-user mailing list