[GRASS-SVN] r46538 - grass/trunk/vector/v.in.lidar

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Jun 3 06:15:01 EDT 2011


Author: mmetz
Date: 2011-06-03 03:15:01 -0700 (Fri, 03 Jun 2011)
New Revision: 46538

Modified:
   grass/trunk/vector/v.in.lidar/main.c
Log:
add error handling

Modified: grass/trunk/vector/v.in.lidar/main.c
===================================================================
--- grass/trunk/vector/v.in.lidar/main.c	2011-06-03 09:21:43 UTC (rev 46537)
+++ grass/trunk/vector/v.in.lidar/main.c	2011-06-03 10:15:01 UTC (rev 46538)
@@ -219,6 +219,12 @@
     /* Open LAS file*/
     LAS_reader = LASReader_Create(in_opt->answer);
     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);
+    }
+
     LAS_srs = LASHeader_GetSRS(LAS_header);
 
     scale_x = LASHeader_GetScaleX(LAS_header);



More information about the grass-commit mailing list