<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body smarttemplateinserted="true" text="#000000" bgcolor="#FFFFFF">
You can use r.resamp.stats with aggregation method the sum<br>
<br>
Paulo<br>
<br>
<br>
<div class="moz-cite-prefix">On 15-04-16 09:02, Micha Silver wrote:<br>
</div>
<blockquote cite="mid:57109203.6070608@arava.co.il" type="cite">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<style type="text/css">body p { margin-bottom: 0cm; margin-top: 0pt; } </style>
Hello all,<br>
I have rasters in a fine resolution, with values of 1 and null. I
need to create, in a coarser resolution, new rasters where each
cell gets the total number of non-null pixels from the fine
resolution raster that are within the coarse pixel.<br>
<br>
The clunky method I worked out uses r.out.xyz and r.in.xyz.
Starting in the fine resolution, I export all (non-null) cell
locations with r.out.xyz. Then I switch to the coarse resolution
and do r.in.xyz with method=n. Seems to work, but is there
anything better, more elegant?<br>
<br>
Thanks,<br>
Micha<br>
<br>
<div class="moz-signature">-- <br>
<div dir="LTR"> Micha Silver<br>
Arava Drainage Authority<br>
+972-523-665918 </div>
</div>
<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></pre>
</blockquote>
<br>
</body>
</html>