[GRASS-dev] [GRASS GIS] #2620: r.neighbours should offer to ignore centre value
GRASS GIS
trac at osgeo.org
Sun Mar 15 02:27:26 PDT 2015
#2620: r.neighbours should offer to ignore centre value
--------------------------+-------------------------------------------------
Reporter: marisn | Owner: grass-dev@…
Type: enhancement | Status: new
Priority: minor | Milestone: 7.0.1
Component: Raster | Version: 7.0.0
Keywords: r.neighbours | Platform: Unspecified
Cpu: Unspecified |
--------------------------+-------------------------------------------------
Comment(by marisn):
Replying to [comment:2 glynn]:
> Replying to [ticket:2620 marisn]:
> > Currently there is not possible to ignore the centre cell when
performing calculation in r.neighbours.
> You can use the weight= option to supply a kernel in which the centre
cell has zero weight.
>
> A flag may still be worth having if this is a sufficiently common case.
First - it is a documentation problem as module description is "Makes each
cell category value a function of the category values assigned to the
cells around it" - the problem with word "around" - I read it as "nearby
cells excluding the centre cell". I took liberty to add a notice in r64860
that "around" means - "all surrounding cells + centre cell".
Second - it is not possible to use weights and circular neighbourhood at
the same time (documentation states: "The -c flag and the weights
parameter are mutually exclusive.")
wenzeslaus - thanks for hint. As I needed a count of neighbour cells, I
ended with mapcalc expression "if(isnull(original), count, count-1)"
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2620#comment:3>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list