t.rast.export(1grass)
β¨ t.rast.export β the manual page, but make it cute β¨
okay so bestie, we're reading t.rast.export(1grass) today, and honestly? it's giving unsung hero π
it takes your whole space time raster dataset and yeets it into a tar archive. let's get into it.
KEYWORDS: temporal, export, raster, time π¦
πΈ SYNOPSIS πΈ
t.rast.export
t.rast.export --help
t.rast.export input=name output=name [directory=name]
[compression=string] [format=string] [type=string]
[createopt=string[,string,...]] [metaopt=string[,string,...]]
[nodata=float] [where=sql_query] [--overwrite] [--help]
[--verbose] [--quiet] [--ui]
β¨ Flags β¨
--overwriteβ lets your output files just bulldoze over whatever's already there. main character energy, no apologies.--helpβ prints the usage summary. the "bestie explain" button.--verboseβ verbose module output. she's chatty, she's telling you everything.--quietβ quiet module output. she's giving silent treatment, but productively.--uiβ force-launches the GUI dialog. sometimes you just want buttons π
π Parameters π
input=name[required]β the name of your input space time raster dataset. no input no output, iykyk.output=name[required]β name of a space time raster dataset archive. that's the file you're making, bestie.directory=nameβ path to the directory where the output gets written. if you don't say anything, the default is just the current working directory. Default:./compression=stringβ compression method of the tar archive. Options:no,gzip,bzip2. Default:bzip2format=stringβ the export format of a single raster map. supported areGTiff,AAIGridviar.out.gdaland the GRASS package format ofr.pack. Options:GTiff,AAIGrid,pack. Default:GTifftype=stringβ data type. supported only forGTiff. Options:Byte,Int16,UInt16,Int32,UInt32,Float32,Float64,CInt16,CInt32,CFloat32,CFloat64createopt=string[,string,...]β creation option(s) to pass to the output format driver. format is"NAME=VALUE", and you separate multiple entries with a comma.metaopt=string[,string,...]β metadata key(s) and value(s) to include. format is"META-TAG=VALUE", separate multiple entries with a comma. heads up: not supported by all output format drivers πnodata=floatβ assign a specified nodata value to output bands. if you give it, the nodata value is always written to metadata, even when there are no NULL cells in the input band (it enhances output compatibility β slay).where=sql_queryβ WHERE conditions of a SQL statement, without thewherekeyword, used in the temporal GIS framework. Example:start_time > β2001-01-01 12:30:00β
π DESCRIPTION π
t.rast.export exports a space time raster dataset (strds) as a tar archive β¨
that archive contains the raster maps either as GeoTIFF files or as GRASS binary files exported using r.pack. the map specific color tables get exported in the case of GeoTIFF files, and on top of that, several metadata files are created inside the archive that describe the temporal layout. let's meet the crew π«Ά
- all time stamps are stored in the file
list.txt, one row per map. the name of the map, the start time and the end time are written. in the case of a time instance, the start time is equal to the end time. no cap. - the
init.txtfile stores the temporal type, the number of maps, the chosen export format and some other metadata. - the
proj.txtfile stores the coordinate reference system information as a proj4 string of the project the space time raster dataset was exported from. - the file
readme.txtdescribes the file format. - the output of
r.infofor each raster map in the space time dataset is stored inmetadata.txt.
the tar archive can be compressed using the compress option. Gzip and bzip2 (default) are available. a where option can be specified, to export only a subset of the space time dataset. archives exported with t.rast.export can be imported with t.rast.import. the circle of life π
π NOTES π
the name of the output file has to carry the suffix of the archive type. the following suffix can be used:
.tarin the case ofcompress=no.tar.bzip2in the case ofcompress=bzip2.tar.gzipin the case ofcompress=gzip
fr fr, get the suffix wrong and it's not gonna go how you want it to go. match the suffix to the compression, periodt π
π₯ EXAMPLE π₯
in this example, all the raster maps of 2012 of tempmean_monthly will be exported:
t.rast.export input=tempmean_monthly output=tempmean_monthly.tar.bzip2 \
where="start_time >= β2012-01-01β and start_time < β2013-01-01β"
tar xvjf precipitation_daily.tar.bzip2
2012_01_tempmean.tif
2012_01_tempmean.color
2012_02_tempmean.tif
2012_02_tempmean.color
2012_03_tempmean.tif
2012_03_tempmean.color
2012_04_tempmean.tif
2012_04_tempmean.color
2012_05_tempmean.tif
2012_05_tempmean.color
2012_06_tempmean.tif
2012_06_tempmean.color
2012_07_tempmean.tif
2012_07_tempmean.color
2012_08_tempmean.tif
2012_08_tempmean.color
2012_09_tempmean.tif
2012_09_tempmean.color
2012_10_tempmean.tif
2012_10_tempmean.color
2012_11_tempmean.tif
2012_11_tempmean.color
2012_12_tempmean.tif
2012_12_tempmean.color
list.txt
proj.txt
init.txt
readme.txt
metadata.txt
and then peep the receipts π§
cat init.txt
stds_type=strds
format=GTiff
temporal_type=absolute
semantic_type=mean
number_of_maps=48
north=320000.0
south=10000.0
east=935000.0
west=120000.0
cat proj.txt
+proj=lcc
+lat_1=36.16666666666666
+lat_2=34.33333333333334
+lat_0=33.75
+lon_0=-79
+x_0=609601.22
+y_0=0
+no_defs
+a=6378137
+rf=298.257222101
+towgs84=0.000,0.000,0.000
+to_meter=1
cat list.txt
2012_01_tempmean|2012-01-01 00:00:00|2012-02-01 00:00:00
2012_02_tempmean|2012-02-01 00:00:00|2012-03-01 00:00:00
2012_03_tempmean|2012-03-01 00:00:00|2012-04-01 00:00:00
2012_04_tempmean|2012-04-01 00:00:00|2012-05-01 00:00:00
2012_05_tempmean|2012-05-01 00:00:00|2012-06-01 00:00:00
2012_06_tempmean|2012-06-01 00:00:00|2012-07-01 00:00:00
2012_07_tempmean|2012-07-01 00:00:00|2012-08-01 00:00:00
2012_08_tempmean|2012-08-01 00:00:00|2012-09-01 00:00:00
2012_09_tempmean|2012-09-01 00:00:00|2012-10-01 00:00:00
2012_10_tempmean|2012-10-01 00:00:00|2012-11-01 00:00:00
2012_11_tempmean|2012-11-01 00:00:00|2012-12-01 00:00:00
2012_12_tempmean|2012-12-01 00:00:00|2013-01-01 00:00:00
cat readme.txt
This space time raster dataset was exported with t.rast.export of GRASS GIS 7
Files:
*.tif -- GeoTIFF raster files
*.color -- GRASS GIS raster color rules
proj.txt -- Projection information in PROJ format
init.txt -- GRASS GIS space time raster dataset information
list.txt -- Time series file, lists all maps by name with interval
time stamps in ISO-Format. Field separator is |
metadata.txt -- The output of t.info
readme.txt -- This file
look at all that. list.txt ate and left no crumbs π field separator is |, in case you were wondering.
π SEE ALSO π
t.rast.import, t.create, t.info, r.out.gdal, r.pack, t.vect.export
π©· AUTHOR π©·
SΓΆren Gebbert, ThΓΌnen Institute of Climate-Smart Agriculture
π SOURCE CODE π
available at: t.rast.export 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
Β© 2003-2026 GRASS Development Team, GRASS 8.5.0 Reference Manual
and that's a wrap bestie π this was t.rast.export(1grass) from the GRASS 8.5.0 Reference Manual β Β© 2003-2026 GRASS Development Team, latest change Thursday Dec 18 07:11:47 2025 in commit cf870a5e49fd2643a55de543467edf5c2e61d640. go export something iconic. mwah π
π¦ 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