Rapid statistics for subareas of a raster map?

William L. Baker BakerWL at UWYO.EDU
Fri Aug 21 19:07:32 EDT 1998


You can use the "region" option and the r.le programs to get
this.  Set the map of patches as the region map.
Bill

> ----------
> From: 	hnw at mtqgrass.ESD.ORNL.GOV[SMTP:hnw at mtqgrass.ESD.ORNL.GOV]
> Sent: 	Friday, August 21, 1998 1:34 PM
> To: 	grassp-list at cecer.army.mil; grassu-list at cecer.army.mil
> Subject: 	Rapid statistics for subareas of a raster map?
> 
> I need to calculate n, mean, std, max, and min for a number of patches
> in a raster map.
> 
> I am currently masking the patch, zooming with g.region, and then using
> r.stats to spew the cells to an awk program which calculates the
> statistics.
> 
> But it takes a long time for g.region to "walk" the edges of the window
> down to each individual patch.  But if I don't window in the current
> region, it takes r.stats a long time to filter through all of the
> masked cells to get to the cells that are in the current patch.
> 
> Does anybody know of a better, faster approach for getting summary
> stats for patches in a raster map?
> 
>      ____                             Oak Ridge National Laboratory
>       /  )      /  /      /  /        P.O. Box 2008, M.S. 6274
>      /--<   o  /  /      /--/         Oak Ridge, TN  37830-6274
>     /___/__<__/__/_     /  / _        (423) 241-2748
>    William W. Hargrove                (423) 241-3870 (fax)
>    hnw at fire.esd.ornl.gov              http://www.esd.ornl.gov/~hnw
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/19980821/39826bb1/attachment.html


More information about the grass-user mailing list