[GRASS-SVN] r54891 - grass/trunk/temporal/t.vect.observe.strds

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Feb 4 02:23:49 PST 2013


Author: huhabla
Date: 2013-02-04 02:23:49 -0800 (Mon, 04 Feb 2013)
New Revision: 54891

Added:
   grass/trunk/temporal/t.vect.observe.strds/test.t.vect.observe.strds.layer_bug.sh
Modified:
   grass/trunk/temporal/t.vect.observe.strds/t.vect.observe.strds.py
Log:
Test to check the layer number bug added


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	2013-02-04 09:08:16 UTC (rev 54890)
+++ grass/trunk/temporal/t.vect.observe.strds/t.vect.observe.strds.py	2013-02-04 10:23:49 UTC (rev 54891)
@@ -126,7 +126,6 @@
     vector_db = grass.vector.vector_db(input)
 
     # We copy the vector table and create the new layers
-
     if vector_db:
         # Use the first layer to copy the categories from
         layers = "1,"

Added: grass/trunk/temporal/t.vect.observe.strds/test.t.vect.observe.strds.layer_bug.sh
===================================================================
--- grass/trunk/temporal/t.vect.observe.strds/test.t.vect.observe.strds.layer_bug.sh	                        (rev 0)
+++ grass/trunk/temporal/t.vect.observe.strds/test.t.vect.observe.strds.layer_bug.sh	2013-02-04 10:23:49 UTC (rev 54891)
@@ -0,0 +1,36 @@
+#!/bin/sh
+# Here we test the limit of the number of layers
+# @preprocess 
+# 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
+
+MAP_LIST="map_list.txt"
+rm ${MAP_LIST}
+
+count=1
+while [ $count -lt 500 ]; do
+    name="test_prec_${count}"
+    r.mapcalc --o expr="${name} = ${count}"
+    echo ${name} >> ${MAP_LIST}
+    count=$((count + 1))
+done
+
+v.random --o 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  file=${MAP_LIST} start="2001-01-01 00:00:00" increment="1 hours"
+
+# The @test
+t.vect.observe.strds input=prec strds=precip_abs1 output=prec_observer vector=prec_observer column="test_val"
+v.info prec_observer
+t.info type=stvds input=prec_observer
+t.vect.list input=prec_observer
+t.vect.db.select input=prec_observer
+
+# @postprocess
+t.unregister type=rast file=${MAP_LIST}
+t.remove type=strds input=precip_abs1
+t.remove type=stvds input=prec_observer
+
+g.remove vect=prec_observer
+g.mremove -f rast=test_prec_*


Property changes on: grass/trunk/temporal/t.vect.observe.strds/test.t.vect.observe.strds.layer_bug.sh
___________________________________________________________________
Added: svn:executable
   + *



More information about the grass-commit mailing list