Classify_poi : Only spatial polygons are supported #630
Replies: 4 comments 9 replies
-
Please provide a minimal reproducible example in the form of text copy pasted (no image). |
Beta Was this translation helpful? Give feedback.
-
I guess a minimal reproducible example would be library(lidR)
library(sf)
x = "..."
BAT <- st_read(dir_bat, quiet = T) # Building file (.shp)
ZI_SOL = readLAScatalog(x) # Las file from IGN (Test urban area of Manosque (04) in France) the file is declassified for tests
opt_output_files(ZI_SOL) <- paste0(tmpdir(),"/Bat_{XCENTER}_{YCENTER}_{ID}")
st_crs(BAT) <- st_crs(ZI_SOL)
ZI_BAT <- classify_poi(ZI_SOL, class = as.integer(6), roi = BAT ) Now I need some data to reproduce. |
Beta Was this translation helpful? Give feedback.
-
You can download the data here : https://wxs.ign.fr/mct8y415ma63eudk50qaf2bi/telechargement/prepackage/JEU-TEST_LIDARHD_PACK_17-05-2022$LIDARHD_1-0_HYB_JEU-TEST-DALLE-0923_6308-2021/file/LIDARHD_1-0_HYB_JEU-TEST-DALLE-0923_6308-2021.7z The building file is attched here. I removed the classification by using the extent (raster package) of the data and classify_poi (before the update). |
Beta Was this translation helpful? Give feedback.
-
The following worked fine. Again please provide a minimal reproducible code. Do not let met guess what code I should run to reproduce. library(lidR)
library(sf)
x = "lidR issues/issue 630/LIDARHD_1-0_HYB_JEU-TEST-DALLE-0923_6308-2021/"
dir_bat = "lidR issues/issue 630/BAT"
BAT <- st_read(dir_bat, quiet = T) # Building file (.shp)
ZI_SOL = readLAScatalog(x) # Las file from IGN (Test urban area of Manosque (04) in France) the file is declassified for tests
opt_chunk_buffer(ZI_SOL) <- 20
opt_chunk_size(ZI_SOL) <- 250
opt_laz_compression(ZI_LAS) = T
opt_output_files(ZI_SOL) <- paste0(tempdir(),"/Sol_{XCENTER}_{YCENTER}_{ID}")
plot(ZI_SOL, chunk = TRUE)
plot(BAT, add = T)
st_crs(BAT) <- st_crs(ZI_SOL)
ZI_BAT <- classify_poi(ZI_SOL, class = as.integer(6), roi = BAT ) |
Beta Was this translation helpful? Give feedback.
-
Hello,
I use lidR to produce DEM from lidar data.
I recently updated all my packages and now the function
classify_poi
, that I use to classify the buildings, doesn't work anymore. here's what I get :Usually it worked without any problem.
I tried to change the chunk size, the output DEM resolution, the
sf/sfc
orsp
format of the building file.Do you know where it come from ?
Usually it worked without any problem.
I tried to change the chunk size, the output DEM resolution, the sf/sfc or sp format of the building file.
Do you know where it come from ?
UPDATE : I use my scipt on two computer, it work in one of them so I think the problem comes from a package but i don't find wich one.
Beta Was this translation helpful? Give feedback.
All reactions