Opened 9 years ago

Last modified 5 years ago

#2715 new enhancement

wish: "higher that/lower than" flag and intervals definition in r.report and r.stats

Reported by: veroandreo Owned by:
Priority: normal Milestone: 7.6.2
Component: Raster Version: svn-releasebranch70
Keywords: r.stats, r.report Cc:
CPU: Unspecified Platform: All

Description

Hello,

If the user wants to know the percentage of the map or surface occupied by values higher or lower than a certain threshold or even in specific intervals, the option nsteps in both r.stats and r.report is not very useful. You need to change nsteps setting several times until you find a set of intervals more or less according to your needs (but always suboptimal).

Wish: A flag or parameter for "higher than/lower than" values in r.report and r.stats, and also the possibility to set specific intervals for the report of areas.

Hint: I know it can also be achieved creating designated masks with r.mapcalc (r.mask would only work with integer maps), and then using r.report or r.stats with nsteps=1 for thresholds or intervals of interest, but this is not really straightforward and easy for anybody.

Thanks much!

Vero

Change History (13)

comment:1 by neteler, 9 years ago

Milestone: 7.0.17.0.2

Ticket retargeted after 7.0.1 milestone closed

comment:2 by neteler, 8 years ago

Milestone: 7.0.27.0.3

Ticket retargeted after milestone closed

comment:3 by neteler, 8 years ago

Milestone: 7.0.3

Ticket retargeted after milestone closed

comment:4 by neteler, 8 years ago

Milestone: 7.0.4

Ticket retargeted after 7.0.3 milestone closed

comment:5 by martinl, 8 years ago

Milestone: 7.0.47.0.5

comment:6 by martinl, 8 years ago

Milestone: 7.0.57.3.0

comment:7 by martinl, 8 years ago

Milestone: 7.3.07.4.0

Milestone renamed

in reply to:  description comment:8 by veroandreo, 6 years ago

Replying to veroandreo:

Hello,

If the user wants to know the percentage of the map or surface occupied by values higher or lower than a certain threshold or even in specific intervals, the option nsteps in both r.stats and r.report is not very useful. You need to change nsteps setting several times until you find a set of intervals more or less according to your needs (but always suboptimal).

Wish: A flag or parameter for "higher than/lower than" values in r.report and r.stats, and also the possibility to set specific intervals for the report of areas.

Hint: I know it can also be achieved creating designated masks with r.mapcalc (r.mask would only work with integer maps), and then using r.report or r.stats with nsteps=1 for thresholds or intervals of interest, but this is not really straightforward and easy for anybody.

Here an example with r.mask and r.univar for integer maps (since nsteps in r.report or r.stats works only for floating point maps):

for MAP in `g.list type=raster pattern=*sur_refl*filt` ; do
 eval `r.info -r $MAP`
 if [ "$max" -ge 10000 ] ; then
  r.mask $MAP maskcats="10000 thru 16000"
  echo $MAP
  r.univar -g $MAP | grep ^n= >> stats
  r.mask -r 
 fi
done

This would be so much easier and fast if G7:r.report and G7:r.stats had a range option (and/or low and high flags) in order to customize the range of values one is interested in getting the report.

comment:9 by neteler, 6 years ago

Milestone: 7.4.07.4.1

Ticket retargeted after milestone closed

comment:10 by neteler, 6 years ago

Milestone: 7.4.17.4.2

comment:11 by martinl, 6 years ago

Milestone: 7.4.27.6.0

All enhancement tickets should be assigned to 7.6 milestone.

comment:12 by martinl, 5 years ago

Milestone: 7.6.07.6.1

Ticket retargeted after milestone closed

comment:13 by martinl, 5 years ago

Milestone: 7.6.17.6.2

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.