t.snap(1)
β¨ NAME β¨
okay so bestie, welcome to t.snap β the GRASS GIS User's Manual page for it, t.snap(1), and she's snapping the maps of a space time dataset, temporally. That's the whole vibe. π«Ά
πΈ KEYWORDS πΈ
temporal, time management, snapping, time
π SYNOPSIS π
t.snap
t.snap --help
t.snap input=name [type=name] [--help] [--verbose] [--quiet]
[--ui]
Flags
--helpβ prints the usage summary, like a little cheat sheet π--verboseβ verbose module output (she's talking more, and honestly? we love that)--quietβ quiet module output (she's giving β¨mysteriousβ¨)--uiβ force launching the GUI dialog
Parameters
input=name[required] β name of an existing space time dataset. You must give her this one, no skipping π¨type=nameβ type of the input space time dataset- Options:
strds,stvds,str3ds - Default:
strds
- Options:
π DESCRIPTION π
So t.snap is literally designed to convert time instances of maps into time intervals, or to create valid temporal topologies for space time datasets. Raster, 3D raster and vector space time datasets are all supported, with both absolute and relative time. all of them, bestie π
This module "snaps" the end time of each registered map of a space time dataset to the start time of the map that is the temporal nearest neighbour in the future. So cute, so orderly π
β οΈ Maps with equal time stamps are not modified and must be removed or modified to create a valid temporal topology. No cap, she will simply not touch them. Not me leaving that mess for you to clean up π
And in case the last map in the space time dataset is a time instance, the granularity of the space time dataset will be used to create the time interval. Iconic behaviour, honestly. π
π¦ EXAMPLE π¦
okay so picture this: a raster space time dataset gets created using precipitation maps for 2012, then absolute time is used in a space time raster dataset with an increment of one month. At the end we snap the created time instances, and boom β time intervals. Obsessed. β¨
Generating the data π
# Generate data
t.create type=strds temporaltype=absolute \
output=precipitation_monthly \
title="Monthly precipitation" \
description="Dataset with monthly precipitation"
t.register type=raster input=precipitation_monthly \
maps=`g.list type=raster pattern="2012*precip" sep=comma` \
start=2012-01-01 increment="1 months"
# please take attention to "Temporal type of maps" value
t.info type=strds input=precipitation_monthly
+-------------------- Space Time Raster Dataset -----------------------------+
| |
+-------------------- Basic information -------------------------------------+
| Id: ........................ precipitation_monthly@climate_2009_2012
| Name: ...................... precipitation_monthly
| Mapset: .................... climate_2009_2012
| Creator: ................... lucadelu
| Temporal type: ............. absolute
| Creation time: ............. 2014-11-28 15:52:30.801148
| Modification time:.......... 2014-11-28 15:53:18.430773
| Semantic type:.............. mean
+-------------------- Absolute time -----------------------------------------+
| Start time:................. 2012-01-01 00:00:00
| End time:................... 2012-12-01 00:00:00
| Granularity:................ 1 month
| Temporal type of maps:...... point
+-------------------- Spatial extent ----------------------------------------+
| North:...................... 320000.0
| South:...................... 10000.0
| East:.. .................... 935000.0
| West:....................... 120000.0
| Top:........................ 0.0
| Bottom:..................... 0.0
+-------------------- Metadata information ----------------------------------+
| Raster register table:...... raster_map_register_282454f66ff5455299526ec3c1db7362
| North-South resolution min:. 500.0
| North-South resolution max:. 500.0
| East-west resolution min:... 500.0
| East-west resolution max:... 500.0
| Minimum value min:.......... 0.0
| Minimum value max:.......... 95.58169
| Maximum value min:.......... 132.413284
| Maximum value max:.......... 356.502949
| Aggregation type:........... None
| Number of registered maps:.. 12
|
| Title:
| Monthly precipitation
| Description:
| Dataset with monthly precipitation
| Command history:
| # 2014-11-28 15:52:30
| t.create type="strds" temporaltype="absolute"
| output="precipitation_monthly" title="Monthly precipitation"
| description="Dataset with monthly precipitation"
| # 2014-11-28 15:53:18
| t.register type="rast" input="precipitation_monthly"
| maps="2012_01_precip,2012_02_precip, ... ,2012_11_precip,2012_12_precip"
| start="2012-01-01" increment="1 months"
|
+----------------------------------------------------------------------------+
The "before" pic πΈ
you can see that end time is not set β it's giving None and we're all just gonna sit with that for a sec:
# you can see that end time is not set
t.rast.list input=precipitation_monthly
name|mapset|start_time|end_time
2012_01_precip|climate_2009_2012|2012-01-01 00:00:00|None
2012_02_precip|climate_2009_2012|2012-02-01 00:00:00|None
2012_03_precip|climate_2009_2012|2012-03-01 00:00:00|None
2012_04_precip|climate_2009_2012|2012-04-01 00:00:00|None
2012_05_precip|climate_2009_2012|2012-05-01 00:00:00|None
2012_06_precip|climate_2009_2012|2012-06-01 00:00:00|None
2012_07_precip|climate_2009_2012|2012-07-01 00:00:00|None
2012_08_precip|climate_2009_2012|2012-08-01 00:00:00|None
2012_09_precip|climate_2009_2012|2012-09-01 00:00:00|None
2012_10_precip|climate_2009_2012|2012-10-01 00:00:00|None
2012_11_precip|climate_2009_2012|2012-11-01 00:00:00|None
2012_12_precip|climate_2009_2012|2012-12-01 00:00:00|None
The snap itself π
t.snap type=strds input=precipitation_monthly
# please take attention to "Temporal type of maps" value again
t.info type=strds input=precipitation_monthly
+-------------------- Space Time Raster Dataset -----------------------------+
| |
+-------------------- Basic information -------------------------------------+
| Id: ........................ precipitation_monthly@climate_2009_2012
| Name: ...................... precipitation_monthly
| Mapset: .................... climate_2009_2012
| Creator: ................... lucadelu
| Temporal type: ............. absolute
| Creation time: ............. 2014-11-28 15:52:30.801148
| Modification time:.......... 2014-11-28 15:54:28.739905
| Semantic type:.............. mean
+-------------------- Absolute time -----------------------------------------+
| Start time:................. 2012-01-01 00:00:00
| End time:................... 2013-01-01 00:00:00
| Granularity:................ 1 month
| Temporal type of maps:...... interval
+-------------------- Spatial extent ----------------------------------------+
| North:...................... 320000.0
| South:...................... 10000.0
| East:.. .................... 935000.0
| West:....................... 120000.0
| Top:........................ 0.0
| Bottom:..................... 0.0
+-------------------- Metadata information ----------------------------------+
| Raster register table:...... raster_map_register_282454f66ff5455299526ec3c1db7362
| North-South resolution min:. 500.0
| North-South resolution max:. 500.0
| East-west resolution min:... 500.0
| East-west resolution max:... 500.0
| Minimum value min:.......... 0.0
| Minimum value max:.......... 95.58169
| Maximum value min:.......... 132.413284
| Maximum value max:.......... 356.502949
| Aggregation type:........... None
| Number of registered maps:.. 12
|
| Title:
| Monthly precipitation
| Description:
| Dataset with monthly precipitation
| Command history:
| # 2014-11-28 15:52:30
| t.create type="strds" temporaltype="absolute"
| output="precipitation_monthly" title="Monthly precipitation"
| description="Dataset with monthly precipitation"
| # 2014-11-28 15:53:18
| t.register type="rast" input="precipitation_monthly"
| maps="2012_01_precip,2012_02_precip, ... ,2012_11_precip,2012_12_precip"
| start="2012-01-01" increment="1 months"
| # 2014-11-28 15:54:28
| t.snap type="strds" input="precipitation_monthly"
|
+----------------------------------------------------------------------------+
The glow-up π
now instead end time is set. she ate and left no crumbs:
# now instead end time is set
t.rast.list input=precipitation_daily
2012_01_precip|climate_2009_2012|2012-01-01 00:00:00|2012-02-01 00:00:00
2012_02_precip|climate_2009_2012|2012-02-01 00:00:00|2012-03-01 00:00:00
2012_03_precip|climate_2009_2012|2012-03-01 00:00:00|2012-04-01 00:00:00
2012_04_precip|climate_2009_2012|2012-04-01 00:00:00|2012-05-01 00:00:00
2012_05_precip|climate_2009_2012|2012-05-01 00:00:00|2012-06-01 00:00:00
2012_06_precip|climate_2009_2012|2012-06-01 00:00:00|2012-07-01 00:00:00
2012_07_precip|climate_2009_2012|2012-07-01 00:00:00|2012-08-01 00:00:00
2012_08_precip|climate_2009_2012|2012-08-01 00:00:00|2012-09-01 00:00:00
2012_09_precip|climate_2009_2012|2012-09-01 00:00:00|2012-10-01 00:00:00
2012_10_precip|climate_2009_2012|2012-10-01 00:00:00|2012-11-01 00:00:00
2012_11_precip|climate_2009_2012|2012-11-01 00:00:00|2012-12-01 00:00:00
2012_12_precip|climate_2009_2012|2012-12-01 00:00:00|2013-01-01 00:00:00
π SEE ALSO π
t.shiftt.createt.register
iykyk, the whole temporal squad π«Ά
π AUTHOR π
SΓΆren Gebbert, ThΓΌnen Institute of Climate-Smart Agriculture
π SOURCE CODE π
Available at: t.snap source code (history)
Accessed: Saturday Jan 17 05:41:54 2026
Main index | Temporal index | Topics index | Keywords index | Graphical index | Full index
and that's the whole page bestie π this was the GRASS 8.4.2 Reference Manual, Β© 2003-2025 GRASS Development Team, manual page t.snap(1) from GRASS 8.4.2 β she's iconic, she's canon, periodt. πβ¨
π¦ where this page comes from
- fedora 44: grass 8.4.2-4.fc44 Β· 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