<html style="direction: ltr;">
<head>
<meta content="text/html; charset=windows-1255"
http-equiv="Content-Type">
<style>body p { margin-bottom: 0cm; margin-top: 0pt; } </style>
</head>
<body style="direction: ltr;"
bidimailui-detected-decoding-type="preferred-charset"
bgcolor="#FFFFFF" text="#660000">
On 12/06/2012 10:18, Antonello Lobianco wrote:
<blockquote
cite="mid:CAOibvJFd5ACCG70rVVVML1yihJo+4FjUBQiK3b+NiJcPVD902Q@mail.gmail.com"
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>
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
cite="mid:CAOibvJFd5ACCG70rVVVML1yihJo+4FjUBQiK3b+NiJcPVD902Q@mail.gmail.com"
type="cite">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: +33.652392310<br>
Email: <a moz-do-not-send="true"
href="mailto:antonello.lobianco@nancy-engref.inra.fr"
target="_blank">antonello.lobianco@nancy-engref.inra.fr</a><br>
<a moz-do-not-send="true" href="http://antonello.lobianco.org/"
target="_blank">http://antonello.lobianco.org</a><br>
<br>
This mail was received via Mail-SeCure System.<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
grass-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/grass-user">http://lists.osgeo.org/mailman/listinfo/grass-user</a>
This mail was received via Mail-SeCure System.
</pre>
</blockquote>
<p><br>
</p>
<br>
<pre class="moz-signature" cols="72">--
Micha Silver
052-3665918
</pre>
</body>
</html>