CONFIDENTIALITY NOTICE: This communication is intended only for the use of the individual or entity to which it is addressed. This message contains information from the State of California, California Geological Survey, which may be privileged, confidential and exempt from disclosure under applicable law, including the Electronic Communications Privacy Act. If the reader of this communication is not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited.
CONFIDENTIALITY NOTICE: This communication is intended only for the use of
the individual or entity to which it is addressed. This message contains
information from the State of California, California Geological Survey,
which may be privileged, confidential and exempt from disclosure under
applicable law, including the Electronic Communications Privacy Act. If the
reader of this communication is not the intended recipient, you are hereby
notified that any dissemination, distribution, or copying of this
communication is strictly prohibited.
--
Dylan Beaudette
Soils and Biogeochemistry Graduate Group
University of California at Davis
530.754.7341
I was just looking at the CVS version of r.neighbors but didn't see where I can specify use an arbitrary neighbourhood shape unless it has something to do with the weight=string option. Unfortunately the documentation doesn't mention how to use it.
So, with r.neighbors, how would I annulus shape neighbourhood shape?
CONFIDENTIALITY NOTICE: This communication is intended only for the use of the individual or entity to which it is addressed. This message contains information from the State of California, California Geological Survey, which may be privileged, confidential and exempt from disclosure under applicable law, including the Electronic Communications Privacy Act. If the reader of this communication is not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited.
-----Original Message-----
From: Glynn Clements [mailto:glynn@gclements.plus.com]
Sent: Wednesday, August 29, 2007 7:21 PM
To: dylan.beaudette@gmail.com
Cc: grassuser@grass.itc.it; Moskovitz, Bob
Subject: Re: [GRASS-user] Looking for a Grass equivalent to
ESRI'sFocalmean(grid, ANNULUS, irad, orad)
Dylan Beaudette wrote:
not sure if there is any simple way to compute the neighborhood stats via an
annulus shape, but you can use r.neighbors for a rectangular window.
The current CVS version of r.neighbors allows the use of an arbitrary
neighbourhood shape, as well as per-neighbor weights.
On Fri, 2007-08-31 at 17:15 -0700, Moskovitz, Bob wrote:
Hi Glynn,
I was just looking at the CVS version of r.neighbors but didn't see where I can specify use an arbitrary neighbourhood shape unless it has something to do with the weight=string option. Unfortunately the documentation doesn't mention how to use it.
That would be Glynn's documentation skills at work. I'll try to
correct that.
Yes, you use the 'weight=' option.
So, with r.neighbors, how would I annulus shape neighbourhood shape?
CONFIDENTIALITY NOTICE: This communication is intended only for the use of the individual or entity to which it is addressed. This message contains information from the State of California, California Geological Survey, which may be privileged, confidential and exempt from disclosure under applicable law, including the Electronic Communications Privacy Act. If the reader of this communication is not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited.
BTW, you're sending to a public and well replicated list. There is no
such thing as express or implied confidentiality here.
--
Brad Douglas <rez touchofmadness com> KB8UYR/6
Address: 37.493,-121.924 / WGS84 National Map Corps #TNMC-3785
I was just looking at the CVS version of r.neighbors but didn't see
where I can specify use an arbitrary neighbourhood shape unless it has
something to do with the weight=string option. Unfortunately the
documentation doesn't mention how to use it.
The argument to the weight= option is the name of a file containing
weights. The file should contain NxN floating-point values (anything
acceptable to scanf's %f conversion).
So, with r.neighbors, how would I annulus shape neighbourhood shape?
Create a weights file with a non-zero value for each cell which should
be part of the neighbourhood, and zero elsewhere. E.g. for size=5:
0 1 1 1 0
1 0 0 0 1
1 0 0 0 1
1 0 0 0 1
0 1 1 1 0
The minimum, maximum, diversity and interspersion aggregates don't
care about the actual weight; they simply discard any values with a
zero weight and retain those with a non-zero weight.
For the other aggregates, the way in which the weights affect the
aggregate is fairly intuitive. In particular, an integer weight has
the same effect as repeating the value that may times (integer weights
aren't treated specially; this is just a consequence of how the
weights are handled).
Finally, note that r.neighbors, r.series and r.resamp.stats all use
use the same code for the aggregates (although r.series only uses the
unweighted forms).
On Saturday 01 September 2007, Glynn Clements wrote:
Moskovitz, Bob wrote:
> I was just looking at the CVS version of r.neighbors but didn't see
> where I can specify use an arbitrary neighbourhood shape unless it has
> something to do with the weight=string option. Unfortunately the
> documentation doesn't mention how to use it.
The argument to the weight= option is the name of a file containing
weights. The file should contain NxN floating-point values (anything
acceptable to scanf's %f conversion).
> So, with r.neighbors, how would I annulus shape neighbourhood shape?
Create a weights file with a non-zero value for each cell which should
be part of the neighbourhood, and zero elsewhere. E.g. for size=5:
0 1 1 1 0
1 0 0 0 1
1 0 0 0 1
1 0 0 0 1
0 1 1 1 0
This is an excellent update. If this does not make it into the docs soon, let
me know and I can cook up some example HTML + images.
cheers,
Dylan
The minimum, maximum, diversity and interspersion aggregates don't
care about the actual weight; they simply discard any values with a
zero weight and retain those with a non-zero weight.
For the other aggregates, the way in which the weights affect the
aggregate is fairly intuitive. In particular, an integer weight has
the same effect as repeating the value that may times (integer weights
aren't treated specially; this is just a consequence of how the
weights are handled).
Finally, note that r.neighbors, r.series and r.resamp.stats all use
use the same code for the aggregates (although r.series only uses the
unweighted forms).
--
Dylan Beaudette
Soils and Biogeochemistry Graduate Group
University of California at Davis
530.754.7341
I was just looking at the CVS version of r.neighbors but didn't see where I
can specify use an arbitrary neighbourhood shape unless it has something to
do with the weight=string option. Unfortunately the documentation doesn't
mention how to use it.
So, with r.neighbors, how would I annulus shape neighbourhood shape?
see also r.mfilter.
Hamish
____________________________________________________________________________________
Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase. http://farechase.yahoo.com/