t.rast.aggregate.ds works like t.rast.aggregate but instead of defining a fixed granularity for temporal aggregation the time intervals of all maps registered in a second space time dataset (can be STRDS, STR3DS or STVDS) are used to aggregate the maps of the input space time raster dataset.

In this example we create 7 raster maps that will be registered in a single space time raster dataset named precipitation_daily using a daily temporal granularity. The names of the raster maps are stored in a text file that is used for raster map registration.

A space time vector dataset is created out of two vector maps with different temporal resolution. The maps are created using v.random. The first map has a granule of 3 days the second a granule of 4 days.

The space time raster dataset precipitation_daily with daily temporal granularity will be aggregated using the space time vector dataset resulting in the output space time raster dataset precipitation_agg. The aggregation method is set to sum to accumulate the precipitation values of all intervals in the space time vector dataset. The sampling option assures that only raster maps that are temporally during the time intervals of the space time vector dataset are considered for computation. Hence the option is set to contains (time stamped vector map layers temporally contain the raster map layers):