Temporal data processing/maps registration: Difference between revisions

From GRASS-Wiki
Jump to navigation Jump to search
(Different options to register maps in stds)
 
mNo edit summary
Line 3: Line 3:
There are different ways to register maps in stds with {{cmd|t.register}}. The best one in each case will depend on your data and wether you need/have '''time instances''' or '''time intervals'''. Time instances are defined by an occurrence date, say only start time, time intervals, instead, are defined by both start and end time.  
There are different ways to register maps in stds with {{cmd|t.register}}. The best one in each case will depend on your data and wether you need/have '''time instances''' or '''time intervals'''. Time instances are defined by an occurrence date, say only start time, time intervals, instead, are defined by both start and end time.  


If you use either a file with map names or a list of maps (manually typed or as g.list output), and you need time instances (temporal type = point), then you set start and increment options (not -i).
If you use either a file with map names or a list of maps (manually typed or as g.list output), and you need ''time instances'' (temporal type = point), then you set start and increment options (not -i).


<source lang="bash">
<source lang="bash">
Line 21: Line 21:
</source>
</source>


You can also get time instances passing a file with map names and start time.
You can also get ''time instances'' passing a file with map names and start time.


<source lang="bash">
<source lang="bash">
Line 28: Line 28:
</source>
</source>


If you need/have data at regular intervals instead, you also need to set the -i flag along with start time. The -i flag and the increment option will only work if a start time is defined (but no end time).
If you need/have data at regular ''intervals'' instead, you also need to set the -i flag along with start time. The -i flag and the increment option will only work if a start time is defined (but no end time).


<source lang="bash">
<source lang="bash">
Line 41: Line 41:
</source>
</source>


If you pass a file with map names and start time only, but you want time intervals, then you can use {{cmd|t.snap}} on the STDS to  
If you pass a file with map names and start time only, but you want time ''intervals'', then you can use {{cmd|t.snap}} on the STDS to  
create a correct temporal topology: maps will use the start time of a potential predecessor as end time.  
create a correct temporal topology: maps will use the start time of a potential predecessor as end time.  


Line 49: Line 49:
</source>
</source>


Or, you can provide also end_time in the input file (for example, if your time intervals are irregular). If end_time in one map equals start_time of the following, {{cmd|t.register}} will automatically create intervals.  
Or, you can provide also end_time in the input file (for example, if your time ''intervals'' are irregular). If end_time in one map equals start_time of the following, {{cmd|t.register}} will automatically create intervals.  


<source lang="bash">
<source lang="bash">

Revision as of 20:45, 5 November 2015

Different ways of registering maps in STDS

There are different ways to register maps in stds with t.register. The best one in each case will depend on your data and wether you need/have time instances or time intervals. Time instances are defined by an occurrence date, say only start time, time intervals, instead, are defined by both start and end time.

If you use either a file with map names or a list of maps (manually typed or as g.list output), and you need time instances (temporal type = point), then you set start and increment options (not -i).

# typed map list 
t.register input=precipitacion \
maps=prec_01,prec_02,prec_03,prec_04,prec_05,prec_06 \
start="2000-01-01" increment="1 months"

# with g.list output
t.register input=precipitacion \
maps=`g.list type=raster pattern=prec* separator=comma` \
start="2000-01-01" increment="1 months"

# file with only map names
t.register input=precipitacion file=map_list.txt \
start="2000-01-01" increment="1 months"

You can also get time instances passing a file with map names and start time.

# file with map names and start time only
t.register input=precipitacion file=map_list_&_start_time.txt

If you need/have data at regular intervals instead, you also need to set the -i flag along with start time. The -i flag and the increment option will only work if a start time is defined (but no end time).

# map list 
t.register -i input=precipitacion \
maps=`g.list type=raster pattern=prec* separator=comma` \
start="2000-01-01" increment="1 months"

# file with only map names
t.register -i input=precipitacion file=map_list.txt \
start="2000-01-01" increment="1 months"

If you pass a file with map names and start time only, but you want time intervals, then you can use t.snap on the STDS to create a correct temporal topology: maps will use the start time of a potential predecessor as end time.

t.register input=precipitacion file=map_list_&_start_time.txt 
t.snap type=strds input=precipitation

Or, you can provide also end_time in the input file (for example, if your time intervals are irregular). If end_time in one map equals start_time of the following, t.register will automatically create intervals.

t.register input=precipitacion file=map_list_start_&_end_time.txt

So, to sum up, if you provide a file with time stamps, you should not use -i flag nor increment option. Besides, in the input file you can provide both time instances and time intervals, and also overlapping times. See manual page for input file formats.