---
name: t.vect.observe.strds
description: "Observes specific locations in a space time raster dataset over a period of time using vector points."
keywords: [ temporal, sampling, vector, time ]
---

# t.vect.observe.strds

Observes specific locations in a space time raster dataset over a period of time using vector points.

=== "Command line"

    **t.vect.observe.strds**
    **input**=*name*
    **strds**=*name* [,*name*,...]
    **output**=*name*
    **vector_output**=*name*
    **columns**=*string* [,*string*,...]
    [**where**=*sql_query*]
    [**--overwrite**]
    [**--verbose**]
    [**--quiet**]
    [**--qq**]
    [**--ui**]

    Example:

    ```sh
    t.vect.observe.strds input=name strds=name output=name vector_output=name columns=string
    ```

=== "Python (grass.tools)"

    *grass.tools.Tools.t_vect_observe_strds*(**input**,
        **strds**,
        **output**,
        **vector_output**,
        **columns**,
        **where**=*None*,
        **overwrite**=*None*,
        **verbose**=*None*,
        **quiet**=*None*,
        **superquiet**=*None*)

    Example:

    ```python
    tools = Tools()
    tools.t_vect_observe_strds(input="name", strds="name", output="name", vector_output="name", columns="string")
    ```

    This grass.tools API is experimental in version 8.5 and expected to be stable in version 8.6.

=== "Python (grass.script)"

    *grass.script.run_command*("***t.vect.observe.strds***",
        **input**,
        **strds**,
        **output**,
        **vector_output**,
        **columns**,
        **where**=*None*,
        **overwrite**=*None*,
        **verbose**=*None*,
        **quiet**=*None*,
        **superquiet**=*None*)

    Example:

    ```python
    gs.run_command("t.vect.observe.strds", input="name", strds="name", output="name", vector_output="name", columns="string")
    ```

## Parameters

=== "Command line"

    **input**=*name* **[required]**  
    &nbsp;&nbsp;&nbsp;&nbsp;Name of input vector map  
    &nbsp;&nbsp;&nbsp;&nbsp;Or data source for direct OGR access  
    **strds**=*name* [,*name*,...] **[required]**  
    &nbsp;&nbsp;&nbsp;&nbsp;Name of the input space time raster datasets  
    **output**=*name* **[required]**  
    &nbsp;&nbsp;&nbsp;&nbsp;Name of the output space time vector dataset  
    **vector_output**=*name* **[required]**  
    &nbsp;&nbsp;&nbsp;&nbsp;Name of the new created vector map that stores the sampled values in different layers  
    **columns**=*string* [,*string*,...] **[required]**  
    &nbsp;&nbsp;&nbsp;&nbsp;Names of the vector columns to be created and to store sampled raster values, one name for each STRDS  
    **where**=*sql_query*  
    &nbsp;&nbsp;&nbsp;&nbsp;WHERE conditions of SQL statement without 'where' keyword  
    &nbsp;&nbsp;&nbsp;&nbsp;Example: income &lt; 1000 and population &gt;= 10000  
    **--overwrite**  
    &nbsp;&nbsp;&nbsp;&nbsp;Allow output files to overwrite existing files  
    **--help**  
    &nbsp;&nbsp;&nbsp;&nbsp;Print usage summary  
    **--verbose**  
    &nbsp;&nbsp;&nbsp;&nbsp;Verbose module output  
    **--quiet**  
    &nbsp;&nbsp;&nbsp;&nbsp;Quiet module output  
    **--qq**  
    &nbsp;&nbsp;&nbsp;&nbsp;Very quiet module output  
    **--ui**  
    &nbsp;&nbsp;&nbsp;&nbsp;Force launching GUI dialog

