Bladeren bron

temporal modules: Added file based output to t.vect.univar

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@66574 15284696-431f-4ddb-bdfa-cd5b030d7da7
Soeren Gebbert 9 jaren geleden
bovenliggende
commit
6c6ff8606d
2 gewijzigde bestanden met toevoegingen van 11 en 3 verwijderingen
  1. 0 2
      temporal/t.rast.univar/t.rast.univar.py
  2. 11 1
      temporal/t.vect.univar/t.vect.univar.py

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

@@ -25,12 +25,10 @@
 #%option G_OPT_STRDS_INPUT
 #%end
 
-
 #%option G_OPT_F_OUTPUT
 #% required: no
 #%end
 
-
 #%option G_OPT_T_WHERE
 #% guisection: Selection
 #%end

+ 11 - 1
temporal/t.vect.univar/t.vect.univar.py

@@ -25,6 +25,10 @@
 #%option G_OPT_STVDS_INPUT
 #%end
 
+#%option G_OPT_F_OUTPUT
+#% required: no
+#%end
+
 #%option G_OPT_V_FIELD
 #%end
 
@@ -72,6 +76,7 @@ def main():
 
     # Get the options
     input = options["input"]
+    output = options["output"]
     twhere = options["twhere"]
     layer = options["layer"]
     type = options["type"]
@@ -84,8 +89,13 @@ def main():
     # Make sure the temporal database exists
     tgis.init()
 
+    if not output:
+        output = None
+    if output == "-":
+        output = None
+
     tgis.print_vector_dataset_univar_statistics(
-        input, twhere, layer, type, column, where, extended, header, separator)
+        input, output, twhere, layer, type, column, where, extended, header, separator)
 
 if __name__ == "__main__":
     options, flags = grass.parser()