[Liblas-commits] hg: actually fail if we can't write points because they are inva...

liblas-commits at liblas.org liblas-commits at liblas.org
Fri Mar 5 15:08:21 EST 2010


changeset c34ee6db25b2 in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=c34ee6db25b2
summary: actually fail if we can't write points because they are invalid #169

diffstat:

 apps/las2las.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 5a1467085fe5 -r c34ee6db25b2 apps/las2las.c
--- a/apps/las2las.c	Fri Mar 05 13:14:54 2010 -0600
+++ b/apps/las2las.c	Fri Mar 05 14:02:50 2010 -0600
@@ -1087,8 +1087,12 @@
             p = LASReader_GetNextPoint(reader);
             continue;
         }
-        LASWriter_WritePoint(writer,p);
-
+        ret = LASWriter_WritePoint(writer,p);
+        
+        if (ret == LE_Warning) {
+            LASError_Print("Unable to write invalid point.  Use --skip_invalid to avoid this problem (you will loose data in the translation)");
+            exit(1);
+        }
         p  = LASReader_GetNextPoint(reader);
         i++;
     }


More information about the Liblas-commits mailing list