[GRASS-SVN] r69510 - in grass/trunk/temporal: t.connect t.info t.info/testsuite t.rast.algebra t.rast.list t.rast.mapcalc t.rast.neighbors t.rast.univar t.rast.univar/testsuite t.rast3d.algebra t.rast3d.mapcalc t.sample t.select t.topology t.vect.algebra t.vect.list t.vect.univar

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Sep 16 16:03:06 PDT 2016


Author: huhabla
Date: 2016-09-16 16:03:06 -0700 (Fri, 16 Sep 2016)
New Revision: 69510

Modified:
   grass/trunk/temporal/t.connect/main.c
   grass/trunk/temporal/t.info/t.info.html
   grass/trunk/temporal/t.info/t.info.py
   grass/trunk/temporal/t.info/testsuite/test.t.info.sh
   grass/trunk/temporal/t.rast.algebra/t.rast.algebra.py
   grass/trunk/temporal/t.rast.list/t.rast.list.py
   grass/trunk/temporal/t.rast.mapcalc/t.rast.mapcalc.py
   grass/trunk/temporal/t.rast.neighbors/t.rast.neighbors.py
   grass/trunk/temporal/t.rast.univar/t.rast.univar.html
   grass/trunk/temporal/t.rast.univar/t.rast.univar.py
   grass/trunk/temporal/t.rast.univar/testsuite/test_univar.py
   grass/trunk/temporal/t.rast3d.algebra/t.rast3d.algebra.py
   grass/trunk/temporal/t.rast3d.mapcalc/t.rast3d.mapcalc.py
   grass/trunk/temporal/t.sample/t.sample.py
   grass/trunk/temporal/t.select/t.select.py
   grass/trunk/temporal/t.topology/t.topology.py
   grass/trunk/temporal/t.vect.algebra/t.vect.algebra.py
   grass/trunk/temporal/t.vect.list/t.vect.list.py
   grass/trunk/temporal/t.vect.univar/t.vect.univar.py
Log:
temporal modules: Attempt to harmonize the flags of temporal modules


Modified: grass/trunk/temporal/t.connect/main.c
===================================================================
--- grass/trunk/temporal/t.connect/main.c	2016-09-16 22:23:02 UTC (rev 69509)
+++ grass/trunk/temporal/t.connect/main.c	2016-09-16 23:03:06 UTC (rev 69510)
@@ -31,9 +31,9 @@
 
     /* Set description */
     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 =
 	_("Prints/sets general temporal GIS database connection for current mapset.");
 

Modified: grass/trunk/temporal/t.info/t.info.html
===================================================================
--- grass/trunk/temporal/t.info/t.info.html	2016-09-16 22:23:02 UTC (rev 69509)
+++ grass/trunk/temporal/t.info/t.info.html	2016-09-16 23:03:06 UTC (rev 69510)
@@ -28,7 +28,7 @@
 In order to obtain information about temporal DBMI backend, run:
 
 <div class="code"><pre>
-t.info -s
+t.info -d
  +------------------- Temporal DBMI backend information ----------------------+
  | DBMI Python interface:...... sqlite3
  | Temporal database string:... /grassdata/nc_spm_temporal_workshop/climate_2000_2012/tgis/sqlite.db

Modified: grass/trunk/temporal/t.info/t.info.py
===================================================================
--- grass/trunk/temporal/t.info/t.info.py	2016-09-16 22:23:02 UTC (rev 69509)
+++ grass/trunk/temporal/t.info/t.info.py	2016-09-16 23:03:06 UTC (rev 69510)
@@ -43,7 +43,7 @@
 #%end
 
 #%flag
-#% key: s
+#% key: d
 #% description: Print information about the temporal DBMI interface and exit
 #% suppress_required: yes
 #%end
@@ -60,7 +60,7 @@
     name = options["input"]
     type_ = options["type"]
     shellstyle = flags['g']
-    system = flags['s']
+    system = flags['d']
     history = flags['h']
 
     # Make sure the temporal database exists
@@ -68,7 +68,6 @@
 
     dbif, connected = tgis.init_dbif(None)
 
