[GRASS-SVN] r57493 - in grass/trunk/temporal: t.rast.gapfill t.rast.import

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Aug 23 11:54:52 PDT 2013


Author: huhabla
Date: 2013-08-23 11:54:51 -0700 (Fri, 23 Aug 2013)
New Revision: 57493

Modified:
   grass/trunk/temporal/t.rast.gapfill/t.rast.gapfill.html
   grass/trunk/temporal/t.rast.import/t.rast.import.html
   grass/trunk/temporal/t.rast.import/t.rast.import.py
Log:
Manpage updates, added base option to import


Modified: grass/trunk/temporal/t.rast.gapfill/t.rast.gapfill.html
===================================================================
--- grass/trunk/temporal/t.rast.gapfill/t.rast.gapfill.html	2013-08-23 18:50:14 UTC (rev 57492)
+++ grass/trunk/temporal/t.rast.gapfill/t.rast.gapfill.html	2013-08-23 18:54:51 UTC (rev 57493)
@@ -1,13 +1,13 @@
 <h2>DESCRIPTION</h2>
 
 This modules fills temporal gaps in space time raster datasets using linear 
-interpolation. Temporal gaps will be detected all gaps in the input space time 
+interpolation. Temporal all gaps will be detected in the input space time 
 raster dataset automatically. The predecessor and successor maps of the gaps 
-will be identified and are used to linear interpolate the raster map between
-them. 
+will be identified and used to linear interpolate the raster map between
+them.
 
 <h2>Note</h2>
-This module uses <a href="r.series.interpol.html">r.series.interpol</a> to
+This module uses <a href="r.series.interp.html">r.series.interp</a> to
 perform the interpolation for each gap independently. Hence several interpolation
 processes can be run in parallel.
 <h2>Examples</h2>
@@ -16,7 +16,7 @@
 temporal database an then in the newly created space time raster dataset.
 There are gaps of one day size between the raster maps. The values of
 the maps are chosen so that the interpolated values can be estimated.
-We expect to maps with values 2 and 4 after interpolation, since we have two gaps.
+We expect two maps with values 2 and 4 after interpolation.
 
 <div class="code"><pre>
 r.mapcalc expr="map1 = 1" 
@@ -66,7 +66,7 @@
 <h2>SEE ALSO</h2>
 
 <em>
-<a href="r.series.interpol.html">r.series.interpol</a>,
+<a href="r.series.interp.html">r.series.interp</a>,
 <a href="t.create.html">t.create</a>,
 <a href="t.info.html">t.info</a>
 </em>

Modified: grass/trunk/temporal/t.rast.import/t.rast.import.html
===================================================================
--- grass/trunk/temporal/t.rast.import/t.rast.import.html	2013-08-23 18:50:14 UTC (rev 57492)
+++ grass/trunk/temporal/t.rast.import/t.rast.import.html	2013-08-23 18:54:51 UTC (rev 57493)
@@ -1,10 +1,65 @@
 <h2>DESCRIPTION</h2>
+This module is designed to import a space time raster dataset archive that where 
+exported with <a href="t.rast.export.html">t.rast.export</a>. 
 
-TBD.
+<h2>NOTE</h2>
+Optionally a base map name can be provided to avoid that existing raster maps 
+are overwritten by the map names that are used in the STRDS archive.
 
+<h2>EXAMPLE</h2>
+
+In this example we create 7 raster maps that will be registered in a single space time
+raster dataset named <em>precipitation_daily</em> using a daily temporal granularity.
+The names of the raster maps are stored in a text file that is used for raster map registration.
+We export the created space time raster dataset and will import it again.
+
+<div class="code"><pre>
+
+MAPS="map_1 map_2 map_3 map_4 map_5 map_6 map_7"
+
+for map in ${MAPS} ; do
+    r.mapcalc --o expr="${map} = 1" 
+    echo ${map} >> map_list.txt 
+done
+
+t.create type=strds temporaltype=absolute \
+         output=precipitation_daily \
+         title="Daily precipitation" \
+         description="Test dataset with daily precipitation"
+
+t.register -i type=rast input=precipitation_daily \
+           file=map_list.txt start="2012-08-20" increment="1 days"
+
+t.rast.list precipitation_daily
+
+map_1   soeren  2012-09-03 00:00:00 2012-09-04 00:00:00
+map_2   soeren  2012-09-04 00:00:00 2012-09-05 00:00:00
+map_3   soeren  2012-09-05 00:00:00 2012-09-06 00:00:00
+map_4   soeren  2012-09-06 00:00:00 2012-09-07 00:00:00
+map_5   soeren  2012-09-07 00:00:00 2012-09-08 00:00:00
+map_6   soeren  2012-09-08 00:00:00 2012-09-09 00:00:00
+map_7   soeren  2012-09-09 00:00:00 2012-09-10 00:00:00
+
+t.rast.export input=precipitation_daily output=precipitation_daily.tar.gz \
+              compression=gzip
+t.rast.import input=precipitation_daily.tar.gz output=new_precipitation_daily \
+              base=new_map extrdir=/tmp
+              
+t.rast.list new_precipitation_daily
+
+new_map_0   soeren  2012-09-03 00:00:00 2012-09-04 00:00:00
+new_map_1   soeren  2012-09-04 00:00:00 2012-09-05 00:00:00
+new_map_2   soeren  2012-09-05 00:00:00 2012-09-06 00:00:00
+new_map_3   soeren  2012-09-06 00:00:00 2012-09-07 00:00:00
+new_map_4   soeren  2012-09-07 00:00:00 2012-09-08 00:00:00
+new_map_5   soeren  2012-09-08 00:00:00 2012-09-09 00:00:00
+new_map_6   soeren  2012-09-09 00:00:00 2012-09-10 00:00:00
+</div>
+
 <h2>SEE ALSO</h2>
 
 <em>
+<a href="t.rast.export.html">t.rast.export</a>,
 <a href="t.create.html">t.create</a>,
 <a href="t.info.html">t.info</a>
 </em>

Modified: grass/trunk/temporal/t.rast.import/t.rast.import.py
===================================================================
--- grass/trunk/temporal/t.rast.import/t.rast.import.py	2013-08-23 18:50:14 UTC (rev 57492)
+++ grass/trunk/temporal/t.rast.import/t.rast.import.py	2013-08-23 18:54:51 UTC (rev 57493)
@@ -70,6 +70,9 @@
 #% description: Override projection (use location's projection)
 #%end
 
+#%option G_OPT_R_BASE
+#%end
+
 #%flag
 #% key: c
 #% description: Create the location specified by the "location" parameter and exit. Do not import the space time raster datasets.
@@ -88,6 +91,7 @@
     title = options["title"]
     descr = options["description"]
     location = options["location"]
+    base = options["base"]
     link = flags["l"]
     exp = flags["e"]
     overr = flags["o"]
@@ -96,7 +100,7 @@
     tgis.init()
 
     tgis.import_stds(input, output, extrdir, title, descr, location,
-                     link, exp, overr, create, "strds")
+                     link, exp, overr, create, "strds", base)
 
 if __name__ == "__main__":
     options, flags = grass.parser()



More information about the grass-commit mailing list