You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
grid_canopy returns an error when the point extent (las argument) is larger than the target extent (res argument supplied as rasterLayer).
Erreur dans C_rasterize(las, layout, subcircle, 1L) :
C++ unexpected internal error in 'rasterize': point out of raster.
If the point cloud is cropped beforeward then the output is ok. The function grid_terrain runs without problem in any case.
Here is some code to reproduce this error:
# load data
data(las_chablais3, package="lidaRtRee")
# output layout (smaller extent than point cloud)output<-raster::raster(xmn=974330, xmx=974340, ymn=6581630, ymx=6581640, resolution=1)
# grid_terrain is ok lidR::grid_terrain(las_chablais3, output, lidR::tin())
# grid_canopy is ok if point cloud is first croppedlidR::grid_canopy(lidR::clip_roi(las_chablais3, raster::extent(output)), output, lidR::p2r())
# error in this caselidR::grid_canopy(las_chablais3, output, lidR::p2r())
The text was updated successfully, but these errors were encountered:
There we go. I removed this limitation. Let me now if it works as expected.
By the way I did not tag you in this discussion because your package is on the irstea's gitlab and did not know your name here. Please take note of what I wrote there. In practice it should not affect you but who knows... If you are using code like las@proj4string or lasctg@polygons[[1]]@area or writeRDS(las) please stop now and use dedicated functions
Thank you for the information regarding the upcoming changes in lidR and the fix in grid_canopy. And thank you very much for lidR. It has made my research so much easier...
Hi,
grid_canopy returns an error when the point extent (las argument) is larger than the target extent (res argument supplied as rasterLayer).
If the point cloud is cropped beforeward then the output is ok. The function
grid_terrain
runs without problem in any case.Here is some code to reproduce this error:
The text was updated successfully, but these errors were encountered: