[GRASS-SVN] r63299 - in grass/branches/releasebranch_7_0/temporal: . t.create t.info t.merge/testsuite t.rast.aggregate.ds t.rast.algebra/testsuite t.rast.list t.rast.mapcalc t.rast.neighbors t.rast.out.vtk t.rast.to.rast3 t.rast.to.rast3/testsuite t.rast.univar t.rast.univar/testsuite t.rast3d.univar t.register t.select t.shift t.snap t.support t.topology t.vect.extract t.vect.observe.strds/testsuite
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Nov 30 03:40:34 PST 2014
Author: neteler
Date: 2014-11-30 03:40:33 -0800 (Sun, 30 Nov 2014)
New Revision: 63299
Added:
grass/branches/releasebranch_7_0/temporal/t.rast.univar/testsuite/
grass/branches/releasebranch_7_0/temporal/t.rast.univar/testsuite/test.t.rast.univar.sh
Removed:
grass/branches/releasebranch_7_0/temporal/t.rast.univar/test.t.rast.univar.sh
grass/branches/releasebranch_7_0/temporal/t.rast3d.univar/test.t.rast3d.univar.sh
Modified:
grass/branches/releasebranch_7_0/temporal/Makefile
grass/branches/releasebranch_7_0/temporal/t.create/t.create.py
grass/branches/releasebranch_7_0/temporal/t.info/t.info.py
grass/branches/releasebranch_7_0/temporal/t.merge/testsuite/test.t.merge.sh
grass/branches/releasebranch_7_0/temporal/t.rast.aggregate.ds/t.rast.aggregate.ds.py
grass/branches/releasebranch_7_0/temporal/t.rast.algebra/testsuite/test_raster_algebra.py
grass/branches/releasebranch_7_0/temporal/t.rast.algebra/testsuite/test_raster_algebra_fails.py
grass/branches/releasebranch_7_0/temporal/t.rast.list/test.t.rast.list.sh
grass/branches/releasebranch_7_0/temporal/t.rast.mapcalc/test.t.rast.mapcalc.sh
grass/branches/releasebranch_7_0/temporal/t.rast.neighbors/t.rast.neighbors.py
grass/branches/releasebranch_7_0/temporal/t.rast.out.vtk/t.rast.out.vtk.py
grass/branches/releasebranch_7_0/temporal/t.rast.to.rast3/t.rast.to.rast3.py
grass/branches/releasebranch_7_0/temporal/t.rast.to.rast3/testsuite/test_strds_to_rast3.py
grass/branches/releasebranch_7_0/temporal/t.register/test.t.register.raster.sh
grass/branches/releasebranch_7_0/temporal/t.select/t.select.py
grass/branches/releasebranch_7_0/temporal/t.select/test.t.select.sh
grass/branches/releasebranch_7_0/temporal/t.shift/t.shift.py
grass/branches/releasebranch_7_0/temporal/t.snap/t.snap.py
grass/branches/releasebranch_7_0/temporal/t.support/t.support.py
grass/branches/releasebranch_7_0/temporal/t.support/test.t.support.sh
grass/branches/releasebranch_7_0/temporal/t.topology/t.topology.py
grass/branches/releasebranch_7_0/temporal/t.vect.extract/test.t.vect.extract.layer.sh
grass/branches/releasebranch_7_0/temporal/t.vect.observe.strds/testsuite/test.t.vect.observe.strds.layer_bug.sh
grass/branches/releasebranch_7_0/temporal/t.vect.observe.strds/testsuite/test.t.vect.observe.strds.relative.sh
grass/branches/releasebranch_7_0/temporal/t.vect.observe.strds/testsuite/test.t.vect.observe.strds.sh
Log:
temporal: selective sync to trunk
Modified: grass/branches/releasebranch_7_0/temporal/Makefile
===================================================================
--- grass/branches/releasebranch_7_0/temporal/Makefile 2014-11-30 11:38:27 UTC (rev 63298)
+++ grass/branches/releasebranch_7_0/temporal/Makefile 2014-11-30 11:40:33 UTC (rev 63299)
@@ -1,5 +1,9 @@
MODULE_TOPDIR = ..
+# t.rast.algebra \
+# t.rast3d.algebra \
+# t.vect.algebra \
+
SUBDIRS = \
t.connect \
t.create \
Modified: grass/branches/releasebranch_7_0/temporal/t.create/t.create.py
===================================================================
--- grass/branches/releasebranch_7_0/temporal/t.create/t.create.py 2014-11-30 11:38:27 UTC (rev 63298)
+++ grass/branches/releasebranch_7_0/temporal/t.create/t.create.py 2014-11-30 11:40:33 UTC (rev 63299)
@@ -2,11 +2,11 @@
# -*- coding: utf-8 -*-
############################################################################
#
-# MODULE: t.create
-# AUTHOR(S): Soeren Gebbert
+# MODULE: t.create
+# AUTHOR(S): Soeren Gebbert
#
-# PURPOSE: Create a space time dataset
-# COPYRIGHT: (C) 2011 by the GRASS Development Team
+# PURPOSE: Create a space time dataset
+# COPYRIGHT: (C) 2011-2014 by the GRASS Development Team
#
# This program is free software under the GNU General Public
# License (version 2). Read the file COPYING that comes with GRASS
@@ -25,7 +25,7 @@
#%end
#%option G_OPT_STDS_TYPE
-#% description: The output type of the space time dataset
+#% description: Type of the output space time dataset
#%end
#%option G_OPT_T_TYPE
@@ -57,8 +57,8 @@
#% multiple: no
#%end
+import grass.script as grass
import grass.temporal as tgis
-import grass.script as grass
############################################################################
@@ -73,6 +73,7 @@
descr = options["description"]
semantic = options["semantictype"]
+ # Make sure the temporal database exists
tgis.init()
tgis.open_new_stds(name, type, temporaltype, title, descr,
Modified: grass/branches/releasebranch_7_0/temporal/t.info/t.info.py
===================================================================
--- grass/branches/releasebranch_7_0/temporal/t.info/t.info.py 2014-11-30 11:38:27 UTC (rev 63298)
+++ grass/branches/releasebranch_7_0/temporal/t.info/t.info.py 2014-11-30 11:40:33 UTC (rev 63299)
@@ -2,11 +2,11 @@
# -*- coding: utf-8 -*-
############################################################################
#
-# MODULE: t.info
+# MODULE: t.info
# AUTHOR(S): Soeren Gebbert
#
-# PURPOSE: Print information about a space-time dataset
-# COPYRIGHT: (C) 2011 by the GRASS Development Team
+# PURPOSE: Print information about a space-time dataset
+# COPYRIGHT: (C) 2011-2014 by the GRASS Development Team
#
# This program is free software under the GNU General Public
# License (version 2). Read the file COPYING that comes with GRASS
@@ -24,15 +24,10 @@
#% description: Name of an existing space time dataset or map
#%end
-#%option
-#% key: type
-#% type: string
-#% description: Type of the dataset, default is strds (space time raster dataset)
-#% required: no
+#%option G_OPT_STDS_TYPE
#% guidependency: input
#% guisection: Required
#% options: strds, str3ds, stvds, rast, rast3d, vect
-#% answer: strds
#%end
#%flag
Modified: grass/branches/releasebranch_7_0/temporal/t.merge/testsuite/test.t.merge.sh
===================================================================
--- grass/branches/releasebranch_7_0/temporal/t.merge/testsuite/test.t.merge.sh 2014-11-30 11:38:27 UTC (rev 63298)
+++ grass/branches/releasebranch_7_0/temporal/t.merge/testsuite/test.t.merge.sh 2014-11-30 11:40:33 UTC (rev 63299)
@@ -49,4 +49,4 @@
t.remove type=strds input=precip_abs1,precip_abs2,precip_abs3,precip_abs4
t.unregister type=rast maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6
-g.remove rast=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6
+g.remove -f type=rast name=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6
Modified: grass/branches/releasebranch_7_0/temporal/t.rast.aggregate.ds/t.rast.aggregate.ds.py
===================================================================
--- grass/branches/releasebranch_7_0/temporal/t.rast.aggregate.ds/t.rast.aggregate.ds.py 2014-11-30 11:38:27 UTC (rev 63298)
+++ grass/branches/releasebranch_7_0/temporal/t.rast.aggregate.ds/t.rast.aggregate.ds.py 2014-11-30 11:40:33 UTC (rev 63299)
@@ -6,10 +6,10 @@
# AUTHOR(S): Soeren Gebbert
#
# PURPOSE: Aggregates data of an existing space time raster dataset using the time intervals of a second space time dataset
-# COPYRIGHT: (C) 2011 by the gcore Development Team
+# COPYRIGHT: (C) 2011 by the GRASS Development Team
#
# This program is free software under the GNU General Public
-# License (version 2). Read the file COPYING that comes with gcore
+# License (version 2). Read the file COPYING that comes with GRASS
# for details.
#
#############################################################################
@@ -29,7 +29,7 @@
#%end
#%option G_OPT_STDS_TYPE
-#% description: Type of the aggregation space time dataset, default is strds
+#% description: Type of the aggregation space time dataset
#%end
#%option G_OPT_STRDS_OUTPUT
Modified: grass/branches/releasebranch_7_0/temporal/t.rast.algebra/testsuite/test_raster_algebra.py
===================================================================
--- grass/branches/releasebranch_7_0/temporal/t.rast.algebra/testsuite/test_raster_algebra.py 2014-11-30 11:38:27 UTC (rev 63298)
+++ grass/branches/releasebranch_7_0/temporal/t.rast.algebra/testsuite/test_raster_algebra.py 2014-11-30 11:40:33 UTC (rev 63299)
@@ -90,7 +90,7 @@
def test_simple_arith_hash_1(self):
"""Simple arithmetic test including the hash operator"""
- self.assertModule("t.rast.algebra", expression='R = A + A {#, equal,l} A', basename="r")
+ self.assertModule("t.rast.algebra", expression='R = A + (A {#, equal,l} A)', basename="r")
D = tgis.open_old_stds("R", type="strds")
Modified: grass/branches/releasebranch_7_0/temporal/t.rast.algebra/testsuite/test_raster_algebra_fails.py
===================================================================
--- grass/branches/releasebranch_7_0/temporal/t.rast.algebra/testsuite/test_raster_algebra_fails.py 2014-11-30 11:38:27 UTC (rev 63298)
+++ grass/branches/releasebranch_7_0/temporal/t.rast.algebra/testsuite/test_raster_algebra_fails.py 2014-11-30 11:40:33 UTC (rev 63299)
@@ -31,12 +31,14 @@
def test_error_handling(self):
# Syntax error
- self.assertModuleFail("t.rast.algebra", expression="R == A {+,equal| precedes| follows,l} B", basename="r")
+ self.assertModuleFail("t.rast.algebra", expression="R == A {+,equal| precedes| follows,l} B",
+ basename="r")
# No STRDS
self.assertModuleFail("t.rast.algebra", expression="R = NoSTRDS + NoSTRDS", basename="r")
# No basename
self.assertModuleFail("t.rast.algebra", expression="R = A + B")
+ # Catch temporal algebra expressions that are prohibited in the raster algebra
+ self.assertModuleFail("t.rast.algebra", expression="R = strds(A) + strds(B)", basename="r")
-
if __name__ == '__main__':
gunittest.test()
Modified: grass/branches/releasebranch_7_0/temporal/t.rast.list/test.t.rast.list.sh
===================================================================
--- grass/branches/releasebranch_7_0/temporal/t.rast.list/test.t.rast.list.sh 2014-11-30 11:38:27 UTC (rev 63298)
+++ grass/branches/releasebranch_7_0/temporal/t.rast.list/test.t.rast.list.sh 2014-11-30 11:40:33 UTC (rev 63299)
@@ -9,12 +9,13 @@
export GRASS_OVERWRITE=1
-r.mapcalc expr="prec_1 = rand(0, 550)"
-r.mapcalc expr="prec_2 = rand(0, 450)"
-r.mapcalc expr="prec_3 = rand(0, 320)"
-r.mapcalc expr="prec_4 = rand(0, 510)"
-r.mapcalc expr="prec_5 = rand(0, 300)"
-r.mapcalc expr="prec_6 = rand(0, 650)"
+# Generate data
+r.mapcalc expr="prec_1 = rand(0, 550)" -s
+r.mapcalc expr="prec_2 = rand(0, 450)" -s
+r.mapcalc expr="prec_3 = rand(0, 320)" -s
+r.mapcalc expr="prec_4 = rand(0, 510)" -s
+r.mapcalc expr="prec_5 = rand(0, 300)" -s
+r.mapcalc expr="prec_6 = rand(0, 650)" -s
n1=`g.tempfile pid=1 -d`
n2=`g.tempfile pid=2 -d`
Modified: grass/branches/releasebranch_7_0/temporal/t.rast.mapcalc/test.t.rast.mapcalc.sh
===================================================================
--- grass/branches/releasebranch_7_0/temporal/t.rast.mapcalc/test.t.rast.mapcalc.sh 2014-11-30 11:38:27 UTC (rev 63298)
+++ grass/branches/releasebranch_7_0/temporal/t.rast.mapcalc/test.t.rast.mapcalc.sh 2014-11-30 11:40:33 UTC (rev 63299)
@@ -9,12 +9,13 @@
# The region setting should work for UTM and LL test locations
g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3
-r.mapcalc expr="prec_1 = rand(0, 550)"
-r.mapcalc expr="prec_2 = rand(0, 450)"
-r.mapcalc expr="prec_3 = rand(0, 320)"
-r.mapcalc expr="prec_4 = rand(0, 510)"
-r.mapcalc expr="prec_5 = rand(0, 300)"
-r.mapcalc expr="prec_6 = rand(0, 650)"
+# Generate data
+r.mapcalc expr="prec_1 = rand(0, 550)" -s
+r.mapcalc expr="prec_2 = rand(0, 450)" -s
+r.mapcalc expr="prec_3 = rand(0, 320)" -s
+r.mapcalc expr="prec_4 = rand(0, 510)" -s
+r.mapcalc expr="prec_5 = rand(0, 300)" -s
+r.mapcalc expr="prec_6 = rand(0, 650)" -s
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"
@@ -46,7 +47,7 @@
t.info type=strds input=precip_abs4
# Let the test fail
-g.remove rast=prec_1
+g.remove -f type=rast name=prec_1
t.rast.mapcalc -sn inputs=precip_abs1,precip_abs2 output=precip_abs4 \
expression=" (precip_abs1 + precip_abs2) * null()" base=new_prec \
method=equal nprocs=5
Modified: grass/branches/releasebranch_7_0/temporal/t.rast.neighbors/t.rast.neighbors.py
===================================================================
--- grass/branches/releasebranch_7_0/temporal/t.rast.neighbors/t.rast.neighbors.py 2014-11-30 11:38:27 UTC (rev 63298)
+++ grass/branches/releasebranch_7_0/temporal/t.rast.neighbors/t.rast.neighbors.py 2014-11-30 11:40:33 UTC (rev 63299)
@@ -109,7 +109,7 @@
grass.warning(_("Space time raster dataset <%s> is empty") % sp.get_id())
return
- new_sp = tgis.check_new_stds(input, "strds", dbif=dbif,
+ new_sp = tgis.check_new_stds(output, "strds", dbif=dbif,
overwrite=overwrite)
# Configure the r.neighbor module
neighbor_module = pymod.Module("r.neighbors", input="dummy",
Modified: grass/branches/releasebranch_7_0/temporal/t.rast.out.vtk/t.rast.out.vtk.py
===================================================================
--- grass/branches/releasebranch_7_0/temporal/t.rast.out.vtk/t.rast.out.vtk.py 2014-11-30 11:38:27 UTC (rev 63298)
+++ grass/branches/releasebranch_7_0/temporal/t.rast.out.vtk/t.rast.out.vtk.py 2014-11-30 11:40:33 UTC (rev 63299)
@@ -146,8 +146,8 @@
count += 1
if use_granularity:
- grass.run_command("g.remove", type='rast', name=null_map, flags='f')
- grass.run_command("g.remove", type='rast', name=map_name, flags='f')
+ grass.run_command("g.remove", flags='f', type='rast', name=null_map)
+ grass.run_command("g.remove", flags='f', type='rast', name=map_name)
if __name__ == "__main__":
options, flags = grass.parser()
Modified: grass/branches/releasebranch_7_0/temporal/t.rast.to.rast3/t.rast.to.rast3.py
===================================================================
--- grass/branches/releasebranch_7_0/temporal/t.rast.to.rast3/t.rast.to.rast3.py 2014-11-30 11:38:27 UTC (rev 63298)
+++ grass/branches/releasebranch_7_0/temporal/t.rast.to.rast3/t.rast.to.rast3.py 2014-11-30 11:40:33 UTC (rev 63299)
@@ -149,7 +149,7 @@
except CalledModuleError:
grass.fatal(_("Unable to create 3D raster map <%s>" % output))
- grass.run_command("g.remove", type='rast', name=null_map, flags='f')
+ grass.run_command("g.remove", flags='f', type='rast', name=null_map)
title = _("Space time voxel cube")
descr = _("This space time voxel cube was created with t.rast.to.rast3")
Modified: grass/branches/releasebranch_7_0/temporal/t.rast.to.rast3/testsuite/test_strds_to_rast3.py
===================================================================
--- grass/branches/releasebranch_7_0/temporal/t.rast.to.rast3/testsuite/test_strds_to_rast3.py 2014-11-30 11:38:27 UTC (rev 63298)
+++ grass/branches/releasebranch_7_0/temporal/t.rast.to.rast3/testsuite/test_strds_to_rast3.py 2014-11-30 11:40:33 UTC (rev 63299)
@@ -68,7 +68,7 @@
"""Remove generated data"""
#self.runModule("t.remove", flags="rf", type="strds",
# inputs="precip_i,precip_f,precip_d")
- #self.runModule('g.mremove', type='rast', pattern='prec_*', flags='f')
+ #self.runModule('g.remove', type='rast', pattern='prec_*', flags='f')
self.del_temp_region()
def otest_3m(self):
@@ -257,7 +257,7 @@
def tearDown(self):
"""Remove generated data"""
#self.runModule("t.remove", flags="rf", type="strds", inputs="precip_d")
- #self.runModule('g.mremove', type='rast', pattern='prec_*', flags='f')
+ #self.runModule('g.remove', type='rast', pattern='prec_*', flags='f')
self.del_temp_region()
def otest_years(self):
Deleted: grass/branches/releasebranch_7_0/temporal/t.rast.univar/test.t.rast.univar.sh
===================================================================
--- grass/branches/releasebranch_7_0/temporal/t.rast.univar/test.t.rast.univar.sh 2014-11-30 11:38:27 UTC (rev 63298)
+++ grass/branches/releasebranch_7_0/temporal/t.rast.univar/test.t.rast.univar.sh 2014-11-30 11:40:33 UTC (rev 63299)
@@ -1,27 +0,0 @@
-#!/bin/sh
-# Test univariate statistics for space time raster datasets
-
-# We need to set a specific region in the
-# @preprocess step of this test.
-# The region setting should work for UTM and LL test locations
-g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3
-
-export GRASS_OVERWRITE=1
-
-# Data generation
-r.mapcalc expr="prec_1 = rand(0, 550)"
-r.mapcalc expr="prec_2 = rand(0, 450)"
-r.mapcalc expr="prec_3 = rand(0, 320)"
-r.mapcalc expr="prec_4 = rand(0, 510)"
-r.mapcalc expr="prec_5 = rand(0, 300)"
-r.mapcalc expr="prec_6 = rand(0, 650)"
-
-t.create type=strds temporaltype=absolute output=precip_abs1 title="A test" descr="A test"
-t.register type=rast --v -i input=precip_abs1 maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6 start="2001-01-15 12:05:45" increment="14 days"
-
-# The first @test
-t.rast.univar -e input=precip_abs1
-
-t.rast.univar -s input=precip_abs1
-
-t.remove -rf type=strds input=precip_abs1
Added: grass/branches/releasebranch_7_0/temporal/t.rast.univar/testsuite/test.t.rast.univar.sh
===================================================================
--- grass/branches/releasebranch_7_0/temporal/t.rast.univar/testsuite/test.t.rast.univar.sh (rev 0)
+++ grass/branches/releasebranch_7_0/temporal/t.rast.univar/testsuite/test.t.rast.univar.sh 2014-11-30 11:40:33 UTC (rev 63299)
@@ -0,0 +1,27 @@
+#!/bin/sh
+# Test univariate statistics for space time raster datasets
+
+# We need to set a specific region in the
+# @preprocess step of this test.
+# The region setting should work for UTM and LL test locations
+g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3
+
+export GRASS_OVERWRITE=1
+
+# Data generation
+r.mapcalc expr="prec_1 = rand(0, 550)" -s
+r.mapcalc expr="prec_2 = rand(0, 450)" -s
+r.mapcalc expr="prec_3 = rand(0, 320)" -s
+r.mapcalc expr="prec_4 = rand(0, 510)" -s
+r.mapcalc expr="prec_5 = rand(0, 300)" -s
+r.mapcalc expr="prec_6 = rand(0, 650)" -s
+
+t.create type=strds temporaltype=absolute output=precip_abs1 title="A test" descr="A test"
+t.register type=rast --v -i input=precip_abs1 maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6 start="2001-01-15 12:05:45" increment="14 days"
+
+# The first @test
+t.rast.univar -e input=precip_abs1
+
+t.rast.univar -s input=precip_abs1
+
+t.remove -rf type=strds input=precip_abs1
Property changes on: grass/branches/releasebranch_7_0/temporal/t.rast.univar/testsuite/test.t.rast.univar.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ text/x-sh
Added: svn:eol-style
+ native
Deleted: grass/branches/releasebranch_7_0/temporal/t.rast3d.univar/test.t.rast3d.univar.sh
===================================================================
--- grass/branches/releasebranch_7_0/temporal/t.rast3d.univar/test.t.rast3d.univar.sh 2014-11-30 11:38:27 UTC (rev 63298)
+++ grass/branches/releasebranch_7_0/temporal/t.rast3d.univar/test.t.rast3d.univar.sh 2014-11-30 11:40:33 UTC (rev 63299)
@@ -1,29 +0,0 @@
-#!/bin/sh
-# Univariate statitsics for space time raster3d datasets
-
-# We need to set a specific region in the
-# @preprocess step of this test.
-# The region setting should work for UTM and LL test locations
-g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3
-
-export GRASS_OVERWRITE=1
-
-# Generate data
-r3.mapcalc expr="prec_1 = rand(0, 550)" -s
-r3.mapcalc expr="prec_2 = rand(0, 450)" -s
-r3.mapcalc expr="prec_3 = rand(0, 320)" -s
-r3.mapcalc expr="prec_4 = rand(0, 510)" -s
-r3.mapcalc expr="prec_5 = rand(0, 300)" -s
-r3.mapcalc expr="prec_6 = rand(0, 650)" -s
-
-t.create type=str3ds temporaltype=absolute output=precip_abs1 title="A test" descr="A test"
-t.register type=rast3d --v -i input=precip_abs1 maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6 start="2001-01-15 12:05:45" increment="14 days"
-t.info type=str3ds input=precip_abs1
-
-# The first @test
-t.rast3d.univar -e input=precip_abs1
-
-t.rast3d.univar -s input=precip_abs1
-
-t.remove -rf type=str3ds input=precip_abs1
-
Modified: grass/branches/releasebranch_7_0/temporal/t.register/test.t.register.raster.sh
===================================================================
--- grass/branches/releasebranch_7_0/temporal/t.register/test.t.register.raster.sh 2014-11-30 11:38:27 UTC (rev 63298)
+++ grass/branches/releasebranch_7_0/temporal/t.register/test.t.register.raster.sh 2014-11-30 11:40:33 UTC (rev 63299)
@@ -13,12 +13,13 @@
# The region setting should work for UTM and LL test locations
g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3
-r.mapcalc expr="prec_1 = rand(0, 550)"
-r.mapcalc expr="prec_2 = rand(0, 450)"
-r.mapcalc expr="prec_3 = rand(0, 320)"
-r.mapcalc expr="prec_4 = rand(0, 510)"
-r.mapcalc expr="prec_5 = rand(0, 300)"
-r.mapcalc expr="prec_6 = rand(0, 650)"
+# Generate data
+r.mapcalc expr="prec_1 = rand(0, 550)" -s
+r.mapcalc expr="prec_2 = rand(0, 450)" -s
+r.mapcalc expr="prec_3 = rand(0, 320)" -s
+r.mapcalc expr="prec_4 = rand(0, 510)" -s
+r.mapcalc expr="prec_5 = rand(0, 300)" -s
+r.mapcalc expr="prec_6 = rand(0, 650)" -s
# The first @test
# We create the space time raster inputs and register the raster maps with absolute time interval
Modified: grass/branches/releasebranch_7_0/temporal/t.select/t.select.py
===================================================================
--- grass/branches/releasebranch_7_0/temporal/t.select/t.select.py 2014-11-30 11:38:27 UTC (rev 63298)
+++ grass/branches/releasebranch_7_0/temporal/t.select/t.select.py 2014-11-30 11:40:33 UTC (rev 63299)
@@ -44,6 +44,8 @@
import grass.temporal as tgis
import sys
+############################################################################
+
def main():
expression = options['expression']
Modified: grass/branches/releasebranch_7_0/temporal/t.select/test.t.select.sh
===================================================================
--- grass/branches/releasebranch_7_0/temporal/t.select/test.t.select.sh 2014-11-30 11:38:27 UTC (rev 63298)
+++ grass/branches/releasebranch_7_0/temporal/t.select/test.t.select.sh 2014-11-30 11:40:33 UTC (rev 63299)
@@ -1,7 +1,5 @@
#!/usr/bin/sh
-export GRASS_OVERWRITE=1
-
# Test for temporal algebra in LatLon location.
n1=`g.tempfile pid=1 -d`
n2=`g.tempfile pid=2 -d`
Modified: grass/branches/releasebranch_7_0/temporal/t.shift/t.shift.py
===================================================================
--- grass/branches/releasebranch_7_0/temporal/t.shift/t.shift.py 2014-11-30 11:38:27 UTC (rev 63298)
+++ grass/branches/releasebranch_7_0/temporal/t.shift/t.shift.py 2014-11-30 11:40:33 UTC (rev 63299)
@@ -2,11 +2,11 @@
# -*- coding: utf-8 -*-
############################################################################
#
-# MODULE: t.shift
-# AUTHOR(S): Soeren Gebbert
+# MODULE: t.shift
+# AUTHOR(S): Soeren Gebbert
#
-# PURPOSE: Temporally shift the maps of a space time dataset.
-# COPYRIGHT: (C) 2013 by the GRASS Development Team
+# PURPOSE: Temporally shift the maps of a space time dataset
+# COPYRIGHT: (C) 2013-2014 by the GRASS Development Team
#
# This program is free software under the GNU General Public
# License (version 2). Read the file COPYING that comes with GRASS
@@ -24,15 +24,9 @@
#% description: Name of an existing space time dataset
#%end
-#%option
-#% key: type
-#% type: string
-#% description: Type of the dataset, default is strds (space time raster dataset)
-#% required: no
+#%option G_OPT_T_TYPE
#% guidependency: input
#% guisection: Required
-#% options: strds, str3ds, stvds
-#% answer: strds
#%end
#%option
Modified: grass/branches/releasebranch_7_0/temporal/t.snap/t.snap.py
===================================================================
--- grass/branches/releasebranch_7_0/temporal/t.snap/t.snap.py 2014-11-30 11:38:27 UTC (rev 63298)
+++ grass/branches/releasebranch_7_0/temporal/t.snap/t.snap.py 2014-11-30 11:40:33 UTC (rev 63299)
@@ -2,10 +2,10 @@
# -*- coding: utf-8 -*-
############################################################################
#
-# MODULE: t.snap
+# MODULE: t.snap
# AUTHOR(S): Soeren Gebbert
#
-# PURPOSE: Temporally snap the maps of a space time dataset.
+# PURPOSE: Temporally snap the maps of a space time dataset.
# COPYRIGHT: (C) 2013 by the GRASS Development Team
#
# This program is free software under the GNU General Public
@@ -24,15 +24,9 @@
#% description: Name of an existing space time dataset
#%end
-#%option
-#% key: type
-#% type: string
-#% description: Type of the dataset, default is strds (space time raster dataset)
-#% required: no
+#%option G_OPT_STDS_TYPE
#% guidependency: input
#% guisection: Required
-#% options: strds, str3ds, stvds
-#% answer: strds
#%end
import grass.script as grass
Modified: grass/branches/releasebranch_7_0/temporal/t.support/t.support.py
===================================================================
--- grass/branches/releasebranch_7_0/temporal/t.support/t.support.py 2014-11-30 11:38:27 UTC (rev 63298)
+++ grass/branches/releasebranch_7_0/temporal/t.support/t.support.py 2014-11-30 11:40:33 UTC (rev 63299)
@@ -65,8 +65,9 @@
#% description: Update metadata information, temporal and spatial extent from registered maps
#%end
+
+import grass.script as grass
import grass.temporal as tgis
-import grass.script as grass
############################################################################
Modified: grass/branches/releasebranch_7_0/temporal/t.support/test.t.support.sh
===================================================================
--- grass/branches/releasebranch_7_0/temporal/t.support/test.t.support.sh 2014-11-30 11:38:27 UTC (rev 63298)
+++ grass/branches/releasebranch_7_0/temporal/t.support/test.t.support.sh 2014-11-30 11:40:33 UTC (rev 63299)
@@ -38,6 +38,7 @@
# @test the map update function
g.region s=0 n=80 w=0 e=120 b=0 t=50 res=20 res3=20
+
# Generate data
r.mapcalc --o expr="prec_1 = rand(0, 55)" -s
r.mapcalc --o expr="prec_2 = rand(0, 45)" -s
Modified: grass/branches/releasebranch_7_0/temporal/t.topology/t.topology.py
===================================================================
--- grass/branches/releasebranch_7_0/temporal/t.topology/t.topology.py 2014-11-30 11:38:27 UTC (rev 63298)
+++ grass/branches/releasebranch_7_0/temporal/t.topology/t.topology.py 2014-11-30 11:40:33 UTC (rev 63299)
@@ -2,11 +2,11 @@
# -*- coding: utf-8 -*-
############################################################################
#
-# MODULE: t.topology
-# AUTHOR(S): Soeren Gebbert
+# MODULE: t.topology
+# AUTHOR(S): Soeren Gebbert
#
-# PURPOSE: List temporal topology of a space time dataset
-# COPYRIGHT: (C) 2011 by the GRASS Development Team
+# PURPOSE: List temporal topology of a space time dataset
+# COPYRIGHT: (C) 2011-2014 by the GRASS Development Team
#
# This program is free software under the GNU General Public
# License (version 2). Read the file COPYING that comes with GRASS
Modified: grass/branches/releasebranch_7_0/temporal/t.vect.extract/test.t.vect.extract.layer.sh
===================================================================
--- grass/branches/releasebranch_7_0/temporal/t.vect.extract/test.t.vect.extract.layer.sh 2014-11-30 11:38:27 UTC (rev 63298)
+++ grass/branches/releasebranch_7_0/temporal/t.vect.extract/test.t.vect.extract.layer.sh 2014-11-30 11:40:33 UTC (rev 63299)
@@ -42,6 +42,6 @@
t.remove type=stvds input=prec_observer,test_extract_1,test_extract_2,test_extract_3
t.unregister type=vect maps=prec_observer:1,prec_observer:2,prec_observer:3,prec_observer:4,prec_observer:5,prec_observer:6
-g.remove vect=prec_observer
-g.mremove -f type=vect pattern=test_*
-g.remove rast=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6
+g.remove -f type=vect name=prec_observer
+g.remove -f type=vect pattern=test_*
+g.remove -f type=rast name=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6
Modified: grass/branches/releasebranch_7_0/temporal/t.vect.observe.strds/testsuite/test.t.vect.observe.strds.layer_bug.sh
===================================================================
--- grass/branches/releasebranch_7_0/temporal/t.vect.observe.strds/testsuite/test.t.vect.observe.strds.layer_bug.sh 2014-11-30 11:38:27 UTC (rev 63298)
+++ grass/branches/releasebranch_7_0/temporal/t.vect.observe.strds/testsuite/test.t.vect.observe.strds.layer_bug.sh 2014-11-30 11:40:33 UTC (rev 63299)
@@ -37,4 +37,4 @@
t.remove type=stvds input=prec_observer
#g.remove -f type=vect name=prec_observer
-g.remove -f type=rast pattern=test_prec_*
+#g.remove -f type=rast pattern="test_prec_*"
Modified: grass/branches/releasebranch_7_0/temporal/t.vect.observe.strds/testsuite/test.t.vect.observe.strds.relative.sh
===================================================================
--- grass/branches/releasebranch_7_0/temporal/t.vect.observe.strds/testsuite/test.t.vect.observe.strds.relative.sh 2014-11-30 11:38:27 UTC (rev 63298)
+++ grass/branches/releasebranch_7_0/temporal/t.vect.observe.strds/testsuite/test.t.vect.observe.strds.relative.sh 2014-11-30 11:40:33 UTC (rev 63299)
@@ -19,7 +19,7 @@
t.register -i input=precip_abs1 maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6 start=0 increment=1 unit=months
# The @test
-t.vect.observe.strds input=prec strds=precip_abs1 output=prec_observer vector=prec_observer
+t.vect.observe.strds input=prec strds=precip_abs1 output=prec_observer vector=prec_observer column=observation
v.info prec_observer
t.info type=stvds input=prec_observer
t.vect.list input=prec_observer
@@ -31,5 +31,5 @@
t.remove type=stvds input=prec_observer
t.unregister type=vect maps=prec_observer:1,prec_observer:2,prec_observer:3,prec_observer:4,prec_observer:5,prec_observer:6
-g.remove -f type=vect name=prec_observer,test_extract
-g.remove -f type=rast name=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6
+#g.remove -f type=vect name=prec_observer,test_extract
+#g.remove -f type=rast name=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6
Modified: grass/branches/releasebranch_7_0/temporal/t.vect.observe.strds/testsuite/test.t.vect.observe.strds.sh
===================================================================
--- grass/branches/releasebranch_7_0/temporal/t.vect.observe.strds/testsuite/test.t.vect.observe.strds.sh 2014-11-30 11:38:27 UTC (rev 63298)
+++ grass/branches/releasebranch_7_0/temporal/t.vect.observe.strds/testsuite/test.t.vect.observe.strds.sh 2014-11-30 11:40:33 UTC (rev 63299)
@@ -45,5 +45,5 @@
t.vect.db.select input=test_1_observer columns=cat,test1,test2,test3
# @postprocess
-t.remove -rf type=strds input=precip_abs1,precip_abs2
-t.remove -rf type=stvds input=prec_observer,test_1_observer
+#t.remove -rf type=strds input=precip_abs1,precip_abs2
+#t.remove -rf type=stvds input=prec_observer,test_1_observer
More information about the grass-commit
mailing list