[GRASS-SVN] r48771 - in grass/trunk/temporal: t.create t.info t.list t.remove t.time.abs t.time.rel tr.aggregate tr.extract tr.register tr.series tr.unregister tr3.register tr3.unregister tv.register tv.unregister

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Oct 13 07:05:21 EDT 2011


Author: huhabla
Date: 2011-10-13 04:05:21 -0700 (Thu, 13 Oct 2011)
New Revision: 48771

Added:
   grass/trunk/temporal/t.time.abs/test.t.time.abs.file.sh
   grass/trunk/temporal/t.time.rel/test.t.time.rel.file.sh
   grass/trunk/temporal/tr.register/test.tr.register.file.sh
Modified:
   grass/trunk/temporal/t.create/t.create.py
   grass/trunk/temporal/t.info/t.info.py
   grass/trunk/temporal/t.list/t.list.py
   grass/trunk/temporal/t.remove/t.remove.py
   grass/trunk/temporal/t.time.abs/t.time.abs.py
   grass/trunk/temporal/t.time.abs/test.t.time.abs.sh
   grass/trunk/temporal/t.time.rel/t.time.rel.py
   grass/trunk/temporal/t.time.rel/test.t.time.rel.sh
   grass/trunk/temporal/tr.aggregate/test.tr.aggregate.sh
   grass/trunk/temporal/tr.extract/test.tr.extract.sh
   grass/trunk/temporal/tr.register/test.tr.register.sh
   grass/trunk/temporal/tr.register/tr.register.py
   grass/trunk/temporal/tr.series/test.tr.series.sh
   grass/trunk/temporal/tr.series/tr.series.py
   grass/trunk/temporal/tr.unregister/tr.unregister.py
   grass/trunk/temporal/tr3.register/test.tr3.register.sh
   grass/trunk/temporal/tr3.register/tr3.register.py
   grass/trunk/temporal/tr3.unregister/tr3.unregister.py
   grass/trunk/temporal/tv.register/test.tv.register.sh
   grass/trunk/temporal/tv.register/tv.register.py
   grass/trunk/temporal/tv.unregister/tv.unregister.py
Log:
Added file option to several temporal modules. Follow GRASS naming
convention. New tests.


Modified: grass/trunk/temporal/t.create/t.create.py
===================================================================
--- grass/trunk/temporal/t.create/t.create.py	2011-10-13 11:04:02 UTC (rev 48770)
+++ grass/trunk/temporal/t.create/t.create.py	2011-10-13 11:05:21 UTC (rev 48771)
@@ -22,7 +22,7 @@
 #%end
 
 #%option
-#% key: dataset
+#% key: output
 #% type: string
 #% description: Name of the new space time dataset
 #% required: yes
@@ -89,7 +89,7 @@
 def main():
 
     # Get the options
-    name = options["dataset"]
+    name = options["output"]
     type = options["type"]
     temporaltype = options["temporaltype"]
     title = options["title"]

Modified: grass/trunk/temporal/t.info/t.info.py
===================================================================
--- grass/trunk/temporal/t.info/t.info.py	2011-10-13 11:04:02 UTC (rev 48770)
+++ grass/trunk/temporal/t.info/t.info.py	2011-10-13 11:05:21 UTC (rev 48771)
@@ -21,7 +21,7 @@
 #%end
 
 #%option
-#% key: dataset
+#% key: input
 #% type: string
 #% description: Name of an existing space time or map dataset
 #% required: no
@@ -33,7 +33,7 @@
 #% type: string
 #% description: Type of the dataset, default is strds (space time raster dataset)
 #% required: no
-#% options: strds, str3ds, stvds, raster, raster3d, vector
+#% options: strds, str3ds, stvds, rast, rast3d, vect
 #% answer: strds
 #%end
 
@@ -61,7 +61,7 @@
 def main():
 
     # Get the options
-    name = options["dataset"]
+    name = options["input"]
     type = options["type"]
     shellstyle = flags['g']
     tmatrix = flags['t']
@@ -96,13 +96,13 @@
         sp = tgis.space_time_raster3d_dataset(id)
     if type == "stvds":
         sp = tgis.space_time_vector_dataset(id)
-    if type == "raster":
+    if type == "rast":
         sp = tgis.raster_dataset(id)
         tmatrix = False
-    if type == "raster3d":
+    if type == "rast3d":
         sp = tgis.raster3d_dataset(id)
         tmatrix = False
-    if type == "vector":
+    if type == "vect":
         sp = tgis.vector_dataset(id)
         tmatrix = False
 

Modified: grass/trunk/temporal/t.list/t.list.py
===================================================================
--- grass/trunk/temporal/t.list/t.list.py	2011-10-13 11:04:02 UTC (rev 48770)
+++ grass/trunk/temporal/t.list/t.list.py	2011-10-13 11:05:21 UTC (rev 48771)
@@ -106,11 +106,11 @@
         sp = tgis.space_time_raster3d_dataset(id)
     if type == "stvds":
         sp = tgis.space_time_vector_dataset(id)
-    if type == "raster":
+    if type == "rast":
         sp = tgis.raster_dataset(id)
-    if type == "raster3d":
+    if type == "rast3d":
         sp = tgis.raster3d_dataset(id)
-    if type == "vector":
+    if type == "vect":
         sp = tgis.vector_dataset(id)
 
     dbif = tgis.sql_database_interface()

Modified: grass/trunk/temporal/t.remove/t.remove.py
===================================================================
--- grass/trunk/temporal/t.remove/t.remove.py	2011-10-13 11:04:02 UTC (rev 48770)
+++ grass/trunk/temporal/t.remove/t.remove.py	2011-10-13 11:05:21 UTC (rev 48771)
@@ -22,10 +22,18 @@
 #%end
 
 #%option
-#% key: dataset
+#% key: input
 #% type: string
 #% description: Name(s) of the space time or map dataset to be removed from the temporal database
-#% required: yes
+#% required: no
+#% multiple: yes
+#%end
+
+#%option
+#% key: file
+#% type: string
+#% description: Input file with raster map names, one per line
+#% required: no
 #% multiple: no
 #%end
 
@@ -34,7 +42,7 @@
 #% type: string
 #% description: Type of the space time dataset, default is strds
 #% required: no
-#% options: strds, str3ds, stvds, raster, raster3d, vector
+#% options: strds, str3ds, stvds, rast, rast3d, vect
 #% answer: strds
 #%end
 
@@ -46,18 +54,45 @@
 def main():
     
     # Get the options
-    names = options["dataset"]
+    maps = options["input"]
+    file = options["file"]
     type = options["type"]
 
+    if maps and file:
+        core.fata(_("%s= and %s= are mutually exclusive") % ("input","file"))
+
     # Make sure the temporal database exists
     tgis.create_temporal_database()
-    
-    mapset =  grass.gisenv()["MAPSET"]
 
     dbif = tgis.sql_database_interface()
     dbif.connect()
 
-    for name in names.split(","):
+    maplist = []
+
+    # Map names as comma separated string
+    if maps:
+        if maps.find(",") == -1:
+            maplist = (maps,)
+        else:
+            maplist = tuple(maps.split(","))
+
+    # Read the map list from file
+    if file:
+        fd = open(file, "r")
+
+        line = True
+        while True:
+            line = fd.readline()
+            if not line:
+                break
+
+            line_list = line.split("\n")
+            mapname = line_list[0]
+            maplist.append(mapname)
+    
+    mapset =  grass.gisenv()["MAPSET"]
+
+    for name in maplist:
         name = name.strip()
         # Check for the mapset in name
         if name.find("@") < 0:
@@ -71,19 +106,18 @@
             ds = tgis.space_time_raster3d_dataset(id)
         if type == "stvds":
             ds = tgis.space_time_vector_dataset(id)
-        if type == "raster":
+        if type == "rast":
             ds = tgis.raster_dataset(id)
-        if type == "raster3d":
+        if type == "rast3d":
             ds = tgis.raster3d_dataset(id)
-        if type == "vector":
+        if type == "vect":
             ds = tgis.vector_dataset(id)
 
         if ds.is_in_db(dbif) == False:
             dbif.close()
-            grass.fatal(ds.get_type() + " dataset <" + name + "> not found in temporal database")
+            grass.fatal(_("%s dataset <%s> not found in temporal database") % (ds.get_type(), name))
 
         # We need to read some data from the temporal database
-        ds.select(dbif)
         ds.delete(dbif)
 
     dbif.close()

Modified: grass/trunk/temporal/t.time.abs/t.time.abs.py
===================================================================
--- grass/trunk/temporal/t.time.abs/t.time.abs.py	2011-10-13 11:04:02 UTC (rev 48770)
+++ grass/trunk/temporal/t.time.abs/t.time.abs.py	2011-10-13 11:05:21 UTC (rev 48771)
@@ -24,17 +24,17 @@
 #%end
 
 #%option
-#% key: maps
+#% key: input
 #% type: string
-#% description: Name(s) of existing raster map(s)
-#% required: yes
+#% description: Name(s) of existing raster, raster3d or vector map(s)
+#% required: no
 #% multiple: yes
 #%end
 
 #%option
 #% key: start
 #% type: string
-#% description: The valid start date and time of the first raster map. Time format is "yyyy-mm-dd HH:MM:SS" or only "yyyy-mm-dd"
+#% description: The valid start date and time of the first raster map. Time format is "yyyy-mm-dd HH:MM:SS" or only "yyyy-mm-dd", or file in case the start time is located in the input file
 #% required: no
 #% multiple: no
 #%end
@@ -42,7 +42,7 @@
 #%option
 #% key: end
 #% type: string
-#% description: The valid end date and time of the first raster map. Time format is "yyyy-mm-dd HH:MM:SS" or only "yyyy-mm-dd". End time and increment are mutual exclusive.
+#% description: The valid end date and time of the first raster map. Time format is "yyyy-mm-dd HH:MM:SS" or only "yyyy-mm-dd", or file in case the start time is located in the input file 
 #% required: no
 #% multiple: no
 #%end
@@ -55,6 +55,31 @@
 #% multiple: no
 #%end
 
