Explorar o código

temporal modules: Attempt to harmonize the flags of temporal modules

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@69510 15284696-431f-4ddb-bdfa-cd5b030d7da7
Soeren Gebbert %!s(int64=8) %!d(string=hai) anos
pai
achega
21305edfc9

+ 3 - 3
temporal/t.connect/main.c

@@ -31,9 +31,9 @@ int main(int argc, char *argv[])
 
 
     /* Set description */
     /* Set description */
     module = G_define_module();
     module = G_define_module();
-    G_add_keyword(_("database"));
-    G_add_keyword(_("attribute table"));
-    G_add_keyword(_("connection settings"));
+    G_add_keyword(_("temporal"));
+    G_add_keyword(_("settings"));
+    G_add_keyword(_("metadata"));
     module->description =
     module->description =
 	_("Prints/sets general temporal GIS database connection for current mapset.");
 	_("Prints/sets general temporal GIS database connection for current mapset.");
 
 

+ 1 - 1
temporal/t.info/t.info.html

@@ -28,7 +28,7 @@ are in the user's current mapset search path (managed with
 In order to obtain information about temporal DBMI backend, run:
 In order to obtain information about temporal DBMI backend, run:
 
 
 <div class="code"><pre>
 <div class="code"><pre>
-t.info -s
+t.info -d
  +------------------- Temporal DBMI backend information ----------------------+
  +------------------- Temporal DBMI backend information ----------------------+
  | DBMI Python interface:...... sqlite3
  | DBMI Python interface:...... sqlite3
  | Temporal database string:... /grassdata/nc_spm_temporal_workshop/climate_2000_2012/tgis/sqlite.db
  | Temporal database string:... /grassdata/nc_spm_temporal_workshop/climate_2000_2012/tgis/sqlite.db

+ 2 - 3
temporal/t.info/t.info.py

@@ -43,7 +43,7 @@
 #%end
 #%end
 
 
 #%flag
 #%flag
-#% key: s
+#% key: d
 #% description: Print information about the temporal DBMI interface and exit
 #% description: Print information about the temporal DBMI interface and exit
 #% suppress_required: yes
 #% suppress_required: yes
 #%end
 #%end
@@ -60,7 +60,7 @@ def main():
     name = options["input"]
     name = options["input"]
     type_ = options["type"]
     type_ = options["type"]
     shellstyle = flags['g']
     shellstyle = flags['g']
-    system = flags['s']
+    system = flags['d']
     history = flags['h']
     history = flags['h']
 
 
     # Make sure the temporal database exists
     # Make sure the temporal database exists
@@ -68,7 +68,6 @@ def main():
 
 
     dbif, connected = tgis.init_dbif(None)
     dbif, connected = tgis.init_dbif(None)
 
 
-
     rows = tgis.get_tgis_metadata(dbif)
     rows = tgis.get_tgis_metadata(dbif)
 
 
     if system and not shellstyle:
     if system and not shellstyle:

+ 3 - 3
temporal/t.info/testsuite/test.t.info.sh

@@ -2,7 +2,7 @@
 # Test the info output
 # Test the info output
 
 
 # We need to set a specific region in the
 # We need to set a specific region in the
-# @preprocess step of this test. 
+# @preprocess step of this test.
 g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3
 g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3
 
 
 export GRASS_OVERWRITE=1
 export GRASS_OVERWRITE=1
@@ -17,8 +17,8 @@ v.random -z output=lidar_abs_1 n=20 zmin=0 zmax=100 column=height
 v.random -z output=lidar_abs_2 n=20 zmin=0 zmax=100 column=height
 v.random -z output=lidar_abs_2 n=20 zmin=0 zmax=100 column=height
 
 
 # The first @test
 # The first @test
-t.info -s
-t.info -sg
+t.info -d
+t.info -dg
 
 
 t.create type=strds temporaltype=absolute output=precip_abs1 title="A test" descr="A test"
 t.create type=strds temporaltype=absolute output=precip_abs1 title="A test" descr="A test"
 t.create type=strds temporaltype=absolute output=precip_abs2 title="A test" descr="A test"
 t.create type=strds temporaltype=absolute output=precip_abs2 title="A test" descr="A test"

