landam / grass-gis-git-migration-test

0 stars 0 forks source link

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

Open landam opened 5 years ago

landam commented 5 years ago

Reported by veroandreo on 20 Jul 2015 17:22 UTC 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

GRASS GIS version and provenance

svn-releasebranch70

Migrated-From: https://trac.osgeo.org/grass/ticket/2715

landam commented 5 years ago

Comment by neteler on 30 Jul 2015 21:19 UTC Ticket retargeted after 7.0.1 milestone closed

landam commented 5 years ago

Comment by neteler on 20 Nov 2015 17:08 UTC Ticket retargeted after milestone closed

landam commented 5 years ago

Comment by neteler on 28 Jan 2016 08:02 UTC Ticket retargeted after milestone closed

landam commented 5 years ago

Comment by neteler on 28 Jan 2016 08:06 UTC Ticket retargeted after 7.0.3 milestone closed

landam commented 5 years ago

Modified by @landam on 12 May 2016 06:36 UTC

landam commented 5 years ago

Modified by @landam on 25 Aug 2016 15:51 UTC

landam commented 5 years ago

Comment by @landam on 27 Aug 2016 13:42 UTC Milestone renamed

landam commented 5 years ago

Comment by veroandreo on 23 Nov 2017 21:13 UTC Replying to [ticket:2715 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 https://grass.osgeo.org/grass77/manuals/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..html

landam commented 5 years ago

Comment by neteler on 26 Jan 2018 11:40 UTC Ticket retargeted after milestone closed

landam commented 5 years ago

Modified by neteler on 12 Jun 2018 20:48 UTC

landam commented 5 years ago

Comment by @landam on 25 Sep 2018 16:52 UTC All enhancement tickets should be assigned to 7.6 milestone.

landam commented 5 years ago

Comment by @landam on 25 Jan 2019 21:07 UTC Ticket retargeted after milestone closed