Opened 6 years ago

Closed 2 years ago

#2294 closed enhancement (fixed)

t.rast.aggregate: Name output rasters based on start-time

Reported by: sbl Owned by: grass-dev@…
Priority: normal Milestone: 7.4.0
Component: Temporal Version: svn-trunk
Keywords: t.rast.aggregate Cc:
CPU: All Platform: All

Description

Using a numerical suffix for aggregated time series data makes it less intuitive to use the results outside the TGRASS framework. One has to look up the time stamp for e.g. a rastermap "temperature_avg_months_317" in order to know which time periode it refers to (even those people who produced it), while "temperature_avg_months_1989_09" already tells something.

Please find attached a proposal for naming output rasters based on start time - truncated according to granularity, implemented in a flag (s).

The attached patch is a modification of a patch I made for GRAS 7.0 wich I currently use and where it works fine for absolute time datasets. Not sure if it is suitable for relative or cyclic time though and it has not been tested with GRASS 7.1. So it needs a critical review in any case.

I do not know if such a solution would be relevant for t.rast.accumulate too (I have not used the module yet)...

If you find it useful I can send a patch for GRASS 7.0 too.

Attachments (2)

time_suffix_modules.diff (4.1 KB) - added by sbl 6 years ago.
time_suffix_lib.diff (2.1 KB) - added by sbl 6 years ago.

Download all attachments as: .zip

Change History (15)

Changed 6 years ago by sbl

Attachment: time_suffix_modules.diff added

Changed 6 years ago by sbl

Attachment: time_suffix_lib.diff added

comment:1 Changed 5 years ago by sbl

Component: DefaultTemporal
CPU: UnspecifiedAll
Platform: UnspecifiedAll

comment:2 Changed 5 years ago by huhabla

Many thanks for your patches.

I have integrated it in r61066 and modified the aggregation methods to allow parallel processing and faster metadata management. The new aggregation methods are experimental, hence no backport to 7.0 is planned right now. Further testing is needed.

Your map name suffix approach is now available as library method and can be reused in other modules as well.

comment:3 Changed 5 years ago by sbl

Resolution: fixed
Status: newclosed

Great thanks! Closing the ticket.

comment:4 Changed 5 years ago by annakrat

Resolution: fixed
Status: closedreopened

I am reopening this ticket because there are unsolved issues here.

  • Can this patch handle relative timestamp?
  • We should keep option to choose between the temporal and numerical suffix. Possibly as a parameter?
  • With numerical suffix, it should pad the number with zeros.
  • This should be applied to all t.* modules generating new maps.

comment:5 in reply to:  4 ; Changed 5 years ago by annakrat

Replying to annakrat:

I am reopening this ticket because there are unsolved issues here.

  • Can this patch handle relative timestamp?
  • We should keep option to choose between the temporal and numerical suffix. Possibly as a parameter?
  • With numerical suffix, it should pad the number with zeros.

I did that in r61888.

  • This should be applied to all t.* modules generating new maps.

comment:6 in reply to:  5 Changed 5 years ago by annakrat

Replying to annakrat:

I did that in r61888.

Sorry for the formatting, the commit applies to the zero padding part only.

comment:7 in reply to:  4 Changed 4 years ago by lucadelu

Replying to annakrat:

I am reopening this ticket because there are unsolved issues here.

  • Can this patch handle relative timestamp?
  • We should keep option to choose between the temporal and numerical suffix. Possibly as a parameter?
  • With numerical suffix, it should pad the number with zeros.
  • This should be applied to all t.* modules generating new maps.

After discussion in mailing list we replace -s flag with suffix option, this is done for most of the involved modules in r67935, r67936, r67939, r67940, r67942, r67944. Missing modules will be implemented in the next days.

comment:8 Changed 4 years ago by lucadelu

Other modules modified in r67944.

I also implemented algebra and mapcalc modules but there are still some errors, using testsuite. I will investigate in the next days.

comment:9 Changed 4 years ago by neteler

Milestone: 7.1.07.2.0

Milestone renamed

comment:10 Changed 3 years ago by neteler

Milestone: 7.2.07.2.1

Ticket retargeted after milestone closed

comment:11 Changed 3 years ago by martinl

Milestone: 7.2.17.2.2

comment:12 Changed 2 years ago by martinl

Milestone: 7.2.27.4.0

All enhancement tickets should be assigned to 7.4 milestone.

comment:13 Changed 2 years ago by sbl

Resolution: fixed
Status: reopenedclosed

Closing this as fixed, as remaining modules that should get the suffix option are addressed here: https://trac.osgeo.org/grass/ticket/3302

Note: See TracTickets for help on using tickets.