+#%option
+#% key: file
+#% type: string
+#% description: Input file with map names, one per line
+#% required: no
+#% multiple: no
+#%end
+
+#%option
+#% key: type
+#% type: string
+#% description: Input map type
+#% required: no
+#% options: rast, rast3d, vect
+#% answer: rast
+#%end
+
+#%option
+#% key: fs
+#% type: string
+#% description: The field separator character of the input file
+#% required: no
+#% answer: |
+#%end
+
 #%flag
 #% key: i
 #% description: Create an interval (start and end time) in case an increment is provided
@@ -68,18 +93,21 @@
 def main():
 
     # Get the options
-    maps = options["maps"]
+    maps = options["input"]
+    file = options["file"]
     start = options["start"]
     end = options["end"]
     increment = options["increment"]
+    fs = options["fs"]
+    type = options["type"]
     interval = flags["i"]
 
     # Make sure the temporal database exists
     tgis.create_temporal_database()
     # Set valid absolute time to maps
-    tgis.assign_valid_time_to_maps(type="raster", maps=maps, ttype="absolute", \
-                                   start=start, end=end, increment=increment, \
-                                   dbif=None, interval=interval)
+    tgis.assign_valid_time_to_maps(type=type, maps=maps, ttype="absolute", \
+                                   start=start, end=end, file=file, increment=increment, \
+                                   dbif=None, interval=interval, fs=fs)
     
 if __name__ == "__main__":
     options, flags = grass.parser()

Added: grass/trunk/temporal/t.time.abs/test.t.time.abs.file.sh
===================================================================
--- grass/trunk/temporal/t.time.abs/test.t.time.abs.file.sh	                        (rev 0)
+++ grass/trunk/temporal/t.time.abs/test.t.time.abs.file.sh	2011-10-13 11:05:21 UTC (rev 48771)
@@ -0,0 +1,80 @@
+# This is a test to absolute time for raster maps
+# We need to set a specific region in the
+# @preprocess step of this test. We generate
+# raster with r.mapcalc and create two space time raster inputs
+# with relative and absolute time
+# The region setting should work for UTM and LL test locations
+g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3
+
+r.mapcalc --o expr="prec_1 = rand(0, 550)"
+r.mapcalc --o expr="prec_2 = rand(0, 450)"
+r.mapcalc --o expr="prec_3 = rand(0, 320)"
+r.mapcalc --o expr="prec_4 = rand(0, 510)"
+r.mapcalc --o expr="prec_5 = rand(0, 300)"
+r.mapcalc --o expr="prec_6 = rand(0, 650)"
+
+n1=`g.tempfile pid=1 -d` # Only map names
+n2=`g.tempfile pid=2 -d` # Map names and start time
+n3=`g.tempfile pid=3 -d` # Map names start time and increment
+
+cat > $n1 << EOF
+prec_1
+prec_2
+prec_3
+prec_4
+prec_5
+prec_6
+EOF
+cat $n1
+
+cat > $n2 << EOF
+prec_1|2001-01-01
+prec_2|2001-02-01
+prec_3|2001-03-01
+prec_4|2001-04-01
+prec_5|2001-05-01
+prec_6|2001-06-01
+EOF
+cat $n2
+
+cat > $n3 << EOF
+prec_1|2001-01-01|2001-04-01
+prec_2|2001-04-01|2001-07-01
+prec_3|2001-07-01|2001-10-01
+prec_4|2001-10-01|2002-01-01
+prec_5|2002-01-01|2002-04-01
+prec_6|2002-04-01|2002-07-01
+EOF
+cat $n3
+
+# The first @test
+# We create the space time raster inputs and register the raster maps with absolute time interval
+t.create --o type=strds temporaltype=absolute output=precip_abs8 gran="1 months" title="A test with input files" descr="A test with input files"
+
+# Test with input files
+# File 1
+t.time.abs file=$n1 start="2001-01-01" increment="1 months"
+
+tr.register input=precip_abs8 file=$n1
+t.info type=strds input=precip_abs8
+tr.list input=precip_abs8
+
+# File 1
+t.time.abs file=$n1 start="2001-01-01" 
+t.info type=strds input=precip_abs8
+tr.list input=precip_abs8
+# File 2
+t.time.abs file=$n2 start=file
+t.info type=strds input=precip_abs8
+tr.list input=precip_abs8
+# File 2
+t.time.abs -i file=$n2 start=file increment="1 months"
+t.info type=strds input=precip_abs8
+tr.list input=precip_abs8
+# File 3
+t.time.abs file=$n3 start=file end=file
+t.info type=strds input=precip_abs8
+tr.list input=precip_abs8
+
+t.remove --v type=strds input=precip_abs8
+t.remove --v type=rast file=$n1

Modified: grass/trunk/temporal/t.time.abs/test.t.time.abs.sh
===================================================================
--- grass/trunk/temporal/t.time.abs/test.t.time.abs.sh	2011-10-13 11:04:02 UTC (rev 48770)
+++ grass/trunk/temporal/t.time.abs/test.t.time.abs.sh	2011-10-13 11:05:21 UTC (rev 48771)
@@ -13,31 +13,31 @@
 r.mapcalc --o expr="prec_5 = rand(0, 300)"
 r.mapcalc --o expr="prec_6 = rand(0, 650)"
 
-t.create --v --o type=strds temporaltype=absolute dataset=precip_abs1 gran="1 months" title="A test" descr="A test"
-t.create --v --o type=strds temporaltype=absolute dataset=precip_abs2 gran="1 months" title="A test" descr="A test"
-t.create --v --o type=strds temporaltype=absolute dataset=precip_abs3 gran="1 months" title="A test" descr="A test"
+t.create --v --o type=strds temporaltype=absolute output=precip_abs1 gran="1 months" title="A test" descr="A test"
+t.create --v --o type=strds temporaltype=absolute output=precip_abs2 gran="1 months" title="A test" descr="A test"
+t.create --v --o type=strds temporaltype=absolute output=precip_abs3 gran="1 months" title="A test" descr="A test"
 
-t.time.abs --v maps=prec_1,prec_2,prec_3 start="2001-01-01" increment="1 months"
-t.info type=raster dataset=prec_1
-t.info type=raster dataset=prec_2
-t.info type=raster dataset=prec_3
+t.time.abs --v input=prec_1,prec_2,prec_3 start="2001-01-01" increment="1 months"
+t.info type=rast input=prec_1
+t.info type=rast input=prec_2
+t.info type=rast input=prec_3
 
-tr.register --v dataset=precip_abs1 maps=prec_1,prec_2,prec_3
-tr.register --v dataset=precip_abs2 maps=prec_1,prec_2,prec_3
-tr.register --v dataset=precip_abs3 maps=prec_1,prec_2,prec_3
-# Check if the space time datasets are updated correctly
-t.time.abs --v maps=prec_1,prec_2,prec_3 start="2011-01-01" increment="1 months"
-t.info type=strds dataset=precip_abs1
+tr.register --v input=precip_abs1 maps=prec_1,prec_2,prec_3
+tr.register --v input=precip_abs2 maps=prec_1,prec_2,prec_3
+tr.register --v input=precip_abs3 maps=prec_1,prec_2,prec_3
+# Check if the space time inputs are updated correctly
+t.time.abs --v input=prec_1,prec_2,prec_3 start="2011-01-01" increment="1 months"
+t.info type=strds input=precip_abs1
 
-# Check if the space time datasets are updated correctly
-t.time.abs --v -i maps=prec_1,prec_2,prec_3 start="2011-01-01" increment="1 months"
-t.info type=strds dataset=precip_abs1
+# Check if the space time inputs are updated correctly
+t.time.abs --v -i input=prec_1,prec_2,prec_3 start="2011-01-01" increment="1 months"
+t.info type=strds input=precip_abs1
 
-t.time.abs --v maps=prec_4,prec_5 start="2001-01-01" end="2002-01-01"
-t.info type=raster dataset=prec_4
-t.info type=raster dataset=prec_5
-t.time.abs --v maps=prec_6 start="2001-01-01 00:00:00" end="2001-01-01 12:00:00"
-t.info type=raster dataset=prec_6
+t.time.abs --v input=prec_4,prec_5 start="2001-01-01" end="2002-01-01"
+t.info type=rast input=prec_4
+t.info type=rast input=prec_5
+t.time.abs --v input=prec_6 start="2001-01-01 00:00:00" end="2001-01-01 12:00:00"
+t.info type=rast input=prec_6
 
-t.remove --v type=raster dataset=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6
-t.remove --v type=strds dataset=precip_abs1,precip_abs2,precip_abs3
\ No newline at end of file
+t.remove --v type=rast input=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6
+t.remove --v type=strds input=precip_abs1,precip_abs2,precip_abs3

Modified: grass/trunk/temporal/t.time.rel/t.time.rel.py
===================================================================
--- grass/trunk/temporal/t.time.rel/t.time.rel.py	2011-10-13 11:04:02 UTC (rev 48770)
+++ grass/trunk/temporal/t.time.rel/t.time.rel.py	2011-10-13 11:05:21 UTC (rev 48771)
@@ -5,7 +5,7 @@
 # MODULE:	t.time.rel
 # AUTHOR(S):	Soeren Gebbert
 #
-# PURPOSE:	Set the relative valid time interval for raster maps
+# PURPOSE:	Set the relative valid time point or interval for maps of type raster, vector and raster3d
 # COPYRIGHT:	(C) 2011 by the GRASS Development Team
 #
 #		This program is free software under the GNU General Public
@@ -15,46 +15,71 @@
 #############################################################################
 
 #%module
-#% description: Set the relative valid time interval for maps of type raster, vector and raster3d
+#% description: Set the relative valid time point or interval for maps of type raster, vector and raster3d
 #% keywords: time
-#% keywords: relative
+#% keywords: absolute
 #% keywords: raster
 #% keywords: vector
 #% keywords: raster3d
 #%end
 
 #%option
-#% key: maps
+#% key: input
 #% type: string
-#% description: Name(s) of existing raster map(s)
-#% required: yes
+#% description: Name(s) of existing raster, raster3d or vector map(s)
+#% required: no
 #% multiple: yes
 #%end
 
 #%option
 #% key: start
