~ubuntu-branches/ubuntu/wily/grass/wily

« back to all changes in this revision

Viewing changes to temporal/t.sample/t.sample.html

Tags: 7.0.0~rc1+ds1-1~exp1
* New upstream release candidate.
* Repack upstream tarball, remove precompiled Python objects.
* Add upstream metadata.
* Update gbp.conf and Vcs-Git URL to use the experimental branch.
* Update watch file for GRASS 7.0.
* Drop build dependencies for Tcl/Tk, add build dependencies:
  python-numpy, libnetcdf-dev, netcdf-bin, libblas-dev, liblapack-dev
* Update Vcs-Browser URL to use cgit instead of gitweb.
* Update paths to use grass70.
* Add configure options: --with-netcdf, --with-blas, --with-lapack,
  remove --with-tcltk-includes.
* Update patches for GRASS 7.
* Update copyright file, changes:
  - Update copyright years
  - Group files by license
  - Remove unused license sections
* Add patches for various typos.
* Fix desktop file with patch instead of d/rules.
* Use minimal dh rules.
* Bump Standards-Version to 3.9.6, no changes.
* Use dpkg-maintscript-helper to replace directories with symlinks.
  (closes: #776349)
* Update my email to use @debian.org address.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<h2>DESCRIPTION</h2>
 
2
 
 
3
The purpose of this module is to compute and to show spatio-temporal 
 
4
relations between space time datasets of different type. Several input 
 
5
space time datasets are sampled by a <em>sample</em> space time dataset 
 
6
using temporal topological relations. The types of the input space time 
 
7
datasets and the type of the sample space time dataset can be 
 
8
different.
 
9
<p>
 
10
This module is useful to analyze temporal relationships between space 
 
11
time datasets using temporal topology. The flag <em>-s</em> enables a 
 
12
spatio-temporal topology, so that only spatio-temporal related map 
 
13
layers of space time datasets are considered in the analysis.
 
14
 
 
15
<h2>NOTE</h2>
 
16
 
 
17
The temporal relation <em>start</em> means that the start time of an 
 
18
input map layer is temporally located in an interval of a sample map 
 
19
layer.
 
20
<p>
 
21
The textual output at the command line shows the names of the maps, 
 
22
start and end time as well as the <em>interval length</em> in days and 
 
23
the temporal <em>distance from begin</em> in days.
 
24
<p>
 
25
The default <em>separator</em> is the pipe symbol.
 
26
<p>
 
27
Temporal gaps, if present, in the input and sampling space time 
 
28
datasets will be used in the sampling process. Gaps have no map name, 
 
29
instead <em>None</em> is printed.
 
30
 
 
31
<h2>EXAMPLE</h2>
 
32
 
 
33
In the examples below we create a space time raster dataset <em>A</em> 
 
34
and a space time vector dataset <em>P</em> that have different temporal 
 
35
layouts and number of map layers. The space time vector dataset 
 
36
contains a gap, that will be used in the sampling process.
 
37
<p>
 
38
We use <em>t.sample</em> to inspect the topological relations between the
 
39
time stamped map layers in <em>A</em> and <em>P</em>.
 
40
<p>
 
41
<div class="code"><pre>
 
42
# Set an appropriate region
 
43
g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3
 
44
 
 
45
# Generate the raster map layer
 
46
r.mapcalc expr="a1 = rand(0, 550)" -s
 
47
r.mapcalc expr="a2 = rand(0, 450)" -s
 
48
r.mapcalc expr="a3 = rand(0, 320)" -s
 
49
r.mapcalc expr="a4 = rand(0, 510)" -s
 
50
r.mapcalc expr="a5 = rand(0, 300)" -s
 
51
r.mapcalc expr="a6 = rand(0, 650)" -s
 
52
 
 
53
# Generate the vector map layer
 
54
v.random -z output=pnts1 n=20 zmin=0 zmax=100 column=height
 
55
v.random -z output=pnts2 n=20 zmin=0 zmax=100 column=height
 
56
 
 
57
n1=`g.tempfile pid=1 -d` 
 
58
n2=`g.tempfile pid=2 -d`
 
59
 
 
60
cat > "${n1}" << EOF
 
61
a1
 
62
a2
 
63
a3
 
64
a4
 
65
a5
 
66
a6
 
67
EOF
 
68
 
 
69
cat > "${n2}" << EOF
 
70
pnts1|2001-01-01|2001-03-01
 
71
pnts2|2001-05-01|2001-07-01
 
72
EOF
 
73
 
 
74
# Register the maps in new space time datasets
 
75
t.create type=strds temporaltype=absolute output=A \
 
76
    title="A test with raster input files" descr="A test with raster input files"
 
77
 
 
78
t.create type=stvds temporaltype=absolute output=P \
 
79
    title="A test with vector input files" descr="A test with vector input files"
 
80
 
 
81
t.register type=raster -i input=A file="${n1}" start="2001-01-01" increment="1 months"
 
82
 
 
83
# Raster map layer in A
 
84
t.rast.list A
 
85
 
 
86
name|mapset|start_time|end_time
 
87
a1|PERMANENT|2001-01-01 00:00:00|2001-02-01 00:00:00
 
88
a2|PERMANENT|2001-02-01 00:00:00|2001-03-01 00:00:00
 
89
a3|PERMANENT|2001-03-01 00:00:00|2001-04-01 00:00:00
 
90
a4|PERMANENT|2001-04-01 00:00:00|2001-05-01 00:00:00
 
91
a5|PERMANENT|2001-05-01 00:00:00|2001-06-01 00:00:00
 
92
a6|PERMANENT|2001-06-01 00:00:00|2001-07-01 00:00:00
 
93
 
 
94
 
 
95
t.register type=vector input=P file="${n2}"
 
96
 
 
97
# Vector map layer in P
 
98
t.vect.list P
 
99
 
 
100
name|layer|mapset|start_time|end_time
 
101
pnts1|None|PERMANENT|2001-01-01 00:00:00|2001-03-01 00:00:00
 
102
pnts2|None|PERMANENT|2001-05-01 00:00:00|2001-07-01 00:00:00
 
103
 
 
104
# Start time of maps in A located in maps in P
 
105
t.sample method=start input=A samtype=stvds sample=P -c
 
106
 
 
107
P@PERMANENT|A@PERMANENT|start_time|end_time|interval_length|distance_from_begin
 
108
pnts1@PERMANENT|a1@PERMANENT,a2@PERMANENT|2001-01-01 00:00:00|2001-03-01 00:00:00|59.0|0.0
 
109
None|a3@PERMANENT,a4@PERMANENT|2001-03-01 00:00:00|2001-05-01 00:00:00|61.0|59.0
 
110
pnts2@PERMANENT|a5@PERMANENT,a6@PERMANENT|2001-05-01 00:00:00|2001-07-01 00:00:00|61.0|120.0
 
111
 
 
112
 
 
113
# P contains A
 
114
t.sample method=contain input=A samtype=stvds sample=P -c
 
115
 
 
116
P@PERMANENT|A@PERMANENT|start_time|end_time|interval_length|distance_from_begin
 
117
pnts1@PERMANENT|a1@PERMANENT,a2@PERMANENT|2001-01-01 00:00:00|2001-03-01 00:00:00|59.0|0.0
 
118
None|a3@PERMANENT,a4@PERMANENT|2001-03-01 00:00:00|2001-05-01 00:00:00|61.0|59.0
 
119
pnts2@PERMANENT|a5@PERMANENT,a6@PERMANENT|2001-05-01 00:00:00|2001-07-01 00:00:00|61.0|120.0
 
120
 
 
121
 
 
122
# A during P
 
123
t.sample method=during intype=stvds input=P samtype=strds sample=A -c
 
124
 
 
125
A@PERMANENT|P@PERMANENT|start_time|end_time|interval_length|distance_from_begin
 
126
a1@PERMANENT|pnts1@PERMANENT|2001-01-01 00:00:00|2001-02-01 00:00:00|31.0|0.0
 
127
a2@PERMANENT|pnts1@PERMANENT|2001-02-01 00:00:00|2001-03-01 00:00:00|28.0|31.0
 
128
a3@PERMANENT|None|2001-03-01 00:00:00|2001-04-01 00:00:00|31.0|59.0
 
129
a4@PERMANENT|None|2001-04-01 00:00:00|2001-05-01 00:00:00|30.0|90.0
 
130
a5@PERMANENT|pnts2@PERMANENT|2001-05-01 00:00:00|2001-06-01 00:00:00|31.0|120.0
 
131
a6@PERMANENT|pnts2@PERMANENT|2001-06-01 00:00:00|2001-07-01 00:00:00|30.0|151.0
 
132
 
 
133
 
 
134
# No Overlapping
 
135
t.sample method=overlap input=A samtype=stvds sample=P -cs
 
136
 
 
137
P@PERMANENT|A@PERMANENT|start_time|end_time|interval_length|distance_from_begin
 
138
pnts1@PERMANENT|None|2001-01-01 00:00:00|2001-03-01 00:00:00|59.0|0.0
 
139
None|None|2001-03-01 00:00:00|2001-05-01 00:00:00|61.0|59.0
 
140
pnts2@PERMANENT|None|2001-05-01 00:00:00|2001-07-01 00:00:00|61.0|120.0
 
141
 
 
142
 
 
143
t.sample method=precedes input=A samtype=stvds sample=P -c
 
144
 
 
145
P@PERMANENT|A@PERMANENT|start_time|end_time|interval_length|distance_from_begin
 
146
pnts1@PERMANENT|a3@PERMANENT|2001-01-01 00:00:00|2001-03-01 00:00:00|59.0|0.0
 
147
None|a5@PERMANENT|2001-03-01 00:00:00|2001-05-01 00:00:00|61.0|59.0
 
148
pnts2@PERMANENT|None|2001-05-01 00:00:00|2001-07-01 00:00:00|61.0|120.0
 
149
 
 
150
 
 
151
t.sample method=follows  input=A samtype=stvds sample=P -c
 
152
 
 
153
P@PERMANENT|A@PERMANENT|start_time|end_time|interval_length|distance_from_begin
 
154
pnts1@PERMANENT|None|2001-01-01 00:00:00|2001-03-01 00:00:00|59.0|0.0
 
155
None|a2@PERMANENT|2001-03-01 00:00:00|2001-05-01 00:00:00|61.0|59.0
 
156
pnts2@PERMANENT|a4@PERMANENT|2001-05-01 00:00:00|2001-07-01 00:00:00|61.0|120.0
 
157
 
 
158
 
 
159
t.sample method=precedes,follows input=A samtype=stvds sample=P -c
 
160
 
 
161
P@PERMANENT|A@PERMANENT|start_time|end_time|interval_length|distance_from_begin
 
162
pnts1@PERMANENT|a3@PERMANENT|2001-01-01 00:00:00|2001-03-01 00:00:00|59.0|0.0
 
163
None|a5@PERMANENT,a2@PERMANENT|2001-03-01 00:00:00|2001-05-01 00:00:00|61.0|59.0
 
164
pnts2@PERMANENT|a4@PERMANENT|2001-05-01 00:00:00|2001-07-01 00:00:00|61.0|120.0
 
165
</pre></div>
 
166
 
 
167
<h2>SEE ALSO</h2>
 
168
 
 
169
<em>
 
170
<a href="t.create.html">t.create</a>,
 
171
<a href="t.info.html">t.info</a>
 
172
</em>
 
173
 
 
174
<h2>AUTHOR</h2>
 
175
 
 
176
S&ouml;ren Gebbert, Th&uuml;nen Institute of Climate-Smart Agriculture
 
177
 
 
178
<p><i>Last changed: $Date: 2014-12-29 09:56:42 +0100 (Mon, 29 Dec 2014) $</i>
 
179