v2.2.3
lidR v2.2.3
FIXES
-
This fix breaks backward compatibility. In
catalog_apply()
ifautomerge = TRUE
and the output contains alist
of strings the list was expected to be merged into a character vector. But actually, the raw list was returned, which was not the intended behavior. This appends withSpatial*
andsf
objects and withdata.frame
. This bug should not have affected too many people.opt_output_files(ctg) <- paste0(tempdir(), "/{ORIGINALFILENAME}") option <- list(automerge = TRUE) ret <- catalog_apply(ctg, sptest, .options = option) # now returns a vector print(ret) #> "/tmp/RtmpV4CQll/file38f1.txt" "/tmp/RtmpV4CQll/file38g.txt" "/tmp/RtmpV4CQll/file38h.txt" "/tmp/RtmpV4CQll/file38i.txt"
-
When using a
grid_*
function with aRasterLayer
used as layout, if the layout was not empty or full of NAs, the values of the layout were transferred to the NA cells of the output #318. -
lascheck()
no longer warns about "proj4string found but no CRS in the header". This was a false positive. Overall, CRS are better checked.
ENHANCEMENTS
-
opt_output_files()
now prints a message when using theORIGINALFILENAME
template with a chunk size that is not 0 to inform users that it does not make sense.opt_chunk_size(ctg) <- 800 opt_output_files(ctg) <- "{ORIGINALFILENAME}" #> ORIGINALFILENAME template has been used but the chunk size is not 0. This template makes sense only when processing by file.
-
Internally when building the chunks an informative error is now thrown when using the
ORIGINALFILENAME
template with a chunk size that is not 0 to inform users that it does not make sense instead of the former uninformative error,Error in eval(parse(text = text, keep.source = FALSE), envir) : objet 'ORIGINALFILENAME' not found
.#> Erreur : The template {ORIGINALFILENAME} makes sense only when processing by file (chunk size = 0). It is undefined otherwise.
-
When using a "by file" processing strategy + a buffer around each file, up to 9 files may be read. Internally the chunks (
LAScluster
) are now built in such a way that the first file read is the main one (and not one of the "buffer file"). This way, if the 9 files do not have the same scales and the same offsets, the main file has precedence over the other ones when rescaling and re-offsetting on-the-fly. This reduces the risk of incompatibilities and preserves the original pattern when processing a LAScatalog. -
grid_metrics()
now constructs aRasterBrick
in a better way and this reduces the risk of bugs with users' functions that sometimes return 0 length objects. TheRasterBrick
will now be properly filled withNAs
. -
lascheck()
now reports information if some points are flagged 'withheld', 'synthetic' or 'keypoint'. -
We moved the internal logic of chunk realignment with a raster from
catalog_apply()
to the internal functioncatalog_makecluster()
. This simplifies the source code, make it easier to maintain and test and will enable us to provide access, at the user level, to more internal functions in future releases.