Opened 16 years ago
Closed 16 years ago
#518 closed enhancement (fixed)
negative flow accumulation with r.watershed SFD or MFD
Reported by: | dylan | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | Raster | Version: | svn-develbranch6 |
Keywords: | r.watershed | Cc: | |
CPU: | x86-32 | Platform: | All |
Description
Hi,
I just noticed that there are negative flow accumulation numbers in the output from the recently updated r.watershed. I am working with today's SVN (develbranch_6). Here is an example from the spearfish dataset:
g.region rast=elevation.10m r.watershed --o -f elevation=elevation.10m accumulation=acc r.info acc # SFD: Range of data: min = -811721.000000 max = 735505.000000 # MFD: Range of data: min = -641132.649622 max = 720490.193602
This looks like an overflow problem...but I cannot seem to find anything obvious in the code.
Change History (5)
comment:1 by , 16 years ago
comment:2 by , 16 years ago
Type: | defect → enhancement |
---|
Maybe I overlooked the documentation. This is a feature, perhaps a flag as Michael suggests would be useful.
comment:3 by , 16 years ago
IMHO, there is still some cleaning up to do for r.watershed. I left some things in it for backwards compatibility. One such thing is the "visual" output which I regard as obsolete because "accumulation" output now comes with a (better I hope) colortable by default. The "visual" output could be removed and another output option be added, e.g. called "absacc" that gives absolute accumulation values. That would however break backwards compatibility, a new flag would not.
There is a good reason *not* to add this option/flag, nicely illustrated by Dylan creating this ticket. The purpose of negative accumulation values is to make people wonder what on earth is going here, then figure out that not the whole catchment area under study was included and expand the computational region accordingly to get proper results: only positive accumulation values for the catchment under study.
comment:4 by , 16 years ago
Component: | default → Raster |
---|---|
Platform: | Linux → All |
comment:5 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
The new -a flag should have fixed it, closing ticket.
Hmm.. It looks like this is not an overflow, rather some areas are randomly getting their sign flipped. ABS(flow_acc) results in a map that *looks* correct.