-#% type: double
-#% description: The valid start time value in [days]
-#% required: yes
+#% type: string
+#% description: The valid start value in [days] for all maps, or file in case the start time is located in the input file 
+#% required: no
 #% multiple: no
 #%end
 
 #%option
 #% key: end
-#% type: double
-#% description: The valid end time value in [days]
+#% type: string
+#% description: The valid end value in [days] for all maps, or file in case the start time is located in the input file 
 #% required: no
 #% multiple: no
 #%end
 
 #%option
 #% key: increment
-#% type: double
-#% description: Time increment between maps for valid time interval creation [days]
+#% type: string
+#% description: Increment between maps for valid time interval creation in [days] e.g. 1.5
 #% required: no
 #% multiple: no
 #%end
 
+#%option
+#% key: file
+#% type: string
+#% description: Input file with map names, one per line
+#% required: no
+#% multiple: no
+#%end
+
+#%option
+#% key: type
+#% type: string
+#% description: Input map type
+#% required: no
+#% options: rast, rast3d, vect
+#% answer: rast
+#%end
+
+#%option
+#% key: fs
+#% type: string
+#% description: The field separator character of the input file
+#% required: no
+#% answer: |
+#%end
+
 #%flag
 #% key: i
 #% description: Create an interval (start and end time) in case an increment is provided
@@ -68,19 +93,22 @@
 def main():
 
     # Get the options
-    maps = options["maps"]
+    maps = options["input"]
+    file = options["file"]
     start = options["start"]
     end = options["end"]
     increment = options["increment"]
+    fs = options["fs"]
+    type = options["type"]
     interval = flags["i"]
 
     # Make sure the temporal database exists
     tgis.create_temporal_database()
-    # Set valid relative time to maps
-    tgis.assign_valid_time_to_maps(type="raster", maps=maps, ttype="relative", \
-                                    start=start, end=end, increment=increment, \
-                                    dbif=None, interval=interval)
-
+    # Set valid absolute time to maps
+    tgis.assign_valid_time_to_maps(type=type, maps=maps, ttype="relative", \
+                                   start=start, end=end, file=file, increment=increment, \
+                                   dbif=None, interval=interval, fs=fs)
+    
 if __name__ == "__main__":
     options, flags = grass.parser()
     main()

Added: grass/trunk/temporal/t.time.rel/test.t.time.rel.file.sh
===================================================================
--- grass/trunk/temporal/t.time.rel/test.t.time.rel.file.sh	                        (rev 0)
+++ grass/trunk/temporal/t.time.rel/test.t.time.rel.file.sh	2011-10-13 11:05:21 UTC (rev 48771)
@@ -0,0 +1,80 @@
+# This is a test to absolute time for raster maps
+# We need to set a specific region in the
+# @preprocess step of this test. We generate
+# raster with r.mapcalc and create two space time raster inputs
+# with relative and absolute time
+# The region setting should work for UTM and LL test locations
+g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3
+
+r.mapcalc --o expr="prec_1 = rand(0, 550)"
+r.mapcalc --o expr="prec_2 = rand(0, 450)"
+r.mapcalc --o expr="prec_3 = rand(0, 320)"
+r.mapcalc --o expr="prec_4 = rand(0, 510)"
+r.mapcalc --o expr="prec_5 = rand(0, 300)"
+r.mapcalc --o expr="prec_6 = rand(0, 650)"
+
+n1=`g.tempfile pid=1 -d` # Only map names
+n2=`g.tempfile pid=2 -d` # Map names and start time
+n3=`g.tempfile pid=3 -d` # Map names start time and increment
+
+cat > $n1 << EOF
+prec_1
+prec_2
+prec_3
+prec_4
+prec_5
+prec_6
+EOF
+cat $n1
+
+cat > $n2 << EOF
+prec_1|1
+prec_2|2
+prec_3|3
+prec_4|4
+prec_5|5
+prec_6|6
+EOF
+cat $n2
+
+cat > $n3 << EOF
+prec_1|1|4
+prec_2|4|7
+prec_3|7|10
+prec_4|10|11
+prec_5|11|14
+prec_6|14|17
+EOF
+cat $n3
+
+# The first @test
+# We create the space time raster inputs and register the raster maps with absolute time interval
+t.create --o type=strds temporaltype=relative output=precip_rel gran=1 title="A test with input files" descr="A test with input files"
+
+# Test with input files
+# File 1
+t.time.rel -i file=$n1 start=20 increment=5
+
+tr.register input=precip_rel file=$n1
+t.info type=strds input=precip_rel
+tr.list input=precip_rel
+
+# File 1
+t.time.rel file=$n1 start=20
+t.info type=strds input=precip_rel
+tr.list input=precip_rel
+# File 2
+t.time.rel file=$n2 start=file
+t.info type=strds input=precip_rel
+tr.list input=precip_rel
+# File 2
+t.time.rel -i file=$n2 start=file increment=5
+t.info type=strds input=precip_rel
+tr.list input=precip_rel
+# File 3
+t.time.rel file=$n3 start=file end=file
+t.info type=strds input=precip_rel
+tr.list input=precip_rel
+
+t.remove --v type=strds input=precip_rel
+t.remove --v type=rast file=$n1

Modified: grass/trunk/temporal/t.time.rel/test.t.time.rel.sh
===================================================================
--- grass/trunk/temporal/t.time.rel/test.t.time.rel.sh	2011-10-13 11:04:02 UTC (rev 48770)
+++ grass/trunk/temporal/t.time.rel/test.t.time.rel.sh	2011-10-13 11:05:21 UTC (rev 48771)
@@ -2,7 +2,7 @@
 
 # We need to set a specific region in the
 # @preprocess step of this test. We generate
-# raster with r.mapcalc
+# raster input with r.mapcalc
 # The region setting should work for UTM and LL test locations
 g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3
 
@@ -13,30 +13,30 @@
 r.mapcalc --o expr="prec_5 = rand(0, 300)"
 r.mapcalc --o expr="prec_6 = rand(0, 650)"
 
-t.create --v --o type=strds temporaltype=relative dataset=precip_rel1 gran=2 title="A test" descr="A test"
-t.create --v --o type=strds temporaltype=relative dataset=precip_rel2 gran=2 title="A test" descr="A test"
-t.create --v --o type=strds temporaltype=relative dataset=precip_rel3 gran=2 title="A test" descr="A test"
+t.create --v --o type=strds temporaltype=relative output=precip_rel1 gran=2 title="A test" descr="A test"
+t.create --v --o type=strds temporaltype=relative output=precip_rel2 gran=2 title="A test" descr="A test"
+t.create --v --o type=strds temporaltype=relative output=precip_rel3 gran=2 title="A test" descr="A test"
 
-t.time.rel --v maps=prec_1,prec_2,prec_3 start=5 increment=2
-t.info type=raster dataset=prec_1
-t.info type=raster dataset=prec_2
-t.info type=raster dataset=prec_3
+t.time.rel --v input=prec_1,prec_2,prec_3 start=5 increment=2
+t.info type=rast input=prec_1
+t.info type=rast input=prec_2
+t.info type=rast input=prec_3
 
-tr.register --v dataset=precip_rel1 maps=prec_1,prec_2,prec_3
-tr.register --v dataset=precip_rel2 maps=prec_1,prec_2,prec_3
-tr.register --v dataset=precip_rel3 maps=prec_1,prec_2,prec_3
-# Check if the space time datasets are updated correctly
-t.time.rel --v maps=prec_1,prec_2,prec_3 start=0 increment=1000
-t.info type=strds dataset=precip_rel1
+tr.register --v input=precip_rel1 maps=prec_1,prec_2,prec_3
+tr.register --v input=precip_rel2 maps=prec_1,prec_2,prec_3
+tr.register --v input=precip_rel3 maps=prec_1,prec_2,prec_3
+# Check if the space time inputs are updated correctly
+t.time.rel --v input=prec_1,prec_2,prec_3 start=0 increment=1000
+t.info type=strds input=precip_rel1
 
-t.time.rel --v maps=prec_1,prec_2,prec_3 start=0 increment=1000 -i
-t.info type=strds dataset=precip_rel1
+t.time.rel --v -i input=prec_1,prec_2,prec_3 start=0 increment=1000 -i
+t.info type=strds input=precip_rel1
 
-t.time.rel --v maps=prec_4,prec_5 start=5000 end=6000
-t.info type=raster dataset=prec_4
-t.info type=raster dataset=prec_5
-t.time.rel --v maps=prec_6 start=6000
-t.info type=raster dataset=prec_6
+t.time.rel --v input=prec_4,prec_5 start=5000 end=6000
+t.info type=rast input=prec_4
+t.info type=rast input=prec_5
+t.time.rel --v input=prec_6 start=6000
+t.info type=rast input=prec_6
 
-t.remove --v type=raster dataset=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6
-t.remove --v type=strds dataset=precip_rel1,precip_rel2,precip_rel3
\ No newline at end of file
+t.remove --v type=rast input=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6
+t.remove --v type=strds input=precip_rel1,precip_rel2,precip_rel3

Modified: grass/trunk/temporal/tr.aggregate/test.tr.aggregate.sh
===================================================================
--- grass/trunk/temporal/tr.aggregate/test.tr.aggregate.sh	2011-10-13 11:04:02 UTC (rev 48770)
+++ grass/trunk/temporal/tr.aggregate/test.tr.aggregate.sh	2011-10-13 11:05:21 UTC (rev 48771)
@@ -1,8 +1,8 @@
-# Test the extraction of a subset of a space time raster dataset
+# Test the extraction of a subset of a space time raster input
 
 # We need to set a specific region in the
 # @preprocess step of this test. We generate
-# raster with r.mapcalc and create two space time raster datasets
+# raster with r.mapcalc and create two space time raster inputs
 # with relative and absolute time
 # The region setting should work for UTM and LL test locations
 g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3
@@ -14,23 +14,23 @@
 r.mapcalc --o expr="prec_5 = rand(0, 300)"
 r.mapcalc --o expr="prec_6 = rand(0, 650)"
 
