[GRASS-user] Re: count pixels by attribute in sampling units
Patrick Giraudoux
patrick.giraudoux at univ-fcomte.fr
Tue Dec 25 05:02:36 EST 2007
Complement: any radius > 100 gives inconsistent results in the 'units'
file of r.le.par:
/Thèse Fritsch/PrépaFragStat/grass$ cat r.le.para/units
1 # of scales
5 # of units of scale 1.
-1078225628-1217465035 u_w, u_l of units in scale 1
100.5 radius of circles in scale 1
539113457 608735128 left, top of unit[1]
539113466 608734109 left, top of unit[2]
539114864 608734976 left, top of unit[3]
539115149 608733823 left, top of unit[4]
539113914 608733783 left, top of unit[5]
When I use a shorter radius, I get:
grass > cat r.le.para/units
1 # of scales
5 # of units of scale 1.
51 51 u_w, u_l of units in scale 1
25.5 radius of circles in scale 1
618 2586 left, top of unit[1]
627 1567 left, top of unit[2]
2025 2434 left, top of unit[3]
2310 1281 left, top of unit[4]
1075 1241 left, top of unit[5]
Patrick Giraudoux wrote:
> 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