File: t.remove.html

package info (click to toggle)
grass 8.4.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 277,040 kB
  • sloc: ansic: 460,798; python: 227,732; cpp: 42,026; sh: 11,262; makefile: 7,007; xml: 3,637; sql: 968; lex: 520; javascript: 484; yacc: 450; asm: 387; perl: 157; sed: 25; objc: 6; ruby: 4
file content (60 lines) | stat: -rw-r--r-- 2,180 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<h2>DESCRIPTION</h2>

The module <em>t.remove</em> removes space time datasets (STRDS, STR3DS,
STVDS) from the temporal database. In other words, by default it deletes
the relevant database entries. It can also unregister maps from temporal
database using the recursive mode <b>-r</b> (recursive).
<p>
Optionally, also the raster, 3D raster and vector maps of the space time
datasets can be removed from the current mapset using the <b>-d</b> (delete)
flag.
All removals only work if <b>-f</b> (force) flag is used.

<h2>EXAMPLE</h2>

In this example a space time raster dataset (STRDS) named
<b>precip_months_sum</b> will be created using a subset of the monthly
precipitation raster maps from the North Carolina climate sample data set.
<br>
In order to be able to show the case of recursive removal without deleting
the original sample data, we generate new data by means of computing
yearly precipitation sums. Eventually, all newly produced data (STRDS and
raster maps) are removed:

<div class="code"><pre>
# Create new and empty STRDS
t.create output=precip_months_sum semantictype=mean \
  title="Monthly sum of precipitation" \
  description="Monthly sum of precipitation for the \
  North Carolina sample data"

# Register maps from sample dataset (selecting a subset with g.list)
t.register -i type=raster input=precip_months_sum \
  maps=$(g.list type=raster pattern="201*_precip" separator=comma) \
  start="2010-01-01" increment="1 months"

# Create some new data by aggregating with 1 years granularity
t.rast.aggregate input=precip_months_sum \
  output=precip_years_sum basename=precip_years_sum \
  granularity="1 years" method=sum

# Remove all newly produced data:

# a) the aggregated STRDS with 1 years granularity along with its raster maps
t.remove -df type=strds input=precip_years_sum

# b) the STRDS with 1 months granularity, but not the original sample data
t.remove -f type=strds input=precip_months_sum
</pre></div>

<h2>SEE ALSO</h2>

<em>
<a href="t.create.html">t.create</a>,
<a href="t.info.html">t.info</a>,
<a href="t.register.html">t.register</a>
</em>

<h2>AUTHOR</h2>

S&ouml;ren Gebbert, Th&uuml;nen Institute of Climate-Smart Agriculture