I’ve a question about temporal GIS framework in GRASS. How does t.rast.series work if I have not a several ordered data? Does it give to data different weights?
Ex:
If I have to calculate summer temperature in several years, but I have 3 raster data for the first year, 1 data for the second, 5 data for the third. What could be the best approach ?
M.
Hi,
unfortunately t.rast.series or t.rast.aggregate do not support
weighting. And i am not completely sure how weighting should work in
your specific case. But you can try to use t.rast.aggregate first to
compute the average for each year and then use t.rast.mapcalc2 to
perform weighting based on the number of map layer in a year of the
irregular dataset. Then t.rast.series can be used to compute a single
raster map layer from the aggregated and weighted space time raster
dataset. Finally r.mapcalc will give the desired result.
Some sample code that might help you:
{{{
t.rast.aggregate input=monthly_irregular output=yearly_mean
granularity="1 year" method=average
t.rast.mapcalc2 expression="weighted = yearly_mean * (yearly_mean
{contain,=#} monthly_irregular)"
t.rast.series input=weighted output=temp_sum method=sum
# Count the number of maps in monthly_irregular
num_maps=`t.rast.list input=monthly_irregular | wc -l`
r.mapcalc expression="temp_result = temp_sum / $num_maps"
}}}
Best regards
Soeren
2014-07-23 11:26 GMT+02:00 matteo cociancich <m.cociancich@gmail.com>:
I've a question about temporal GIS framework in GRASS. How does
t.rast.series work if I have not a several ordered data? Does it give to
data different weights?
Ex:
If I have to calculate summer temperature in several years, but I have 3
raster data for the first year, 1 data for the second, 5 data for the third.
What could be the best approach ?
M.
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev