[GRASS-user] t.rast.aggregate help
Maria Elena Martinotti
mariaelena.martinotti at hotmail.it
Tue May 12 04:51:03 PDT 2015
Hallo everybody,
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:
raster1 | start_time 2014-09-04 12:00:00 | end_time 2014-09-04 13:00:00
raster2 | start_time 2014-09-04 13:00:00 | end_time 2014-09-04 14:00:00
etc
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 just need the first aggregation for each granularity. I
came up with something like this:
for i in `seq 2 1 6` ;
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'");
done;
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?
Thanks for your help.
Maria Elena
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20150512/8d253215/attachment.html>
More information about the grass-user
mailing list