[GRASS-user] Buffering large grid maps

Moritz Lennert mlennert at club.worldonline.be
Wed Jul 23 10:49:58 EDT 2008


On 22/07/08 13:52, Glynn Clements wrote:
> Milton Cezar Ribeiro wrote:
> 
>> Hi Glynn Clements,
>>
>> Thanks for your reply. In fact I need to generate a (uncontroled) distance
>> map from all my values=1.
>> I confess that I don´t understood how r.grow will help me on this task.
>> I need to build a for looping and grow and grow many times the new generated
>> map?
>> Or is there a a way of simple generate a distance map on one command?
> 
> "r.grow ... in=1 out=2" has the same effect as r.buffer with a single
> distance, except that r.grow's radius= option is measured in cells
> while r.buffer's distance= option is measured in physical units (e.g. 
> metres).
> 
> You can get the same effect as r.buffer with multiple distances by
> running r.grow once for each distance value, then overlaying the
> results, from largest to smallest buffer size.
> 
> r.grow will be quite a bit slower, particularly for large distances,
> but it doesn't require that the map fits into memory.
> 
> Alternatively, you could reduce the resolution, so that the map fits
> into memory. Or you could run r.buffer on smaller sections of the
> data, then merge the results with "r.series method=minimum".
> 

Not sure I understand correctly what you are trying to do, but maybe you 
could use r.cost on a map with cell value = resolution and with your 
binary map as starting points (start_rast) ?

Moritz


More information about the grass-user mailing list