瀏覽代碼

Fixed decomposition bug in t.rast.aggregate, added empty map removing to raster algebra modules.

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@59030 15284696-431f-4ddb-bdfa-cd5b030d7da7
Soeren Gebbert 11 年之前
父節點
當前提交
3787abdd82

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

@@ -190,7 +190,7 @@ t.rast.colors input=leafhopper_duration_c3_1990_2000 color=rainbow
 ################ 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" \

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

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

+ 8 - 1
temporal/t.rast.mapcalc2/t.rast.mapcalc2.py

@@ -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 @@ def main():
     basename = options['basename']
     nprocs = options["nprocs"]
     spatial = flags["s"]
+    register_null = flags["n"]
 
     # Check for PLY istallation
     try:
@@ -72,7 +79,7 @@ def main():
                              "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__":

+ 8 - 1
temporal/t.rast3d.mapcalc2/t.rast3d.mapcalc2.py

@@ -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 @@ def main():
     basename = options['basename']
     nprocs = options["nprocs"]
     spatial = flags["s"]
+    register_null = flags["n"]
 
     # Check for PLY istallation
     try:
@@ -72,7 +79,7 @@ def main():
                              "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__":