-t.create --o type=strds temporaltype=absolute dataset=precip_abs1 gran="3 months" title="A test" descr="A test"
-tr.register --v -i dataset=precip_abs1 maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6 start="2001-01-15 12:05:45" increment="14 days"
+t.create --o type=strds temporaltype=absolute output=precip_abs1 gran="3 months" title="A test" descr="A test"
+tr.register --v -i input=precip_abs1 maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6 start="2001-01-15 12:05:45" increment="14 days"
 
 # The first @test
-# We create the space time raster datasets and register the raster maps with absolute time interval
+# We create the space time raster inputs and register the raster maps with absolute time interval
 
-t.info type=strds dataset=precip_abs1
+t.info type=strds input=precip_abs1
 
 tr.aggregate --o --v input=precip_abs1 output=precip_abs2 base=prec_sum granularity="2 days" method=average
-t.info type=strds dataset=precip_abs2
+t.info type=strds input=precip_abs2
 tr.aggregate --o --v input=precip_abs1 output=precip_abs2 base=prec_sum granularity="1 months" method=maximum
-t.info type=strds dataset=precip_abs2
+t.info type=strds input=precip_abs2
 tr.aggregate --o --v input=precip_abs1 output=precip_abs2 base=prec_sum granularity="2 months" method=minimum
-t.info type=strds dataset=precip_abs2
+t.info type=strds input=precip_abs2
 tr.aggregate --o --v input=precip_abs1 output=precip_abs2 base=prec_sum granularity="3 months" method=sum
-t.info type=strds dataset=precip_abs2
+t.info type=strds input=precip_abs2
 
 
-t.remove type=raster dataset=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6
-t.remove type=strds dataset=precip_abs1,precip_abs2
+t.remove type=rast input=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6
+t.remove type=strds input=precip_abs1,precip_abs2

Modified: grass/trunk/temporal/tr.extract/test.tr.extract.sh
===================================================================
--- grass/trunk/temporal/tr.extract/test.tr.extract.sh	2011-10-13 11:04:02 UTC (rev 48770)
+++ grass/trunk/temporal/tr.extract/test.tr.extract.sh	2011-10-13 11:05:21 UTC (rev 48771)
@@ -1,8 +1,8 @@
-# Test the extraction of a subset of a space time raster dataset
+# Test the extraction of a subset of a space time raster input
 
 # We need to set a specific region in the
 # @preprocess step of this test. We generate
-# raster with r.mapcalc and create two space time raster datasets
+# raster with r.mapcalc and create two space time raster inputs
 # with relative and absolute time
 # The region setting should work for UTM and LL test locations
 g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3
@@ -14,15 +14,15 @@
 r.mapcalc --o expr="prec_5 = rand(0, 300)"
 r.mapcalc --o expr="prec_6 = rand(0, 650)"
 
-t.create --o type=strds temporaltype=absolute dataset=precip_abs1 gran="3 months" title="A test" descr="A test"
-tr.register -i dataset=precip_abs1 maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6 start="2001-01-01" increment="3 months"
+t.create --o type=strds temporaltype=absolute output=precip_abs1 gran="3 months" title="A test" descr="A test"
+tr.register -i input=precip_abs1 maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6 start="2001-01-01" increment="3 months"
 
 # The first @test
-# We create the space time raster datasets and register the raster maps with absolute time interval
+# We create the space time raster inputs and register the raster maps with absolute time interval
 
 tr.extract --o input=precip_abs1 output=precip_abs2 where="start_time > '2001-06-01'" expression=" if(precip_abs1 > 400, precip_abs1, null())" base=new_prec
 
-t.info type=strds dataset=precip_abs2
+t.info type=strds input=precip_abs2
 
-t.remove type=raster dataset=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6
-t.remove type=strds dataset=precip_abs1,precip_abs2
+t.remove type=rast input=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6
+t.remove type=strds input=precip_abs1,precip_abs2

Added: grass/trunk/temporal/tr.register/test.tr.register.file.sh
===================================================================
--- grass/trunk/temporal/tr.register/test.tr.register.file.sh	                        (rev 0)
+++ grass/trunk/temporal/tr.register/test.tr.register.file.sh	2011-10-13 11:05:21 UTC (rev 48771)
@@ -0,0 +1,81 @@
+# This is a test to register and unregister raster maps in
+# space time raster input.
+# The raster maps will be registered in different space time raster
+# inputs
+
+# We need to set a specific region in the
+# @preprocess step of this test. We generate
+# raster with r.mapcalc and create two space time raster inputs
+# with relative and absolute time
+# The region setting should work for UTM and LL test locations
+g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3
+
+r.mapcalc --o expr="prec_1 = rand(0, 550)"
+r.mapcalc --o expr="prec_2 = rand(0, 450)"
+r.mapcalc --o expr="prec_3 = rand(0, 320)"
+r.mapcalc --o expr="prec_4 = rand(0, 510)"
+r.mapcalc --o expr="prec_5 = rand(0, 300)"
+r.mapcalc --o expr="prec_6 = rand(0, 650)"
+
+n1=`g.tempfile pid=1 -d` # Only map names
+n2=`g.tempfile pid=2 -d` # Map names and start time
+n3=`g.tempfile pid=3 -d` # Map names start time and increment
+
+cat > $n1 << EOF
+prec_1
+prec_2
+prec_3
+prec_4
+prec_5
+prec_6
+EOF
+cat $n1
+
+cat > $n2 << EOF
+prec_1|2001-01-01
+prec_2|2001-02-01
+prec_3|2001-03-01
+prec_4|2001-04-01
+prec_5|2001-05-01
+prec_6|2001-06-01
+EOF
+cat $n2
+
+cat > $n3 << EOF
+prec_1|2001-01-01|2001-04-01
+prec_2|2001-04-01|2001-07-01
+prec_3|2001-07-01|2001-10-01
+prec_4|2001-10-01|2002-01-01
+prec_5|2002-01-01|2002-04-01
+prec_6|2002-04-01|2002-07-01
+EOF
+cat $n3
+
+# The first @test
+# We create the space time raster inputs and register the raster maps with absolute time interval
+t.create --o type=strds temporaltype=absolute output=precip_abs8 gran="1 months" title="A test with input files" descr="A test with input files"
+
+# Test with input files
+# File 1
+tr.register -i input=precip_abs8 file=$n1 start="2001-01-01" increment="1 months"
+t.info type=strds input=precip_abs8
+tr.list input=precip_abs8
+# File 1
+tr.register input=precip_abs8 file=$n1 start="2001-01-01" 
+t.info type=strds input=precip_abs8
+tr.list input=precip_abs8
+# File 2
+tr.register input=precip_abs8 file=$n2 start=file
+t.info type=strds input=precip_abs8
+tr.list input=precip_abs8
+# File 2
+tr.register input=precip_abs8 file=$n2 start=file increment="1 months"
+t.info type=strds input=precip_abs8
+tr.list input=precip_abs8
+# File 3
+tr.register -i input=precip_abs8 file=$n3 start=file end=file
+t.info type=strds input=precip_abs8
+tr.list input=precip_abs8
+
+t.remove --v type=strds input=precip_abs8
+t.remove --v type=rast file=$n1

Modified: grass/trunk/temporal/tr.register/test.tr.register.sh
===================================================================
--- grass/trunk/temporal/tr.register/test.tr.register.sh	2011-10-13 11:04:02 UTC (rev 48770)
+++ grass/trunk/temporal/tr.register/test.tr.register.sh	2011-10-13 11:05:21 UTC (rev 48771)
@@ -1,11 +1,11 @@
 # This is a test to register and unregister raster maps in
-# space time raster dataset.
+# space time raster input.
 # The raster maps will be registered in different space time raster
-# datasets
+# inputs
 
 # We need to set a specific region in the
 # @preprocess step of this test. We generate
-# raster with r.mapcalc and create two space time raster datasets
+# raster with r.mapcalc and create two space time raster inputs
 # with relative and absolute time
 # The region setting should work for UTM and LL test locations
 g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3
@@ -18,53 +18,56 @@
 r.mapcalc --o expr="prec_6 = rand(0, 650)"
 
 # The first @test
-# We create the space time raster datasets and register the raster maps with absolute time interval
+# We create the space time raster inputs and register the raster maps with absolute time interval
 
-t.create --v --o type=strds temporaltype=absolute dataset=precip_abs1 gran="1 senconds" title="A test" descr="A test"
-t.create --v --o type=strds temporaltype=absolute dataset=precip_abs2 gran="1 minutes" title="A test" descr="A test"
-t.create --v --o type=strds temporaltype=absolute dataset=precip_abs3 gran="1 hours" title="A test" descr="A test"
-t.create --v --o type=strds temporaltype=absolute dataset=precip_abs4 gran="1 days" title="A test" descr="A test"
-t.create --v --o type=strds temporaltype=absolute dataset=precip_abs5 gran="1 weeks" title="A test" descr="A test"
-t.create --v --o type=strds temporaltype=absolute dataset=precip_abs6 gran="1 months" title="A test" descr="A test"
-t.create --v --o type=strds temporaltype=absolute dataset=precip_abs7 gran="1 years" title="A test" descr="A test"
+t.create --o type=strds temporaltype=absolute output=precip_abs1 gran="1 senconds" title="A test" descr="A test"
+t.create --o type=strds temporaltype=absolute output=precip_abs2 gran="1 minutes" title="A test" descr="A test"
+t.create --o type=strds temporaltype=absolute output=precip_abs3 gran="1 hours" title="A test" descr="A test"
+t.create --o type=strds temporaltype=absolute output=precip_abs4 gran="1 days" title="A test" descr="A test"
+t.create --o type=strds temporaltype=absolute output=precip_abs5 gran="1 weeks" title="A test" descr="A test"
+t.create --o type=strds temporaltype=absolute output=precip_abs6 gran="1 months" title="A test" descr="A test"
+t.create --o type=strds temporaltype=absolute output=precip_abs7 gran="1 years" title="A test" descr="A test"
 
-tr.register --v -i dataset=precip_abs1 maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6 start="2001-01-01" increment="1 seconds"
-t.info type=strds dataset=precip_abs1
-t.info -t type=strds dataset=precip_abs1
-tr.unregister --v dataset=precip_abs1 maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6
-t.info type=strds dataset=precip_abs1
+tr.register -i input=precip_abs1 maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6 start="2001-01-01" increment="1 seconds"
+t.info type=strds input=precip_abs1
+tr.list input=precip_abs1
 
