Skip to content

Commit

Permalink
Update readLAS.r
Browse files Browse the repository at this point in the history
unlocked .ptx and .txt for reading
  • Loading branch information
bi0m3trics committed Nov 1, 2024
1 parent c7be95c commit 0055fc5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/readLAS.r
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ read.las = function(files, select = "*", filter = "", transform = "")
read.lasheader = function(file)
{
valid <- file.exists(file)
supported <- tools::file_ext(file) %in% c("las", "laz", "LAS", "LAZ", "ply", "PLY")
supported <- tools::file_ext(file) %in% c("las", "laz", "LAS", "LAZ", "ply", "PLY", "ptx", "PTX", "txt", "TXT")
file <- enc2native(normalizePath(file))

if (!valid) stop("File not found", call. = F)
Expand All @@ -132,7 +132,7 @@ stream.las = function(ifiles, ofile = "", select = "*", filter = "", polygons =
ifiles <- enc2native(normalizePath(ifiles))
ofile <- enc2native(normalizePath(ofile, mustWork = FALSE))
valid <- file.exists(ifiles)
supported <- tools::file_ext(ifiles) %in% c("las", "laz", "LAS", "LAZ", "ply", "PLY")
supported <- tools::file_ext(ifiles) %in% c("las", "laz", "LAS", "LAZ", "ply", "PLY", "ptx", "PTX", "txt", "TXT")

if (!all(valid)) stop("File not found", call. = F)
if (!all(supported)) stop("File not supported", call. = F)
Expand Down

0 comments on commit 0055fc5

Please sign in to comment.