[GRASS-user] sum one raster map conditional on another raster map

Glynn Clements glynn at gclements.plus.com
Thu Mar 18 06:36:08 EDT 2010

stephen sefick wrote:

> I would like to sum all of the positive values of one raster map
> (NDVI) based on a raster containing many watersheds that have values
> 1-22.  Is there a way to do this in GRASS?  Or a way to export this
> information to R and get the same results.  I hope this is clear
> enough.

	r.statistics method=sum ...

This will round the cover values to integers, so you might need to
scale them first.

Glynn Clements <glynn at gclements.plus.com>

More information about the grass-user mailing list