t.remove
Removes space time datasets from temporal database.
t.remove [-rfd] [inputs=name [,name,...]] [type=string] [file=name] [--verbose] [--quiet] [--qq] [--ui]
Example:
t.remove
grass.script.run_command("t.remove", inputs=None, type="strds", file=None, flags=None, verbose=False, quiet=False, superquiet=False)
Example:
gs.run_command("t.remove")
Parameters
inputs=name [,name,...]
Name of the input space time datasets
type=string
Type of the space time dataset, default is strds
Allowed values: strds, str3ds, stvds
Default: strds
file=name
Input file with dataset names, one per line
-r
Remove stds and unregister maps from temporal database
-f
Force removal (required for actual deletion of files)
-d
Remove stds, unregister maps from temporal database and delete them from mapset
--help
Print usage summary
--verbose
Verbose module output
--quiet
Quiet module output
--qq
Very quiet module output
--ui
Force launching GUI dialog
inputs : str | list[str], optional
Name of the input space time datasets
Used as: input, stds, name
type : str, optional
Type of the space time dataset, default is strds
Allowed values: strds, str3ds, stvds
Default: strds
file : str, optional
Input file with dataset names, one per line
Used as: input, file, name
flags : str, optional
Allowed values: r, f, d
r
Remove stds and unregister maps from temporal database
f
Force removal (required for actual deletion of files)
d
Remove stds, unregister maps from temporal database and delete them from mapset
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
The module t.remove removes space time datasets (STRDS, STR3DS, STVDS) from the temporal database. In other words, by default it deletes the relevant database entries. It can also unregister maps from temporal database using the recursive mode -r (recursive).
Optionally, also the raster, 3D raster and vector maps of the space time datasets can be removed from the current mapset using the -d (delete) flag. All removals only work if -f (force) flag is used.
EXAMPLE
In this example a space time raster dataset (STRDS) named
precip_months_sum will be created using a subset of the monthly
precipitation raster maps from the North Carolina climate sample data
set.
In order to be able to show the case of recursive removal without
deleting the original sample data, we generate new data by means of
computing yearly precipitation sums. Eventually, all newly produced data
(STRDS and raster maps) are removed:
# Create new and empty STRDS
t.create output=precip_months_sum semantictype=mean \
title="Monthly sum of precipitation" \
description="Monthly sum of precipitation for the \
North Carolina sample data"
# Register maps from sample dataset (selecting a subset with g.list)
t.register -i type=raster input=precip_months_sum \
maps=$(g.list type=raster pattern="201*_precip" separator=comma) \
start="2010-01-01" increment="1 months"
# Create some new data by aggregating with 1 years granularity
t.rast.aggregate input=precip_months_sum \
output=precip_years_sum basename=precip_years_sum \
granularity="1 years" method=sum
# Remove all newly produced data:
# a) the aggregated STRDS with 1 years granularity along with its raster maps
t.remove -df type=strds input=precip_years_sum
# b) the STRDS with 1 months granularity, but not the original sample data
t.remove -f type=strds input=precip_months_sum
SEE ALSO
AUTHOR
Sören Gebbert, Thünen Institute of Climate-Smart Agriculture
SOURCE CODE
Available at: t.remove source code
(history)
Latest change: Friday Feb 07 19:16:09 2025 in commit a82a39f