Skip to content

t.list

Lists space time datasets and maps registered in the temporal database.

t.list [-c] [type=string] [temporaltype=name [,name,...]] [order=string [,string,...]] [columns=string [,string,...]] [where=sql_query] [separator=character] [output=name] [--overwrite] [--verbose] [--quiet] [--qq] [--ui]

Example:

t.list

grass.script.run_command("t.list", type="strds", temporaltype="absolute,relative", order="id", columns="id", where=None, separator="pipe", output=None, flags=None, overwrite=False, verbose=False, quiet=False, superquiet=False)

Example:

gs.run_command("t.list")

Parameters

type=string
    Type of the space time dataset or map, default is strds
    Allowed values: strds, str3ds, stvds, raster, raster_3d, vector
    Default: strds
temporaltype=name [,name,...]
    The temporal type of the space time dataset
    Allowed values: absolute, relative
    Default: absolute,relative
order=string [,string,...]
    Sort the space time dataset by category
    Columns number_of_maps and granularity only available for space time datasets
    Allowed values: id, name, semantic_label, creator, mapset, number_of_maps, creation_time, start_time, end_time, interval, north, south, west, east, granularity
    Default: id
columns=string [,string,...]
    Columns to be printed to stdout
    Columns number_of_maps and granularity only available for space time datasets
    Allowed values: id, name, semantic_label, creator, mapset, number_of_maps, creation_time, start_time, end_time, north, south, west, east, granularity, all
    Default: id
where=sql_query
    WHERE conditions of SQL statement without 'where' keyword used in the temporal GIS framework
    Example: start_time > '2001-01-01 12:30:00'
separator=character
    Field separator character between the output columns
    Special characters: pipe, comma, space, tab, newline
    Default: pipe
output=name
    Name for output file
-c
    Print the column names as first row
--overwrite
    Allow output files to overwrite existing files
--help
    Print usage summary
--verbose
    Verbose module output
--quiet
    Quiet module output
--qq
    Very quiet module output
--ui
    Force launching GUI dialog

type : str, optional
    Type of the space time dataset or map, default is strds
    Allowed values: strds, str3ds, stvds, raster, raster_3d, vector
    Default: strds
temporaltype : str | list[str], optional
    The temporal type of the space time dataset
    Used as: name
    Allowed values: absolute, relative
    Default: absolute,relative
order : str | list[str], optional
    Sort the space time dataset by category
    Columns number_of_maps and granularity only available for space time datasets
    Allowed values: id, name, semantic_label, creator, mapset, number_of_maps, creation_time, start_time, end_time, interval, north, south, west, east, granularity
    Default: id
columns : str | list[str], optional
    Columns to be printed to stdout
    Columns number_of_maps and granularity only available for space time datasets
    Allowed values: id, name, semantic_label, creator, mapset, number_of_maps, creation_time, start_time, end_time, north, south, west, east, granularity, all
    Default: id
where : str, optional
    WHERE conditions of SQL statement without 'where' keyword used in the temporal GIS framework
    Example: start_time > '2001-01-01 12:30:00'
    Used as: sql_query
separator : str, optional
    Field separator character between the output columns
    Special characters: pipe, comma, space, tab, newline
    Used as: input, separator, character
    Default: pipe
output : str, optional
    Name for output file
    Used as: output, file, name
flags : str, optional
    Allowed values: c
    c
        Print the column names as first row
overwrite: bool, optional
    Allow output files to overwrite existing files
    Default: False
verbose: bool, optional
    Verbose module output
    Default: False
quiet: bool, optional
    Quiet module output
    Default: False
superquiet: bool, optional
    Very quiet module output
    Default: False

DESCRIPTION

t.list lists any dataset that is registered in the temporal database. Datasets are raster, 3D raster and vector maps as well as their corresponding space time datasets (STRDS, STR3DS and STVDS). The type of the dataset can be specified using the type option, default is STRDS. By default all datasets with relative and absolute time are listed. However, the user has the ability to specify a single temporal type with the temporaltype option. The user can define the columns that should be printed for each dataset and the order of the datasets. In addition a SQL WHERE statement can be specified to select a subset of the requested datasets.

NOTES

The SQL where and sort expression will be applied for each temporal database that was found in accessible mapsets. Hence sorting works only on mapset basis.

Temporal databases stored in other mapsets can be used as long as they are in the user's current mapset search path (managed with g.mapsets).

EXAMPLES

Obtain the list of space time raster dataset(s):

t.list strds
----------------------------------------------
Space time raster datasets with absolute time available in mapset <climate_2000_2012>:
tempmean_monthly@climate_2000_2012

Obtain the list of space time raster datasets in a specific mapset (Note that the target mapset must be in the user's search path):

# strds in PERMANENT
t.list strds where="mapset = 'PERMANENT'"
----------------------------------------------

# strds in climate_2000_2012
t.list strds where="mapset = 'climate_2000_2012'"
----------------------------------------------
Space time raster datasets with absolute time available in mapset <climate_2000_2012>:
precip_abs@climate_2000_2012
precipitation@climate_2000_2012
tempmean@climate_2000_2012

The where option can also be used to list the stds with a certain pattern in their name, i.e. as the pattern option in g.list.

# strds whose name start with "precip"
t.list type=strds where="name LIKE 'precip%'"
----------------------------------------------
Space time raster datasets with absolute time available in mapset <climate_1970_2012>:
precip_abs@climate_1970_2012
precipitation@climate_1970_2012

The user can also obtain the list of time stamped raster maps. These maps might be registered in strds or not. The output of the following command can vary according to the accessible mapsets specified through g.mapsets.

t.list raster
Time stamped raster maps with absolute time available in mapset <climate_2000_2012>:
2009_01_tempmean@climate_2000_2012
2009_02_tempmean@climate_2000_2012
2009_03_tempmean@climate_2000_2012
...
2012_10_tempmean@climate_2000_2012
2012_11_tempmean@climate_2000_2012
2012_12_tempmean@climate_2000_2012

SEE ALSO

g.list, t.create, t.info, t.rast.list, t.rast3d.list, t.vect.list

AUTHOR

Sören Gebbert, Thünen Institute of Climate-Smart Agriculture

SOURCE CODE

Available at: t.list source code (history)
Latest change: Friday Feb 14 09:52:49 2025 in commit 4173c3d