-tr.register --v -i dataset=precip_abs2 maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6 start="2001-01-01" increment="20 seconds, 5 minutes"
-t.info type=strds dataset=precip_abs2
-t.info -t type=strds dataset=precip_abs2
+tr.register -i input=precip_abs2 maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6 start="2001-01-01" increment="20 seconds, 5 minutes"
+t.info type=strds input=precip_abs2
+tr.list input=precip_abs2
 
-tr.register --v -i dataset=precip_abs3 maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6 start="2001-01-01" increment="8 hours"
-t.info type=strds dataset=precip_abs3
-t.info -t type=strds dataset=precip_abs3
-tr.unregister --v maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6
-t.info type=strds dataset=precip_abs3
+tr.register -i input=precip_abs3 maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6 start="2001-01-01" increment="8 hours"
+t.info type=strds input=precip_abs3
+tr.list input=precip_abs3
 
-tr.register dataset=precip_abs4 maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6 start="2001-01-01" increment="3 days"
-t.info type=strds dataset=precip_abs4
+tr.register input=precip_abs4 maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6 start="2001-01-01" increment="3 days"
+t.info type=strds input=precip_abs4
+tr.list input=precip_abs4
 
-tr.register dataset=precip_abs5 maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6 start="2001-01-01" increment="4 weeks"
-t.info type=strds dataset=precip_abs5
+tr.register input=precip_abs5 maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6 start="2001-01-01" increment="4 weeks"
+t.info type=strds input=precip_abs5
+tr.list input=precip_abs5
 
-tr.register dataset=precip_abs6 maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6 start="2001-08-01" increment="2 months"
-t.info type=strds dataset=precip_abs6
+tr.register input=precip_abs6 maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6 start="2001-08-01" increment="2 months"
+t.info type=strds input=precip_abs6
+tr.list input=precip_abs6
 
-tr.register dataset=precip_abs7 maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6 start="2001-01-01" increment="20 years, 3 months, 1 days, 4 hours"
-t.info type=strds dataset=precip_abs7
-t.info -t type=strds dataset=precip_abs7
+tr.register input=precip_abs7 maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6 start="2001-01-01" increment="20 years, 3 months, 1 days, 4 hours"
+t.info type=strds input=precip_abs7
+tr.list input=precip_abs7
 # Register with different valid time again
-tr.register dataset=precip_abs7 maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6 start="2001-01-01" increment="99 years, 9 months, 9 days, 9 hours"
-t.info type=strds dataset=precip_abs7
-t.info -t type=strds dataset=precip_abs7
+tr.register input=precip_abs7 maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6 start="2001-01-01" increment="99 years, 9 months, 9 days, 9 hours"
+t.info type=strds input=precip_abs7
+tr.list input=precip_abs7
 # Register with different valid time again creating an interval
-tr.register -i dataset=precip_abs7 maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6 start="2001-01-01" increment="99 years, 9 months, 9 days, 9 hours"
-t.info type=strds dataset=precip_abs7
-t.info -t type=strds dataset=precip_abs7
+tr.register -i input=precip_abs7 maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6 start="2001-01-01" increment="99 years, 9 months, 9 days, 9 hours"
+t.info type=strds input=precip_abs7
+tr.list input=precip_abs7
 
-t.remove --v type=raster dataset=prec_1,prec_2,prec_3
-t.remove --v type=strds dataset=precip_abs1,precip_abs2,precip_abs3,precip_abs4,precip_abs5,precip_abs6,precip_abs7
-t.remove --v type=raster dataset=prec_4,prec_5,prec_6
+tr.register input=precip_abs7 maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6 start="2001-01-01" end="2002-01-01"
+t.info type=strds input=precip_abs7
+tr.list input=precip_abs7
+
+t.remove --v type=raster input=prec_1,prec_2,prec_3
+t.remove --v type=strds input=precip_abs1,precip_abs2,precip_abs3,precip_abs4,precip_abs5,precip_abs6,precip_abs7,precip_abs7
+t.remove --v type=raster input=prec_4,prec_5,prec_6

Modified: grass/trunk/temporal/tr.register/tr.register.py
===================================================================
--- grass/trunk/temporal/tr.register/tr.register.py	2011-10-13 11:04:02 UTC (rev 48770)
+++ grass/trunk/temporal/tr.register/tr.register.py	2011-10-13 11:05:21 UTC (rev 48771)
@@ -21,7 +21,7 @@
 #%end
 
 #%option
-#% key: dataset
+#% key: input
 #% type: string
 #% description: Name of an existing space time raster dataset
 #% required: yes
@@ -31,27 +31,51 @@
 #%option
 #% key: maps
 #% type: string
-#% description: Name(s) of existing raster map(s), multiple maps must be provided in temporal order in case datetime should be attached
-#% required: yes
+#% description: Name(s) of existing raster map(s)
+#% required: no
 #% multiple: yes
 #%end
 
 #%option
+#% key: file
+#% type: string
+#% description: Input file with raster map names, one per line. Additionally the start time and the end time can be specified per line
+#% required: no
+#% multiple: no
+#%end
+
+#%option
 #% key: start
 #% type: string
-#% description: The valid start date and time of the first raster map, in case the map has no valid time (format absolute: "yyyy-mm-dd HH:MM:SS", format relative 5.0)
+#% description: The valid start date and time of the first raster map, in case the map has no valid time (format absolute: "yyyy-mm-dd HH:MM:SS", format relative 5.0). Use "file" as identifier in case the start time is located in an input file
 #% required: no
 #% multiple: no
 #%end
 
 #%option
+#% key: end
+#% type: string
+#% description: The valid end date and time of the first raster map. Absolute time format is "yyyy-mm-dd HH:MM:SS" and "yyyy-mm-dd", relative time format id double. Use "file" as identifier in case the end time is located in the input file 
+#% required: no
+#% multiple: no
+#%end
+
+#%option
 #% key: increment
 #% type: string
-#% description: Time increment between maps for valid time interval creation (format absolute: NNN seconds, minutes, hours, days, weeks, months, years; format relative: 1.0)
+#% description: Time increment between maps for valid time interval creation (format absolute: NNN seconds, minutes, hours, days, weeks, months, years; format relative: 1.0), or "file" in case the increment is located in an input file
 #% required: no
 #% multiple: no
 #%end
 
+#%option
+#% key: fs
+#% type: string
+#% description: The field separator character of the input file
+#% required: no
+#% answer: |
+#%end
+
 #%flag
 #% key: i
 #% description: Create an interval (start and end time) in case an increment is provided
@@ -65,16 +89,20 @@
 def main():
 
     # Get the options
-    name = options["dataset"]
+    name = options["input"]
     maps = options["maps"]
+    file = options["file"]
+    fs = options["fs"]
     start = options["start"]
+    end = options["end"]
     increment = options["increment"]
     interval = flags["i"]
 
     # Make sure the temporal database exists
     tgis.create_temporal_database()
     # Register maps
-    tgis.register_maps_in_space_time_dataset("raster", name, maps, start, increment, None, interval)
+    tgis.register_maps_in_space_time_dataset(type="rast", name=name, maps=maps, file=file, start=start, end=end, \
+                                             increment=increment, dbif=None, interval=interval, fs=fs)
     
 if __name__ == "__main__":
     options, flags = grass.parser()

Modified: grass/trunk/temporal/tr.series/test.tr.series.sh
===================================================================
--- grass/trunk/temporal/tr.series/test.tr.series.sh	2011-10-13 11:04:02 UTC (rev 48770)
+++ grass/trunk/temporal/tr.series/test.tr.series.sh	2011-10-13 11:05:21 UTC (rev 48771)
@@ -1,11 +1,11 @@
 # This is a test to register and unregister raster maps in
-# space time raster dataset.
+# space time raster input.
 # The raster maps will be registered in different space time raster
-# datasets
+# inputs
 
 # We need to set a specific region in the
 # @preprocess step of this test. We generate
-# raster with r.mapcalc and create two space time raster datasets
+# raster with r.mapcalc and create two space time raster inputs
 # with relative and absolute time
 # The region setting should work for UTM and LL test locations
 g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3
@@ -18,19 +18,19 @@
 r.mapcalc --o expr="prec_6 = 600"
 
 # The first @test
-# We create the space time raster datasets and register the raster maps with absolute time interval
+# We create the space time raster inputs and register the raster maps with absolute time interval
 
-t.create --v --o type=strds temporaltype=absolute dataset=precip_abs gran="1 months" title="A test" descr="A test"
+t.create --v --o type=strds temporaltype=absolute output=precip_abs gran="1 months" title="A test" descr="A test"
 
-tr.register --v dataset=precip_abs maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6 start="2001-01-01" increment="1 months"
+tr.register --v input=precip_abs maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6 start="2001-01-01" increment="1 months"
 
 tr.series --o input=precip_abs method=average output=prec_average where="start_time > '2001-03-01'"
 tr.series --o -t input=precip_abs method=maximum output=prec_max sort=start_time
 tr.series --o -t input=precip_abs method=sum output=prec_sum
 
-t.remove --v type=raster dataset=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6
-t.remove --v type=strds dataset=precip_abs
+t.remove --v type=rast input=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6
+t.remove --v type=strds input=precip_abs
 
 r.info prec_average
-t.info type=raster dataset=prec_max
-t.info type=raster dataset=prec_sum
+t.info type=rast input=prec_max
+t.info type=rast input=prec_sum

Modified: grass/trunk/temporal/tr.series/tr.series.py
===================================================================
--- grass/trunk/temporal/tr.series/tr.series.py	2011-10-13 11:04:02 UTC (rev 48770)
+++ grass/trunk/temporal/tr.series/tr.series.py	2011-10-13 11:05:21 UTC (rev 48771)
@@ -25,7 +25,7 @@
 #% key: input
 #% type: string
 #% description: Name of an existing space time raster dataset
-#% required: yes
+#% required: no
 #% multiple: yes
 #%end
 

