Open zoeschindler opened 9 months ago
Thank you for the nice and easily reproducible example. I confirm the bug.
Minimal Reproducible example
las <- readLAS("issue 732/test.las")
st_crs(las) <- "EPSG:32632"
shp_lines <- st_read("~/Téléchargements/lidR issues/issue 732/test.shp")
shp_polys <- st_buffer(shp_lines, 0.025)
sfc <- sf::st_geometry(shp_polys)
sum(lidR:::point_in_polygons(las, sfc), na.rm = T)
#> TLS: 101111
#> ALS: 469881
By the way @zoeschindler do not use crs()
. Use st_crs()
. crs()
will be removed in next version to avoid problem on CRAN with old geospatial package (raster
, sp
)
Fixed with a temporary fix. My octree has a problem, so I disabled the octree and used another spatial indexing structure by default. I keep the issue open because I must repair the octree.
Hello, I have an issue with
classify_roi()
. I want to classify points within some polygons (derived from buffered lines) as a different class than the remaining points. But when I read my data in usingreadTLSLAS()
instead ofreadLAS()
, I get weird results. I made some dummy data: https://drive.google.com/file/d/1OOl4_vRYCIRSmx-Ey7cflgZv_s-y9l07/view?usp=sharingHere is the code:
Polygons:![grafik](https://github.com/r-lidar/lidR/assets/59600387/95ad3e67-42ab-4821-8175-083c27a1be1d)
Result when using![grafik](https://github.com/r-lidar/lidR/assets/59600387/43c930f9-d7d2-4acb-8603-32b0ff9f8f09)
readLAS()
(expected result):Result when using![grafik](https://github.com/r-lidar/lidR/assets/59600387/22b93866-13e1-4363-9aa9-9517e23cfdd7)
readTLSLAS()
(unexpected result):