[GRASS-SVN] r59030 - in grass/trunk/temporal: t.rast.accumulate t.rast.aggregate t.rast.mapcalc2 t.rast3d.mapcalc2

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Feb 13 16:08:41 PST 2014


Author: huhabla
Date: 2014-02-13 16:08:41 -0800 (Thu, 13 Feb 2014)
New Revision: 59030

Modified:
   grass/trunk/temporal/t.rast.accumulate/t.rast.accumulate.html
   grass/trunk/temporal/t.rast.aggregate/t.rast.aggregate.py
   grass/trunk/temporal/t.rast.mapcalc2/t.rast.mapcalc2.py
   grass/trunk/temporal/t.rast3d.mapcalc2/t.rast3d.mapcalc2.py
Log:
Fixed decomposition bug in t.rast.aggregate, added empty map removing to raster algebra modules.


Modified: grass/trunk/temporal/t.rast.accumulate/t.rast.accumulate.html
===================================================================
--- grass/trunk/temporal/t.rast.accumulate/t.rast.accumulate.html	2014-02-14 00:04:59 UTC (rev 59029)
+++ grass/trunk/temporal/t.rast.accumulate/t.rast.accumulate.html	2014-02-14 00:08:41 UTC (rev 59030)
@@ -190,7 +190,7 @@
 ################ MONTHLY CYCLES OCCURRENCE ##################################
 #############################################################################
 
-# Extract the monthly indicator that show the start and end of a cycle
+# Extract the monthly indicator that shows the start and end of a cycle
 
 # First cycle
 t.rast.aggregate input=leafhopper_indicator_c1_1990_2000 gran="1 month" \

Modified: grass/trunk/temporal/t.rast.aggregate/t.rast.aggregate.py
===================================================================
--- grass/trunk/temporal/t.rast.aggregate/t.rast.aggregate.py	2014-02-14 00:04:59 UTC (rev 59029)
+++ grass/trunk/temporal/t.rast.aggregate/t.rast.aggregate.py	2014-02-14 00:08:41 UTC (rev 59030)
@@ -95,7 +95,7 @@
                                               title, description, semantic_type,
                                               dbif, grass.overwrite())
 
-    rows = sp.get_registered_maps("id,start_time", where, "start_time", dbif)
+    rows = sp.get_registered_maps("id,start_time,end_time", where, "start_time", dbif)
 
     if not rows:
         dbif.close()
@@ -109,12 +109,12 @@
     else:
         first_start_time = rows[0]["start_time"]
 
-    last_start_time = rows[len(rows) - 1]["start_time"]
+    last_start_time = rows[len(rows) - 1]["end_time"]
     next_start_time = first_start_time
 
     count = 0
 
-    while next_start_time <= last_start_time:
+    while next_start_time < last_start_time:
         start = next_start_time
         if sp.is_time_absolute():
             end = tgis.increment_datetime_by_string(next_start_time, gran)

Modified: grass/trunk/temporal/t.rast.mapcalc2/t.rast.mapcalc2.py
===================================================================
--- grass/trunk/temporal/t.rast.mapcalc2/t.rast.mapcalc2.py	2014-02-14 00:04:59 UTC (rev 59029)
+++ grass/trunk/temporal/t.rast.mapcalc2/t.rast.mapcalc2.py	2014-02-14 00:08:41 UTC (rev 59030)
@@ -52,6 +52,12 @@
 #% description: Activate spatial topology.
 #%end
 
+#%flag
+#% key: n
+#% description: Register Null maps
+#%end
+
+
 import grass.script
 import grass.temporal as tgis
 import sys
@@ -61,6 +67,7 @@
     basename = options['basename']
     nprocs = options["nprocs"]
     spatial = flags["s"]
+    register_null = flags["n"]
 
     # Check for PLY istallation
     try:
@@ -72,7 +79,7 @@
                              "t.rast.mapcalc2 without PLY requirement."))
 
     tgis.init(True)
-    p = tgis.TemporalRasterAlgebraParser(run = True, debug=False, spatial = spatial, nprocs = nprocs)
+    p = tgis.TemporalRasterAlgebraParser(run = True, debug=False, spatial = spatial, nprocs = nprocs, register_null = register_null)
     p.parse(expression, basename, grass.script.overwrite())
 
 if __name__ == "__main__":

Modified: grass/trunk/temporal/t.rast3d.mapcalc2/t.rast3d.mapcalc2.py
===================================================================
--- grass/trunk/temporal/t.rast3d.mapcalc2/t.rast3d.mapcalc2.py	2014-02-14 00:04:59 UTC (rev 59029)
+++ grass/trunk/temporal/t.rast3d.mapcalc2/t.rast3d.mapcalc2.py	2014-02-14 00:08:41 UTC (rev 59030)
@@ -52,6 +52,12 @@
 #% description: Activate spatial topology.
 #%end
 
+#%flag
+#% key: n
+#% description: Register Null maps
+#%end
+
+
 import grass.script
 import grass.temporal as tgis
 import sys
@@ -61,6 +67,7 @@
     basename = options['basename']
     nprocs = options["nprocs"]
     spatial = flags["s"]
+    register_null = flags["n"]
 
     # Check for PLY istallation
     try:
@@ -72,7 +79,7 @@
                              "t.rast3d.mapcalc2 without PLY requirement."))
 
     tgis.init(True)
-    p = tgis.TemporalRaster3DAlgebraParser(run = True, debug=False, spatial = spatial, nprocs = nprocs)
+    p = tgis.TemporalRaster3DAlgebraParser(run = True, debug=False, spatial = spatial, nprocs = nprocs, register_null = register_null)
     p.parse(expression, basename, grass.script.overwrite())
 
 if __name__ == "__main__":



More information about the grass-commit mailing list