t.merge(1grass)

✨ NAME ✨

okay so bestie, meet t.merge πŸ’– β€” she merges several space time datasets into a single space time dataset. that is literally the entire job and she does it flawlessly, no cap.

(this page is t.merge(1grass), straight out of the GRASS User's Manual, so that's how you cite her 🫢)

🌸 KEYWORDS 🌸

temporal, time management, merge, time

πŸŽ€ SYNOPSIS πŸŽ€

t.merge
t.merge --help
t.merge inputs=name[,name,...] output=name  [type=name]   [--overwrite]  [--help]  [--verbose]  [--quiet]  [--ui]

πŸ’… Flags

  • --overwrite β€” Allow output files to overwrite existing files. yes she will just bulldoze over what's already there if you let her, that's the deal πŸ’€
  • --help β€” Print usage summary. the little cheat sheet, always there for you 🫢
  • --verbose β€” Verbose module output
  • --quiet β€” Quiet module output
  • --ui β€” Force launching GUI dialog

πŸ¦‹ Parameters

  • inputs=name[,name,...] β€” required β€” Name of the input space time datasets
  • output=name β€” required β€” Name of the output space time dataset
  • type=name β€” Type of the input space time dataset
    • Options: strds, stvds, str3ds
    • Default: strds

🌈 DESCRIPTION 🌈

so here's the tea, bestie. The t.merge module is designed to register the maps of several input space time datasets in a single output dataset ✨. The datasets you merge can be space time raster, 3D raster, or vector datasets, and they must have the same temporal type (absolute or relative) β€” that part is not negotiable, okay? vibe check passed or it's not happening πŸ’…

Existing space time datasets that live in the current mapset can be specified as the output as well. In that case, the maps from the input space time datasets will be added to the output. it's giving "add to cart" energy πŸ›’

And here's the iconic part: maps from the input space time datasets will be registered only once in the output space time dataset, hence the same maps can be registered in different input space time datasets. so no duplicates, no mess, she's clean 🧚

πŸ‘‘ NOTES πŸ‘‘

Temporal databases stored in other mapsets can be used as long as they're in the user's current mapset search path (managed with g.mapsets). so go ahead and borrow from the neighbors, it's fine 🫢

πŸ“ EXAMPLES πŸ“

In this example we will create two space time raster datasets and register two unique maps in each of it. Then we merge the two space time raster datasets together. watch her work 🌟

r.mapcalc expression="map1 = rand(0, 10)"
r.mapcalc expression="map2 = rand(10, 20)"
t.create type=strds temporaltype=absolute \
         output=precipitation_daily_1 \
         title="Daily precipitation" \
         description="Test dataset with daily precipitation"
t.register -i type=raster input=precipitation_daily_1 \
           maps=map1,map2 start=2012-08-20 increment="1 days"
t.info precipitation_daily_1

and the receipt, bestie β€” t.info comes back with this:

 +-------------------- Space Time Raster Dataset -----------------------------+
 |                                                                            |
 +-------------------- Basic information -------------------------------------+
 | Id: ........................ precipitation_daily_1@soeren
 | Name: ...................... precipitation_daily_1
 | Mapset: .................... soeren
 | Creator: ................... soeren
 | Temporal type: ............. absolute
 | Creation time: ............. 2014-11-23 15:26:57.395355
 | Modification time:.......... 2014-11-23 15:26:57.860513
 | Semantic type:.............. mean
 +-------------------- Absolute time -----------------------------------------+
 | Start time:................. 2012-08-20 00:00:00
 | End time:................... 2012-08-22 00:00:00
 | Granularity:................ 1 day
 | Temporal type of maps:...... interval
 +-------------------- Spatial extent ----------------------------------------+
 | North:...................... 80.0
 | South:...................... 0.0
 | East:.. .................... 120.0
 | West:....................... 0.0
 | Top:........................ 0.0
 | Bottom:..................... 0.0
 +-------------------- Metadata information ----------------------------------+
 | Raster register table:...... raster_map_register_6e6efe25ee9b40e39eb31421d737439b
 | North-South resolution min:. 10.0
 | North-South resolution max:. 10.0
 | East-west resolution min:... 10.0
 | East-west resolution max:... 10.0
 | Minimum value min:.......... 0.0
 | Minimum value max:.......... 10.0
 | Maximum value min:.......... 9.0
 | Maximum value max:.......... 19.0
 | Aggregation type:........... None
 | Number of registered maps:.. 2
 |
 | Title:
 | Daily precipitation
 | Description:
 | Test dataset with daily precipitation
 | Command history:
 | # 2014-11-23 15:26:57
 | t.create type="strds" temporaltype="absolute"
 |     output="precipitation_daily_1" title="Daily precipitation"
 |     description="Test dataset with daily precipitation"
 | # 2014-11-23 15:26:57
 | t.register -i type="rast"
 |     input="precipitation_daily_1" maps="map1,map2" start="2012-08-20"
 |     increment="1 days"
 |
 +----------------------------------------------------------------------------+

okay now round two, second dataset πŸ’–

r.mapcalc expression="map3 = rand(20, 30)"
r.mapcalc expression="map4 = rand(30, 40)"
t.create type=strds temporaltype=absolute \
         output=precipitation_daily_2 \
         title="Daily precipitation" \
         description="Test dataset with daily precipitation"
