Thank you, this actually worked.<br>As I actually wanted the value in meters what I did was to create a very hi-res grid with 20 meter resolution and then assign the value 400 in the rasterisation of the vector, to finally resample.<br>
<br>A direct rasterisation of the vector using the area column as attribute as previously suggested instead didn't work.<br><br>Many thanks,<br> Antonello <br><br><div class="gmail_quote">2012/6/12 Micha Silver <span dir="ltr"><<a href="mailto:micha@arava.co.il" target="_blank">micha@arava.co.il</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="direction:ltr" bgcolor="#FFFFFF" text="#660000"><div class="im">
On 12/06/2012 10:18, Antonello Lobianco wrote:
<blockquote type="cite">Hello everybody on the list!<br>
<br>
I am a "occasional" grass gis user and I'm stuck with a
relatively simple task: I have a high-res vector layer describing
only one category (Corine Land Cover map for "broad-leaved
forests", 311) and I want to rasterise it in a low-res 8-by-8 km
raster map where the value stored on each cell is the area (or,
that's the same, the share of the area) that the vector cover
within that cell.<br>
So each pixel/cell would have a value ranging from 0 (no
broad-leaved forest at all) to 64 (all the area of the pixel is
covered by broaded-leaved forests).<br>
I already managed to get the region with the right cell dimension,
add the area geometry to the vector and load it in grass, but I
don't know now how to rasterize it (v.to.raster seems to me to not
offer the option to put the area, but only a specific catgegory,
but maybe I am wrong??).<br>
<br>
</blockquote>
<br></div>
I'm not sure what your final goal is, but you can do what you've
described as follows:<br>
<br>
# First set resolution to 1 km<br>
g.region -p res=1000<br>
# Now rasterize the vector<br>
v.to.rast broad_leaf_vector out=broad_leaf_1km type=area use=val
val=1 <br>
# THis will give you as raster of 1km X 1km with values of 1 where
the original vector covered, and null otherwise<br>
# Now change resolution to 8km and use r.resamp.stats to resample to
your courser region:<br>
g.region -p res=8000<br>
# Use the "sum" method of r.resamp.stats to get the values for the
new, coarse raster<br>
r.resamp.stats broad_leaf_1km out=broad_leaf_8km method=sum<br>
# Should leave you with a new raster of res 8km, and with values
0-64<br>
<br>
HTH,<br>
Micha<br>
<br>
<blockquote type="cite"><div class="im">Thank you for any hint you could provide me.<br>
<br>
Antonello<br>
<br clear="all">
<br>
-- <br>
Antonello Lobianco<br>
INRA, Laboratoire d'Economie Forestière<br>
14 Rue Girardet - 54000 Nancy, France<br>
Tel: <a href="tel:%2B33.652392310" value="+33652392310" target="_blank">+33.652392310</a><br>
Email: <a href="mailto:antonello.lobianco@nancy-engref.inra.fr" target="_blank">antonello.lobianco@nancy-engref.inra.fr</a><br>
<a href="http://antonello.lobianco.org/" target="_blank">http://antonello.lobianco.org</a><br>
<br></div>
This mail was received via Mail-SeCure System.<br>
<br>
<fieldset></fieldset>
<br>
<pre><div class="im">_______________________________________________
grass-user mailing list
<a href="mailto:grass-user@lists.osgeo.org" target="_blank">grass-user@lists.osgeo.org</a>
<a href="http://lists.osgeo.org/mailman/listinfo/grass-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-user</a></div>
This mail was received via Mail-SeCure System.
</pre><span class="HOEnZb"><font color="#888888">
</font></span></blockquote><span class="HOEnZb"><font color="#888888">
<p><br>
</p>
<br>
<pre cols="72">--
Micha Silver
<a href="tel:052-3665918" value="+390523665918" target="_blank">052-3665918</a>
</pre>
</font></span></div>
</blockquote></div><br><br clear="all"><br>-- <br>Antonello Lobianco<br>INRA, Laboratoire d'Economie Forestière<br>14 Rue Girardet - 54000 Nancy, France<br>Tel: +33.652392310<br>Email: <a href="mailto:antonello.lobianco@nancy-engref.inra.fr" target="_blank">antonello.lobianco@nancy-engref.inra.fr</a><br>
<a href="http://antonello.lobianco.org/" target="_blank">http://antonello.lobianco.org</a><br>