t.rast.list(1grass)

✨ NAME ✨

t.rast.list β€” the GRASS User's Manual page for it, bestie. It lists registered maps of a space time raster dataset. That's the whole assignment, and it eats. πŸ’…


🌸 KEYWORDS 🌸

temporal, map management, raster, list, time

Like… five words and yet the entire personality is right there. πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

t.rast.list
t.rast.list --help
t.rast.list [-u] input=name  [order=string[,string,...]]
[columns=string[,string,...]]   [where=sql_query]   [method=string]
[granule=string]  format=name  [separator=character]   [output=name]
[--overwrite]  [--help]  [--verbose]  [--quiet]  [--ui]

🚩 Flags

  • -u β€” Suppress printing of column names. No header row, just the raw data, silent and mysterious. πŸ™ˆ
  • --overwrite β€” Allow output files to overwrite existing files. Yes queen, bulldoze it. πŸ”₯
  • --help β€” Print usage summary. Classic.
  • --verbose β€” Verbose module output. It will tell you everything. 🌈
  • --quiet β€” Quiet module output. Shhh. 🀫
  • --ui β€” Force launching GUI dialog. For when you want ✨buttons✨ instead of terminal energy.

πŸŽ€ Parameters

  • input=name β€” [required] Name of the input space time raster dataset. This one is not optional, bestie, you have to feed it a STRDS. 😭
  • order=string[,string,...] β€” Sort the space time dataset by category. Because chaos is not a sorting strategy. Options: id, name, semantic_label, creator, mapset, temporal_type, creation_time, start_time, end_time, north, south, west, east, nsres, ewres, cols, rows, number_of_cells, min, max
  • columns=string[,string,...] β€” Columns to be printed to stdout. Pick your faves, the output is fully customizable. Options: id, name, semantic_label, creator, mapset, temporal_type, creation_time, start_time, end_time, north, south, west, east, nsres, ewres, cols, rows, number_of_cells, min, max, interval_length, distance_from_begin
  • where=sql_query β€” WHERE conditions of SQL statement without 'where' keyword used in the temporal GIS framework. Yeah β€” you write the condition, GRASS handles the where part itself, iykyk. Example: start_time > '2001-01-01 12:30:00'
  • method=string β€” Method used for data listing. Options: list, cols, comma, delta, deltagaps, gran. Default: list
  • granule=string β€” The granule to be used for listing. The granule must be specified as string eg.: absolute time "1 months" or relative time "1". Very specific, very demure.
  • format=name β€” [required] Output format. Options: plain, line, json, yaml, csv. Default: plain
    • plain: Plain text output
    • line: Comma separated list of map names
    • json: JSON (JavaScript Object Notation)
    • yaml: YAML (YAML Ain't Markup Language)
    • csv: CSV (Comma Separated Values)
  • separator=character β€” Field separator character between the output columns. Special characters: pipe, comma, space, tab, newline. Default: pipe. Glue of your choosing. 🫢
  • output=name β€” Name for output file. Send it somewhere instead of screaming into stdout.

πŸ’– DESCRIPTION πŸ’–

So here's the tea, bestie. ✨ t.rast.list lists time stamped raster map layers that are registered in a space time raster dataset. It gives you several options to list map layers along with their metadata. Listing of map layers can be ordered by metadata, metadata columns can be specified, and SQL where conditions can be provided to select a map layer subset of the input space time raster dataset. The way this works: most of the raster map specific metadata is available for column selection, sorting and SQL where statements. Obsessed. πŸ‘‘

Using the method option lets you pick between different methods to list map layers. Method list is the default option and it's sensitive to the column, order and where options. Main character energy, honestly. 🌟

  • Wanna print interval length in days plus distance from the begin? Use method delta.
  • Method deltagap will additionally print temporal gaps between map layers. (Gaps! The drama! πŸ’€)
  • The gran method allows the listing of map layers sampled by a user defined granule. As default, the granularity of the space time raster dataset is used for sampling.

Now, a very important rules moment: while method list supports all columns except for interval_length and distance_from_begin, methods delta, deltagap, and gran support only the following columns: id, name, mapset, start_time, end_time, interval_length, and distance_from_begin. And the order option is only available with method list. No cap. πŸŽ€

⚠️ Methods cols and comma are depreciated. (That's their spelling, not mine πŸ’….) The cols method is replaced by the plain format and the comma method is replaced by the line format.

The format option specifies the format of the output data, and this part is lowkey the best part:

  • The default plain format will simply print user specified metadata columns of one map layer per line, separated by a pipe by default.
  • The line format will list fully qualified map names (name and mapset) as a comma-separated list of values that can be used as input for spatial modules.
  • The csv format will print data in the CSV format using comma as the value separator (delimiter) and double quote for text field quoting.
  • The json format generates JSON and, if the PyYAML package is installed, the yaml format generates YAML.
  • The column (or item) separator can be specified with the separator option for plain, line, and csv.

ok that's the setup β€” the rest is coming, don't go anywhere πŸ¦‹

✨ EXAMPLES ✨

okay bestie, buckle up πŸ’– this is the fun part. Here's a whole lil' buffet of the options you can throw at map layers when you're listing them. no cap, they're all useful.

πŸŽ€ Default query

run it with zero extra flags and you get the standard glow-up: name, mapset, start_time, end_time for every single map chillin' in the space time dataset 🌸

t.rast.list tempmean_monthly
name|mapset|start_time|end_time
2009_01_tempmean|climate_2000_2012|2009-01-01 00:00:00|2009-02-01 00:00:00
2009_02_tempmean|climate_2000_2012|2009-02-01 00:00:00|2009-03-01 00:00:00
....
2012_11_tempmean|climate_2000_2012|2012-11-01 00:00:00|2012-12-01 00:00:00
2012_12_tempmean|climate_2000_2012|2012-12-01 00:00:00|2013-01-01 00:00:00

🌸 Add more info

want to curate the vibe? this one lets you pick which columns get the spotlight ✨

t.rast.list tempmean_monthly columns=name,start_time,min,max
name|start_time|min|max
2009_01_tempmean|2009-01-01 00:00:00|-3.380823|7.426054
2009_02_tempmean|2009-02-01 00:00:00|-1.820261|8.006386
...
2009_01_tempmean|2009-01-01 00:00:00|-3.380823|7.426054
2009_02_tempmean|2009-02-01 00:00:00|-1.820261|8.006386

πŸ’… Filtering the result by value

watch this β€” we're only letting through the maps whose max value is bigger than 24. it's giving "only the hot ones" πŸ”₯

t.rast.list tempmean_monthly columns=name,start_time,min,max where="max > 24"
name|start_time|min|max
2009_06_tempmean|2009-06-01 00:00:00|15.962669|25.819681
2009_07_tempmean|2009-07-01 00:00:00|15.32852|26.103664
2009_08_tempmean|2009-08-01 00:00:00|16.37995|27.293282
....
2012_06_tempmean|2012-06-01 00:00:00|14.929379|24.000651
2012_07_tempmean|2012-07-01 00:00:00|18.455802|28.794653
2012_08_tempmean|2012-08-01 00:00:00|15.718526|26.151115

⏰ Filtering the result by time range

same energy, but now it's a time thing β€” only maps that fall inside the range you set (from .. to) πŸ•°οΈ

t.rast.list tempmean_monthly columns=name,start_time,min,max \
  where="start_time > ’2009-06-01 00:00:00’ and start_time < ’2012-08-01 00:00:00’"
name|start_time|min|max
2009_06_tempmean|2009-06-01 00:00:00|15.962669|25.819681
2009_07_tempmean|2009-07-01 00:00:00|15.32852|26.103664
2009_08_tempmean|2009-08-01 00:00:00|16.37995|27.293282
....
2012_06_tempmean|2012-06-01 00:00:00|14.929379|24.000651
2012_07_tempmean|2012-07-01 00:00:00|18.455802|28.794653
2012_08_tempmean|2012-08-01 00:00:00|15.718526|26.151115

πŸ” Filtering the result by selecting recurring timestamps

this is the "it happens every year, bestie" filter 😌 only maps that fall into a recurring time range β€” here it's one month per year:

t.rast.list Tseasonal_fieldata_garda where="strftime(’%m’, start_time)=’06’"

πŸ¦‹ Using method option

method lets you show the raster in a completely different way. by default the cols value is used. but say comma and it'll just print the plain list of maps inside the space time dataset β€” obsessed with how tidy that is πŸ‘‘

t.rast.list method=comma input=tempmean_monthly
2009_01_tempmean@climate_2009_2012,2009_02_tempmean@climate_2009_2012,2009_03_tempmean@climate_2009_2012, \
2009_04_tempmean@climate_2009_2012,2009_05_tempmean@climate_2009_2012,2009_06_tempmean@climate_2009_2012, \
2009_07_tempmean@climate_2009_2012,2009_08_tempmean@climate_2009_2012,2009_09_tempmean@climate_2009_2012, \
2009_10_tempmean@climate_2009_2012,2009_11_tempmean@climate_2009_2012,2009_12_tempmean@climate_2009_2012, \
2010_01_tempmean@climate_2009_2012,2010_02_tempmean@climate_2009_2012,2010_03_tempmean@climate_2009_2012, \
2010_04_tempmean@climate_2009_2012,2010_05_tempmean@climate_2009_2012,2010_06_tempmean@climate_2009_2012, \
2010_07_tempmean@climate_2009_2012,2010_08_tempmean@climate_2009_2012,2010_09_tempmean@climate_2009_2012, \
2010_10_tempmean@climate_2009_2012,2010_11_tempmean@climate_2009_2012,2010_12_tempmean@climate_2009_2012, \
2011_01_tempmean@climate_2009_2012,2011_02_tempmean@climate_2009_2012,2011_03_tempmean@climate_2009_2012, \
2011_04_tempmean@climate_2009_2012,2011_05_tempmean@climate_2009_2012,2011_06_tempmean@climate_2009_2012, \
2011_07_tempmean@climate_2009_2012,2011_08_tempmean@climate_2009_2012,2011_09_tempmean@climate_2009_2012, \
2011_10_tempmean@climate_2009_2012,2011_11_tempmean@climate_2009_2012,2011_12_tempmean@climate_2009_2012, \
2012_01_tempmean@climate_2009_2012,2012_02_tempmean@climate_2009_2012,2012_03_tempmean@climate_2009_2012, \
2012_04_tempmean@climate_2009_2012,2012_05_tempmean@climate_2009_2012,2012_06_tempmean@climate_2009_2012, \
2012_07_tempmean@climate_2009_2012,2012_08_tempmean@climate_2009_2012,2012_09_tempmean@climate_2009_2012, \
2012_10_tempmean@climate_2009_2012,2012_11_tempmean@climate_2009_2012,2012_12_tempmean@climate_2009_2012

the delta value hands you the interval between maps and the distance from the very first map. math queen behavior πŸ“

t.rast.list method=delta input=tempmean_monthly
id|name|mapset|start_time|end_time|interval_length|distance_from_begin
2009_01_tempmean@climate_2000_2012|2009_01_tempmean|climate_2000_2012|2009-01-01 00:00:00|2009-02-01 00:00:00|31.0|0.0
2009_02_tempmean@climate_2000_2012|2009_02_tempmean|climate_2000_2012|2009-02-01 00:00:00|2009-03-01 00:00:00|28.0|31.0
2009_03_tempmean@climate_2000_2012|2009_03_tempmean|climate_2000_2012|2009-03-01 00:00:00|2009-04-01 00:00:00|31.0|59.0
...
2012_10_tempmean@climate_2000_2012|2012_10_tempmean|climate_2000_2012|2012-10-01 00:00:00|2012-11-01 00:00:00|31.0|1369.0
2012_11_tempmean@climate_2000_2012|2012_11_tempmean|climate_2000_2012|2012-11-01 00:00:00|2012-12-01 00:00:00|30.0|1400.0
2012_12_tempmean@climate_2000_2012|2012_12_tempmean|climate_2000_2012|2012-12-01 00:00:00|2013-01-01 00:00:00|31.0|1430.0

the gran value returns data sampled by a granule you define. and by default? the granularity of the space time raster dataset itself gets used for the sampling 🧚

t.rast.list  method=gran input=tempmean_monthly
id|name|mapset|start_time|end_time|interval_length|distance_from_begin
2009_01_tempmean@climate_2009_2012|2009_01_tempmean|climate_2009_2012|2009-01-01 00:00:00|2009-02-01 00:00:00|31.0|0.0
2009_02_tempmean@climate_2009_2012|2009_02_tempmean|climate_2009_2012|2009-02-01 00:00:00|2009-03-01 00:00:00|28.0|31.0
2009_03_tempmean@climate_2009_2012|2009_03_tempmean|climate_2009_2012|2009-03-01 00:00:00|2009-04-01 00:00:00|31.0|59.0
2009_04_tempmean@climate_2009_2012|2009_04_tempmean|climate_2009_2012|2009-04-01 00:00:00|2009-05-01 00:00:00|30.0|90.0
....
2012_09_tempmean@climate_2009_2012|2012_09_tempmean|climate_2009_2012|2012-09-01 00:00:00|2012-10-01 00:00:00|30.0|1339.0
2012_10_tempmean@climate_2009_2012|2012_10_tempmean|climate_2009_2012|2012-10-01 00:00:00|2012-11-01 00:00:00|31.0|1369.0
2012_11_tempmean@climate_2009_2012|2012_11_tempmean|climate_2009_2012|2012-11-01 00:00:00|2012-12-01 00:00:00|30.0|1400.0
2012_12_tempmean@climate_2009_2012|2012_12_tempmean|climate_2009_2012|2012-12-01 00:00:00|2013-01-01 00:00:00|31.0|1430.0

t.rast.list  method=gran input=tempmean_monthly gran="2 months"
id|name|mapset|start_time|end_time|interval_length|distance_from_begin
2009_01_tempmean@climate_2009_2012|2009_01_tempmean|climate_2009_2012|2009-01-01 00:00:00|2009-03-01 00:00:00|59.0|0.0
2009_03_tempmean@climate_2009_2012|2009_03_tempmean|climate_2009_2012|2009-03-01 00:00:00|2009-05-01 00:00:00|61.0|59.0
2009_05_tempmean@climate_2009_2012|2009_05_tempmean|climate_2009_2012|2009-05-01 00:00:00|2009-07-01 00:00:00|61.0|120.0
....
2012_07_tempmean@climate_2009_2012|2012_07_tempmean|climate_2009_2012|2012-07-01 00:00:00|2012-09-01 00:00:00|62.0|1277.0
2012_09_tempmean@climate_2009_2012|2012_09_tempmean|climate_2009_2012|2012-09-01 00:00:00|2012-11-01 00:00:00|61.0|1339.0
2012_11_tempmean@climate_2009_2012|2012_11_tempmean|climate_2009_2012|2012-11-01 00:00:00|2013-01-01 00:00:00|61.0|1400.0

want the deltagaps value? there's a whole example waiting for you over in the space time vector dataset page, t.vect.list πŸ‘€

🐍 Reading raster names in Python

yes bestie, you can absolutely vibe in Python 🐍✨

result = json.loads(
    gs.read_command(
        "t.rast.list", input="tempmean_monthly", format="json"
    )
)
for item in result["data"]:
    print(item["name"])

🏷️ Filtering the result by semantic label

a semantic label can be assigned to raster maps by the r.semantic.label module β€” or honestly just whenever you're registering raster maps into a STRDS with t.register πŸ’–

the name of your STRDS can be extended with the semantic label you wanna filter by. the STRDS name and the semantic label get split by a single dot, so:

t.rast.list input=test.S2_1
heads up bestie: semantic label filtering is supported by all temporal modules. but also note β€” only STRDS can be filtered by semantic label, so go peek at r.semantic.label for the current limitations 🌸

πŸ‘€ SEE ALSO ✨

  • g.list
  • t.create
  • t.info
  • t.list
  • t.rast3d.list
  • t.vect.list

Temporal data processing Wiki


πŸ’– AUTHOR πŸ’–

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


πŸ“¦ SOURCE CODE πŸ“¦

Available at: t.rast.list source code (history)

Latest change: Saturday Feb 14 00:16:26 2026 in commit: ae1ae67e52b94c5cef185fac50aa33b38a56875f

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

Β© 2003-2026 GRASS Development Team, GRASS 8.5.0 Reference Manual


and that's the whole page, bestie 🫢 this was GRASS 8.5.0 talkin' to you as t.rast.list(1grass), freshest as of Saturday Feb 14 00:16:26 2026. go forth and list some rasters, you absolute icon πŸ‘‘πŸ’…

πŸ“¦ where this page comes from