t.shift.html 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. <h2>DESCRIPTION</h2>
  2. <em>t.shift</em> is designed to temporally shift all registered maps in a space time dataset
  3. with a user defined granularity. Raster, 3D raster and vector space time datasets are supported.
  4. <p>
  5. The format of the absolute time granularity is "number unit". Number is an integer, unit is the temporal
  6. unit that can be one of year(s), month(s), week(s), day(s), hour(s), minute(s) or second(s).
  7. <p>
  8. The granularity in case of relative time is an integer. The temporal unit is the unit of the space time dataset
  9. and can not be modified.
  10. <h2>Note</h2>
  11. Be careful when shifting space time datasets with absolute time.
  12. The temporal granularity may change if you shift a space time dataset with a unit that is
  13. different from the space time dataset granularity. Be aware that the shifting with months and years
  14. may result in incorrect days per month. Shifting the date 20012-03-31 with a granularity
  15. of one month will result in 2012-04-31 which is incorrect. In this case an error will raise
  16. and the shifting will not performed for the whole dataset.
  17. <p>
  18. You can use the extraction module to shift only a subset of maps from a space time dataset.
  19. Be aware that the shifting of maps affect all space time datasets in which they are registered.
  20. <h2>EXAMPLE</h2>
  21. We create 6 raster maps and register them in a space time raster dataset using an increment of one day.
  22. Then we shift the time intervals with a granularity of 12 hours.
  23. <div class="code"><pre>
  24. r.mapcalc expr="prec_1 = rand(0, 550)"
  25. r.mapcalc expr="prec_2 = rand(0, 450)"
  26. r.mapcalc expr="prec_3 = rand(0, 320)"
  27. r.mapcalc expr="prec_4 = rand(0, 510)"
  28. r.mapcalc expr="prec_5 = rand(0, 300)"
  29. r.mapcalc expr="prec_6 = rand(0, 650)"
  30. t.create type=strds temporaltype=absolute \
  31. output=precipitation_daily \
  32. title="Daily precipitation" \
  33. description="Test dataset with daily precipitation"
  34. t.register -i type=rast input=precipitation_daily \
  35. maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6 \
  36. start=2012-01-01 increment="1 day"
  37. t.info type=strds input=precipitation_daily
  38. +-------------------- Space Time Raster Dataset -----------------------------+
  39. | |
  40. +-------------------- Basic information -------------------------------------+
  41. | Id: ........................ precipitation_daily@soeren
  42. | Name: ...................... precipitation_daily
  43. | Mapset: .................... soeren
  44. | Creator: ................... soeren
  45. | Creation time: ............. 2013-04-20 14:41:55.392394
  46. | Temporal type: ............. absolute
  47. | Semantic type:.............. mean
  48. +-------------------- Absolute time -----------------------------------------+
  49. | Start time:................. 2012-01-01 00:00:00
  50. | End time:................... 2012-01-07 00:00:00
  51. | Granularity:................ 1 day
  52. | Temporal type of maps:...... interval
  53. +-------------------- Spatial extent ----------------------------------------+
  54. | North:...................... 80.0
  55. | South:...................... 0.0
  56. | East:.. .................... 120.0
  57. | West:....................... 0.0
  58. | Top:........................ 0.0
  59. | Bottom:..................... 0.0
  60. +-------------------- Metadata information ----------------------------------+
  61. | Number of registered maps:.. 6
  62. | Title:
  63. | Daily precipitation
  64. | Description:
  65. | Test dataset with daily precipitation
  66. | Commands of creation:
  67. | - 2013-04-20 14:41:55 -
  68. | t.create type="strds" temporaltype="absolute"
  69. | output="precipitation_daily" title="Daily precipitation"
  70. | description="Test dataset with daily precipitation"
  71. | - 2013-04-20 14:41:55 -
  72. | t.register -i type="rast"
  73. | input="precipitation_daily"
  74. | maps="prec_1,prec_2,prec_3,prec_4,prec_5,prec_6" start="2012-01-01"
  75. | increment="1 day"
  76. |
  77. | North-South resolution min:. 10.0
  78. | North-South resolution max:. 10.0
  79. | East-west resolution min:... 10.0
  80. | East-west resolution max:... 10.0
  81. | Minimum value min:.......... 0.0
  82. | Minimum value max:.......... 0.0
  83. | Maximum value min:.......... 296.0
  84. | Maximum value max:.......... 648.0
  85. | Raster register table:...... precipitation_daily_soeren_raster_register
  86. +----------------------------------------------------------------------------+
  87. t.rast.list input=precipitation_daily
  88. prec_1 soeren 2012-01-01 00:00:00 2012-01-02 00:00:00
  89. prec_2 soeren 2012-01-02 00:00:00 2012-01-03 00:00:00
  90. prec_3 soeren 2012-01-03 00:00:00 2012-01-04 00:00:00
  91. prec_4 soeren 2012-01-04 00:00:00 2012-01-05 00:00:00
  92. prec_5 soeren 2012-01-05 00:00:00 2012-01-06 00:00:00
  93. prec_6 soeren 2012-01-06 00:00:00 2012-01-07 00:00:00
  94. t.shift type=strds input=precipitation_daily granularity="12 hours"
  95. t.info type=strds input=precipitation_daily
  96. +-------------------- Space Time Raster Dataset -----------------------------+
  97. | |
  98. +-------------------- Basic information -------------------------------------+
  99. | Id: ........................ precipitation_daily@soeren
  100. | Name: ...................... precipitation_daily
  101. | Mapset: .................... soeren
  102. | Creator: ................... soeren
  103. | Creation time: ............. 2013-04-20 14:41:55.392394
  104. | Temporal type: ............. absolute
  105. | Semantic type:.............. mean
  106. +-------------------- Absolute time -----------------------------------------+
  107. | Start time:................. 2012-01-01 12:00:00
  108. | End time:................... 2012-01-07 12:00:00
  109. | Granularity:................ 24 hours
  110. | Temporal type of maps:...... interval
  111. +-------------------- Spatial extent ----------------------------------------+
  112. | North:...................... 80.0
  113. | South:...................... 0.0
  114. | East:.. .................... 120.0
  115. | West:....................... 0.0
  116. | Top:........................ 0.0
  117. | Bottom:..................... 0.0
  118. +-------------------- Metadata information ----------------------------------+
  119. | Number of registered maps:.. 6
  120. | Title:
  121. | Daily precipitation
  122. | Description:
  123. | Test dataset with daily precipitation
  124. | Commands of creation:
  125. | - 2013-04-20 14:41:55 -
  126. | t.create type="strds" temporaltype="absolute"
  127. | output="precipitation_daily" title="Daily precipitation"
  128. | description="Test dataset with daily precipitation"
  129. | - 2013-04-20 14:41:55 -
  130. | t.register -i type="rast"
  131. | input="precipitation_daily"
  132. | maps="prec_1,prec_2,prec_3,prec_4,prec_5,prec_6" start="2012-01-01"
  133. | increment="1 day"
  134. | - 2013-04-20 14:42:21 -
  135. | t.shift type="strds" input="precipitation_daily"
  136. | granularity="12 hours"
  137. |
  138. | North-South resolution min:. 10.0
  139. | North-South resolution max:. 10.0
  140. | East-west resolution min:... 10.0
  141. | East-west resolution max:... 10.0
  142. | Minimum value min:.......... 0.0
  143. | Minimum value max:.......... 0.0
  144. | Maximum value min:.......... 296.0
  145. | Maximum value max:.......... 648.0
  146. | Raster register table:...... precipitation_daily_soeren_raster_register
  147. +----------------------------------------------------------------------------+
  148. t.rast.list input=precipitation_daily
  149. prec_1 soeren 2012-01-01 12:00:00 2012-01-02 12:00:00
  150. prec_2 soeren 2012-01-02 12:00:00 2012-01-03 12:00:00
  151. prec_3 soeren 2012-01-03 12:00:00 2012-01-04 12:00:00
  152. prec_4 soeren 2012-01-04 12:00:00 2012-01-05 12:00:00
  153. prec_5 soeren 2012-01-05 12:00:00 2012-01-06 12:00:00
  154. prec_6 soeren 2012-01-06 12:00:00 2012-01-07 12:00:00
  155. </pre></div>
  156. <h2>SEE ALSO</h2>
  157. <em>
  158. <a href="t.create.html">t.create</a>,
  159. <a href="t.register.html">t.register</a>,
  160. <a href="t.snap.html">t.snap</a>
  161. </em>
  162. <h2>AUTHOR</h2>
  163. S&ouml;ren Gebbert
  164. <p><i>Last changed: $Date: 2013-01-22 14:44:08 +0100 (Di, 22. Jan 2013) $</i>