-
-
Notifications
You must be signed in to change notification settings - Fork 133
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
readLAS crashes when reading ALS las files, after previously working #323
Comments
This file is read on my computer GNU/linux, |
Thanks for the quick reply. Both
I am sorry this is not reproducing. |
So it is a Windows or Mac specific issue. Please report your |
|
I read your file on Windows 7, R 3.5.3 32 bits rlas 1.3.5, lidR 2.2.2 x = rlas::read.las("H://issue46/e1054n0839.las") # ok
x = lidR::readLAS("H:/Téléchargements/issue46/e1054n0839.las") # ok Then on Windows 7, R 3.6.1 64 bits rlas 1.3.5, lidR 2.2.2 x = rlas::read.las("H://issue46/e1054n0839.las") # ok
x = lidR::readLAS("H:/Téléchargements/issue46/e1054n0839.las") # crash
x = rlas:::stream.las("H://Téléchargements/issue46/e1054n0839.las") # ok I confirm the bug. However on Windows tools to debug such kind of trouble do not exist so I don't know how and when I will be able to fix it. Other tests x = rlas:::stream.las("H://Téléchargements/issue46/e1054n0839.las") # ok
x = rlas:::C_reader("H:/Téléchargements/issue46/e1054n0839.las", "", select = "*", filter = "", filter_wkt = ) # ok I'm moving the question to data = rlas::read.las("H://Téléchargements/issue46/e1054n0839.las")
header= rlas::read.lasheader("H:/Téléchargements/issue46/e1054n0839.las")
las = lidR::LAS(data, header) # crash |
I spotted the issue header <- rlas::read.lasheader("H:/Téléchargements/issue46/e1054n0839.las")
header <- lidR::LASheader(header)
proj4string <- lidR::projection(header, asText = FALSE) # crash |
Minimal reproducible example wkt = "PROJCS[\"NAD83 (2011) / Conus Albers\",GEOGCS[\"GCS_NAD_1983_2011\",DATUM[\"D_NAD_1983_2011\",SPHEROID[\"GRS_1980\",6378137.0,298.257222101,AUTHORITY[\"EPSG\",7019]],AUTHORITY[\"EPSG\",1116]],PRIMEM[\"Greenwich\",0.0,AUTHORITY[\"EPSG\",8901]],UNIT[\"Degree\",0.0174532925199433,AUTHORITY[\"EPSG\",9102]],AUTHORITY[\"EPSG\",6318]],PROJECTION[\"Albers\",AUTHORITY[\"Esri\",43007]],PARAMETER[\"False_Easting\",0.0,AUTHORITY[\"Esri\",100001]],PARAMETER[\"False_Northing\",0.0,AUTHORITY[\"Esri\",100002]],PARAMETER[\"Central_Meridian\",-96.0,AUTHORITY[\"Esri\",100010]],PARAMETER[\"Standard_Parallel_1\",29.5,AUTHORITY[\"Esri\",100025]],PARAMETER[\"Standard_Parallel_2\",45.5,AUTHORITY[\"Esri\",100026]],PARAMETER[\"Latitude_Of_Origin\",23.0,AUTHORITY[\"Esri\",100021]],UNIT[\"Meter\",1.0,AUTHORITY[\"EPSG\",9001]]],VERTCS[\"NAVD_1988\",VDATUM[\"North_American_Vertical_Datum_1988\",AUTHORITY[\"EPSG\",5103]],PARAMETER[\"Vertical_Shift\",0.0,AUTHORITY[\"Esri\",100006]],PARAMETER[\"Direction\",1.0,AUTHORITY[\"Esri\",100007]],UNIT[\"Meter\",1.0,AUTHORITY[\"EPSG\",9001]],AUTHORITY[\"EPSG\",5703]]"
proj4 = rgdal::showP4(wkt)
crs = sp::CRS(proj4) # crash I'm closing the issue because it is not related to |
Fixed in v2.2.4 |
Thank you! |
For your information the conclusion is that the coordinate reference in your file is invalid. The issue went upstream to sp edzer/sp#75 then upstream again to libproj OSGeo/PROJ#2022 |
I have previously been using the
lidR
package and it was working great (great work!). However today I simply tried to open an airborne las file and the R sessions crashed. Here is the code, it ain't complicated.I have uploaded the example las file here.
This crashes the R session, either in R or R studio (grey bomb). I have tried to open multiple airborne LiDAR las files from this same dataset and they all crash R. However, when I open much larger las files (100 times larger) from a different project they load into R just fine. I have updated my R version to 3.6.2, updated to the latest version of
lidR
, checked my filepaths, had the las file on my C drive, and on an external hard drive, doesn't matter.I have checked the las files in other programs such as PDQ viewer and ArcGIS and they look fine and perform fine in those software programs. And like I said everything was working fine yesterday. I would also note that I had similar experience on a different computer, when I tried to
readLAS
or put into a las catalog the session crashed. I would be happy to learn that this behavior is due to something I, the user, is doing.The text was updated successfully, but these errors were encountered: