[GRASS-dev] [GRASS GIS] #3756: r.watershed: flow accumulation wrong with edge contamination

GRASS GIS trac at osgeo.org
Tue Feb 19 15:39:10 PST 2019


#3756: r.watershed: flow accumulation wrong with edge contamination
-------------------------+-------------------------------------------------
  Reporter:  itati01     |      Owner:  grass-dev@…
      Type:  defect      |     Status:  new
  Priority:  normal      |  Milestone:
 Component:  Raster      |    Version:  svn-releasebranch76
Resolution:              |   Keywords:  r.watershed, flow accumulation,
       CPU:              |  edge contamination
  Unspecified            |   Platform:  Unspecified
-------------------------+-------------------------------------------------

Comment (by itati01):

 Dear Markus,

 Thank you for your comment.

 I understand the problem with nodata cells in flow accumulation and would
 normally drop edge-contaminated cells. However, this is an exceptional use
 case, with nodata cells within the catchment. So, I used the flag -a
 hoping to obtain the number of upslope cells. I would like to ignore the
 nodata cells, and can actually do so because they form a channel (which I
 burned into the DEM to avoid artifical inflow from outside the watershed).
 So, there should really be no flow out of these nodata cells.

 According to your explanation, my flow accumulation of -/+1 for cells 2
 and 6 within the rectangle in Figure 2 must be wrong. Cell 6, i.e. the 3rd
 cell in the 2nd row, only receives input from the 2 cells in row 3 which
 were correctly - as neighbors of nodata cells - set to -1. So, the weight
 of cell 6 should also be -1 (only flow from cells with nodata as neighbor)
 and the flow accumulation should be -/+3 - what I hoped to obtain.

 However, even with "regular" inflow, it would be nice to have an option to
 ignore edge contamination (feature request?). Just assume, we have 4
 upslope cells, of which 2 are edge contaminated. So, currently, we would
 get a flow accumulation of 1, not 5?

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/3756#comment:2>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list