NAME
t.register.py - Registers raster, vector and raster3d maps in a space time datasets.
KEYWORDS
temporal,
map management,
register
SYNOPSIS
t.register.py
t.register.py --help
t.register.py [-i] [input=name] [maps=name[,name,...]] [type=name] [file=name] [start=string] [end=string] [unit=string] [increment=string] [separator=character] [--overwrite] [--help] [--verbose] [--quiet] [--ui]
Flags:
- -i
- Create an interval (start and end time) in case an increment is provided
- --overwrite
- Allow output files to overwrite existing files
- --help
- Print usage summary
- --verbose
- Verbose module output
- --quiet
- Quiet module output
- --ui
- Force launching GUI dialog
Parameters:
- input=name
- Name of the input space time dataset
- maps=name[,name,...]
- Name of the input maps
- type=name
- Type of the input map
- Options: raster, vector, raster_3d
- Default: raster
- file=name
- Input file with map names, one per line
- Additionally the start time and the end time can be specified per line
- start=string
- Valid start date and time of the first map
- Format absolute time: "yyyy-mm-dd HH:MM:SS +HHMM", relative time is of type integer).
- end=string
- Valid end date and time of all map
- Format absolute time: "yyyy-mm-dd HH:MM:SS +HHMM", relative time is of type integer).
- unit=string
- Time stamp unit
- Unit must be set in case of relative time stamps
- Options: years, months, days, hours, minutes, seconds
- increment=string
- Time increment
- Time increment between maps for valid time interval creation (format absolute: NNN seconds, minutes, hours, days, weeks, months, years; format relative is integer: 5)
- separator=character
- Field separator
- Field separator character of the input file
- Default: pipe
The module
t.register is designed to register raster, 3D
raster and vector maps in the temporal database and in specific space
time datasets. This module must be used to assign time stamps to
raster, 3D raster and vector maps. The existing timestamp modules
r.timestamp,
r3.timestamp and
v.timestamp do not register the maps in the
temporal database of GRASS. However, timestamps that have been created
with these modules can be read and used by
t.register. This
works only for maps that are not already registered in the temporal
database.
This module supports absolute and relative time. Maps can be registered
by command line argument (a list of comma separated map names) or using
an input file. The start time, the end time and a temporal increment
can be provided by command line or in the input file. End time and
increment are mutual exclusive. The user can register single maps or a
list of maps at once. Maps can be registered in several space time
datasets using the same timestamp.
Start time and end time with absolute time must be provided using the
format yyyy-mm-dd HH:MM:SS +HHMM. It is supported to specify
only the date yyyy-mm-dd. In case of relative time the temporal
unit (years, months, days, hours, minutes or seconds) must be provided.
The relative start time, end time and the increment are integers.
The timestamps of registered maps will be stored in the temporal
database and in the metadata of the grass maps in the spatial database.
This assures that timestamps can always be accessed with
(r|r3|v).timestamp and the temporal modules. Timestamps should
only be modified with
t.register because the
(r|r3|v).timestamp modules have no access to the temporal
database.
Specification of map names:
prec_1
prec_2
prec_3
prec_4
prec_5
prec_6
Specification of map names and the absolute start time (date) of the time instances:
prec_1|2001-01-01
prec_2|2001-02-01
prec_3|2001-03-01
prec_4|2001-04-01
prec_5|2001-05-01
prec_6|2001-06-01
Specification of map names and the absolute time stamp (datetime):
terra_lst_day20020113|2002-01-13 10:30
terra_lst_day20020114|2002-01-14 10:30
terra_lst_day20020115|2002-01-15 10:30
terra_lst_day20020116|2002-01-16 10:30
terra_lst_day20020117|2002-01-17 10:30
Specification of the map name and the absolute time interval with start and end time:
prec_1|2001-01-01|2001-04-01
prec_2|2001-04-01|2001-07-01
prec_3|2001-07-01|2001-10-01
prec_4|2001-10-01|2002-01-01
prec_5|2002-01-01|2002-04-01
prec_6|2002-04-01|2002-07-01
Register maps in a absolute space time dataset, creating a time interval
t.register -i type=raster input=precipitation_monthly \
maps=`g.list rast patt=*precip* sep=,` start=2009-01-01 \
increment="1 months"
In this example we create 6 raster maps that will be registered in a single space time raster dataset named precip_abs using a monthly temporal granularity. The -i flag generates interval time. The generated timestamps will be inspected using r.timestamp and t.rast.list. We will register an additional map with a timetsamp that was set with r.timestamp.
r.mapcalc expr="prec_1 = 100"
r.mapcalc expr="prec_2 = 200"
r.mapcalc expr="prec_3 = 300"
r.mapcalc expr="prec_4 = 400"
r.mapcalc expr="prec_5 = 500"
r.mapcalc expr="prec_6 = 600"
t.create type=strds temporaltype=absolute \
output=precip_abs title="Example" \
descr="Example"
t.register -i type=raster input=precip_abs \
maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6 \
start="2001-01-01" increment="1 months"
r.timestamp prec_1
1 Jan 2001 00:00:00 / 1 Feb 2001 00:00:00
r.timestamp prec_2
1 Feb 2001 00:00:00 / 1 Mar 2001 00:00:00
t.rast.list input=precip_abs
name|mapset|start_time|end_time
prec_1|PERMANENT|2001-01-01 00:00:00|2001-02-01 00:00:00
prec_2|PERMANENT|2001-02-01 00:00:00|2001-03-01 00:00:00
prec_3|PERMANENT|2001-03-01 00:00:00|2001-04-01 00:00:00
prec_4|PERMANENT|2001-04-01 00:00:00|2001-05-01 00:00:00
prec_5|PERMANENT|2001-05-01 00:00:00|2001-06-01 00:00:00
prec_6|PERMANENT|2001-06-01 00:00:00|2001-07-01 00:00:00
r.mapcalc expr="prec_7 = 700"
r.timestamp map=prec_7 date="1 jul 2001 / 1 aug 2001"
t.register type=raster input=precip_abs maps=prec_7
t.rast.list input=precip_abs
name|mapset|start_time|end_time
prec_1|PERMANENT|2001-01-01 00:00:00|2001-02-01 00:00:00
prec_2|PERMANENT|2001-02-01 00:00:00|2001-03-01 00:00:00
prec_3|PERMANENT|2001-03-01 00:00:00|2001-04-01 00:00:00
prec_4|PERMANENT|2001-04-01 00:00:00|2001-05-01 00:00:00
prec_5|PERMANENT|2001-05-01 00:00:00|2001-06-01 00:00:00
prec_6|PERMANENT|2001-06-01 00:00:00|2001-07-01 00:00:00
prec_7|PERMANENT|2001-07-01 00:00:00|2001-08-01 00:00:00
t.create,
t.info
Sören Gebbert, Thünen Institute of Climate-Smart Agriculture
Last changed: $Date: 2014-12-27 00:50:11 +0100 (so, 27 12 2014) $
Main index | Temporal index | Topics index | Keywords index | Full index
© 2003-2015 GRASS Development Team, GRASS GIS 7.0.1 Reference Manual