[GRASS-user] calculate percentage of land use in larger cells
Moritz Lennert
mlennert at club.worldonline.be
Tue Nov 26 02:47:39 PST 2013
Hi,
I'm pretty sure that this has been discussed before and even that some
solution already exists, but I just can't seem to find the right search
terms to put my hands on it:
I have a raster layer with landcover at 0:00:10 resolution. I would like
for a select of the landcover classes raster layers at 0:10 resolution
with the percentage of surface of the respective class in the new pixel.
Currently I'm thinking of the following possible work flow:
- at resolution of landover map, for each class:
- r.mapcalc classX = if(cover=X,1,0)
- at coarser resolution
- r.resamp.stats in=classX out=classX_total method=sum
- r.mapcalc "classX_perc = classX_total / perc"
As an option one could also replace r.resamp.stats with
r.out.xyz/r.in.out.xyz, but I'm not sure that there would be any
advantage to that.
My question is: is there some option in an existing module (or addon
module) that already does something like this ?
Moritz
More information about the grass-user
mailing list