[GRASS-SVN] r51674 - in grass/trunk/temporal: t.rast.aggregate
t.rast.aggregate.ds t.rast.export t.rast.extract
t.rast.mapcalc t.vect.extract t.vect.observe.strds t.vect.what.strds
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed May 23 10:00:55 EDT 2012
Author: huhabla
Date: 2012-05-23 07:00:54 -0700 (Wed, 23 May 2012)
New Revision: 51674
Added:
grass/trunk/temporal/t.vect.extract/test.t.vect.extract.layer.sh
Modified:
grass/trunk/temporal/t.rast.aggregate.ds/t.rast.aggregate.ds.py
grass/trunk/temporal/t.rast.aggregate/t.rast.aggregate.py
grass/trunk/temporal/t.rast.export/t.rast.export.py
grass/trunk/temporal/t.rast.extract/t.rast.extract.py
grass/trunk/temporal/t.rast.mapcalc/t.rast.mapcalc.py
grass/trunk/temporal/t.vect.observe.strds/t.vect.observe.strds.py
grass/trunk/temporal/t.vect.observe.strds/test.t.vect.observe.strds.sh
grass/trunk/temporal/t.vect.what.strds/t.vect.what.strds.py
Log:
New t.vect.extract test and several command line option fixes
Modified: grass/trunk/temporal/t.rast.aggregate/t.rast.aggregate.py
===================================================================
--- grass/trunk/temporal/t.rast.aggregate/t.rast.aggregate.py 2012-05-23 12:56:03 UTC (rev 51673)
+++ grass/trunk/temporal/t.rast.aggregate/t.rast.aggregate.py 2012-05-23 14:00:54 UTC (rev 51674)
@@ -56,6 +56,7 @@
#%end
#%option G_OPT_R_BASE
+#% gisprompt:
#%end
#%flag
Modified: grass/trunk/temporal/t.rast.aggregate.ds/t.rast.aggregate.ds.py
===================================================================
--- grass/trunk/temporal/t.rast.aggregate.ds/t.rast.aggregate.ds.py 2012-05-23 12:56:03 UTC (rev 51673)
+++ grass/trunk/temporal/t.rast.aggregate.ds/t.rast.aggregate.ds.py 2012-05-23 14:00:54 UTC (rev 51674)
@@ -54,6 +54,7 @@
#%end
#%option G_OPT_R_BASE
+#% gisprompt:
#%end
#%flag
Modified: grass/trunk/temporal/t.rast.export/t.rast.export.py
===================================================================
--- grass/trunk/temporal/t.rast.export/t.rast.export.py 2012-05-23 12:56:03 UTC (rev 51673)
+++ grass/trunk/temporal/t.rast.export/t.rast.export.py 2012-05-23 14:00:54 UTC (rev 51674)
@@ -27,12 +27,10 @@
#% description: Name of a space time raster dataset archive
#%end
-#%option
+#%option G_OPT_M_DIR
#% key: workdir
-#% type: string
#% description: Path to the work directory, default is /tmp
#% required: no
-#% multiple: no
#% answer: /tmp
#%end
Modified: grass/trunk/temporal/t.rast.extract/t.rast.extract.py
===================================================================
--- grass/trunk/temporal/t.rast.extract/t.rast.extract.py 2012-05-23 12:56:03 UTC (rev 51673)
+++ grass/trunk/temporal/t.rast.extract/t.rast.extract.py 2012-05-23 14:00:54 UTC (rev 51674)
@@ -38,6 +38,7 @@
#%end
#%option G_OPT_R_BASE
+#% gisprompt:
#%end
#%option
Modified: grass/trunk/temporal/t.rast.mapcalc/t.rast.mapcalc.py
===================================================================
--- grass/trunk/temporal/t.rast.mapcalc/t.rast.mapcalc.py 2012-05-23 12:56:03 UTC (rev 51673)
+++ grass/trunk/temporal/t.rast.mapcalc/t.rast.mapcalc.py 2012-05-23 14:00:54 UTC (rev 51674)
@@ -43,6 +43,7 @@
#% key: base
#% type: string
#% description: The base name of the new created raster maps. This name will be extended with a numerical prefix
+#% gisprompt: NULL
#% required: yes
#% multiple: no
#%end
Added: grass/trunk/temporal/t.vect.extract/test.t.vect.extract.layer.sh
===================================================================
--- grass/trunk/temporal/t.vect.extract/test.t.vect.extract.layer.sh (rev 0)
+++ grass/trunk/temporal/t.vect.extract/test.t.vect.extract.layer.sh 2012-05-23 14:00:54 UTC (rev 51674)
@@ -0,0 +1,45 @@
+# Test the temporal and spatial sampling of raster maps by vector point maps
+# 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
+
+r.mapcalc --o expr="prec_1 = 100.0"
+r.mapcalc --o expr="prec_2 = 200.0"
+r.mapcalc --o expr="prec_3 = 300"
+r.mapcalc --o expr="prec_4 = 400"
+r.mapcalc --o expr="prec_5 = 500.0"
+r.mapcalc --o expr="prec_6 = 600.0"
+
+v.random --o -z output=prec n=5 seed=1
+
+t.create --o type=strds temporaltype=absolute output=precip_abs1 title="A test" descr="A test"
+t.register -i input=precip_abs1 maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6 start="2001-03-01 00:00:00" increment="1 months"
+
+# The @test
+t.vect.observe.strds input=prec strds=precip_abs1 output=prec_observer column=prec
+v.info prec_observer
+t.info type=stvds input=prec_observer
+t.vect.list input=prec_observer
+
+t.vect.extract --o input=prec_observer output=test_extract_1 base=test_1
+t.info type=stvds input=test_extract_1
+t.vect.univar input=test_extract_1 column=prec
+t.vect.extract --o input=prec_observer expr="prec > 400" output=test_extract_2 base=test_2
+t.info type=stvds input=test_extract_2
+t.vect.univar input=test_extract_2 column=prec
+t.vect.extract --o input=prec_observer where="start_time >= '2001-05-01'" expr="prec > 400" output=test_extract_3 base=test_3
+t.info type=stvds input=test_extract_3
+t.vect.univar input=test_extract_3 column=prec
+
+
+
+# @postprocess
+t.unregister type=rast maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6
+t.remove type=strds input=precip_abs1
+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 vect=test_*
+g.remove rast=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6
Property changes on: grass/trunk/temporal/t.vect.extract/test.t.vect.extract.layer.sh
___________________________________________________________________
Added: svn:executable
+ *
Modified: grass/trunk/temporal/t.vect.observe.strds/t.vect.observe.strds.py
===================================================================
--- grass/trunk/temporal/t.vect.observe.strds/t.vect.observe.strds.py 2012-05-23 12:56:03 UTC (rev 51673)
+++ grass/trunk/temporal/t.vect.observe.strds/t.vect.observe.strds.py 2012-05-23 14:00:54 UTC (rev 51674)
@@ -23,12 +23,8 @@
#%option G_OPT_STVDS_INPUT
#%end
-#%option
+#%option G_OPT_STRDS_INPUT
#% key: strds
-#% type: string
-#% description: The space time raster dataset to use
-#% required: yes
-#% multiple: no
#%end
#%option
Modified: grass/trunk/temporal/t.vect.observe.strds/test.t.vect.observe.strds.sh
===================================================================
--- grass/trunk/temporal/t.vect.observe.strds/test.t.vect.observe.strds.sh 2012-05-23 12:56:03 UTC (rev 51673)
+++ grass/trunk/temporal/t.vect.observe.strds/test.t.vect.observe.strds.sh 2012-05-23 14:00:54 UTC (rev 51674)
@@ -21,7 +21,6 @@
v.info prec_observer
t.info type=stvds input=prec_observer
t.vect.list input=prec_observer
-t.vect.extract input=prec_observer where="start_time >= '2001-05-01'" expr="prec > 400" output=test_extract base=test_
# @postprocess
t.unregister type=rast maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6
Modified: grass/trunk/temporal/t.vect.what.strds/t.vect.what.strds.py
===================================================================
--- grass/trunk/temporal/t.vect.what.strds/t.vect.what.strds.py 2012-05-23 12:56:03 UTC (rev 51673)
+++ grass/trunk/temporal/t.vect.what.strds/t.vect.what.strds.py 2012-05-23 14:00:54 UTC (rev 51674)
@@ -23,7 +23,7 @@
#%option G_OPT_STVDS_INPUT
#%end
-#%option G_OPT_STRDS_INPUT
+#%option G_OPT_STRDS_INPUT
#% key: strds
#%end
More information about the grass-commit
mailing list