[GRASS-SVN] r50795 - in grass/trunk/temporal: t.create t.remove
t.sample t.support t.topology tr.univar tv.list
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Feb 13 09:55:21 EST 2012
Author: huhabla
Date: 2012-02-13 06:55:21 -0800 (Mon, 13 Feb 2012)
New Revision: 50795
Modified:
grass/trunk/temporal/t.create/t.create.py
grass/trunk/temporal/t.remove/t.remove.py
grass/trunk/temporal/t.sample/test.t.sample.sh
grass/trunk/temporal/t.support/test.t.support.sh
grass/trunk/temporal/t.topology/test.t.topology.abstime.sh
grass/trunk/temporal/t.topology/test.t.topology.reltime.sh
grass/trunk/temporal/tr.univar/test.tr.univar.sh
grass/trunk/temporal/tv.list/test.tv.list.layer.sh
grass/trunk/temporal/tv.list/test.tv.list.sh
Log:
New semantic types. Maps are now removed from the temporal database
using t.unregister rasther than t.remove. Updated several tests to use
t.register and t.unregister.
Modified: grass/trunk/temporal/t.create/t.create.py
===================================================================
--- grass/trunk/temporal/t.create/t.create.py 2012-02-13 14:35:00 UTC (rev 50794)
+++ grass/trunk/temporal/t.create/t.create.py 2012-02-13 14:55:21 UTC (rev 50795)
@@ -35,8 +35,8 @@
#% description: The semantic type of the space time dataset
#% required: yes
#% multiple: no
-#% options: event, const, continuous
-#% answer: event
+#% options: min,max,sum,mean
+#% answer: mean
#%end
#%option
Modified: grass/trunk/temporal/t.remove/t.remove.py
===================================================================
--- grass/trunk/temporal/t.remove/t.remove.py 2012-02-13 14:35:00 UTC (rev 50794)
+++ grass/trunk/temporal/t.remove/t.remove.py 2012-02-13 14:55:21 UTC (rev 50795)
@@ -5,7 +5,7 @@
# MODULE: t.remove
# AUTHOR(S): Soeren Gebbert
#
-# PURPOSE: Remove space time or map dataset
+# PURPOSE: Remove space time datasets from the temporal database
# COPYRIGHT: (C) 2011 by the GRASS Development Team
#
# This program is free software under the GNU General Public
@@ -15,7 +15,7 @@
#############################################################################
#%module
-#% description: Remove space time or map datasets from temporal database
+#% description: Remove space time datasets from temporal database
#% keywords: spacetime
#% keywords: dataset
#% keywords: remove
@@ -24,7 +24,7 @@
#%option
#% key: input
#% type: string
-#% description: Name(s) of the space time or map dataset to be removed from the temporal database
+#% description: Name(s) of the space time dataset to be removed from the temporal database
#% required: no
#% multiple: yes
#%end
@@ -32,7 +32,7 @@
#%option
#% key: file
#% type: string
-#% description: Input file with raster map names, one per line
+#% description: Input file with dataset names, one per line
#% required: no
#% multiple: no
#%end
@@ -42,7 +42,7 @@
#% type: string
#% description: Type of the space time dataset, default is strds
#% required: no
-#% options: strds, str3ds, stvds, rast, rast3d, vect
+#% options: strds, str3ds, stvds
#% answer: strds
#%end
Modified: grass/trunk/temporal/t.sample/test.t.sample.sh
===================================================================
--- grass/trunk/temporal/t.sample/test.t.sample.sh 2012-02-13 14:35:00 UTC (rev 50794)
+++ grass/trunk/temporal/t.sample/test.t.sample.sh 2012-02-13 14:55:21 UTC (rev 50795)
@@ -55,11 +55,11 @@
t.create --o type=stvds temporaltype=absolute output=pnts_abs0 title="A test with vector input files" descr="A test with vector input files"
t.create --o type=stvds temporaltype=absolute output=pnts_abs1 title="A test with vector input files" descr="A test with vector input files"
-tr.register -i input=precip_abs0 file="${n1}" start="2001-01-01" increment="1 months"
+t.register type=rast -i input=precip_abs0 file="${n1}" start="2001-01-01" increment="1 months"
tr.list precip_abs0 -h
-tv.register input=pnts_abs0 file="${n2}" start=file end=file
+t.register type=vect input=pnts_abs0 file="${n2}" start=file end=file
tv.list pnts_abs0 -h
-tv.register input=pnts_abs1 file="${n3}" start=file end=file
+t.register type=vect input=pnts_abs1 file="${n3}" start=file end=file
tv.list pnts_abs1 -h
# The @test
@@ -71,11 +71,11 @@
# Test with temporal point data
-tr.register input=precip_abs0 file="${n1}" start="2001-01-01" increment="1 months"
+t.register type=rast input=precip_abs0 file="${n1}" start="2001-01-01" increment="1 months"
tr.list precip_abs0 -h
t.sample input=precip_abs0 samtype=stvds sample=pnts_abs0 -h
t.sample input=precip_abs0 samtype=stvds sample=pnts_abs1 -h
-t.remove type=rast input=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6
+t.unregister type=rast maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6
t.remove type=strds input=precip_abs0
t.remove type=stvds input=pnts_abs0,pnts_abs1
Modified: grass/trunk/temporal/t.support/test.t.support.sh
===================================================================
--- grass/trunk/temporal/t.support/test.t.support.sh 2012-02-13 14:35:00 UTC (rev 50794)
+++ grass/trunk/temporal/t.support/test.t.support.sh 2012-02-13 14:55:21 UTC (rev 50795)
@@ -1,15 +1,15 @@
# We create several space time raster datasets
# A simple space ime raster datasets creation and unpdate @test with absolute time
-t.create --v --o type=strds temporaltype=absolute output=precip_abs1 title="Test" descr="This is the 1 test strds" semantictype=event
+t.create --v --o type=strds temporaltype=absolute output=precip_abs1 title="Test" descr="This is the 1 test strds" semantictype=sum
t.info type=strds input=precip_abs1
-t.support --v type=strds input=precip_abs1 title="Test support" descr="This is the support test strds" semantictype=const
+t.support --v type=strds input=precip_abs1 title="Test support" descr="This is the support test strds" semantictype=mean
t.info type=strds input=precip_abs1
# A simple space ime raster datasets creation and update @test with relative time
-t.create --v --o type=strds temporaltype=relative output=precip_rel1 title="Test" descr="This is the 1 test strds" semantictype=event
+t.create --v --o type=strds temporaltype=relative output=precip_rel1 title="Test" descr="This is the 1 test strds" semantictype=min
t.info type=strds input=precip_rel1
-t.support --v type=strds input=precip_rel1 title="Test support" descr="This is the support test strds" semantictype=continuous
+t.support --v type=strds input=precip_rel1 title="Test support" descr="This is the support test strds" semantictype=max
t.info type=strds input=precip_rel1
t.remove --v type=strds input=precip_abs1,precip_rel1
Modified: grass/trunk/temporal/t.topology/test.t.topology.abstime.sh
===================================================================
--- grass/trunk/temporal/t.topology/test.t.topology.abstime.sh 2012-02-13 14:35:00 UTC (rev 50794)
+++ grass/trunk/temporal/t.topology/test.t.topology.abstime.sh 2012-02-13 14:55:21 UTC (rev 50795)
@@ -87,36 +87,36 @@
t.create --o type=strds temporaltype=absolute output=precip_abs title="A test with input files" descr="A test with input files"
t.create --o type=strds temporaltype=absolute output=maps title="A test with maps in input files" descr="A test with maps in input files"
-tr.register -i input=precip_abs file="${n1}" start="2001-01-01" increment="1 months"
+t.register type=rast -i input=precip_abs file="${n1}" start="2001-01-01" increment="1 months"
cat "${n1}"
t.topology input=precip_abs
t.topology -m input=precip_abs
-tr.register -i input=precip_abs file="${n2}" start=file
+t.register type=rast -i input=precip_abs file="${n2}"
cat "${n2}"
t.topology input=precip_abs
t.topology -m input=precip_abs
-tr.register -i input=precip_abs file="${n3}" start=file end=file
+t.register type=rast -i input=precip_abs file="${n3}"
cat "${n3}"
t.topology input=precip_abs
t.topology -m input=precip_abs
-tr.register -i input=precip_abs file="${n4}" start=file end=file
+t.register type=rast -i input=precip_abs file="${n4}"
cat "${n4}"
t.topology input=precip_abs
t.topology -m input=precip_abs
-tr.register -i input=precip_abs file="${n5}" start=file end=file
+t.register type=rast -i input=precip_abs file="${n5}"
cat "${n5}"
t.topology input=precip_abs
t.topology -m input=precip_abs
-tr.register -i input=maps file="${n6}" start=file end=file
+t.register type=rast -i input=maps file="${n6}"
cat "${n6}"
t.topology input=maps
t.topology -m input=maps
t.remove type=strds input=precip_abs,maps
-t.remove type=rast file="${n1}"
-t.remove type=rast input=A,B,C,D
+t.unregister type=rast file="${n1}"
+t.unregister type=rast maps=A,B,C,D
Modified: grass/trunk/temporal/t.topology/test.t.topology.reltime.sh
===================================================================
--- grass/trunk/temporal/t.topology/test.t.topology.reltime.sh 2012-02-13 14:35:00 UTC (rev 50794)
+++ grass/trunk/temporal/t.topology/test.t.topology.reltime.sh 2012-02-13 14:55:21 UTC (rev 50795)
@@ -74,31 +74,31 @@
t.create --o type=strds temporaltype=relative output=precip_rel_d title="A test with input files of unti days" descr="A test with input files"
t.create --o type=strds temporaltype=relative output=precip_rel_y title="A test with input files of unit years" descr="A test with input files"
-tr.register -i --v input=precip_rel_d file="${n1}" start=0 increment=1 unit=days
+t.register type=rast -i --v input=precip_rel_d file="${n1}" start=0 increment=1 unit=days
cat "${n1}"
t.topology input=precip_rel_d
t.topology -m input=precip_rel_d
-tr.register -i input=precip_rel_d file="${n2}" start=file unit=days
+t.register type=rast -i input=precip_rel_d file="${n2}" unit=days
cat "${n2}"
t.topology input=precip_rel_d
t.topology -m input=precip_rel_d
-tr.register -i input=precip_rel_d file="${n3}" start=file end=file unit=days
+t.register type=rast -i input=precip_rel_d file="${n3}" unit=days
cat "${n3}"
t.topology input=precip_rel_d
t.topology -m input=precip_rel_d
-tr.register -i input=precip_rel_y file="${n4}" start=file end=file unit=years
+t.register type=rast -i input=precip_rel_y file="${n4}" unit=years
cat "${n4}"
t.topology input=precip_rel_y
t.topology -m input=precip_rel_y
-tr.register -i input=precip_rel_y file="${n5}" start=file end=file unit=years
+t.register type=rast -i input=precip_rel_y file="${n5}" unit=years
cat "${n5}"
t.topology input=precip_rel_y
t.topology -m input=precip_rel_y
t.remove type=strds input=precip_rel_d
t.remove type=strds input=precip_rel_y
-t.remove type=rast file="${n1}"
+t.unregister type=rast file="${n1}"
Modified: grass/trunk/temporal/tr.univar/test.tr.univar.sh
===================================================================
--- grass/trunk/temporal/tr.univar/test.tr.univar.sh 2012-02-13 14:35:00 UTC (rev 50794)
+++ grass/trunk/temporal/tr.univar/test.tr.univar.sh 2012-02-13 14:55:21 UTC (rev 50795)
@@ -13,10 +13,10 @@
r.mapcalc --o expr="prec_6 = rand(0, 650)"
t.create --o type=strds temporaltype=absolute output=precip_abs1 title="A test" descr="A test"
-tr.register --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.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
tr.univar -he input=precip_abs1
-t.remove type=rast input=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6
+t.unregister type=rast maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6
t.remove type=strds input=precip_abs1
Modified: grass/trunk/temporal/tv.list/test.tv.list.layer.sh
===================================================================
--- grass/trunk/temporal/tv.list/test.tv.list.layer.sh 2012-02-13 14:35:00 UTC (rev 50794)
+++ grass/trunk/temporal/tv.list/test.tv.list.layer.sh 2012-02-13 14:55:21 UTC (rev 50795)
@@ -33,48 +33,48 @@
n5=`g.tempfile pid=5 -d`
cat > "${n1}" << EOF
-soils|1
-soils|2
-soils|3
-soils|4
-soils|5
-soils|6
+soils:1
+soils:2
+soils:3
+soils:4
+soils:5
+soils:6
EOF
cat > "${n2}" << EOF
-soils|1|2001-01-01
-soils|2|2001-02-01
-soils|3|2001-03-01
-soils|4|2001-04-01
-soils|5|2001-05-01
-soils|6|2001-06-01
+soils:1|2001-01-01
+soils:2|2001-02-01
+soils:3|2001-03-01
+soils:4|2001-04-01
+soils:5|2001-05-01
+soils:6|2001-06-01
EOF
cat > "${n3}" << EOF
-soils|1|2001-01-01|2001-04-01
-soils|2|2001-05-01|2001-07-01
-soils|3|2001-08-01|2001-10-01
-soils|4|2001-11-01|2002-01-01
-soils|5|2002-02-01|2002-04-01
-soils|6|2002-05-01|2002-07-01
+soils:1|2001-01-01|2001-04-01
+soils:2|2001-05-01|2001-07-01
+soils:3|2001-08-01|2001-10-01
+soils:4|2001-11-01|2002-01-01
+soils:5|2002-02-01|2002-04-01
+soils:6|2002-05-01|2002-07-01
EOF
cat > "${n4}" << EOF
-soils|1|2001-01-01|2001-07-01
-soils|2|2001-02-01|2001-04-01
-soils|3|2001-03-01|2001-04-01
-soils|4|2001-04-01|2001-06-01
-soils|5|2001-05-01|2001-06-01
-soils|6|2001-06-01|2001-07-01
+soils:1|2001-01-01|2001-07-01
+soils:2|2001-02-01|2001-04-01
+soils:3|2001-03-01|2001-04-01
+soils:4|2001-04-01|2001-06-01
+soils:5|2001-05-01|2001-06-01
+soils:6|2001-06-01|2001-07-01
EOF
cat > "${n5}" << EOF
-soils|1|2001-01-01|2001-03-11
-soils|2|2001-02-01|2001-04-01
-soils|3|2001-03-01|2001-06-02
-soils|4|2001-04-01|2001-04-01
-soils|5|2001-05-01|2001-05-01
-soils|6|2001-06-01|2001-07-01
+soils:1|2001-01-01|2001-03-11
+soils:2|2001-02-01|2001-04-01
+soils:3|2001-03-01|2001-06-02
+soils:4|2001-04-01|2001-04-01
+soils:5|2001-05-01|2001-05-01
+soils:6|2001-06-01|2001-07-01
EOF
t.create --o type=stvds temporaltype=absolute output=soils_abs1 title="A test with input files" descr="A test with input files"
@@ -84,38 +84,38 @@
t.create --o type=stvds temporaltype=absolute output=soils_abs5 title="A test with input files" descr="A test with input files"
# The first @test
-tv.register input=soils_abs1 file="${n1}" layer=file start="2001-01-01" increment="1 months"
+t.register type=vect input=soils_abs1 file="${n1}" start="2001-01-01" increment="1 months"
tv.list fs=" | " method=comma input=soils_abs1
tv.list -h input=soils_abs1
tv.list -h fs=" | " method=cols input=soils_abs1
tv.list -h fs=" | " method=delta input=soils_abs1
tv.list -h fs=" | " method=deltagaps input=soils_abs1
-tv.register -i input=soils_abs2 file="${n2}" layer=file start=file
+t.register type=vect -i input=soils_abs2 file="${n2}"
tv.list fs=" | " method=comma input=soils_abs2
tv.list -h input=soils_abs2
tv.list -h fs=" | " method=cols input=soils_abs2
tv.list -h fs=" | " method=delta input=soils_abs2
tv.list -h fs=" | " method=deltagaps input=soils_abs2
-tv.register -i input=soils_abs3 file="${n3}" layer=file start=file end=file
+t.register type=vect -i input=soils_abs3 file="${n3}"
tv.list fs=" | " method=comma input=soils_abs3
tv.list -h fs=" | " method=delta input=soils_abs3
tv.list -h fs=" | " method=deltagaps input=soils_abs3
-tv.register -i input=soils_abs4 file="${n4}" layer=file start=file end=file
+t.register type=vect -i input=soils_abs4 file="${n4}"
tv.list fs=" | " method=comma input=soils_abs4
tv.list -h fs=" | " method=delta input=soils_abs4
tv.list -h fs=" | " method=deltagaps input=soils_abs4
-tv.register -i input=soils_abs5 file="${n5}" layer=file start=file end=file
+t.register type=vect -i input=soils_abs5 file="${n5}"
tv.list fs=" | " method=comma input=soils_abs5
tv.list -h input=soils_abs5
tv.list -h fs=" | " method=cols input=soils_abs5
tv.list -h fs=" | " method=delta input=soils_abs5
tv.list -h fs=" | " method=deltagaps input=soils_abs5
-t.remove type=vect input=soils:1,soils:2,soils:3,soils:4,soils:5,soils:6
+t.unregister type=vect maps=soils:1,soils:2,soils:3,soils:4,soils:5,soils:6
t.remove type=stvds input=soils_abs1,soils_abs2,soils_abs3,soils_abs4,soils_abs5
g.remove vect=soil_orig,soils
Modified: grass/trunk/temporal/tv.list/test.tv.list.sh
===================================================================
--- grass/trunk/temporal/tv.list/test.tv.list.sh 2012-02-13 14:35:00 UTC (rev 50794)
+++ grass/trunk/temporal/tv.list/test.tv.list.sh 2012-02-13 14:55:21 UTC (rev 50795)
@@ -70,36 +70,36 @@
t.create --o type=stvds temporaltype=absolute output=lidar_abs5 title="A test with input files" descr="A test with input files"
# The first @test
-tv.register input=lidar_abs1 file="${n1}" start="2001-01-01" increment="1 months"
+t.register type=vect input=lidar_abs1 file="${n1}" start="2001-01-01" increment="1 months"
tv.list fs=" | " method=comma input=lidar_abs1
tv.list -h input=lidar_abs1
tv.list -h fs=" | " method=cols input=lidar_abs1
tv.list -h fs=" | " method=delta input=lidar_abs1
tv.list -h fs=" | " method=deltagaps input=lidar_abs1
-tv.register -i input=lidar_abs2 file="${n2}" start=file
+t.register type=vect -i input=lidar_abs2 file="${n2}"
tv.list fs=" | " method=comma input=lidar_abs2
tv.list -h input=lidar_abs2
tv.list -h fs=" | " method=cols input=lidar_abs2
tv.list -h fs=" | " method=delta input=lidar_abs2
tv.list -h fs=" | " method=deltagaps input=lidar_abs2
-tv.register -i input=lidar_abs3 file="${n3}" start=file end=file
+t.register type=vect -i input=lidar_abs3 file="${n3}"
tv.list fs=" | " method=comma input=lidar_abs3
tv.list -h fs=" | " method=delta input=lidar_abs3
tv.list -h fs=" | " method=deltagaps input=lidar_abs3
-tv.register -i input=lidar_abs4 file="${n4}" start=file end=file
+t.register type=vect -i input=lidar_abs4 file="${n4}"
tv.list fs=" | " method=comma input=lidar_abs4
tv.list -h fs=" | " method=delta input=lidar_abs4
tv.list -h fs=" | " method=deltagaps input=lidar_abs4
-tv.register -i input=lidar_abs5 file="${n5}" start=file end=file
+t.register type=vect -i input=lidar_abs5 file="${n5}"
tv.list fs=" | " method=comma input=lidar_abs5
tv.list -h input=lidar_abs5
tv.list -h fs=" | " method=cols input=lidar_abs5
tv.list -h fs=" | " method=delta input=lidar_abs5
tv.list -h fs=" | " method=deltagaps input=lidar_abs5
-t.remove type=vect input=lidar_1,lidar_2,lidar_3,lidar_4,lidar_5,lidar_6
+t.unregister type=vect maps=lidar_1,lidar_2,lidar_3,lidar_4,lidar_5,lidar_6
t.remove type=stvds input=lidar_abs1,lidar_abs2,lidar_abs3,lidar_abs4,lidar_abs5
More information about the grass-commit
mailing list