[GRASS-SVN] r51251 - in grass/trunk/temporal: . t.rast3d.list
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Apr 4 05:39:32 EDT 2012
Author: huhabla
Date: 2012-04-04 02:39:32 -0700 (Wed, 04 Apr 2012)
New Revision: 51251
Added:
grass/trunk/temporal/t.rast3d.list/
grass/trunk/temporal/t.rast3d.list/Makefile
grass/trunk/temporal/t.rast3d.list/t.rast3d.list.html
grass/trunk/temporal/t.rast3d.list/t.rast3d.list.py
grass/trunk/temporal/t.rast3d.list/test.t.rast3d.list.sh
Removed:
grass/trunk/temporal/t.rast3d.list/Makefile
grass/trunk/temporal/t.rast3d.list/test.tr3.list.sh
grass/trunk/temporal/t.rast3d.list/tr3.list.html
grass/trunk/temporal/t.rast3d.list/tr3.list.py
grass/trunk/temporal/tr3.list/
Log:
Renaming tr3.list to meet new naming scheme
Deleted: grass/trunk/temporal/t.rast3d.list/Makefile
===================================================================
--- grass/trunk/temporal/tr3.list/Makefile 2012-04-04 09:31:44 UTC (rev 51249)
+++ grass/trunk/temporal/t.rast3d.list/Makefile 2012-04-04 09:39:32 UTC (rev 51251)
@@ -1,7 +0,0 @@
-MODULE_TOPDIR = ../../
-
-PGM = tr3.list
-
-include $(MODULE_TOPDIR)/include/Make/Script.make
-
-default: script $(TEST_DST)
Copied: grass/trunk/temporal/t.rast3d.list/Makefile (from rev 51250, grass/trunk/temporal/tr3.list/Makefile)
===================================================================
--- grass/trunk/temporal/t.rast3d.list/Makefile (rev 0)
+++ grass/trunk/temporal/t.rast3d.list/Makefile 2012-04-04 09:39:32 UTC (rev 51251)
@@ -0,0 +1,7 @@
+MODULE_TOPDIR = ../../
+
+PGM = t.rast3d.list
+
+include $(MODULE_TOPDIR)/include/Make/Script.make
+
+default: script $(TEST_DST)
Copied: grass/trunk/temporal/t.rast3d.list/t.rast3d.list.html (from rev 51250, grass/trunk/temporal/tr3.list/t.rast3d.list.html)
===================================================================
Copied: grass/trunk/temporal/t.rast3d.list/t.rast3d.list.py (from rev 51250, grass/trunk/temporal/tr3.list/t.rast3d.list.py)
===================================================================
--- grass/trunk/temporal/t.rast3d.list/t.rast3d.list.py (rev 0)
+++ grass/trunk/temporal/t.rast3d.list/t.rast3d.list.py 2012-04-04 09:39:32 UTC (rev 51251)
@@ -0,0 +1,96 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+############################################################################
+#
+# MODULE: t.rast3d.list
+# AUTHOR(S): Soeren Gebbert
+#
+# PURPOSE: List registered maps of a space time raster3d dataset
+# 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 GRASS
+# for details.
+#
+#############################################################################
+
+#%module
+#% description: List registered maps of a space time raster3d dataset
+#% keywords: dataset
+#% keywords: spacetime
+#% keywords: raster3d
+#% keywords: list
+#%end
+
+#%option G_OPT_STR3DS_INPUT
+#%end
+
+#%option
+#% key: order
+#% type: string
+#% description: Order the space time dataset by category.
+#% required: no
+#% multiple: yes
+#% options: id,name,creator,mapset,temporal_type,creation_time,start_time,end_time,north,south,west,east,nsres,tbres,ewres,cols,rows,depths,number_of_cells,min,max
+#% answer: start_time
+#%end
+
+#%option
+#% key: columns
+#% type: string
+#% description: Select columns to be printed to stdout
+#% required: no
+#% multiple: yes
+#% options: id,name,creator,mapset,temporal_type,creation_time,start_time,end_time,north,south,west,east,nsres,tbres,ewres,cols,rows,depths,number_of_cells,min,max
+#% answer: name,mapset,start_time,end_time
+#%end
+
+#%option G_OPT_T_WHERE
+#%end
+
+#%option
+#% key: method
+#% type: string
+#% description: Which method should be used for data listing
+#% required: no
+#% multiple: no
+#% options: cols,comma,delta,deltagaps,gran
+#% answer: cols
+#%end
+
+#%option
+#% key: fs
+#% type: string
+#% description: The field separator character between the output columns, default is tabular "\t"
+#% required: no
+#%end
+
+#%flag
+#% key: h
+#% description: Print column names
+#%end
+
+import grass.script as grass
+import grass.temporal as tgis
+
+############################################################################
+
+def main():
+
+ # Get the options
+ input = options["input"]
+ columns = options["columns"]
+ order = options["order"]
+ where = options["where"]
+ separator = options["fs"]
+ method = options["method"]
+ header = flags["h"]
+
+ # Make sure the temporal database exists
+ tgis.create_temporal_database()
+
+ tgis.list_maps_of_stds("str3ds", input, columns, order, where, separator, method, header)
+
+if __name__ == "__main__":
+ options, flags = grass.parser()
+ main()
Copied: grass/trunk/temporal/t.rast3d.list/test.t.rast3d.list.sh (from rev 51250, grass/trunk/temporal/tr3.list/test.t.rast3d.list.sh)
===================================================================
--- grass/trunk/temporal/t.rast3d.list/test.t.rast3d.list.sh (rev 0)
+++ grass/trunk/temporal/t.rast3d.list/test.t.rast3d.list.sh 2012-04-04 09:39:32 UTC (rev 51251)
@@ -0,0 +1,106 @@
+# This is a test to list raster maps of a space time raster dataset
+
+# We need to set a specific region in the
+# @preprocess step of this test. We generate
+# raster with r.mapcalc and create a space time raster datasets
+# 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
+
+r3.mapcalc --o expr="vol_1 = rand(0, 550)"
+r3.mapcalc --o expr="vol_2 = rand(0, 450)"
+r3.mapcalc --o expr="vol_3 = rand(0, 320)"
+r3.mapcalc --o expr="vol_4 = rand(0, 510)"
+r3.mapcalc --o expr="vol_5 = rand(0, 300)"
+r3.mapcalc --o expr="vol_6 = rand(0, 650)"
+
+n1=`g.tempfile pid=1 -d`
+n2=`g.tempfile pid=2 -d`
+n3=`g.tempfile pid=3 -d`
+n4=`g.tempfile pid=4 -d`
+n5=`g.tempfile pid=5 -d`
+
+cat > "${n1}" << EOF
+vol_1
+vol_2
+vol_3
+vol_4
+vol_5
+vol_6
+EOF
+
+cat > "${n2}" << EOF
+vol_1|2001-01-01
+vol_2|2001-02-01
+vol_3|2001-03-01
+vol_4|2001-04-01
+vol_5|2001-05-01
+vol_6|2001-06-01
+EOF
+
+cat > "${n3}" << EOF
+vol_1|2001-01-01|2001-04-01
+vol_2|2001-05-01|2001-07-01
+vol_3|2001-08-01|2001-10-01
+vol_4|2001-11-01|2002-01-01
+vol_5|2002-02-01|2002-04-01
+vol_6|2002-05-01|2002-07-01
+EOF
+
+cat > "${n4}" << EOF
+vol_1|2001-01-01|2001-07-01
+vol_2|2001-02-01|2001-04-01
+vol_3|2001-03-01|2001-04-01
+vol_4|2001-04-01|2001-06-01
+vol_5|2001-05-01|2001-06-01
+vol_6|2001-06-01|2001-07-01
+EOF
+
+cat > "${n5}" << EOF
+vol_1|2001-01-01|2001-03-11
+vol_2|2001-02-01|2001-04-01
+vol_3|2001-03-01|2001-06-02
+vol_4|2001-04-01|2001-04-01
+vol_5|2001-05-01|2001-05-01
+vol_6|2001-06-01|2001-07-01
+EOF
+
+t.create --o type=str3ds temporaltype=absolute output=volume_abs1 title="A test with input files" descr="A test with input files"
+t.create --o type=str3ds temporaltype=absolute output=volume_abs2 title="A test with input files" descr="A test with input files"
+t.create --o type=str3ds temporaltype=absolute output=volume_abs3 title="A test with input files" descr="A test with input files"
+t.create --o type=str3ds temporaltype=absolute output=volume_abs4 title="A test with input files" descr="A test with input files"
+t.create --o type=str3ds temporaltype=absolute output=volume_abs5 title="A test with input files" descr="A test with input files"
+
+# The first @test
+t.register type=rast3d input=volume_abs1 file="${n1}" start="2001-01-01" increment="1 months"
+t.rast3d.list fs=" | " method=comma input=volume_abs1
+t.rast3d.list -h input=volume_abs1
+t.rast3d.list -h fs=" | " method=cols input=volume_abs1
+t.rast3d.list -h fs=" | " method=delta input=volume_abs1
+t.rast3d.list -h fs=" | " method=deltagaps input=volume_abs1
+
+t.register -i type=rast3d input=volume_abs2 file="${n2}"
+t.rast3d.list fs=" | " method=comma input=volume_abs2
+t.rast3d.list -h input=volume_abs2
+t.rast3d.list -h fs=" | " method=cols input=volume_abs2
+t.rast3d.list -h fs=" | " method=delta input=volume_abs2
+t.rast3d.list -h fs=" | " method=deltagaps input=volume_abs2
+
+t.register -i type=rast3d input=volume_abs3 file="${n3}"
+t.rast3d.list fs=" | " method=comma input=volume_abs3
+t.rast3d.list -h fs=" | " method=delta input=volume_abs3
+t.rast3d.list -h fs=" | " method=deltagaps input=volume_abs3
+
+t.register -i type=rast3d input=volume_abs4 file="${n4}"
+t.rast3d.list fs=" | " method=comma input=volume_abs4
+t.rast3d.list -h fs=" | " method=delta input=volume_abs4
+t.rast3d.list -h fs=" | " method=deltagaps input=volume_abs4
+
+t.register -i type=rast3d input=volume_abs5 file="${n5}"
+t.rast3d.list fs=" | " method=comma input=volume_abs5
+t.rast3d.list -h input=volume_abs5
+t.rast3d.list -h fs=" | " method=cols input=volume_abs5
+t.rast3d.list -h fs=" | " method=delta input=volume_abs5
+t.rast3d.list -h fs=" | " method=deltagaps input=volume_abs5
+
+t.unregister type=rast3d maps=vol_1,vol_2,vol_3,vol_4,vol_5,vol_6
+t.remove type=str3ds input=volume_abs1,volume_abs2,volume_abs3,volume_abs4,volume_abs5
Deleted: grass/trunk/temporal/t.rast3d.list/test.tr3.list.sh
===================================================================
--- grass/trunk/temporal/tr3.list/test.tr3.list.sh 2012-04-04 09:31:44 UTC (rev 51249)
+++ grass/trunk/temporal/t.rast3d.list/test.tr3.list.sh 2012-04-04 09:39:32 UTC (rev 51251)
@@ -1,106 +0,0 @@
-# This is a test to list raster maps of a space time raster dataset
-
-# We need to set a specific region in the
-# @preprocess step of this test. We generate
-# raster with r.mapcalc and create a space time raster datasets
-# 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
-
-r3.mapcalc --o expr="vol_1 = rand(0, 550)"
-r3.mapcalc --o expr="vol_2 = rand(0, 450)"
-r3.mapcalc --o expr="vol_3 = rand(0, 320)"
-r3.mapcalc --o expr="vol_4 = rand(0, 510)"
-r3.mapcalc --o expr="vol_5 = rand(0, 300)"
-r3.mapcalc --o expr="vol_6 = rand(0, 650)"
-
-n1=`g.tempfile pid=1 -d`
-n2=`g.tempfile pid=2 -d`
-n3=`g.tempfile pid=3 -d`
-n4=`g.tempfile pid=4 -d`
-n5=`g.tempfile pid=5 -d`
-
-cat > "${n1}" << EOF
-vol_1
-vol_2
-vol_3
-vol_4
-vol_5
-vol_6
-EOF
-
-cat > "${n2}" << EOF
-vol_1|2001-01-01
-vol_2|2001-02-01
-vol_3|2001-03-01
-vol_4|2001-04-01
-vol_5|2001-05-01
-vol_6|2001-06-01
-EOF
-
-cat > "${n3}" << EOF
-vol_1|2001-01-01|2001-04-01
-vol_2|2001-05-01|2001-07-01
-vol_3|2001-08-01|2001-10-01
-vol_4|2001-11-01|2002-01-01
-vol_5|2002-02-01|2002-04-01
-vol_6|2002-05-01|2002-07-01
-EOF
-
-cat > "${n4}" << EOF
-vol_1|2001-01-01|2001-07-01
-vol_2|2001-02-01|2001-04-01
-vol_3|2001-03-01|2001-04-01
-vol_4|2001-04-01|2001-06-01
-vol_5|2001-05-01|2001-06-01
-vol_6|2001-06-01|2001-07-01
-EOF
-
-cat > "${n5}" << EOF
-vol_1|2001-01-01|2001-03-11
-vol_2|2001-02-01|2001-04-01
-vol_3|2001-03-01|2001-06-02
-vol_4|2001-04-01|2001-04-01
-vol_5|2001-05-01|2001-05-01
-vol_6|2001-06-01|2001-07-01
-EOF
-
-t.create --o type=str3ds temporaltype=absolute output=volume_abs1 title="A test with input files" descr="A test with input files"
-t.create --o type=str3ds temporaltype=absolute output=volume_abs2 title="A test with input files" descr="A test with input files"
-t.create --o type=str3ds temporaltype=absolute output=volume_abs3 title="A test with input files" descr="A test with input files"
-t.create --o type=str3ds temporaltype=absolute output=volume_abs4 title="A test with input files" descr="A test with input files"
-t.create --o type=str3ds temporaltype=absolute output=volume_abs5 title="A test with input files" descr="A test with input files"
-
-# The first @test
-t.register type=rast3d input=volume_abs1 file="${n1}" start="2001-01-01" increment="1 months"
-tr3.list fs=" | " method=comma input=volume_abs1
-tr3.list -h input=volume_abs1
-tr3.list -h fs=" | " method=cols input=volume_abs1
-tr3.list -h fs=" | " method=delta input=volume_abs1
-tr3.list -h fs=" | " method=deltagaps input=volume_abs1
-
-t.register -i type=rast3d input=volume_abs2 file="${n2}"
-tr3.list fs=" | " method=comma input=volume_abs2
-tr3.list -h input=volume_abs2
-tr3.list -h fs=" | " method=cols input=volume_abs2
-tr3.list -h fs=" | " method=delta input=volume_abs2
-tr3.list -h fs=" | " method=deltagaps input=volume_abs2
-
-t.register -i type=rast3d input=volume_abs3 file="${n3}"
-tr3.list fs=" | " method=comma input=volume_abs3
-tr3.list -h fs=" | " method=delta input=volume_abs3
-tr3.list -h fs=" | " method=deltagaps input=volume_abs3
-
-t.register -i type=rast3d input=volume_abs4 file="${n4}"
-tr3.list fs=" | " method=comma input=volume_abs4
-tr3.list -h fs=" | " method=delta input=volume_abs4
-tr3.list -h fs=" | " method=deltagaps input=volume_abs4
-
-t.register -i type=rast3d input=volume_abs5 file="${n5}"
-tr3.list fs=" | " method=comma input=volume_abs5
-tr3.list -h input=volume_abs5
-tr3.list -h fs=" | " method=cols input=volume_abs5
-tr3.list -h fs=" | " method=delta input=volume_abs5
-tr3.list -h fs=" | " method=deltagaps input=volume_abs5
-
-t.unregister type=rast3d maps=vol_1,vol_2,vol_3,vol_4,vol_5,vol_6
-t.remove type=str3ds input=volume_abs1,volume_abs2,volume_abs3,volume_abs4,volume_abs5
Deleted: grass/trunk/temporal/t.rast3d.list/tr3.list.html
===================================================================
Deleted: grass/trunk/temporal/t.rast3d.list/tr3.list.py
===================================================================
--- grass/trunk/temporal/tr3.list/tr3.list.py 2012-04-04 09:31:44 UTC (rev 51249)
+++ grass/trunk/temporal/t.rast3d.list/tr3.list.py 2012-04-04 09:39:32 UTC (rev 51251)
@@ -1,96 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-############################################################################
-#
-# MODULE: tr3.list
-# AUTHOR(S): Soeren Gebbert
-#
-# PURPOSE: List registered maps of a space time raster3d dataset
-# 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 GRASS
-# for details.
-#
-#############################################################################
-
-#%module
-#% description: List registered maps of a space time raster3d dataset
-#% keywords: dataset
-#% keywords: spacetime
-#% keywords: raster3d
-#% keywords: list
-#%end
-
-#%option G_OPT_STR3DS_INPUT
-#%end
-
-#%option
-#% key: order
-#% type: string
-#% description: Order the space time dataset by category.
-#% required: no
-#% multiple: yes
-#% options: id,name,creator,mapset,temporal_type,creation_time,start_time,end_time,north,south,west,east,nsres,tbres,ewres,cols,rows,depths,number_of_cells,min,max
-#% answer: start_time
-#%end
-
-#%option
-#% key: columns
-#% type: string
-#% description: Select columns to be printed to stdout
-#% required: no
-#% multiple: yes
-#% options: id,name,creator,mapset,temporal_type,creation_time,start_time,end_time,north,south,west,east,nsres,tbres,ewres,cols,rows,depths,number_of_cells,min,max
-#% answer: name,mapset,start_time,end_time
-#%end
-
-#%option G_OPT_T_WHERE
-#%end
-
-#%option
-#% key: method
-#% type: string
-#% description: Which method should be used for data listing
-#% required: no
-#% multiple: no
-#% options: cols,comma,delta,deltagaps,gran
-#% answer: cols
-#%end
-
-#%option
-#% key: fs
-#% type: string
-#% description: The field separator character between the output columns, default is tabular "\t"
-#% required: no
-#%end
-
-#%flag
-#% key: h
-#% description: Print column names
-#%end
-
-import grass.script as grass
-import grass.temporal as tgis
-
-############################################################################
-
-def main():
-
- # Get the options
- input = options["input"]
- columns = options["columns"]
- order = options["order"]
- where = options["where"]
- separator = options["fs"]
- method = options["method"]
- header = flags["h"]
-
- # Make sure the temporal database exists
- tgis.create_temporal_database()
-
- tgis.list_maps_of_stds("str3ds", input, columns, order, where, separator, method, header)
-
-if __name__ == "__main__":
- options, flags = grass.parser()
- main()
More information about the grass-commit
mailing list