+ 3 - 3
temporal/t.rast.algebra/t.rast.algebra.py

@@ -50,7 +50,7 @@
 
 
 #%flag
 #%flag
 #% key: s
 #% key: s
-#% description: Activate spatial topology
+#% description: Check the spatial topology of temporally related maps and process only spatially related maps
 #%end
 #%end
 
 
 #%flag
 #%flag
@@ -97,11 +97,11 @@ def main():
                                          nprocs=nprocs,
                                          nprocs=nprocs,
                                          register_null=register_null,
                                          register_null=register_null,
                                          dry_run=dry_run)
                                          dry_run=dry_run)
-    
+
     if granularity:
     if granularity:
         if not p.setup_common_granularity(expression=expression,  lexer = tgis.TemporalRasterAlgebraLexer()):
         if not p.setup_common_granularity(expression=expression,  lexer = tgis.TemporalRasterAlgebraLexer()):
             grass.script.fatal(_("Unable to process the expression in granularity algebra mode"))
             grass.script.fatal(_("Unable to process the expression in granularity algebra mode"))
-    
+
     pc = p.parse(expression, basename, grass.script.overwrite())
     pc = p.parse(expression, basename, grass.script.overwrite())
 
 
     if dry_run is True:
     if dry_run is True:

+ 2 - 2
temporal/t.rast.list/t.rast.list.py

@@ -80,7 +80,7 @@
 #%end
 #%end
 
 
 #%flag
 #%flag
-#% key: s
+#% key: u
 #% description: Suppress printing of column names
 #% description: Suppress printing of column names
 #% guisection: Formatting
 #% guisection: Formatting
 #%end
 #%end
@@ -101,7 +101,7 @@ def main():
     separator = grass.separator(options["separator"])
     separator = grass.separator(options["separator"])
     method = options["method"]
     method = options["method"]
     granule = options["granule"]
     granule = options["granule"]
-    header = flags["s"]
+    header = flags["u"]
     output = options["output"]
     output = options["output"]
 
 
     # Make sure the temporal database exists
     # Make sure the temporal database exists

+ 1 - 3
temporal/t.rast.mapcalc/t.rast.mapcalc.py

@@ -64,11 +64,9 @@
 
 
 #%flag
 #%flag
 #% key: s
 #% key: s
-#% description: Check spatial overlap
+#% description: Check the spatial topology of temporally related maps and process only spatially related maps
 #%end
 #%end
 
 
-from multiprocessing import Process
-import copy
 import grass.script as grass
 import grass.script as grass
 import grass.temporal as tgis
 import grass.temporal as tgis
 
 

+ 0 - 1
temporal/t.rast.neighbors/t.rast.neighbors.py

@@ -84,7 +84,6 @@
 #% description: Register Null maps
 #% description: Register Null maps
 #%end
 #%end
 
 
-
 #%flag
 #%flag
 #% key: r
 #% key: r
 #% description: Ignore the current region settings and use the raster map regions
 #% description: Ignore the current region settings and use the raster map regions

+ 1 - 1
temporal/t.rast.univar/t.rast.univar.html

@@ -6,7 +6,7 @@ dataset.
 <p>
 <p>
 By default it returns the name of the map, the start and end date of
 By default it returns the name of the map, the start and end date of
 dataset and the following values: mean, minimum and maximum vale,
 dataset and the following values: mean, minimum and maximum vale,
-mean_of_abs, standard deviation, variance,coeff_var, number of null
+mean_of_abs, standard deviation, variance, coeff_var, number of null
 cells, total number of cell.
 cells, total number of cell.
 <p>
 <p>
 Using the <em>e</em> flag it can calculate also extended statistics:
 Using the <em>e</em> flag it can calculate also extended statistics:

+ 2 - 2
temporal/t.rast.univar/t.rast.univar.py

@@ -49,7 +49,7 @@
 #%end
 #%end
 
 
 #%flag
 #%flag
-#% key: s
+#% key: u
 #% description: Suppress printing of column names
 #% description: Suppress printing of column names
 #% guisection: Formatting
 #% guisection: Formatting
 #%end
 #%end
@@ -67,7 +67,7 @@ def main():
     output = options["output"]
     output = options["output"]
     where = options["where"]
     where = options["where"]
     extended = flags["e"]
     extended = flags["e"]
-    no_header = flags["s"]
+    no_header = flags["u"]
     rast_region = bool(flags["r"])
     rast_region = bool(flags["r"])
     separator = grass.separator(options["separator"])
     separator = grass.separator(options["separator"])
 
 

+ 7 - 7
temporal/t.rast.univar/testsuite/test_univar.py

@@ -25,23 +25,23 @@ class TestRasterUnivar(TestCase):
         cls.runModule("r.mapcalc", expression="a_3 = 300",  overwrite=True)
         cls.runModule("r.mapcalc", expression="a_3 = 300",  overwrite=True)
         cls.runModule("r.mapcalc", expression="a_4 = 400",  overwrite=True)
         cls.runModule("r.mapcalc", expression="a_4 = 400",  overwrite=True)
 
 
-        cls.runModule("t.create",  type="strds",  temporaltype="absolute",  
-                                 output="A",  title="A test",  description="A test",  
+        cls.runModule("t.create",  type="strds",  temporaltype="absolute",
+                                 output="A",  title="A test",  description="A test",
                                  overwrite=True)
                                  overwrite=True)
-        cls.runModule("t.register",  flags="i",  type="raster",  input="A",  
-                                     maps="a_1,a_2,a_3,a_4",  start="2001-01-01", 
+        cls.runModule("t.register",  flags="i",  type="raster",  input="A",
+                                     maps="a_1,a_2,a_3,a_4",  start="2001-01-01",
                                      increment="3 months",  overwrite=True)
                                      increment="3 months",  overwrite=True)
 
 
     @classmethod
     @classmethod
     def tearDownClass(cls):
     def tearDownClass(cls):
         """Remove the temporary region
         """Remove the temporary region
         """
         """
-        cls.runModule("t.remove",  flags="rf",  type="strds",  
+        cls.runModule("t.remove",  flags="rf",  type="strds",
                                    inputs="A")
                                    inputs="A")
         cls.del_temp_region()
         cls.del_temp_region()
 
 
     def test_1(self):
     def test_1(self):
-        
+
         t_rast_univar = SimpleModule("t.rast.univar", input="A",
         t_rast_univar = SimpleModule("t.rast.univar", input="A",
                                                       where="start_time >= '2001-01-01'",
                                                       where="start_time >= '2001-01-01'",
                                                       overwrite=True, verbose=True)
                                                       overwrite=True, verbose=True)
@@ -122,7 +122,7 @@ a_4@testing|2001-10-01 00:00:00|2002-01-01 00:00:00|400|400|400|400|0|0|0|384000
     def test_5(self):
     def test_5(self):
 
 
         self.runModule("g.region", res=10)
         self.runModule("g.region", res=10)
-        self.assertModule("t.rast.univar", input="A", flags="rs",
+        self.assertModule("t.rast.univar", input="A", flags="ru",
                                            output="univar_output.txt",
                                            output="univar_output.txt",
                                            where="start_time >= '2001-03-01'",
                                            where="start_time >= '2001-03-01'",
                                            overwrite=True, verbose=True)
                                            overwrite=True, verbose=True)

+ 3 - 3
temporal/t.rast3d.algebra/t.rast3d.algebra.py

@@ -51,7 +51,7 @@
 
 
 #%flag
 #%flag
 #% key: s
 #% key: s
-#% description: Activate spatial topology
+#% description: Check the spatial topology of temporally related maps and process only spatially related maps
 #%end
 #%end
 
 
 #%flag
 #%flag
@@ -88,11 +88,11 @@ def main():
 
 
     tgis.init(True)
     tgis.init(True)
     p = tgis.TemporalRaster3DAlgebraParser(run = True, debug=False, spatial = spatial, nprocs = nprocs, register_null = register_null)
     p = tgis.TemporalRaster3DAlgebraParser(run = True, debug=False, spatial = spatial, nprocs = nprocs, register_null = register_null)
-    
+
     if granularity:
     if granularity:
         if not p.setup_common_granularity(expression=expression,  stdstype = 'str3ds',  lexer = tgis.TemporalRasterAlgebraLexer()):
         if not p.setup_common_granularity(expression=expression,  stdstype = 'str3ds',  lexer = tgis.TemporalRasterAlgebraLexer()):
             grass.script.fatal(_("Unable to process the expression in granularity algebra mode"))
             grass.script.fatal(_("Unable to process the expression in granularity algebra mode"))
-            
+
     p.parse(expression, basename, grass.script.overwrite())
     p.parse(expression, basename, grass.script.overwrite())
 
 
 if __name__ == "__main__":
 if __name__ == "__main__":

+ 1 - 1
temporal/t.rast3d.mapcalc/t.rast3d.mapcalc.py

@@ -68,7 +68,7 @@
 
 
 #%flag
 #%flag
 #% key: s
 #% key: s
-#% description: Check spatial overlap
+#% description: Check the spatial topology of temporally related maps and process only spatially related maps
 #%end
 #%end
 
 
 from multiprocessing import Process
 from multiprocessing import Process

+ 1 - 1
temporal/t.sample/t.sample.py

@@ -57,7 +57,7 @@
 
 
 #%flag
 #%flag
 #% key: s
 #% key: s
-#% description: Check spatial overlap
+#% description: Check for spatial topological overlap
 #%end
 #%end
 
 
 import grass.script as grass
 import grass.script as grass

+ 1 - 1
temporal/t.select/t.select.py

@@ -37,7 +37,7 @@
 
 
 #%flag
 #%flag
 #% key: s
 #% key: s
-#% description: Activate spatial topology
+#% description: Check the spatial topology of temporally related maps and select only spatially related maps
 #%end
 #%end
 
 
 #%flag
 #%flag

+ 2 - 2
temporal/t.topology/t.topology.py

@@ -34,12 +34,12 @@
 
 
 #%flag
 #%flag
 #% key: m
 #% key: m
-#% description: Print temporal relationships and exit
+#% description: Print temporal topological relationships and exit
 #%end
 #%end
 
 
 #%flag
 #%flag
 #% key: s
 #% key: s
-#% description: Print spatio-temporal relationships and exit
+#% description: Print spatio-temporal topological relationships and exit
 #%end
 #%end
 from __future__ import print_function
 from __future__ import print_function
 
 

+ 1 - 1
temporal/t.vect.algebra/t.vect.algebra.py

@@ -43,7 +43,7 @@
 
 
 #%flag
 #%flag
 #% key: s
 #% key: s
-#% description: Activate spatial topology
+#% description: Check the spatial topology of temporally related maps and process only spatially related maps
 #%end
 #%end
 
 
 import grass.script
 import grass.script

+ 2 - 2
temporal/t.vect.list/t.vect.list.py

@@ -72,7 +72,7 @@
 #%end
 #%end
 
 
 #%flag
 #%flag
-#% key: s
+#% key: u
 #% description: Suppress printing of column names
 #% description: Suppress printing of column names
 #% guisection: Formatting
 #% guisection: Formatting
 #%end
 #%end
@@ -92,7 +92,7 @@ def main():
     where = options["where"]
     where = options["where"]
     separator = grass.separator(options["separator"])
     separator = grass.separator(options["separator"])
     method = options["method"]
     method = options["method"]
-    header = flags["s"]
+    header = flags["u"]
     output = options["output"]
     output = options["output"]
 
 
     # Make sure the temporal database exists
     # Make sure the temporal database exists

+ 2 - 2
temporal/t.vect.univar/t.vect.univar.py

@@ -62,7 +62,7 @@
 #%end
 #%end
 
 
 #%flag
 #%flag
-#% key: s
+#% key: u
 #% description: Suppress printing of column names
 #% description: Suppress printing of column names
 #% guisection: Formatting
 #% guisection: Formatting
 #%end
 #%end
@@ -83,7 +83,7 @@ def main():
     column = options["column"]
     column = options["column"]
     where = options["where"]
     where = options["where"]
     extended = flags["e"]
     extended = flags["e"]
-    header = flags["s"]
+    header = flags["u"]
     separator = grass.separator(options["separator"])
     separator = grass.separator(options["separator"])
 
 
     # Make sure the temporal database exists
     # Make sure the temporal database exists