Modified: grass/trunk/temporal/tr.unregister/tr.unregister.py
===================================================================
--- grass/trunk/temporal/tr.unregister/tr.unregister.py	2011-10-13 11:04:02 UTC (rev 48770)
+++ grass/trunk/temporal/tr.unregister/tr.unregister.py	2011-10-13 11:05:21 UTC (rev 48771)
@@ -21,7 +21,7 @@
 #%end
 
 #%option
-#% key: dataset
+#% key: input
 #% type: string
 #% description: Name of an existing space time raster dataset. If no name is provided the raster map(s) are unregistered from all space time datasets in which they are registered.
 #% required: no
@@ -29,6 +29,14 @@
 #%end
 
 #%option
+#% key: file
+#% type: string
+#% description: Input file with raster map names, one per line
+#% required: no
+#% multiple: no
+#%end
+
+#%option
 #% key: maps
 #% type: string
 #% description: Name(s) of existing raster map(s) to unregister
@@ -44,13 +52,14 @@
 def main():
 
     # Get the options
-    name = options["dataset"]
+    file = options["file"]
+    name = options["input"]
     maps = options["maps"]
 
     # Make sure the temporal database exists
     tgis.create_temporal_database()
     # Unregister maps
-    tgis.unregister_maps_from_space_time_datasets("raster", name, maps)
+    tgis.unregister_maps_from_space_time_datasets(type="rast", name=name, maps=maps, file=file, dbif=None)
 
 if __name__ == "__main__":
     options, flags = grass.parser()

Modified: grass/trunk/temporal/tr3.register/test.tr3.register.sh
===================================================================
--- grass/trunk/temporal/tr3.register/test.tr3.register.sh	2011-10-13 11:04:02 UTC (rev 48770)
+++ grass/trunk/temporal/tr3.register/test.tr3.register.sh	2011-10-13 11:05:21 UTC (rev 48771)
@@ -1,11 +1,11 @@
 # This is a test to register and unregister raster3d maps in
-# space time raster3d dataset.
+# space time raster3d input.
 # The raster3d maps will be registered in different space time raster3d
-# datasets
+# inputs
 
 # We need to set a specific region in the
 # @preprocess step of this test. We generate
-# 3d raster with r3.mapcalc and create two space time raster3d datasets
+# 3d raster with r3.mapcalc and create two space time raster3d inputs
 # with relative and absolute time
 # The region setting should work for UTM and LL test locations
 g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3
@@ -18,47 +18,47 @@
 r3.mapcalc --o expr="volume_6 = rand(0, 650)"
 
 # The first @test
-# We create the space time raster3d datasets and register the raster3d maps with absolute time interval
+# We create the space time raster3d inputs and register the raster3d maps with absolute time interval
 
-t.create --v --o type=str3ds temporaltype=absolute dataset=volume_abs1 gran="1 senconds" title="A test" descr="A test"
-t.create --v --o type=str3ds temporaltype=absolute dataset=volume_abs2 gran="1 minutes" title="A test" descr="A test"
-t.create --v --o type=str3ds temporaltype=absolute dataset=volume_abs3 gran="1 hours" title="A test" descr="A test"
-t.create --v --o type=str3ds temporaltype=absolute dataset=volume_abs4 gran="1 days" title="A test" descr="A test"
-t.create --v --o type=str3ds temporaltype=absolute dataset=volume_abs5 gran="1 weeks" title="A test" descr="A test"
-t.create --v --o type=str3ds temporaltype=absolute dataset=volume_abs6 gran="1 months" title="A test" descr="A test"
-t.create --v --o type=str3ds temporaltype=absolute dataset=volume_abs7 gran="1 years" title="A test" descr="A test"
+t.create --v --o type=str3ds temporaltype=absolute output=volume_abs1 gran="1 senconds" title="A test" descr="A test"
+t.create --v --o type=str3ds temporaltype=absolute output=volume_abs2 gran="1 minutes" title="A test" descr="A test"
+t.create --v --o type=str3ds temporaltype=absolute output=volume_abs3 gran="1 hours" title="A test" descr="A test"
+t.create --v --o type=str3ds temporaltype=absolute output=volume_abs4 gran="1 days" title="A test" descr="A test"
+t.create --v --o type=str3ds temporaltype=absolute output=volume_abs5 gran="1 weeks" title="A test" descr="A test"
+t.create --v --o type=str3ds temporaltype=absolute output=volume_abs6 gran="1 months" title="A test" descr="A test"
+t.create --v --o type=str3ds temporaltype=absolute output=volume_abs7 gran="1 years" title="A test" descr="A test"
 
-tr3.register --v -i dataset=volume_abs1 maps=volume_1,volume_2,volume_3,volume_4,volume_5,volume_6 start="2001-01-01" increment="1 seconds"
-t.info type=str3ds dataset=volume_abs1
-tr3.unregister --v dataset=volume_abs1 maps=volume_1,volume_2,volume_3,volume_4,volume_5,volume_6
-t.info type=str3ds dataset=volume_abs1
+tr3.register --v -i input=volume_abs1 maps=volume_1,volume_2,volume_3,volume_4,volume_5,volume_6 start="2001-01-01" increment="1 seconds"
+t.info type=str3ds input=volume_abs1
+tr3.unregister --v input=volume_abs1 maps=volume_1,volume_2,volume_3,volume_4,volume_5,volume_6
+t.info type=str3ds input=volume_abs1
 
-tr3.register --v -i dataset=volume_abs2 maps=volume_1,volume_2,volume_3,volume_4,volume_5,volume_6 start="2001-01-01" increment="20 seconds, 5 minutes"
-t.info type=str3ds dataset=volume_abs2
+tr3.register --v -i input=volume_abs2 maps=volume_1,volume_2,volume_3,volume_4,volume_5,volume_6 start="2001-01-01" increment="20 seconds, 5 minutes"
+t.info type=str3ds input=volume_abs2
 
-tr3.register --v -i dataset=volume_abs3 maps=volume_1,volume_2,volume_3,volume_4,volume_5,volume_6 start="2001-01-01" increment="8 hours"
-t.info type=str3ds dataset=volume_abs3
+tr3.register --v -i input=volume_abs3 maps=volume_1,volume_2,volume_3,volume_4,volume_5,volume_6 start="2001-01-01" increment="8 hours"
+t.info type=str3ds input=volume_abs3
 tr3.unregister --v maps=volume_1,volume_2,volume_3,volume_4,volume_5,volume_6
-t.info type=str3ds dataset=volume_abs3
+t.info type=str3ds input=volume_abs3
 
-tr3.register dataset=volume_abs4 maps=volume_1,volume_2,volume_3,volume_4,volume_5,volume_6 start="2001-01-01" increment="3 days"
-t.info type=str3ds dataset=volume_abs4
+tr3.register input=volume_abs4 maps=volume_1,volume_2,volume_3,volume_4,volume_5,volume_6 start="2001-01-01" increment="3 days"
+t.info type=str3ds input=volume_abs4
 
-tr3.register dataset=volume_abs5 maps=volume_1,volume_2,volume_3,volume_4,volume_5,volume_6 start="2001-01-01" increment="4 weeks"
-t.info type=str3ds dataset=volume_abs5
+tr3.register input=volume_abs5 maps=volume_1,volume_2,volume_3,volume_4,volume_5,volume_6 start="2001-01-01" increment="4 weeks"
+t.info type=str3ds input=volume_abs5
 
-tr3.register dataset=volume_abs6 maps=volume_1,volume_2,volume_3,volume_4,volume_5,volume_6 start="2001-08-01" increment="2 months"
-t.info type=str3ds dataset=volume_abs6
+tr3.register input=volume_abs6 maps=volume_1,volume_2,volume_3,volume_4,volume_5,volume_6 start="2001-08-01" increment="2 months"
+t.info type=str3ds input=volume_abs6
 
-tr3.register dataset=volume_abs7 maps=volume_1,volume_2,volume_3,volume_4,volume_5,volume_6 start="2001-01-01" increment="20 years, 3 months, 1 days, 4 hours"
-t.info type=str3ds dataset=volume_abs7
+tr3.register input=volume_abs7 maps=volume_1,volume_2,volume_3,volume_4,volume_5,volume_6 start="2001-01-01" increment="20 years, 3 months, 1 days, 4 hours"
+t.info type=str3ds input=volume_abs7
 # Register with different valid time again
-tr3.register dataset=volume_abs7 maps=volume_1,volume_2,volume_3,volume_4,volume_5,volume_6 start="2001-01-01" increment="99 years, 9 months, 9 days, 9 hours"
-t.info type=str3ds dataset=volume_abs7
+tr3.register input=volume_abs7 maps=volume_1,volume_2,volume_3,volume_4,volume_5,volume_6 start="2001-01-01" increment="99 years, 9 months, 9 days, 9 hours"
+t.info type=str3ds input=volume_abs7
 # Register with different valid time again creating intervals
-tr3.register -i dataset=volume_abs7 maps=volume_1,volume_2,volume_3,volume_4,volume_5,volume_6 start="2001-01-01" increment="99 years, 9 months, 9 days, 9 hours"
-t.info type=str3ds dataset=volume_abs7
+tr3.register -i input=volume_abs7 maps=volume_1,volume_2,volume_3,volume_4,volume_5,volume_6 start="2001-01-01" increment="99 years, 9 months, 9 days, 9 hours"
+t.info type=str3ds input=volume_abs7
 
-t.remove --v type=raster3d dataset=volume_1,volume_2,volume_3
-t.remove --v type=str3ds dataset=volume_abs1,volume_abs2,volume_abs3,volume_abs4,volume_abs5,volume_abs6,volume_abs7
-t.remove --v type=raster3d dataset=volume_4,volume_5,volume_6
+t.remove --v type=rast3d input=volume_1,volume_2,volume_3
+t.remove --v type=str3ds input=volume_abs1,volume_abs2,volume_abs3,volume_abs4,volume_abs5,volume_abs6,volume_abs7
+t.remove --v type=rast3d input=volume_4,volume_5,volume_6

Modified: grass/trunk/temporal/tr3.register/tr3.register.py
===================================================================
--- grass/trunk/temporal/tr3.register/tr3.register.py	2011-10-13 11:04:02 UTC (rev 48770)
+++ grass/trunk/temporal/tr3.register/tr3.register.py	2011-10-13 11:05:21 UTC (rev 48771)
@@ -16,12 +16,12 @@
 
 #%module
 #% description: Register raster3d maps in a space time raster3d dataset
