[GRASS-dev] Re: [GRASS-user] how to measure distances in a constrained space

Glynn Clements glynn at gclements.plus.com
Thu Nov 13 14:41:59 EST 2008


Moritz Lennert wrote:

> >> r.grow.distance creates a distance map from each point, but
> >> there is no way of telling it anything about null cells or
> >> barriers. Even when setting a mask, r.grow.distance fills in
> >> the whole region, which seems like a bug to me.
> > 
> > 
> > perhaps if you invert the map?
> > 
> > 
> > ie put starting point in null space and it will grow until/around cells
> > with value?
> 
> You mean invert the mask, so that land masses are nulls and water 
> non-nulls ?
> 
> Doesn't work.
> 
> r.grow.distance just seems to ignore the mask. Glynn ?

As I wrote in this thread on grass-user:

> A mask just forces some input cells to be null. As a general
> principle, modules don't distinguish between cells which are null in
> the map itself and those which are null due to the mask.
> 
> In any case, the specific purpose of r.grow.distance is:
> 
>    r.grow.distance generates a raster map representing the distance to
>    the nearest non-null cell in the input map.

IOW, the mask just makes some input cells "disappear".

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


More information about the grass-dev mailing list