t.rast.export.html 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. <h2>DESCRIPTION</h2>
  2. This module exports a space time raster dataset as a tar archive. The archive contains the
  3. raster maps either as geotiff files or as GRASS binary files exported using r.out.bin.
  4. The map specific color tables are exported as well in case of geotiff files.
  5. In addition several meta data files are created in the archive that describe the
  6. temporal layout. All time stamps are stored in the file "list.txt", for each map one row.
  7. The name of the map, the start time and the end time are written. In case of a time instance,
  8. the start time is equal to the end time. The "init.txt" files stores the temporal
  9. type, the number of maps, the chosen export format and some other metadata. The "proj.txt"
  10. files stores the projection information as proj4 string of the
  11. location the space time raster dataset was exported from.
  12. The file "readme.txt" describes the file format. The output of r.info is stored in "metadata.txt".
  13. <p>
  14. The tar archive can be compressed using the <b>compress</b> option. Gzip and bzip2 are
  15. available. A <b>where</b> option can be specified, to export only a subset of the space time dataset.
  16. Archives exported with <b>t.rast.export</b> can be importet with <b>t.rast.import</b>.
  17. <h2>EXAMPLE</h2>
  18. In this example we create 7 raster maps that will be registered in a single space time
  19. raster dataset named <em>precipitation_daily</em> using a daily temporal granularity.
  20. The names of the raster maps are stored in a text file that is used for raster map registration.
  21. We export the created space time raster dataset and will have a look at some files that are created:
  22. <div class="code"><pre>
  23. MAPS="map_1 map_2 map_3 map_4 map_5 map_6 map_7"
  24. for map in ${MAPS} ; do
  25. r.mapcalc --o expr="${map} = 1"
  26. echo ${map} >> map_list.txt
  27. done
  28. t.create type=strds temporaltype=absolute \
  29. output=precipitation_daily \
  30. title="Daily precipitation" \
  31. description="Test dataset with daily precipitation"
  32. t.register -i type=rast input=precipitation_daily \
  33. file=map_list.txt start="2012-08-20" increment="1 days"
  34. t.rast.export input=precipitation_daily output=precipitation_daily.tar
  35. tar xvf precipitation_daily.tar
  36. map_1.tif
  37. map_1.color
  38. map_2.tif
  39. map_2.color
  40. map_3.tif
  41. map_3.color
  42. map_4.tif
  43. map_4.color
  44. map_5.tif
  45. map_5.color
  46. map_6.tif
  47. map_6.color
  48. map_7.tif
  49. map_7.color
  50. list.txt
  51. proj.txt
  52. init.txt
  53. readme.txt
  54. metadata.txt
  55. cat init.txt
  56. stds_type=strds
  57. format=GTiff
  58. temporal_type=absolute
  59. semantic_type=mean
  60. number_of_maps=7
  61. north=80.0
  62. south=0.0
  63. east=120.0
  64. west=0.0
  65. cat proj.txt
  66. +proj=longlat
  67. +no_defs
  68. +a=6378137
  69. +rf=298.257223563
  70. +towgs84=0,0,0,0,0,0,0
  71. cat list.txt
  72. map_1|2012-08-20 00:00:00|2012-08-21 00:00:00
  73. map_2|2012-08-21 00:00:00|2012-08-22 00:00:00
  74. map_3|2012-08-22 00:00:00|2012-08-23 00:00:00
  75. map_4|2012-08-23 00:00:00|2012-08-24 00:00:00
  76. map_5|2012-08-24 00:00:00|2012-08-25 00:00:00
  77. map_6|2012-08-25 00:00:00|2012-08-26 00:00:00
  78. map_7|2012-08-26 00:00:00|2012-08-27 00:00:00
  79. cat readme.txt
  80. This space time raster dataset was exported with t.rast.export of GRASS GIS 7
  81. Files:
  82. *.tif -- GeoTIFF raster files
  83. *.color -- GRASS GIS raster color rules
  84. proj.txt -- Projection information in PROJ.4 format
  85. init.txt -- GRASS GIS space time raster dataset information
  86. list.txt -- Time series file, lists all maps by name with interval
  87. time stamps in ISO-Format. Field separator is |
  88. metadata.txt -- The output of t.info
  89. readme.txt -- This file
  90. </div>
  91. <h2>SEE ALSO</h2>
  92. <em>
  93. <a href="t.rast.import.html">t.rast.import</a>,
  94. <a href="t.create.html">t.create</a>,
  95. <a href="t.info.html">t.info</a>
  96. </em>
  97. <h2>AUTHOR</h2>
  98. S&ouml;ren Gebbert
  99. <p><i>Last changed: $Date$</i>