-#% keywords: spacetime raster dataset
-#% keywords: raster
+#% keywords: spacetime raster3d dataset
+#% keywords: raster3d
 #%end
 
 #%option
-#% key: dataset
+#% key: input
 #% type: string
 #% description: Name of an existing space time raster3d dataset
 #% required: yes
@@ -31,33 +31,56 @@
 #%option
 #% key: maps
 #% type: string
-#% description: Name(s) of existing raster3d map(s), multiple maps must be provided in temporal order in case datetime should be attached
-#% required: yes
+#% description: Name(s) of existing raster3d map(s)
+#% required: no
 #% multiple: yes
 #%end
 
 #%option
+#% key: file
+#% type: string
+#% description: Input file with raster3d map names, one per line. Additionally the start time and the end time can be specified per line
+#% required: no
+#% multiple: no
+#%end
+
+#%option
 #% key: start
 #% type: string
-#% description: The valid start date and time of the first raster3d map, in case the map has no valid time (format absolute: "yyyy-mm-dd HH:MM:SS", format relative 5.0)
+#% description: The valid start date and time of the first raster3d map, in case the map has no valid time (format absolute: "yyyy-mm-dd HH:MM:SS", format relative 5.0). Use "file" as identifier in case the start time is located in an input file
 #% required: no
 #% multiple: no
 #%end
 
 #%option
+#% key: end
+#% type: string
+#% description: The valid end date and time of the first raster3d map. Absolute time format is "yyyy-mm-dd HH:MM:SS" and "yyyy-mm-dd", relative time format id double. Use "file" as identifier in case the end time is located in the input file 
+#% required: no
+#% multiple: no
+#%end
+
+#%option
 #% key: increment
 #% type: string
-#% description: Time increment between maps for valid time interval creation (format absolute: NNN seconds, minutes, hours, days, weeks, months, years; format relative: 1.0)
+#% description: Time increment between maps for valid time interval creation (format absolute: NNN seconds, minutes, hours, days, weeks, months, years; format relative: 1.0), or "file" in case the increment is located in an input file
 #% required: no
 #% multiple: no
 #%end
 
+#%option
+#% key: fs
+#% type: string
+#% description: The field separator character of the input file
+#% required: no
+#% answer: |
+#%end
+
 #%flag
 #% key: i
 #% description: Create an interval (start and end time) in case an increment is provided
 #%end
 
-
 import grass.script as grass
 import grass.temporal as tgis
 
@@ -66,16 +89,20 @@
 def main():
 
     # Get the options
-    name = options["dataset"]
+    name = options["input"]
     maps = options["maps"]
+    file = options["file"]
+    fs = options["fs"]
     start = options["start"]
+    end = options["end"]
     increment = options["increment"]
     interval = flags["i"]
 
     # Make sure the temporal database exists
     tgis.create_temporal_database()
     # Register maps
-    tgis.register_maps_in_space_time_dataset("raster3d", name, maps, start, increment, None, interval)
+    tgis.register_maps_in_space_time_dataset(type="rast3d", name=name, maps=maps, file=file, start=start, end=end, \
+                                             increment=increment, dbif=None, interval=interval, fs=fs)
     
 if __name__ == "__main__":
     options, flags = grass.parser()

Modified: grass/trunk/temporal/tr3.unregister/tr3.unregister.py
===================================================================
--- grass/trunk/temporal/tr3.unregister/tr3.unregister.py	2011-10-13 11:04:02 UTC (rev 48770)
+++ grass/trunk/temporal/tr3.unregister/tr3.unregister.py	2011-10-13 11:05:21 UTC (rev 48771)
@@ -21,7 +21,7 @@
 #%end
 
 #%option
-#% key: dataset
+#% key: input
 #% type: string
 #% description: Name of an existing space time raster3d dataset. If no name is provided the raster3d map(s) are unregistered from all space time datasets in which they are registered.
 #% required: no
@@ -29,6 +29,14 @@
 #%end
 
 #%option
+#% key: file
+#% type: string
+#% description: Input file with raster3d map names, one per line
+#% required: no
+#% multiple: no
+#%end
+
+#%option
 #% key: maps
 #% type: string
 #% description: Name(s) of existing raster3d map(s) to unregister
@@ -44,13 +52,14 @@
 def main():
 
     # Get the options
-    name = options["dataset"]
+    file = options["file"]
+    name = options["input"]
     maps = options["maps"]
 
     # Make sure the temporal database exists
     tgis.create_temporal_database()
     # Unregister maps
-    tgis.unregister_maps_from_space_time_datasets("raster3d", name, maps)
+    tgis.unregister_maps_from_space_time_datasets(type="rast3d", name=name, maps=maps, file=file, dbif=None)
 
 if __name__ == "__main__":
     options, flags = grass.parser()

Modified: grass/trunk/temporal/tv.register/test.tv.register.sh
===================================================================
--- grass/trunk/temporal/tv.register/test.tv.register.sh	2011-10-13 11:04:02 UTC (rev 48770)
+++ grass/trunk/temporal/tv.register/test.tv.register.sh	2011-10-13 11:05:21 UTC (rev 48771)
@@ -1,11 +1,11 @@
 # This is a test to register and unregister vector maps in
-# space time vector dataset.
+# space time vector input.
 # The vector maps will be registered in different space time vector
-# datasets
+# inputs
 
 # We need to set a specific region in the
 # @preprocess step of this test. We generate
-# vector with v.random and create several space time vector datasets
+# vector with v.random and create several space time vector inputs
 # with absolute time
 # The region setting should work for UTM and LL test locations
 g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3
@@ -18,47 +18,47 @@
 v.random --o -z output=lidar_abs_6 n=20 zmin=0 zmax=100 column=height
 
 # The first @test
-# We create the space time vector datasets and register the vector maps with absolute time interval
+# We create the space time vector inputs and register the vector maps with absolute time interval
 
-t.create --v --o type=stvds temporaltype=absolute dataset=lidar_abs_ds1 gran="1 senconds" title="A test" descr="A test"
-t.create --v --o type=stvds temporaltype=absolute dataset=lidar_abs_ds2 gran="1 minutes" title="A test" descr="A test"
-t.create --v --o type=stvds temporaltype=absolute dataset=lidar_abs_ds3 gran="1 hours" title="A test" descr="A test"
-t.create --v --o type=stvds temporaltype=absolute dataset=lidar_abs_ds4 gran="1 days" title="A test" descr="A test"
-t.create --v --o type=stvds temporaltype=absolute dataset=lidar_abs_ds5 gran="1 weeks" title="A test" descr="A test"
-t.create --v --o type=stvds temporaltype=absolute dataset=lidar_abs_ds6 gran="1 months" title="A test" descr="A test"
-t.create --v --o type=stvds temporaltype=absolute dataset=lidar_abs_ds7 gran="1 years" title="A test" descr="A test"
+t.create --v --o type=stvds temporaltype=absolute output=lidar_abs_ds1 gran="1 senconds" title="A test" descr="A test"
+t.create --v --o type=stvds temporaltype=absolute output=lidar_abs_ds2 gran="1 minutes" title="A test" descr="A test"
+t.create --v --o type=stvds temporaltype=absolute output=lidar_abs_ds3 gran="1 hours" title="A test" descr="A test"
+t.create --v --o type=stvds temporaltype=absolute output=lidar_abs_ds4 gran="1 days" title="A test" descr="A test"
+t.create --v --o type=stvds temporaltype=absolute output=lidar_abs_ds5 gran="1 weeks" title="A test" descr="A test"
+t.create --v --o type=stvds temporaltype=absolute output=lidar_abs_ds6 gran="1 months" title="A test" descr="A test"
+t.create --v --o type=stvds temporaltype=absolute output=lidar_abs_ds7 gran="1 years" title="A test" descr="A test"
 
-tv.register --v -i dataset=lidar_abs_ds1 maps=lidar_abs_1,lidar_abs_2,lidar_abs_3,lidar_abs_4,lidar_abs_5,lidar_abs_6 start="2001-01-01" increment="1 seconds"
-t.info type=stvds dataset=lidar_abs_ds1
-tv.unregister --v dataset=lidar_abs_ds1 maps=lidar_abs_1,lidar_abs_2,lidar_abs_3,lidar_abs_4,lidar_abs_5,lidar_abs_6
-t.info type=stvds dataset=lidar_abs_ds1
+tv.register --v -i input=lidar_abs_ds1 maps=lidar_abs_1,lidar_abs_2,lidar_abs_3,lidar_abs_4,lidar_abs_5,lidar_abs_6 start="2001-01-01" increment="1 seconds"
+t.info type=stvds input=lidar_abs_ds1
+tv.unregister --v input=lidar_abs_ds1 maps=lidar_abs_1,lidar_abs_2,lidar_abs_3,lidar_abs_4,lidar_abs_5,lidar_abs_6
+t.info type=stvds input=lidar_abs_ds1
 
-tv.register --v -i dataset=lidar_abs_ds2 maps=lidar_abs_1,lidar_abs_2,lidar_abs_3,lidar_abs_4,lidar_abs_5,lidar_abs_6 start="2001-01-01" increment="20 seconds, 5 minutes"
-t.info type=stvds dataset=lidar_abs_ds2
+tv.register --v -i input=lidar_abs_ds2 maps=lidar_abs_1,lidar_abs_2,lidar_abs_3,lidar_abs_4,lidar_abs_5,lidar_abs_6 start="2001-01-01" increment="20 seconds, 5 minutes"
+t.info type=stvds input=lidar_abs_ds2
 
-tv.register --v -i dataset=lidar_abs_ds3 maps=lidar_abs_1,lidar_abs_2,lidar_abs_3,lidar_abs_4,lidar_abs_5,lidar_abs_6 start="2001-01-01" increment="8 hours"
-t.info type=stvds dataset=lidar_abs_ds3
+tv.register --v -i input=lidar_abs_ds3 maps=lidar_abs_1,lidar_abs_2,lidar_abs_3,lidar_abs_4,lidar_abs_5,lidar_abs_6 start="2001-01-01" increment="8 hours"
+t.info type=stvds input=lidar_abs_ds3
 tv.unregister --v maps=lidar_abs_1,lidar_abs_2,lidar_abs_3,lidar_abs_4,lidar_abs_5,lidar_abs_6