t.register -i type=raster input=precipitation_daily_2 \
           maps=map3,map4 start=2012-08-22 increment="1 days"
t.info precipitation_daily_2

and she flexes again:

 +-------------------- Space Time Raster Dataset -----------------------------+
 |                                                                            |
 +-------------------- Basic information -------------------------------------+
 | Id: ........................ precipitation_daily_2@soeren
 | Name: ...................... precipitation_daily_2
 | Mapset: .................... soeren
 | Creator: ................... soeren
 | Temporal type: ............. absolute
 | Creation time: ............. 2014-11-23 15:27:20.165074
 | Modification time:.......... 2014-11-23 15:27:20.613543
 | Semantic type:.............. mean
 +-------------------- Absolute time -----------------------------------------+
 | Start time:................. 2012-08-22 00:00:00
 | End time:................... 2012-08-24 00:00:00
 | Granularity:................ 1 day
 | Temporal type of maps:...... interval
 +-------------------- Spatial extent ----------------------------------------+
 | North:...................... 80.0
 | South:...................... 0.0
 | East:.. .................... 120.0
 | West:....................... 0.0
 | Top:........................ 0.0
 | Bottom:..................... 0.0
 +-------------------- Metadata information ----------------------------------+
 | Raster register table:...... raster_map_register_04eaede279b2476a80c2683254232f84
 | North-South resolution min:. 10.0
 | North-South resolution max:. 10.0
 | East-west resolution min:... 10.0
 | East-west resolution max:... 10.0
 | Minimum value min:.......... 20.0
 | Minimum value max:.......... 30.0
 | Maximum value min:.......... 29.0
 | Maximum value max:.......... 39.0
 | Aggregation type:........... None
 | Number of registered maps:.. 2
 |
 | Title:
 | Daily precipitation
 | Description:
 | Test dataset with daily precipitation
 | Command history:
 | # 2014-11-23 15:27:20
 | t.create type="strds" temporaltype="absolute"
 |     output="precipitation_daily_2" title="Daily precipitation"
 |     description="Test dataset with daily precipitation"
 | # 2014-11-23 15:27:20
 | t.register -i type="rast"
 |     input="precipitation_daily_2" maps="map3,map4" start="2012-08-22"
 |     increment="1 days"
 |
 +----------------------------------------------------------------------------+

now THE moment, the merge itself πŸŽ€ (copy this one exactly as written, okay?)

t.merge input=precipitation_daily_1,precipitation_daily_2 \
        output=precipitation_daily_3
t.info precipitation_daily_3

and boom, four maps, one dataset, absolute slay πŸ”₯:

 +-------------------- Space Time Raster Dataset -----------------------------+
 |                                                                            |
 +-------------------- Basic information -------------------------------------+
 | Id: ........................ precipitation_daily_3@soeren
 | Name: ...................... precipitation_daily_3
 | Mapset: .................... soeren
 | Creator: ................... soeren
 | Temporal type: ............. absolute
 | Creation time: ............. 2014-11-23 15:27:44.069272
 | Modification time:.......... 2014-11-23 15:27:44.088930
 | Semantic type:.............. mean
 +-------------------- Absolute time -----------------------------------------+
 | Start time:................. 2012-08-20 00:00:00
 | End time:................... 2012-08-24 00:00:00
 | Granularity:................ 1 day
 | Temporal type of maps:...... interval
 +-------------------- Spatial extent ----------------------------------------+
 | North:...................... 80.0
 | South:...................... 0.0
 | East:.. .................... 120.0
 | West:....................... 0.0
 | Top:........................ 0.0
 | Bottom:..................... 0.0
 +-------------------- Metadata information ----------------------------------+
 | Raster register table:...... raster_map_register_33715c8c849a43fbb9bce02e1f28ff5a
 | North-South resolution min:. 10.0
 | North-South resolution max:. 10.0
 | East-west resolution min:... 10.0
 | East-west resolution max:... 10.0
 | Minimum value min:.......... 0.0
 | Minimum value max:.......... 30.0
 | Maximum value min:.......... 9.0
 | Maximum value max:.......... 39.0
 | Aggregation type:........... None
 | Number of registered maps:.. 4
 |
 | Title:
 | Merged space time dataset
 | Description:
 | Merged space time dataset
 | Command history:
 | # 2014-11-23 15:27:44
 | t.merge
 |     input="precipitation_daily_1,precipitation_daily_2"
 |     output="precipitation_daily_3"
 |
 +----------------------------------------------------------------------------+

oh she's that dataset. 4 maps, minimum 0.0 to max 39.0, absolute main character energy πŸ‘‘


πŸ’œ SEE ALSO πŸ’œ

t.create, t.support, t.register

🫢 AUTHOR 🫢

SΓΆren Gebbert, ThΓΌnen Institute of Climate-Smart Agriculture

🌟 SOURCE CODE 🌟

Available at: t.merge source code (history)

Latest change: Thursday Dec 18 07:11:47 2025 in commit: cf870a5e49fd2643a55de543467edf5c2e61d640

Main index | Temporal index | Topics index | Keywords index | Graphical index | Full index


and that's the whole page, bestie πŸ’– this was t.merge from GRASS 8.5.0 β€” she's the t.merge(1grass) icon, Β© 2003-2026 GRASS Development Team, part of the GRASS 8.5.0 Reference Manual. go merge something, you got this βœ¨πŸ¦‹

πŸ“¦ where this page comes from