temporalintro.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  1. <!-- meta page description: Temporal data processing in GRASS GIS -->
  2. <!-- meta page index: temporal -->
  3. The temporal enabled GRASS introduces three new data types that
  4. are designed to handle time series data:
  5. <ul>
  6. <li> <em>Space time raster datasets</em> (strds) are designed to
  7. manage raster map time series. Modules that process strds have the
  8. naming prefix <em>t.rast</em>.
  9. <li> <em>Space time 3D raster datasets</em> (str3ds) are designed to
  10. manage 3D raster map time series. Modules that process str3ds have
  11. the naming prefix <em>t.rast3d</em>.
  12. <li> <em>Space time vector datasets</em> (stvds) are designed to
  13. manage vector map time series. Modules that process stvds have the
  14. naming prefix <em>t.vect</em>.
  15. </ul>
  16. These new data types can be managed, analyzed and processed with
  17. temporal modules that are based on the GRASS GIS temporal framework.
  18. <h3>Temporal data management in general</h3>
  19. Space time datasets are stored in a temporal database. A core principle
  20. of the temporal framework is that temporal databases are mapset
  21. specific. A new temporal database is created when a temporal command is
  22. invoked in a mapset that does not contain any temporal databases yet.
  23. For example, when a mapset was recently created.
  24. <p>
  25. <b>Therefore, as space-time datasets are mapset specific, they can only
  26. register raster, 3D raster or vector maps from the same mapset.</b>
  27. <p>
  28. By default, space-time datasets can not register maps from other
  29. mapsets. This is a security measure, since the registration of maps in
  30. a space-time dataset will always modify the metadata of the registered
  31. map. This is critical if:
  32. <ul>
  33. <li>The user has no write access to the maps from other mapsets
  34. he/she wants to register</li>
  35. <li>If registered maps are removed from other mapsets, the temporal
  36. database will not be updated and will contain ghost maps</li>
  37. </ul>
  38. SQLite3 or PostgreSQL are supported as temporal database backends.
  39. Temporal databases stored in other mapsets can be accessed as long as
  40. those other mapsets are in the user's current mapset search path
  41. (managed with <a href="g.mapsets.html">g.mapsets</a>). Access to
  42. space-time datasets from other mapsets is read-only. They can not be
  43. modified or removed.
  44. <p>
  45. Connection settings are performed with <a href="t.connect.html">t.connect</a>.
  46. By default, a SQLite3 database is
  47. created in the current mapset to store all space-time datasets and
  48. registered time series maps in that mapset.
  49. <p>
  50. New space-time datasets are created in the temporal database with
  51. <a href="t.create.html">t.create</a>. The name of the new dataset, the
  52. type (strds, str3ds, stvds), the title and the description must be
  53. provided for creation. Optionally, the temporal type (absolute,
  54. relative) and the semantic information can be provided.
  55. <p>
  56. The module <a href="t.register.html">t.register</a> is designed to
  57. register raster, 3D raster and vector maps in the temporal database and
  58. in the space-time datasets. It supports different input options. Maps
  59. to register can be provided as a comma separated string at the command
  60. line, or in an input file. The module supports the definition of time
  61. stamps (time instances or intervals) for each map in the input file.
  62. With <a href="t.unregister.html">t.unregister</a> maps can be
  63. unregistered from space-time datasets and from the temporal database.
  64. <p>
  65. <b>Important</b><br>
  66. <i>Use only temporal commands like <a href="t.register.html">t.register</a>
  67. to attach a time stamp to raster,
  68. 3D raster and vector maps. The commands r.timestamp, r3.timestamp and
  69. v.timestamp should not be used because they only modify the metadata of
  70. the map in the spatial database, but they do not register maps in the
  71. temporal database. However, maps with timestamps attached by means of
  72. *.timestamp modules can be registered in space-time datasets using the
  73. existing timestamp.</i>
  74. <p>
  75. The module <a href="t.remove.html">t.remove</a> will remove the
  76. space-time datasets from the temporal database and optionally all
  77. registered maps. It will take care of multiple map registration, hence
  78. if maps are registered in several space-time datasets in the current
  79. mapset. Use <a href="t.support.html">t.support</a> to modify the
  80. metadata of space time datasets or to update the metadata that is
  81. derived from registered maps. This module also checks for removed and
  82. modified maps and updates the space-time datasets accordingly. Rename a
  83. space-time dataset with <a href="t.rename.html">t.rename</a>.
  84. <p>
  85. To print information about space-time datasets or registered maps, the
  86. module <a href="t.info.html">t.info</a> can be used.
  87. <a href="t.list.html">t.list</a> will list all space-time datasets and
  88. registered maps in the temporal database.
  89. <p>
  90. The module <a href="t.topology.html">t.topology</a> was designed to
  91. compute and check the temporal topology of space-time datasets.
  92. Moreover, the module <a href="t.sample.html">t.sample</a> samples input
  93. space-time dataset(s) with a sample space-time dataset and prints the
  94. result to standard output. Different sampling methods are supported and
  95. can be combined.
  96. <p>
  97. List of general management modules:
  98. <ul>
  99. <li><a href="t.connect.html">t.connect</a></li>
  100. <li><a href="t.create.html">t.create</a></li>
  101. <li><a href="t.rename.html">t.rename</a></li>
  102. <li><a href="t.remove.html">t.remove</a></li>
  103. <li><a href="t.register.html">t.register</a></li>
  104. <li><a href="t.unregister.html">t.unregister</a></li>
  105. <li><a href="t.info.html">t.info</a></li>
  106. <li><a href="t.list.html">t.list</a></li>
  107. <li><a href="t.sample.html">t.sample</a></li>
  108. <li><a href="t.support.html">t.support</a></li>
  109. <li><a href="t.topology.html">t.topology</a></li>
  110. </ul>
  111. <h3>Modules to visualize space-time datasets and temporal data</h3>
  112. <ul>
  113. <li><a href="g.gui.animation.html">g.gui.animation</a></li>
  114. <li><a href="g.gui.timeline.html">g.gui.timeline</a></li>
  115. <li><a href="g.gui.mapswipe.html">g.gui.mapswipe</a></li>
  116. <li><a href="g.gui.tplot.html">g.gui.tplot</a></li>
  117. </ul>
  118. <h3>Modules to process space-time raster datasets</h3>
  119. The focus of the temporal GIS framework is the processing and analysis
  120. of raster time series. Hence, the majority of the temporal modules are
  121. designed to process space-time raster datasets (strds). However, there
  122. are several modules to process space-time 3D raster datasets and
  123. space-time vector datasets as well.
  124. <h4>Querying and map calculation</h4>
  125. Maps registered in a space-time raster dataset can be listed using
  126. <a href="t.rast.list.html">t.rast.list</a>. This module supports several
  127. methods to list maps and uses SQL queries to determine how these maps
  128. are selected and sorted. Subsets of space-time raster datasets can be
  129. extracted with <a href="t.rast.extract.html">t.rast.extract</a> that
  130. allows performing additional mapcalc operations on the selected raster
  131. maps.
  132. <p>
  133. Several modules in the temporal framework have a <em>where</em> option.
  134. This option allows performing different selections of maps registered
  135. in the temporal database and in space-time datasets. The columns that
  136. can be used to perform these selections are: <i>id, name, creator,
  137. mapset, temporal_type, creation_time, start_time, end_time, north,
  138. south, west, east, nsres, ewres, cols, rows, number_of_cells, min and
  139. max</i>. Note that for vector time series, i.e. stvds, some of the
  140. columns that can be queried to list/select vector maps differ from
  141. those for space-time raster datasets (check with <code>t.vect.list --help</code>).
  142. <ul>
  143. <li><a href="t.rast.extract.html">t.rast.extract</a></li>
  144. <li><a href="t.rast.gapfill.html">t.rast.gapfill</a></li>
  145. <li><a href="t.rast.mapcalc.html">t.rast.mapcalc</a></li>
  146. <li><a href="t.rast.colors.html">t.rast.colors</a></li>
  147. <li><a href="t.rast.neighbors.html">t.rast.neighbors</a></li>
  148. </ul>
  149. <p>
  150. Moreover, there is <a href="v.what.strds.html">v.what.strds</a>, that
  151. uploads space-time raster dataset values at positions of vector points,
  152. to the attribute table of the vector map.
  153. <h4>Aggregation and accumulation analysis</h4>
  154. The temporal framework supports the aggregation of space-time raster
  155. datasets. It provides three modules to perform aggregation using
  156. different approaches. To aggregate a space-time raster dataset using a
  157. temporal granularity like 4 months, 7 days and so on, use
  158. <a href="t.rast.aggregate.html">t.rast.aggregate</a>. The module
  159. <a href="t.rast.aggregate.ds.html">t.rast.aggregate.ds</a> allows
  160. aggregating a space-time raster dataset using the time intervals of the
  161. maps of another space-time dataset (raster, 3D raster and vector). A
  162. simple interface to <a href="r.series.html">r.series</a> is the module
  163. <a href="t.rast.series.html">t.rast.series</a> that processes the whole
  164. input space-time raster dataset or a subset of it.
  165. <ul>
  166. <li><a href="t.rast.aggregate.html">t.rast.aggregate</a></li>
  167. <li><a href="t.rast.aggregate.ds.html">t.rast.aggregate.ds</a></li>
  168. <li><a href="t.rast.series.html">t.rast.series</a></li>
  169. <li><a href="t.rast.accumulate.html">t.rast.accumulate</a></li>
  170. <li><a href="t.rast.accdetect.html">t.rast.accdetect</a></li>
  171. </ul>
  172. <h4>Export/import conversion</h4>
  173. Space-time raster datasets can be exported with
  174. <a href="t.rast.export.html">t.rast.export</a> as a compressed tar
  175. archive. Such archives can be then imported using
  176. <a href="t.rast.import.html">t.rast.import</a>.
  177. <p>
  178. The module <a href="t.rast.to.rast3.html">t.rast.to.rast3</a> converts
  179. space-time raster datasets into space-time voxel cubes. All 3D raster
  180. modules can be used to process such voxel cubes. This conversion allows
  181. the export of space-time raster datasets as netCDF files that include
  182. time as one dimension.
  183. <ul>
  184. <li><a href="t.rast.export.html">t.rast.export</a></li>
  185. <li><a href="t.rast.import.html">t.rast.import</a></li>
  186. <li><a href="t.rast.out.vtk.html">t.rast.out.vtk</a></li>
  187. <li><a href="t.rast.to.rast3.html">t.rast.to.rast3</a></li>
  188. <li><a href="r3.out.netcdf.html">r3.out.netcdf</a></li>
  189. </ul>
  190. <h4>Statistics and gap filling</h4>
  191. <ul>
  192. <li><a href="t.rast.univar.html">t.rast.univar</a></li>
  193. <li><a href="t.rast.gapfill.html">t.rast.gapfill</a></li>
  194. </ul>
  195. <h3>Modules to manage, process and analyze STR3DS and STVDS</h3>
  196. Several space-time vector dataset modules were developed to allow the
  197. handling of vector time series data.
  198. <ul>
  199. <li><a href="t.vect.extract.html">t.vect.extract</a></li>
  200. <li><a href="t.vect.import.html">t.vect.import</a></li>
  201. <li><a href="t.vect.export.html">t.vect.export</a></li>
  202. <li><a href="t.vect.observe.strds.html">t.vect.observe.strds</a></li>
  203. <li><a href="t.vect.univar.html">t.vect.univar</a></li>
  204. <li><a href="t.vect.what.strds.html">t.vect.what.strds</a></li>
  205. <li><a href="t.vect.db.select.html">t.vect.db.select</a></li>
  206. </ul>
  207. The space-time 3D raster dataset modules are doing exactly the same as
  208. their raster pendants, but with 3D raster map layers:
  209. <ul>
  210. <li><a href="t.rast3d.list.html">t.rast3d.list</a></li>
  211. <li><a href="t.rast3d.extract.html">t.rast3d.extract</a></li>
  212. <li><a href="t.rast3d.mapcalc.html">t.rast3d.mapcalc</a></li>
  213. <li><a href="t.rast3d.univar.html">t.rast3d.univar</a></li>
  214. </ul>
  215. <h4>See also</h4>
  216. <ul>
  217. <li>
  218. Gebbert, S., Pebesma, E., 2014. TGRASS: A temporal GIS for field
  219. based environmental modeling. Environmental Modelling &amp;
  220. Software 53, 1-12. (<a href="http://dx.doi.org/10.1016/j.envsoft.2013.11.001">DOI</a>)
  221. </li>
  222. <li>
  223. <a href="http://grasswiki.osgeo.org/wiki/Temporal_data_processing">Temporal
  224. data processing</a> (Wiki)
  225. </li>
  226. <li>
  227. Vaclav Petras, Anna Petrasova, Helena Mitasova, Markus Neteler,
  228. <b>FOSS4G 2014 workshop</b>: <br>
  229. <a href="http://fatra.cnr.ncsu.edu/temporal-grass-workshop/">Spatio-temporal
  230. data handling and visualization in GRASS GIS</a>
  231. </li>
  232. <li>
  233. <a href="http://www.geostat-course.org/Topic_Gebbert">GEOSTAT 2012
  234. TGRASS Course</a>
  235. </li>
  236. </ul>