On Thu, Apr 25, 2013 at 10:26 PM, Markus Metz <[email protected] > wrote:
> r.info reports max of the raster map as it is, r.univar reports max > for the current region settings. Since r.mapcalc uses the current > region settings, you should really use r.univar instead of r.info. Thanks for the precision. My current region is set using the raster map. On Fri, Apr 26, 2013 at 10:29 AM, Markus Neteler <[email protected]> wrote: > > > GRASS 6.4.3svn (nc_spm_08):~ > eval `r.univar -g elevation` > GRASS 6.4.3svn (nc_spm_08):~ > echo $max > 156.329864501953 > GRASS 6.4.3svn (nc_spm_08):~ > r.mapcalc "newrast = myrast * 100.0 / $max" > > Note that I wrote 100.0 for floating point arithmetics. > > If you really want r.info, then likewise with: > > GRASS 6.4.3svn (nc_spm_08):~ > eval `r.info -gr elevation` > > markusN > Nice alternative, indeed. Thanks to all of you
_______________________________________________ grass-user mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-user
