[GRASS-SVN] r74141 - in grass-addons/grass7/raster/r.in.pdal: . testsuite

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Feb 28 09:12:05 PST 2019


Author: neteler
Date: 2019-02-28 09:12:05 -0800 (Thu, 28 Feb 2019)
New Revision: 74141

Added:
   grass-addons/grass7/raster/r.in.pdal/testsuite/
Modified:
   grass-addons/grass7/raster/r.in.pdal/r.in.pdal.py
   grass-addons/grass7/raster/r.in.pdal/testsuite/test_base_resolution.sh
Log:
r.in.pdal addon: testsuite added (derived from r.in.lidar testsuite)

Modified: grass-addons/grass7/raster/r.in.pdal/r.in.pdal.py
===================================================================
--- grass-addons/grass7/raster/r.in.pdal/r.in.pdal.py	2019-02-28 17:02:36 UTC (rev 74140)
+++ grass-addons/grass7/raster/r.in.pdal/r.in.pdal.py	2019-02-28 17:12:05 UTC (rev 74141)
@@ -464,10 +464,10 @@
             grass.fatal(_("r.in.xyz is broken..."))
 
         # metadata
-        empty_histroy = grass.tempfile()
-        if empty_histroy is None:
+        empty_history = grass.tempfile()
+        if empty_history is None:
             grass.fatal("Unable to create temporary files")
-        f = open(empty_histroy, 'w')
+        f = open(empty_history, 'w')
         f.close()
         grass.run_command(
                             'r.support',
@@ -474,7 +474,7 @@
                             map=outfile,
                             source1=infile,
                             description='generated by r.in.pdal',
-                            loadhistory=empty_histroy
+                            loadhistory=empty_history
                         )
         grass.run_command(
                             'r.support',
@@ -481,7 +481,7 @@
                             map=outfile,
                             history=os.environ['CMDLINE']
                         )
-        os.remove(empty_histroy)
+        os.remove(empty_history)
 
         # Cleanup
         grass.message(_("Cleaning up..."))

Modified: grass-addons/grass7/raster/r.in.pdal/testsuite/test_base_resolution.sh
===================================================================
--- grass/trunk/raster/r.in.lidar/testsuite/test_base_resolution.sh	2019-02-28 11:54:47 UTC (rev 74139)
+++ grass-addons/grass7/raster/r.in.pdal/testsuite/test_base_resolution.sh	2019-02-28 17:12:05 UTC (rev 74141)
@@ -3,7 +3,7 @@
 set -e
 set -x
 
-basename="test_rinlidar_"
+basename="test_rinpdal_"
 
 g.region n=20 s=10 e=30 w=20 res=2.5
 r.in.xyz data/points.txt output=${basename}base x=1 y=2 z=3 separator=comma
@@ -10,8 +10,9 @@
 
 echo "With base raster resolution matching current region"
 
-r.in.lidar input=data/points.las output=${basename}with_region \
-    base_raster=${basename}base method=min -o
+g.region align=${basename}base
+r.in.pdal input=data/points.las output=${basename}with_region \
+    method=min
 echo "Almost all in the following r.univar output should be zero"
 r.univar ${basename}with_region
 echo "Automatic test if there are only allowed values..."
@@ -21,9 +22,9 @@
 echo "With base raster resolution different from current region"
 
 g.region res=5
-
-r.in.lidar input=data/points.las output=${basename}with_base \
-    base_raster=${basename}base method=min -o -d
+g.region align=${basename}base
+r.in.pdal input=data/points.las output=${basename}with_base \
+    method=min
 echo "Almost all in the following r.univar output should be zero"
 r.univar ${basename}with_base
 echo "Automatic test if there are only allowed values..."
@@ -32,5 +33,5 @@
 
 echo "Test successful
 When running manually maps can be now removed with:
-  g.remove type=rast pattern='test_rinlidar_*' -f
+  g.remove type=rast pattern='test_rinpdal_*' -f
 However, the region was changed to whatever the test needed."



More information about the grass-commit mailing list