1# This script tests v.what.rast3d 2 3# We specific a small region in the 4# @preprocess step 5# The region setting should work for UTM and LL test locations 6g.region s=0 n=70 w=0 e=100 b=0 t=50 res=10 res3=10 -p3 7 8# Create the volume and the sampling vector map 9r3.mapcalc --o expr="plume = double(col() + row() + depth())" 10# This is how the input data was created 11# v.random --o -z seed=1 output=random_points npoints=10 zmin=0 zmax=50 12# v.out.ascii --o format=standard input=random_points output=random_points.txt 13 14v.in.ascii --o -z format=standard input=random_points.txt output=random_points 15v.db.addtable --o map=random_points column="concentration double precision" 16 17# @test the voxel sampling with vector points 18v.what.rast3 map=random_points raster3d=plume column=concentration 19 20# Some data export commands for reference data creation and visual validation 21#v.out.ascii --o format=standard input=random_points output=random_points.ref 22#v.db.select map=random_points > random_points_db.ref 23#r3.out.vtk --o input=plume output=plume.vtk null=0 24#v.out.vtk --o -n input=random_points output=random_points.vtk 25