-
     rows = tgis.get_tgis_metadata(dbif)
 
     if system and not shellstyle:

Modified: grass/trunk/temporal/t.info/testsuite/test.t.info.sh
===================================================================
--- grass/trunk/temporal/t.info/testsuite/test.t.info.sh	2016-09-16 22:23:02 UTC (rev 69509)
+++ grass/trunk/temporal/t.info/testsuite/test.t.info.sh	2016-09-16 23:03:06 UTC (rev 69510)
@@ -2,7 +2,7 @@
 # Test the info output
 
 # 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
 
 export GRASS_OVERWRITE=1
@@ -17,8 +17,8 @@
 v.random -z output=lidar_abs_2 n=20 zmin=0 zmax=100 column=height
 
 # 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_abs2 title="A test" descr="A test"

Modified: grass/trunk/temporal/t.rast.algebra/t.rast.algebra.py
===================================================================
--- grass/trunk/temporal/t.rast.algebra/t.rast.algebra.py	2016-09-16 22:23:02 UTC (rev 69509)
+++ grass/trunk/temporal/t.rast.algebra/t.rast.algebra.py	2016-09-16 23:03:06 UTC (rev 69510)
@@ -50,7 +50,7 @@
 
 #%flag
 #% key: s
-#% description: Activate spatial topology
+#% description: Check the spatial topology of temporally related maps and process only spatially related maps
 #%end
 
 #%flag
@@ -97,11 +97,11 @@
                                          nprocs=nprocs,
                                          register_null=register_null,
                                          dry_run=dry_run)
-    
+
     if granularity:
         if not p.setup_common_granularity(expression=expression,  lexer = tgis.TemporalRasterAlgebraLexer()):
             grass.script.fatal(_("Unable to process the expression in granularity algebra mode"))
-    
+
     pc = p.parse(expression, basename, grass.script.overwrite())
 
     if dry_run is True:

Modified: grass/trunk/temporal/t.rast.list/t.rast.list.py
===================================================================
--- grass/trunk/temporal/t.rast.list/t.rast.list.py	2016-09-16 22:23:02 UTC (rev 69509)
+++ grass/trunk/temporal/t.rast.list/t.rast.list.py	2016-09-16 23:03:06 UTC (rev 69510)
@@ -80,7 +80,7 @@
 #%end
 
 #%flag
-#% key: s
+#% key: u
 #% description: Suppress printing of column names
 #% guisection: Formatting
 #%end
@@ -101,7 +101,7 @@
     separator = grass.separator(options["separator"])
     method = options["method"]
     granule = options["granule"]
-    header = flags["s"]
+    header = flags["u"]
     output = options["output"]
 
     # Make sure the temporal database exists

Modified: grass/trunk/temporal/t.rast.mapcalc/t.rast.mapcalc.py
===================================================================
--- grass/trunk/temporal/t.rast.mapcalc/t.rast.mapcalc.py	2016-09-16 22:23:02 UTC (rev 69509)
+++ grass/trunk/temporal/t.rast.mapcalc/t.rast.mapcalc.py	2016-09-16 23:03:06 UTC (rev 69510)
@@ -64,11 +64,9 @@
 
 #%flag
 #% key: s
-#% description: Check spatial overlap
+#% description: Check the spatial topology of temporally related maps and process only spatially related maps
 #%end
 
-from multiprocessing import Process
-import copy
 import grass.script as grass
 import grass.temporal as tgis
 

Modified: grass/trunk/temporal/t.rast.neighbors/t.rast.neighbors.py
===================================================================
--- grass/trunk/temporal/t.rast.neighbors/t.rast.neighbors.py	2016-09-16 22:23:02 UTC (rev 69509)
+++ grass/trunk/temporal/t.rast.neighbors/t.rast.neighbors.py	2016-09-16 23:03:06 UTC (rev 69510)
@@ -84,7 +84,6 @@
 #% description: Register Null maps
 #%end
 
-
 #%flag
 #% key: r
 #% description: Ignore the current region settings and use the raster map regions

Modified: grass/trunk/temporal/t.rast.univar/t.rast.univar.html
===================================================================
--- grass/trunk/temporal/t.rast.univar/t.rast.univar.html	2016-09-16 22:23:02 UTC (rev 69509)
+++ grass/trunk/temporal/t.rast.univar/t.rast.univar.html	2016-09-16 23:03:06 UTC (rev 69510)
@@ -6,7 +6,7 @@
 <p>
 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,
-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.
 <p>
 Using the <em>e</em> flag it can calculate also extended statistics:

Modified: grass/trunk/temporal/t.rast.univar/t.rast.univar.py
===================================================================
--- grass/trunk/temporal/t.rast.univar/t.rast.univar.py	2016-09-16 22:23:02 UTC (rev 69509)
+++ grass/trunk/temporal/t.rast.univar/t.rast.univar.py	2016-09-16 23:03:06 UTC (rev 69510)
@@ -49,7 +49,7 @@
 #%end
 
 #%flag
-#% key: s
+#% key: u
 #% description: Suppress printing of column names
 #% guisection: Formatting
 #%end
@@ -67,7 +67,7 @@
     output = options["output"]
     where = options["where"]
     extended = flags["e"]
-    no_header = flags["s"]
+    no_header = flags["u"]
     rast_region = bool(flags["r"])
     separator = grass.separator(options["separator"])
 

Modified: grass/trunk/temporal/t.rast.univar/testsuite/test_univar.py
===================================================================
--- grass/trunk/temporal/t.rast.univar/testsuite/test_univar.py	2016-09-16 22:23:02 UTC (rev 69509)
+++ grass/trunk/temporal/t.rast.univar/testsuite/test_univar.py	2016-09-16 23:03:06 UTC (rev 69510)
@@ -25,23 +25,23 @@
         cls.runModule("r.mapcalc", expression="a_3 = 300",  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)
-        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)
 
     @classmethod
     def tearDownClass(cls):
         """Remove the temporary region
         """
-        cls.runModule("t.remove",  flags="rf",  type="strds",  
+        cls.runModule("t.remove",  flags="rf",  type="strds",
                                    inputs="A")
         cls.del_temp_region()
 
     def test_1(self):
-        
+
         t_rast_univar = SimpleModule("t.rast.univar", input="A",
                                                       where="start_time >= '2001-01-01'",
                                                       overwrite=True, verbose=True)
@@ -122,7 +122,7 @@
     def test_5(self):
 
         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",
                                            where="start_time >= '2001-03-01'",
                                            overwrite=True, verbose=True)

Modified: grass/trunk/temporal/t.rast3d.algebra/t.rast3d.algebra.py
===================================================================
--- grass/trunk/temporal/t.rast3d.algebra/t.rast3d.algebra.py	2016-09-16 22:23:02 UTC (rev 69509)
+++ grass/trunk/temporal/t.rast3d.algebra/t.rast3d.algebra.py	2016-09-16 23:03:06 UTC (rev 69510)
@@ -51,7 +51,7 @@
 
 #%flag
 #% key: s
-#% description: Activate spatial topology
+#% description: Check the spatial topology of temporally related maps and process only spatially related maps
 #%end
 
 #%flag
@@ -88,11 +88,11 @@
 
     tgis.init(True)
     p = tgis.TemporalRaster3DAlgebraParser(run = True, debug=False, spatial = spatial, nprocs = nprocs, register_null = register_null)
-    
+
     if granularity:
         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"))
-            
+
     p.parse(expression, basename, grass.script.overwrite())
 
 if __name__ == "__main__":

Modified: grass/trunk/temporal/t.rast3d.mapcalc/t.rast3d.mapcalc.py
===================================================================
--- grass/trunk/temporal/t.rast3d.mapcalc/t.rast3d.mapcalc.py	2016-09-16 22:23:02 UTC (rev 69509)
+++ grass/trunk/temporal/t.rast3d.mapcalc/t.rast3d.mapcalc.py	2016-09-16 23:03:06 UTC (rev 69510)
@@ -68,7 +68,7 @@
 
 #%flag
 #% key: s
-#% description: Check spatial overlap
+#% description: Check the spatial topology of temporally related maps and process only spatially related maps
 #%end
 
 from multiprocessing import Process

