[GRASS-user] Re: count pixels by attribute in sampling units

Patrick Giraudoux patrick.giraudoux at univ-fcomte.fr
Tue Dec 25 04:20:39 EST 2007


Doubts confirmed... Circles in r.le.setup may not reach the expected 
size.  For instance, using the option 'sampling units centered over 
sites', if I take a 25.5 cells radius everything works fine (I get a 
total of 2053 pixels in each sampling units, which looks reasonable 
25.5^2 * pi = 2042.8), but if I want a larger sampling unit of 125.5 
pixel radius, I get a warning asking confirmation whether I want a 
radius > 100 pixels, and then get a total area of 2601 pixels, which is 
far below what is expected from a 125.5 radius (125.5^2 * pi = 49480.87).

The pixel size is 4 m in reality, and the two radius correspond to appx 
100m and 500m...

Any hint welcome !

Patrick


Patrick Giraudoux wrote:
> Sorry to reply to myself... I just though this could help other 
> listers...
>
> It seems that r.le.patch provides a way to get a count of cells by 
> attribute in each sampling unit with the option att=a5. One must 
> previously define each attribute value as a group (e.g. with 
> r.le.setup) and things work fine at least with rectangles. I will have 
> some control trials with circles later on...
>
> Patrick
>
>
> Patrick Giraudoux wrote:
>> Dear listers,
>>
>> I am exploring r.le and r.li, but I am afraid those two sets of 
>> programmes are providing what I need only partly. Before using them 
>> for shape and diversity analysis, I just would like to get the number 
>> of pixels (or the area) by attributes types (eg the attribute is a 
>> class of CORINE landcover or any classified image) in each sampling 
>> unit into a text file. Sampling units would be circles of a given 
>> radius centered over sites (overlayed on the raste to analyse). I can 
>> provide either a vector file with the center points or imported 
>> polygon shapefiles. Surprisingly it seems that this simple statistics 
>> is not provided in r.le (maybe wrong ?). I suppose this may be due to 
>> the fact there is a much more simple way to do it in GRASS, but 
>> cannot find it in Neteler and Mitasova book.
>>
>> Any hint welcome,
>>
>> Patrick
>>
>>
>>
>
>




More information about the grass-user mailing list