r-lidar / lidR

Airborne LiDAR data manipulation and visualisation for forestry application
https://CRAN.R-project.org/package=lidR
GNU General Public License v3.0
587 stars 132 forks source link

use summary( ) or print( ) function report error #637

Closed zzk112233 closed 1 year ago

zzk112233 commented 1 year ago

Dear author: When I use summary() or print () to check point cloud basic information, R always reports error : Error in if (is.na(units)) "units" else units : argument is of length zero. Can you tell me how to end this error? Looking forward to your reply! Thank you~

Jean-Romain commented 1 year ago

Please report a minimal reproducible example

zzk112233 commented 1 year ago

Here is example:

library("lidR")
lidR 4.0.1 using 6 threads. Help on <gis.stackexchange.com>. Bug report on <github.com/r-lidar/lidR>.
las <- readLAS("G:\LiDAR数据\近自然经营LiDAR数据\预处理数据\裁切\YW\新建文件夹\0.02 pre_ YW01CKK_2022_12.las")
summary(las)
Error in if (is.na(units)) "units" else units :
argument is of length zero
print(las)
Error in if (is.na(units)) "units" else units :
argument is of length zero
Jean-Romain commented 1 year ago

Can you share the file or a subset of the file that allow to reproduce.

zzk112233 commented 1 year ago

Here is subset of the file

Jean-Romain commented 1 year ago

Fixed but your CRS seems invalid