| 1 |
<h2>DESCRIPTION</h2> |
| 2 |
|
| 3 |
<em>t.rast.gapfill</em> fills temporal gaps in space time raster datasets |
| 4 |
using linear interpolation. Temporal all gaps will be detected in the input |
| 5 |
space time raster dataset automatically. The predecessor and successor maps |
| 6 |
of the gaps will be identified and used to linear interpolate the raster |
| 7 |
map between them. |
| 8 |
|
| 9 |
<h2>NOTES</h2> |
| 10 |
|
| 11 |
This module uses <a href="r.series.interp.html">r.series.interp</a> to |
| 12 |
perform the interpolation for each gap independently. Hence several |
| 13 |
interpolation processes can be run in parallel. |
| 14 |
<p> |
| 15 |
Each gap is re-sampled by the space time raster dataset granularity. |
| 16 |
Therefore several time stamped raster map layers will be interpolated |
| 17 |
if the gap is larger than the STRDS granularity. |
| 18 |
|
| 19 |
<h2>EXAMPLES</h2> |
| 20 |
|
| 21 |
In this example we will create 3 raster maps and register them in the |
| 22 |
temporal database an then in the newly created space time raster dataset. |
| 23 |
There are gaps of one and two day size between the raster maps. The values of |
| 24 |
the maps are chosen so that the interpolated values can be estimated. |
| 25 |
We expect one map with a value of 2 for the first gap and |
| 26 |
two maps (values 3.666 and 4.333) for the second gap after interpolation. |
| 27 |
|
| 28 |
<div class="code"><pre> |
| 29 |
r.mapcalc expression="map1 = 1" |
| 30 |
r.mapcalc expression="map2 = 3" |
| 31 |
r.mapcalc expression="map3 = 5" |
| 32 |
|
| 33 |
t.register type=raster maps=map1 start=2012-08-20 end=2012-08-21 |
| 34 |
t.register type=raster maps=map2 start=2012-08-22 end=2012-08-23 |
| 35 |
t.register type=raster maps=map3 start=2012-08-25 end=2012-08-26 |
| 36 |
|
| 37 |
t.create type=strds temporaltype=absolute \ |
| 38 |
output=precipitation_daily \ |
| 39 |
title="Daily precipitation" \ |
| 40 |
description="Test dataset with daily precipitation" |
| 41 |
|
| 42 |
t.register type=raster input=precipitation_daily maps=map1,map2,map3 |
| 43 |
|
| 44 |
# the output shows three missing maps |
| 45 |
t.rast.list input=precipitation_daily columns=name,start_time,min,max |
| 46 |
|
| 47 |
name|start_time|min|max |
| 48 |
map1|2012-08-20 00:00:00|1.0|1.0 |
| 49 |
map2|2012-08-22 00:00:00|3.0|3.0 |
| 50 |
map3|2012-08-25 00:00:00|5.0|5.0 |
| 51 |
|
| 52 |
|
| 53 |
t.rast.list input=precipitation_daily method=deltagaps |
| 54 |
|
| 55 |
id|name|mapset|start_time|end_time|interval_length|distance_from_begin |
| 56 |
map1@PERMANENT|map1|PERMANENT|2012-08-20 00:00:00|2012-08-21 00:00:00|1.0|0.0 |
| 57 |
None|None|None|2012-08-21 00:00:00|2012-08-22 00:00:00|1.0|1.0 |
| 58 |
map2@PERMANENT|map2|PERMANENT|2012-08-22 00:00:00|2012-08-23 00:00:00|1.0|2.0 |
| 59 |
None|None|None|2012-08-23 00:00:00|2012-08-25 00:00:00|2.0|3.0 |
| 60 |
map3@PERMANENT|map3|PERMANENT|2012-08-25 00:00:00|2012-08-26 00:00:00|1.0|5.0 |
| 61 |
|
| 62 |
t.rast.gapfill input=precipitation_daily basename=gap |
| 63 |
|
| 64 |
t.rast.list input=precipitation_daily columns=name,start_time,min,max |
| 65 |
|
| 66 |
name|start_time|min|max |
| 67 |
map1|2012-08-20 00:00:00|1.0|1.0 |
| 68 |
gap_6_1|2012-08-21 00:00:00|2.0|2.0 |
| 69 |
map2|2012-08-22 00:00:00|3.0|3.0 |
| 70 |
gap_7_1|2012-08-23 00:00:00|3.666667|3.666667 |
| 71 |
gap_7_2|2012-08-24 00:00:00|4.333333|4.333333 |
| 72 |
map3|2012-08-25 00:00:00|5.0|5.0 |
| 73 |
|
| 74 |
</pre></div> |
| 75 |
|
| 76 |
<h2>SEE ALSO</h2> |
| 77 |
|
| 78 |
<em> |
| 79 |
<a href="r.series.interp.html">r.series.interp</a>, |
| 80 |
<a href="t.create.html">t.create</a>, |
| 81 |
<a href="t.info.html">t.info</a> |
| 82 |
</em> |
| 83 |
|
| 84 |
<h2>AUTHOR</h2> |
| 85 |
|
| 86 |
Sören Gebbert, Thünen Institute of Climate-Smart Agriculture |