counting the number of patches in a certain class

Malcolm Williamson malcolm at cast.uark.edu
Thu Jan 26 11:59:56 EST 1995


> 
> Hello,
> 
> I have a map of 4 classes and I would like to know the fastest way 
> to find the number of patches (raster polygons) within each 
> class.  Thanks for any suggestions.
> 
> -Eric
> 
> =========================================================================
> Eric Lambert					
> ENE Division	         	OR		GIS Labratory/Geography
> P.O. Box 9005					318 Davenport Hall
> Champaign, IL 61826-9005			Urbana, IL 61801
> 
> E-mail:lambert at gis.uiuc.edu			Lab#: (217) 333-5919
> WWW: http://ice.gis.uiuc.edu/LAESA/lambert/lambert.html
> =========================================================================
> 

The only way I know of within standard GRASS programs is to reclass your data
into 4 binary maps, and then run r.clump on each class map. The r.le programs
by William Baker may offer alternative techniques; I'm not sure how the speed
would compare.

Good luck,
-- 
Malcolm D. Williamson - GIS Specialist           E-mail: malcolm at cast.uark.edu
Center for Advanced Spatial Technologies      Telephone: (501) 575-6159
Ozark Rm. 12                                        Fax: (501) 575-5218 
University of Arkansas              
Fayetteville, AR 72701



More information about the grass-user mailing list