Modified: grass/trunk/temporal/t.sample/t.sample.py
===================================================================
--- grass/trunk/temporal/t.sample/t.sample.py	2016-09-16 22:23:02 UTC (rev 69509)
+++ grass/trunk/temporal/t.sample/t.sample.py	2016-09-16 23:03:06 UTC (rev 69510)
@@ -57,7 +57,7 @@
 
 #%flag
 #% key: s
-#% description: Check spatial overlap
+#% description: Check for spatial topological overlap
 #%end
 
 import grass.script as grass

Modified: grass/trunk/temporal/t.select/t.select.py
===================================================================
--- grass/trunk/temporal/t.select/t.select.py	2016-09-16 22:23:02 UTC (rev 69509)
+++ grass/trunk/temporal/t.select/t.select.py	2016-09-16 23:03:06 UTC (rev 69510)
@@ -37,7 +37,7 @@
 
 #%flag
 #% key: s
-#% description: Activate spatial topology
+#% description: Check the spatial topology of temporally related maps and select only spatially related maps
 #%end
 
 #%flag

Modified: grass/trunk/temporal/t.topology/t.topology.py
===================================================================
--- grass/trunk/temporal/t.topology/t.topology.py	2016-09-16 22:23:02 UTC (rev 69509)
+++ grass/trunk/temporal/t.topology/t.topology.py	2016-09-16 23:03:06 UTC (rev 69510)
@@ -34,12 +34,12 @@
 
 #%flag
 #% key: m
-#% description: Print temporal relationships and exit
+#% description: Print temporal topological relationships and exit
 #%end
 
 #%flag
 #% key: s
-#% description: Print spatio-temporal relationships and exit
+#% description: Print spatio-temporal topological relationships and exit
 #%end
 from __future__ import print_function
 

Modified: grass/trunk/temporal/t.vect.algebra/t.vect.algebra.py
===================================================================
--- grass/trunk/temporal/t.vect.algebra/t.vect.algebra.py	2016-09-16 22:23:02 UTC (rev 69509)
+++ grass/trunk/temporal/t.vect.algebra/t.vect.algebra.py	2016-09-16 23:03:06 UTC (rev 69510)
@@ -43,7 +43,7 @@
 
 #%flag
 #% key: s
-#% description: Activate spatial topology
+#% description: Check the spatial topology of temporally related maps and process only spatially related maps
 #%end
 
 import grass.script

Modified: grass/trunk/temporal/t.vect.list/t.vect.list.py
===================================================================
--- grass/trunk/temporal/t.vect.list/t.vect.list.py	2016-09-16 22:23:02 UTC (rev 69509)
+++ grass/trunk/temporal/t.vect.list/t.vect.list.py	2016-09-16 23:03:06 UTC (rev 69510)
@@ -72,7 +72,7 @@
 #%end
 
 #%flag
-#% key: s
+#% key: u
 #% description: Suppress printing of column names
 #% guisection: Formatting
 #%end
@@ -92,7 +92,7 @@
     where = options["where"]
     separator = grass.separator(options["separator"])
     method = options["method"]
-    header = flags["s"]
+    header = flags["u"]
     output = options["output"]
 
     # Make sure the temporal database exists

Modified: grass/trunk/temporal/t.vect.univar/t.vect.univar.py
===================================================================
--- grass/trunk/temporal/t.vect.univar/t.vect.univar.py	2016-09-16 22:23:02 UTC (rev 69509)
+++ grass/trunk/temporal/t.vect.univar/t.vect.univar.py	2016-09-16 23:03:06 UTC (rev 69510)
@@ -62,7 +62,7 @@
 #%end
 
 #%flag
-#% key: s
+#% key: u
 #% description: Suppress printing of column names
 #% guisection: Formatting
 #%end
@@ -83,7 +83,7 @@
     column = options["column"]
     where = options["where"]
     extended = flags["e"]
-    header = flags["s"]
+    header = flags["u"]
     separator = grass.separator(options["separator"])
 
     # Make sure the temporal database exists



More information about the grass-commit mailing list