Skip to content

Commit

Permalink
v.what.rast3: Rename test folder and fix execution of test
Browse files Browse the repository at this point in the history
  • Loading branch information
echoix committed Jan 14, 2024
1 parent ddf374e commit 273eb7e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 41 deletions.
40 changes: 0 additions & 40 deletions vector/v.what.rast3/test_suite/random_points.txt

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,28 @@ r3.mapcalc --o expr="plume = double(col() + row() + depth())"
# v.random --o -z seed=1 output=random_points npoints=10 zmin=0 zmax=50
# v.out.ascii --o format=standard input=random_points output=random_points.txt

v.in.ascii --o -z format=standard input=random_points.txt output=random_points
v.in.ascii --o -z format=standard input=data/random_points.ref output=random_points
v.out.ascii --o format=standard input=random_points > data/random_points.txt
v.db.addtable --o map=random_points column="concentration double precision"

# @test the voxel sampling with vector points
v.what.rast3 map=random_points raster3d=plume column=concentration
v.db.select map=random_points > data/random_points_db.txt

# Some data export commands for reference data creation and visual validation
#v.out.ascii --o format=standard input=random_points output=random_points.ref
#v.db.select map=random_points > random_points_db.ref
#r3.out.vtk --o input=plume output=plume.vtk null=0
#v.out.vtk --o -n input=random_points output=random_points.vtk


cd data

for i in `ls *.txt` ; do
diff $i "`basename $i .txt`.ref" >> out.diff
done

CHAR_NUM=`cat out.diff | wc -c`

# Return as exit status 0 in case no diffs are found
exit $CHAR_NUM

0 comments on commit 273eb7e

Please sign in to comment.