-t.info type=stvds dataset=lidar_abs_ds3
+t.info type=stvds input=lidar_abs_ds3
 
-tv.register dataset=lidar_abs_ds4 maps=lidar_abs_1,lidar_abs_2,lidar_abs_3,lidar_abs_4,lidar_abs_5,lidar_abs_6 start="2001-01-01" increment="3 days"
-t.info type=stvds dataset=lidar_abs_ds4
+tv.register input=lidar_abs_ds4 maps=lidar_abs_1,lidar_abs_2,lidar_abs_3,lidar_abs_4,lidar_abs_5,lidar_abs_6 start="2001-01-01" increment="3 days"
+t.info type=stvds input=lidar_abs_ds4
 
-tv.register dataset=lidar_abs_ds5 maps=lidar_abs_1,lidar_abs_2,lidar_abs_3,lidar_abs_4,lidar_abs_5,lidar_abs_6 start="2001-01-01" increment="4 weeks"
-t.info type=stvds dataset=lidar_abs_ds5
+tv.register input=lidar_abs_ds5 maps=lidar_abs_1,lidar_abs_2,lidar_abs_3,lidar_abs_4,lidar_abs_5,lidar_abs_6 start="2001-01-01" increment="4 weeks"
+t.info type=stvds input=lidar_abs_ds5
 
-tv.register dataset=lidar_abs_ds6 maps=lidar_abs_1,lidar_abs_2,lidar_abs_3,lidar_abs_4,lidar_abs_5,lidar_abs_6 start="2001-08-01" increment="2 months"
-t.info type=stvds dataset=lidar_abs_ds6
+tv.register input=lidar_abs_ds6 maps=lidar_abs_1,lidar_abs_2,lidar_abs_3,lidar_abs_4,lidar_abs_5,lidar_abs_6 start="2001-08-01" increment="2 months"
+t.info type=stvds input=lidar_abs_ds6
 
-tv.register dataset=lidar_abs_ds7 maps=lidar_abs_1,lidar_abs_2,lidar_abs_3,lidar_abs_4,lidar_abs_5,lidar_abs_6 start="2001-01-01" increment="20 years, 3 months, 1 days, 4 hours"
-t.info type=stvds dataset=lidar_abs_ds7
+tv.register input=lidar_abs_ds7 maps=lidar_abs_1,lidar_abs_2,lidar_abs_3,lidar_abs_4,lidar_abs_5,lidar_abs_6 start="2001-01-01" increment="20 years, 3 months, 1 days, 4 hours"
+t.info type=stvds input=lidar_abs_ds7
 # Register with different valid time again
-tv.register dataset=lidar_abs_ds7 maps=lidar_abs_1,lidar_abs_2,lidar_abs_3,lidar_abs_4,lidar_abs_5,lidar_abs_6 start="2001-01-01" increment="99 years, 9 months, 9 days, 9 hours"
-t.info type=stvds dataset=lidar_abs_ds7
+tv.register input=lidar_abs_ds7 maps=lidar_abs_1,lidar_abs_2,lidar_abs_3,lidar_abs_4,lidar_abs_5,lidar_abs_6 start="2001-01-01" increment="99 years, 9 months, 9 days, 9 hours"
+t.info type=stvds input=lidar_abs_ds7
 # Register with different valid time again creating an interval
-tv.register -i dataset=lidar_abs_ds7 maps=lidar_abs_1,lidar_abs_2,lidar_abs_3,lidar_abs_4,lidar_abs_5,lidar_abs_6 start="2001-01-01" increment="99 years, 9 months, 9 days, 9 hours"
-t.info type=stvds dataset=lidar_abs_ds7
+tv.register -i input=lidar_abs_ds7 maps=lidar_abs_1,lidar_abs_2,lidar_abs_3,lidar_abs_4,lidar_abs_5,lidar_abs_6 start="2001-01-01" increment="99 years, 9 months, 9 days, 9 hours"
+t.info type=stvds input=lidar_abs_ds7
 
-t.remove --v type=vector dataset=lidar_abs_1,lidar_abs_2,lidar_abs_3
-t.remove --v type=stvds dataset=lidar_abs_ds1,lidar_abs_ds2,lidar_abs_ds3,lidar_abs_ds4,lidar_abs_ds5,lidar_abs_ds6,lidar_abs_ds7
-t.remove --v type=vector dataset=lidar_abs_4,lidar_abs_5,lidar_abs_6
+t.remove --v type=vect input=lidar_abs_1,lidar_abs_2,lidar_abs_3
+t.remove --v type=stvds input=lidar_abs_ds1,lidar_abs_ds2,lidar_abs_ds3,lidar_abs_ds4,lidar_abs_ds5,lidar_abs_ds6,lidar_abs_ds7
+t.remove --v type=vect input=lidar_abs_4,lidar_abs_5,lidar_abs_6

Modified: grass/trunk/temporal/tv.register/tv.register.py
===================================================================
--- grass/trunk/temporal/tv.register/tv.register.py	2011-10-13 11:04:02 UTC (rev 48770)
+++ grass/trunk/temporal/tv.register/tv.register.py	2011-10-13 11:05:21 UTC (rev 48771)
@@ -21,7 +21,7 @@
 #%end
 
 #%option
-#% key: dataset
+#% key: input
 #% type: string
 #% description: Name of an existing space time vector dataset
 #% required: yes
@@ -31,33 +31,56 @@
 #%option
 #% key: maps
 #% type: string
-#% description: Name(s) of existing vector map(s), multiple maps must be provided in temporal order in case datetime should be attached
-#% required: yes
+#% description: Name(s) of existing vector map(s)
+#% required: no
 #% multiple: yes
 #%end
 
 #%option
+#% key: file
+#% type: string
+#% description: Input file with vector map names, one per line. Additionally the start time and the end time can be specified per line
+#% required: no
+#% multiple: no
+#%end
+
+#%option
 #% key: start
 #% type: string
-#% description: The valid start date and time of the first vector map, in case the map has no valid time (format absolute: "yyyy-mm-dd HH:MM:SS", format relative 5.0)
+#% description: The valid start date and time of the first vector map, in case the map has no valid time (format absolute: "yyyy-mm-dd HH:MM:SS", format relative 5.0). Use "file" as identifier in case the start time is located in an input file
 #% required: no
 #% multiple: no
 #%end
 
 #%option
+#% key: end
+#% type: string
+#% description: The valid end date and time of the first vector map. Absolute time format is "yyyy-mm-dd HH:MM:SS" and "yyyy-mm-dd", relative time format id double. Use "file" as identifier in case the end time is located in the input file 
+#% required: no
+#% multiple: no
+#%end
+
+#%option
 #% key: increment
 #% type: string
-#% description: Time increment between maps for valid time interval creation (format absolute: NNN seconds, minutes, hours, days, weeks, months, years; format relative: 1.0)
+#% description: Time increment between maps for valid time interval creation (format absolute: NNN seconds, minutes, hours, days, weeks, months, years; format relative: 1.0), or "file" in case the increment is located in an input file
 #% required: no
 #% multiple: no
 #%end
 
+#%option
+#% key: fs
+#% type: string
+#% description: The field separator character of the input file
+#% required: no
+#% answer: |
+#%end
+
 #%flag
 #% key: i
 #% description: Create an interval (start and end time) in case an increment is provided
 #%end
 
-
 import grass.script as grass
 import grass.temporal as tgis
 
@@ -66,16 +89,20 @@
 def main():
 
     # Get the options
-    name = options["dataset"]
+    name = options["input"]
     maps = options["maps"]
+    file = options["file"]
+    fs = options["fs"]
     start = options["start"]
+    end = options["end"]
     increment = options["increment"]
     interval = flags["i"]
 
     # Make sure the temporal database exists
     tgis.create_temporal_database()
     # Register maps
-    tgis.register_maps_in_space_time_dataset("vector", name, maps, start, increment, None, interval)
+    tgis.register_maps_in_space_time_dataset(type="vect", name=name, maps=maps, file=file, start=start, end=end, \
+                                             increment=increment, dbif=None, interval=interval, fs=fs)
     
 if __name__ == "__main__":
     options, flags = grass.parser()

Modified: grass/trunk/temporal/tv.unregister/tv.unregister.py
===================================================================
--- grass/trunk/temporal/tv.unregister/tv.unregister.py	2011-10-13 11:04:02 UTC (rev 48770)
+++ grass/trunk/temporal/tv.unregister/tv.unregister.py	2011-10-13 11:05:21 UTC (rev 48771)
@@ -15,13 +15,13 @@
 #############################################################################
 
 #%module
-#% description: Unregister vector map(s) from a specific or from all space time vector datasets in which it is registered
+#% description: Unregister vector map(s) from a specific or from all space time vector dataset in which it is registered
 #% keywords: spacetime vector dataset
 #% keywords: vector
 #%end
 
 #%option
-#% key: dataset
+#% key: input
 #% type: string
 #% description: Name of an existing space time vector dataset. If no name is provided the vector map(s) are unregistered from all space time datasets in which they are registered.
 #% required: no
@@ -29,6 +29,14 @@
 #%end
 
 #%option
+#% key: file
+#% type: string
+#% description: Input file with vector map names, one per line
+#% required: no
+#% multiple: no
+#%end
+
+#%option
 #% key: maps
 #% type: string
 #% description: Name(s) of existing vector map(s) to unregister
@@ -44,13 +52,14 @@
 def main():
 
     # Get the options
-    name = options["dataset"]
+    file = options["file"]
+    name = options["input"]
     maps = options["maps"]
 
     # Make sure the temporal database exists
     tgis.create_temporal_database()
     # Unregister maps
-    tgis.unregister_maps_from_space_time_datasets("vector", name, maps)
+    tgis.unregister_maps_from_space_time_datasets(type="vect", name=name, maps=maps, file=file, dbif=None)
 
 if __name__ == "__main__":
     options, flags = grass.parser()



More information about the grass-commit mailing list