=== "Python (grass.tools)"

    **input** : str, *required*  
    &nbsp;&nbsp;&nbsp;&nbsp;Name of input vector map  
    &nbsp;&nbsp;&nbsp;&nbsp;Or data source for direct OGR access  
    &nbsp;&nbsp;&nbsp;&nbsp;Used as: input, vector, *name*  
    **strds** : str | list[str], *required*  
    &nbsp;&nbsp;&nbsp;&nbsp;Name of the input space time raster datasets  
    &nbsp;&nbsp;&nbsp;&nbsp;Used as: input, strds, *name*  
    **output** : str, *required*  
    &nbsp;&nbsp;&nbsp;&nbsp;Name of the output space time vector dataset  
    &nbsp;&nbsp;&nbsp;&nbsp;Used as: output, stvds, *name*  
    **vector_output** : str, *required*  
    &nbsp;&nbsp;&nbsp;&nbsp;Name of the new created vector map that stores the sampled values in different layers  
    &nbsp;&nbsp;&nbsp;&nbsp;Used as: output, vector, *name*  
    **columns** : str | list[str], *required*  
    &nbsp;&nbsp;&nbsp;&nbsp;Names of the vector columns to be created and to store sampled raster values, one name for each STRDS  
    **where** : str, *optional*  
    &nbsp;&nbsp;&nbsp;&nbsp;WHERE conditions of SQL statement without 'where' keyword  
    &nbsp;&nbsp;&nbsp;&nbsp;Example: income &lt; 1000 and population &gt;= 10000  
    &nbsp;&nbsp;&nbsp;&nbsp;Used as: input, sql_query, *sql_query*  
    **overwrite** : bool, *optional*  
    &nbsp;&nbsp;&nbsp;&nbsp;Allow output files to overwrite existing files  
    &nbsp;&nbsp;&nbsp;&nbsp;Default: *None*  
    **verbose** : bool, *optional*  
    &nbsp;&nbsp;&nbsp;&nbsp;Verbose module output  
    &nbsp;&nbsp;&nbsp;&nbsp;Default: *None*  
    **quiet** : bool, *optional*  
    &nbsp;&nbsp;&nbsp;&nbsp;Quiet module output  
    &nbsp;&nbsp;&nbsp;&nbsp;Default: *None*  
    **superquiet** : bool, *optional*  
    &nbsp;&nbsp;&nbsp;&nbsp;Very quiet module output  
    &nbsp;&nbsp;&nbsp;&nbsp;Default: *None*  

    Returns:

    **result** : grass.tools.support.ToolResult | None  
    If the tool produces text as standard output, a *ToolResult* object will be returned. Otherwise, `None` will be returned.

    Raises:

    *grass.tools.ToolError*: When the tool ended with an error.

=== "Python (grass.script)"

    **input** : str, *required*  
    &nbsp;&nbsp;&nbsp;&nbsp;Name of input vector map  
    &nbsp;&nbsp;&nbsp;&nbsp;Or data source for direct OGR access  
    &nbsp;&nbsp;&nbsp;&nbsp;Used as: input, vector, *name*  
    **strds** : str | list[str], *required*  
    &nbsp;&nbsp;&nbsp;&nbsp;Name of the input space time raster datasets  
    &nbsp;&nbsp;&nbsp;&nbsp;Used as: input, strds, *name*  
    **output** : str, *required*  
    &nbsp;&nbsp;&nbsp;&nbsp;Name of the output space time vector dataset  
    &nbsp;&nbsp;&nbsp;&nbsp;Used as: output, stvds, *name*  
    **vector_output** : str, *required*  
    &nbsp;&nbsp;&nbsp;&nbsp;Name of the new created vector map that stores the sampled values in different layers  
    &nbsp;&nbsp;&nbsp;&nbsp;Used as: output, vector, *name*  
    **columns** : str | list[str], *required*  
    &nbsp;&nbsp;&nbsp;&nbsp;Names of the vector columns to be created and to store sampled raster values, one name for each STRDS  
    **where** : str, *optional*  
    &nbsp;&nbsp;&nbsp;&nbsp;WHERE conditions of SQL statement without 'where' keyword  
    &nbsp;&nbsp;&nbsp;&nbsp;Example: income &lt; 1000 and population &gt;= 10000  
    &nbsp;&nbsp;&nbsp;&nbsp;Used as: input, sql_query, *sql_query*  
    **overwrite** : bool, *optional*  
    &nbsp;&nbsp;&nbsp;&nbsp;Allow output files to overwrite existing files  
    &nbsp;&nbsp;&nbsp;&nbsp;Default: *None*  
    **verbose** : bool, *optional*  
    &nbsp;&nbsp;&nbsp;&nbsp;Verbose module output  
    &nbsp;&nbsp;&nbsp;&nbsp;Default: *None*  
    **quiet** : bool, *optional*  
    &nbsp;&nbsp;&nbsp;&nbsp;Quiet module output  
    &nbsp;&nbsp;&nbsp;&nbsp;Default: *None*  
    **superquiet** : bool, *optional*  
    &nbsp;&nbsp;&nbsp;&nbsp;Very quiet module output  
    &nbsp;&nbsp;&nbsp;&nbsp;Default: *None*

## DESCRIPTION

The module *t.vect.observe.strds* is used to observe specific locations
in a space time raster dataset over a period of time using vector
points. The first input is a vector map layer with vector points. The
second input is one or several space time raster datasets (STRDS) that
should be sampled over time at the vector point positions. The space
time raster dataset will be sampled over its whole temporal extent (from
start to end). A column name must be specified for each input space time
raster dataset.

The result is a new space time vector dataset that contains a single
(new) vector map which links to as many time-stamped attribute tables as
raster map layers are present in the input space time raster dataset.
Hence, for each time step in the space time raster dataset a new
attribute table is created. The GRASS Temporal Framework allows to
time stamp attribute tables that can be linked to a single vector map
layer.

The module *v.what.rast* is used internally for sampling the time
stamped raster map layers. All sampled values of a single time stamped
raster map layer are written into a new time stamped attribute table.

