Skip to content

t.vect.what.strds

Stores raster map values at spatial and temporal positions of vector points as vector attributes.

t.vect.what.strds input=name strds=name [column=string] method=string [where=sql_query] [t_where=sql_query] [sampling=name [,name,...]] [--verbose] [--quiet] [--qq] [--ui]

Example:

t.vect.what.strds input=name strds=name method=disabled

grass.script.run_command("t.vect.what.strds", input, strds, column=None, method="disabled", where=None, t_where=None, sampling="start", verbose=False, quiet=False, superquiet=False)

Example:

gs.run_command("t.vect.what.strds", input="name", strds="name", method="disabled")

Parameters

input=name [required]
    Name of the input space time vector dataset
strds=name [required]
    Name of the input space time raster dataset
column=string
    Name of the vector column to be created and to store sampled raster values
    The use of a column name forces t.vect.what.rast to sample only values from the first map found in an interval. Otherwise the raster map names are used as column names
method=string [required]
    Aggregate operation to be performed on the raster maps
    Allowed values: disabled, average, count, median, mode, minimum, min_raster, maximum, max_raster, stddev, range, sum, variance, diversity, slope, offset, detcoeff, quart1, quart3, perc90, quantile, skewness, kurtosis
    Default: disabled
where=sql_query
    WHERE conditions of SQL statement without 'where' keyword
    Example: income < 1000 and population >= 10000
t_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'
sampling=name [,name,...]
    The method to be used for sampling the input dataset
    Allowed values: start, during, overlap, contain, equal, follows, precedes
    Default: start
--help
    Print usage summary
--verbose
    Verbose module output
--quiet
    Quiet module output
--qq
    Very quiet module output
--ui
    Force launching GUI dialog

input : str, required
    Name of the input space time vector dataset
    Used as: input, stvds, name
strds : str, required
    Name of the input space time raster dataset
    Used as: input, strds, name
column : str, optional
    Name of the vector column to be created and to store sampled raster values
    The use of a column name forces t.vect.what.rast to sample only values from the first map found in an interval. Otherwise the raster map names are used as column names
method : str, required
    Aggregate operation to be performed on the raster maps
    Allowed values: disabled, average, count, median, mode, minimum, min_raster, maximum, max_raster, stddev, range, sum, variance, diversity, slope, offset, detcoeff, quart1, quart3, perc90, quantile, skewness, kurtosis
    Default: disabled
where : str, optional
    WHERE conditions of SQL statement without 'where' keyword
    Example: income < 1000 and population >= 10000
    Used as: input, sql_query, sql_query
t_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
sampling : str | list[str], optional
    The method to be used for sampling the input dataset
    Used as: name
    Allowed values: start, during, overlap, contain, equal, follows, precedes
    Default: start
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.vect.what.strds samples a space time raster dataset (STRDS) at the spatio-temporal locations of a space time vector dataset (STVDS).

EXAMPLE

The example is based on the space time vector dataset "precip_stations@climate_2009_2012" created in the t.vect.observe.strds example. In the example below, the module fills the new column "new_temp" with values extracted from the "tempmean_monthly" space time raster dataset:

t.vect.what.strds input=precip_stations@climate_2009_2012 \
                  strds=tempmean_monthly@climate_2009_2012 \
                  column=new_temp method=average

SEE ALSO

r.univar, v.univar, v.what.rast, v.what.rast3, v.what.strds, v.what.vect, t.create, t.info

AUTHOR

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

SOURCE CODE

Available at: t.vect.what.strds source code (history)
Latest change: Friday Feb 07 19:16:09 2025 in commit a82a39f