r.neighbour and r.mask

4 messages Options
Embed this post
Permalink
Milton Cezar Ribeiro

r.neighbour and r.mask

Reply Threaded More More options
Print post
Permalink
Dear all,
 
Just suppose I have a very large - and irregular - region, and that I am running r.neighbors
to compute some moving windows stats. As my region is irregular, many of central
pixels will be NULL. If I use r.mask, it means that when I run r.neighbours the
processing will be faster than when I not set r.mask (supposing that the north, south, west and east
will be the same on both case)?
 
bests
 
milton
brazil=toronto

_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user
achim

Re: r.neighbour and r.mask

Reply Threaded More More options
Print post
Permalink
Hallo Milton,

Yes, it should be faster. (You could write a script with timestamps and
test on a small area how much faster it would be)

> If I use r.mask, it means that when I run
> r.neighbours the
> processing will be faster than when I not set r.mask (supposing that the
> north, south, west and east
> will be the same on both case)?

But be aware of filters that involve NULL values in there window. That
could cause NULLs where weren't before.

To be sure, write the filters manually with r.mapcalc and handle NULLs
as you like.

Best wishes,
Achim
_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user
Glynn Clements

Re: r.neighbour and r.mask

Reply Threaded More More options
Print post
Permalink
In reply to this post by Milton Cezar Ribeiro

Milton Cezar Ribeiro wrote:

> Just suppose I have a very large - and irregular - region, and that
> I am running r.neighbors to compute some moving windows stats. As my
> region is irregular, many of central pixels will be NULL. If I use
> r.mask, it means that when I run r.neighbours the processing will be
> faster than when I not set r.mask (supposing that the north, south,
> west and east will be the same on both case)?

There's no point in using r.mask to mask out pixels which are already
null. The mask simply forces specific pixels to be read as null; to
the module, such nulls are indistinguishable from nulls in the
original data.

--
Glynn Clements <[hidden email]>
_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user
Milton Cezar Ribeiro

Re: r.neighbour and r.mask

Reply Threaded More More options
Print post
Permalink
I Glynn,
 
Thanks for the reply. I was thinking (and must confess, I was wishing) that with r.mask those pixels that are outside of the mask (i.e. is NULL) can by skiped during the processing.
Anyway, pretty thanks.
 
milton

2009/7/7 Glynn Clements <[hidden email]>

Milton Cezar Ribeiro wrote:

> Just suppose I have a very large - and irregular - region, and that
> I am running r.neighbors to compute some moving windows stats. As my
> region is irregular, many of central pixels will be NULL. If I use
> r.mask, it means that when I run r.neighbours the processing will be
> faster than when I not set r.mask (supposing that the north, south,
> west and east will be the same on both case)?

There's no point in using r.mask to mask out pixels which are already
null. The mask simply forces specific pixels to be read as null; to
the module, such nulls are indistinguishable from nulls in the
original data.

--
Glynn Clements <[hidden email]>


_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user