Use *t.vect.db.select* to print attribute values of the space time
vector dataset to stdout.

## EXAMPLE

The example shows how to create a space time vector dataset and a vector
layer starting from a point vector and a space time raster dataset:

```sh
t.vect.observe.strds input=precip_30ynormals_3d strds=tempmean_monthly \
                     output=precip_stations vect=precip_stations_monthly \
                     columns=month

t.info precip_stations type=stvds
 +-------------------- Space Time Vector Dataset -----------------------------+
 |                                                                            |
 +-------------------- Basic information -------------------------------------+
 | Id: ........................ precip_stations@climate_2009_2012
 | Name: ...................... precip_stations
 | Mapset: .................... climate_2009_2012
 | Creator: ................... lucadelu
 | Temporal type: ............. absolute
 | Creation time: ............. 2014-12-02 00:42:39.187615
 | Modification time:.......... 2014-12-02 00:42:55.215169
 | Semantic type:.............. mean
 +-------------------- Absolute time -----------------------------------------+
 | Start time:................. 2009-01-01 00:00:00
 | End time:................... 2013-01-01 00:00:00
 | Granularity:................ 1 month
 | Temporal type of maps:...... interval
 +-------------------- Spatial extent ----------------------------------------+
 | North:...................... 306221.830194
 | South:...................... 27606.895351
 | East:.. .................... 917004.829165
 | West:....................... 151768.568246
 | Top:........................ 1615.44
 | Bottom:..................... 2.4384
 +-------------------- Metadata information ----------------------------------+
 | Vector register table:...... vector_map_register_be074525097c4088997c9a1979f17065
 | Number of points ........... 6664
 | Number of lines ............ 0
 | Number of boundaries ....... 0
 | Number of centroids ........ 0
 | Number of faces ............ 0
 | Number of kernels .......... 0
 | Number of primitives ....... 6664
 | Number of nodes ............ 0
 | Number of areas ............ 0
 | Number of islands .......... 0
 | Number of holes ............ 0
 | Number of volumes .......... 0
 | Number of registered maps:.. 49
 |
 | Title:
 | Observaion of space time raster dataset(s) tempmean_monthly
 | Description:
 | Observation of space time raster dataset(s) tempmean_monthly with vector map precip_30ynormals_3d
 | Command history:
 | # 2014-12-02 00:42:39
 | t.vect.observe.strds input="precip_30ynormals_3d"
 |     strds="tempmean_monthly" output="precip_stations"
 |     vect="precip_stations_monthly" columns="month"
 |
 +----------------------------------------------------------------------------+


v.info precip_stations_monthly
 +----------------------------------------------------------------------------+
 | Name:            precip_stations_monthly                                   |
 | Mapset:          climate_2009_2012                                         |
 | Project:         nc_spm_temporal_workshop                                  |
 | Database:        /grassdata                                                |
 | Title:           North Carolina 30 year precipitation normals (3D)         |
 | Map scale:       1:1                                                       |
 | Name of creator: neteler                                                   |
 | Organization:                                                              |
 | Source date:     Wed May  9 14:32:39 2007                                  |
 | Timestamp (first layer): none                                              |
 |----------------------------------------------------------------------------|
 | Map format:      native                                                    |
 |----------------------------------------------------------------------------|
 |   Type of map: vector (level: 2)                                           |
 |                                                                            |
 |   Number of points:       136             Number of centroids:  0          |
 |   Number of lines:        0               Number of boundaries: 0          |
 |   Number of areas:        0               Number of islands:    0          |
 |   Number of faces:        0               Number of kernels:    0          |
 |   Number of volumes:      0               Number of holes:      0          |
 |                                                                            |
 |   Map is 3D:              Yes                                              |
 |   Number of dblinks:      49                                               |
 |                                                                            |
 |   Projection: Lambert Conformal Conic                                      |
 |                                                                            |
 |               N:     306221.830194    S:      27606.895351                 |
 |               E:     917004.829165    W:     151768.568246                 |
 |               B:            2.4384    T:           1615.44                 |
 |                                                                            |
 |   Digitization threshold: 0                                                |
 |   Comment:                                                                 |
 |                                                                            |
 +----------------------------------------------------------------------------+
```

## SEE ALSO

*[t.create](t.create.md), [t.info](t.info.md),
[t.vect.db.select](t.vect.db.select.md),
[t.vect.what.strds](t.vect.what.strds.md)*

## AUTHOR

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

## SOURCE CODE

Available at: [t.vect.observe.strds source code](https://github.com/OSGeo/grass/tree/main/temporal/t.vect.observe.strds)
([history](https://github.com/OSGeo/grass/commits/main/temporal/t.vect.observe.strds))  
Latest change: Saturday Oct 11 04:38:40 2025 in commit [3dd71f5](https://github.com/OSGeo/grass/commit/3dd71f5fab83b72a2db2da959fe075c5b3b52200)
