In the documentation of rasterize_terrain()
it says for shape
argument: "It can also be an sfc to define a polygon in which to perform the interpolation."
In my understanding this means that I can pass a catalog and some region as sfc to get a dtm for that region. However, this seems not to work. E.g.:
# A single file LAScatalog using data provided with the package LASfile <- system.file("extdata", "Megaplot.laz", package="lidR") ctg = readLAScatalog(LASfile) bbox <- st_bbox(ctg@data[1,]) dtm <- rasterize_terrain(ctg, res=1, shape= st_as_sfc(bbox))
outputs
Processing [==============================================================] 100% (1/1) eta: 0s
unable to find an inherited method for function ‘mosaic’ for signature ‘"SpatRaster", "missing"’Warning message:
An error occured during the automatic merge of 'catalog_apply'. Merging is impossible. A list has been returned.
Is this an error or am I understanding it wrong?
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4