test.t.vect.observe.strds.layer_bug.sh 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #!/bin/sh
  2. # Here we test the limit of the number of layers
  3. # @preprocess
  4. # The region setting should work for UTM and LL test locations
  5. g.region s=0 n=80 w=0 e=120 b=0 t=50 res=10 res3=10 -p3
  6. MAP_LIST="map_list.txt"
  7. rm ${MAP_LIST}
  8. count=1
  9. while [ $count -lt 500 ]; do
  10. name="test_prec_${count}"
  11. r.mapcalc --o expr="${name} = ${count}"
  12. echo ${name} >> ${MAP_LIST}
  13. count=$((count + 1))
  14. done
  15. v.random --o output=prec n=5 seed=1
  16. t.create --o type=strds temporaltype=absolute output=precip_abs1 title="A test" descr="A test"
  17. t.register -i input=precip_abs1 file=${MAP_LIST} start="2001-01-01 00:00:00" increment="1 hours"
  18. # The @test
  19. t.vect.observe.strds input=prec strds=precip_abs1 output=prec_observer vector=prec_observer column="test_val"
  20. v.info prec_observer
  21. t.info type=stvds input=prec_observer
  22. t.vect.list input=prec_observer
  23. t.vect.db.select input=prec_observer
  24. # @postprocess
  25. t.unregister type=rast file=${MAP_LIST}
  26. t.remove type=strds input=precip_abs1
  27. t.remove type=stvds input=prec_observer
  28. g.remove vect=prec_observer
  29. g.mremove -f rast=test_prec_*