Skip to content

Commit 3b7627b

Browse files
committed
Fix #711
1 parent 6b63774 commit 3b7627b

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

R/las_check.R

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,20 @@ las_check.LAS = function(las, print = TRUE, ...)
165165

166166
.h1("Checking the data")
167167

168+
if (npoints(las) == 0)
169+
{
170+
.fail(glue::glue("0 point, cannot check this object. Aborting."))
171+
warnerr = list(
172+
messages = infos,
173+
warnings = warnings,
174+
errors = errors)
175+
176+
if (print)
177+
return(invisible(warnerr))
178+
else
179+
return(warnerr)
180+
}
181+
168182
.h2("Checking coordinates...")
169183

170184
.fail(rlas::is_defined_coordinates(data, "vector"))

0 commit comments

Comments
 (0)