<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><p class="MsoNormal">Hallo everybody, <o:p></o:p></p><p class="MsoNormal"><br></p>

<p class="MsoNormal">I am trying to aggregate some time-stamped raster (placed in
an initial space-time dataset) but I have some problems; each raster represents
a 1h-cumulated rainfall, so I have something like this:<o:p></o:p></p><p class="MsoNormal"><br></p>

<p class="MsoNormal">raster1 | start_time 2014-09-04  12:00:00 | end_time 2014-09-04  13:00:00<o:p></o:p></p>

<p class="MsoNormal">raster2 | start_time 2014-09-04  13:00:00 | end_time 2014-09-04  14:00:00<o:p></o:p></p>

<p class="MsoNormal">etc<o:p></o:p></p>

<p class="MsoNormal"><br></p><p class="MsoNormal">I would like to aggregate from a certain datetime backward adopting
different granularities (2 hours, 3 hours, 4 hours, 5hours and 6 hours) but not
in a “massive” way, I <span style="font-size: 12pt;"> </span><span style="font-size: 12pt;">just </span><span style="font-size: 12pt;">need the first aggregation for each granularity. I
came up with something like this:</span></p><p class="MsoNormal"><br></p>

<p class="MsoNormal">for i in `seq 2 1 6` ;<o:p></o:p></p>

<p class="MsoNormal">do t.rast.aggregate -- o input=initial_dataset  output=${i}h_aggregate  method=sum basename=${i}h_aggregate   granularity="$i hours"   sampling=contains   where="start_time = datetime('2014-09-04
 14:00:00','-$i hours') and end_time
<= '2014-09-04  12:00:00'");<o:p></o:p></p>

<p class="MsoNormal">done;<o:p></o:p></p>

<p class="MsoNormal"><br></p><p class="MsoNormal">For i=2 for example, I would like to sum up raster1 and
raster2; if I ask for a t.rast.list of the 2h_aggregate dataset, star and end
time seem correct but if I do a query directly on one point of the raster maps
(raster1, raster2 and the output of the aggregation) I see that the results aren’t
correct. It seems that it didn’t perform the
aggregation.  It's because of the where query? <o:p></o:p></p>

<p class="MsoNormal"><br></p><p class="MsoNormal">Thanks for your help.<o:p></o:p></p>

<p class="MsoNormal">Maria Elena<o:p></o:p></p><br><br><p class="ecxMsoAutoSig"><br></p>                                        </div></body>
</html>