-
-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rasterize_terrain() with sfc shape #558
Comments
I think both ! First this is an error, it should work and actually it is related to the fact you are processing a single file. It is reproductible without LASfile <- system.file("extdata", "Megaplot.laz", package="lidR")
ctg = readLAScatalog(LASfile)
chm = rasterize_canopy(ctg, 1, p2r()) Second, your example seems useless to me. Please exaplain what you have in mind when using |
Fixed |
Ok, so my initial intention was to skip the step to clip the catalog ( e.g. ctg <- readLAScatalog(folder)
# get area as bbox from one of the las files
bbox <- st_bbox(ctg@data[1,])
dtm <- rasterize_terrain(ctg, res=1, shape= st_as_sfc(bbox)) this results in Processing [-------------------------------] 0% (1/49588) eta: 8d
#> Error: subscript out of bounds |
That makes sense and looks like a perfectly valid use of the argument ctg$processed = FALSE
ctg$processed[1] = TRUE
dtm <- rasterize_terrain(ctg)
Fixed. Especially it did not behave as expected. Thank you for reporting |
In the documentation of
rasterize_terrain()
it says forshape
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.:
outputs
Is this an error or am I understanding it wrong?
The text was updated successfully, but these errors were encountered: