Browse Source

Manpage updates, added base option to import

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@57493 15284696-431f-4ddb-bdfa-cd5b030d7da7
Soeren Gebbert 11 years ago
parent
commit
76459356ec

+ 6 - 6
temporal/t.rast.gapfill/t.rast.gapfill.html

@@ -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 @@ In this example we will create 3 raster maps and register them in the
 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 @@ map3    2012-08-24 00:00:00 5.0 5.0
 <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>

+ 56 - 1
temporal/t.rast.import/t.rast.import.html

@@ -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>

+ 5 - 1
temporal/t.rast.import/t.rast.import.py

@@ -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 @@ def main():
     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 @@ def main():
     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()