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,maxcolumns=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_beginwhere=sql_queryβ WHERE conditions of SQL statement without 'where' keyword used in the temporal GIS framework. Yeah β you write the condition, GRASS handles thewherepart 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:listgranule=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:plainplain: Plain text outputline: Comma separated list of map namesjson: 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
deltagapwill additionally print temporal gaps between map layers. (Gaps! The drama! π) - The
granmethod 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. π
β οΈ Methodscolsandcommaare depreciated. (That's their spelling, not mine π .) Thecolsmethod is replaced by theplainformat and thecommamethod is replaced by thelineformat.
The format option specifies the format of the output data, and this part is lowkey the best part:
- The default
plainformat will simply print user specified metadata columns of one map layer per line, separated by apipeby default. - The
lineformat will list fully qualified map names (nameandmapset) as a comma-separated list of values that can be used as input for spatial modules. - The
csvformat will print data in the CSV format using comma as the value separator (delimiter) and double quote for text field quoting. - The
jsonformat generates JSON and, if the PyYAML package is installed, theyamlformat generates YAML. - The column (or item) separator can be specified with the
separatoroption forplain,line, andcsv.
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.listt.createt.infot.listt.rast3d.listt.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
- alpine 3.24: grass-gis-doc 8.5.0-r1 Β· GPL-2.0-or-later
- ubuntu stonking: grass-doc 8.5.0-1ubuntu1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms