[GRASS-SVN] r70299 - grass/branches/releasebranch_7_2/vector/v.in.lidar

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Jan 8 04:25:46 PST 2017


Author: martinl
Date: 2017-01-08 04:25:46 -0800 (Sun, 08 Jan 2017)
New Revision: 70299

Modified:
   grass/branches/releasebranch_7_2/vector/v.in.lidar/main.c
Log:
v.in.lidar: print error message when unable open input


Modified: grass/branches/releasebranch_7_2/vector/v.in.lidar/main.c
===================================================================
--- grass/branches/releasebranch_7_2/vector/v.in.lidar/main.c	2017-01-08 12:20:42 UTC (rev 70298)
+++ grass/branches/releasebranch_7_2/vector/v.in.lidar/main.c	2017-01-08 12:25:46 UTC (rev 70299)
@@ -348,11 +348,12 @@
     }
     /* Open LAS file*/
     LAS_reader = LASReader_Create(in_opt->answer);
+    if (LAS_reader == NULL)
+        G_fatal_error(_("Unable to open file <%s> as a LiDAR point cloud. %s"),
+                      in_opt->answer, LASError_GetLastErrorMsg());
     LAS_header = LASReader_GetHeader(LAS_reader);
-
     if  (LAS_header == NULL) {
-	G_fatal_error(_("Input file <%s> is not a LAS LiDAR point cloud"),
-	                in_opt->answer);
+        G_fatal_error(_("Unable to read LAS header of <%s>"), in_opt->answer);
     }
 
     LAS_srs = LASHeader_GetSRS(LAS_header);



More information about the grass-commit mailing list