Skip to content
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 fail (LASlib internal error) #38

Closed
jfbourdon opened this issue May 1, 2019 · 8 comments
Closed

readLAS fail (LASlib internal error) #38

jfbourdon opened this issue May 1, 2019 · 8 comments
Labels
wontfix Not reproducible or not fixable

Comments

@jfbourdon
Copy link

jfbourdon commented May 1, 2019

I recently updated lidR and I'm now unable to read LAS/LAZ files that worked perfectly before.
I was before on lidR (2.0.0), rlas (1.2.8) and R (3.4.3) and updated to lidR (2.0.2), rlas (1.3.2) and R (3.6.0).

The error that readLAS returns:

Error: LASlib internal error. See message above.
Error in C_reader(ifiles, ofile, select, filter, filter_wkt) :
  LASlib internal error. See message above.
@Jean-Romain
Copy link
Collaborator

Please show me which file are failing. In rlas 1.3.2 LASlib has been entirely updated but I did not notice any file I was not able to read.

@jfbourdon
Copy link
Author

Here is a small LAZ (link)

@Jean-Romain
Copy link
Collaborator

I cannot reproduce. Does the following work for you?

library(rlas)
read.las("~/Téléchargements/clip_LiDAR.laz")
read.lasheader("~/Téléchargements/clip_LiDAR.laz")

@Jean-Romain Jean-Romain transferred this issue from r-lidar/lidR May 2, 2019
@jfbourdon
Copy link
Author

Yes, using rlas directly works, but not lidR... I have tried uninstalling/reinstalling lidR without any success.

@Jean-Romain
Copy link
Collaborator

Jean-Romain commented May 2, 2019

No problem with lidR. It is not suprising to me since lidR is not related to this error. This comes from rlas. readLAS basically call rlas::read.las plus some checks on the content. So what you are describing is very weird. Please show me an exact copy of your code and your outputs with reprex

I tried with rlas 1.3.2, lidR 2.0.2, R 3.6.0 on Linux.

library(lidR)
readLAS("~/Téléchargements/clip_LiDAR.laz")
#> class        : LAS (LASF v1.2)
#> point format : 1
#> memory       : 999.3 Kb 
#> extent       :294923, 294943, 5281064, 5281084 (xmin, xmax, ymin, ymax)
#> coord. ref.  : +init=epsg:2949 +proj=tmerc +lat_0=0 +lon_0=-70.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs 
#> area         : 312.1502 m² (convex hull)
#> points       : 12599 points
#> density      : 40.36 points/m²
#> names        : X Y Z gpstime Intensity ReturnNumber NumberOfReturns ScanDirectionFlag EdgeOfFlightline Classification Synthetic_flag Keypoint_flag Withheld_flag ScanAngleRank UserData PointSourceID

Created on 2019-05-02 by the reprex package (v0.2.1)

@jfbourdon
Copy link
Author

It now works as it should. The problem was probably caused by a conflict between different versions of R and packages. Also, I was working inside a Rproject created with an other version of R and I was getting other error when trying to install packages. So the problem had probably nothing to do with rlas nor lidR.

@Jean-Romain Jean-Romain added the wontfix Not reproducible or not fixable label May 2, 2019
@jfbourdon jfbourdon reopened this May 2, 2019
@jfbourdon
Copy link
Author

jfbourdon commented May 2, 2019

I just found the real root cause by accident... the filepath and filename must not contain accent or other similar special caracter. In my case, I had a long path with some à and é. I remove those and the file is correctly read.

@Jean-Romain
Copy link
Collaborator

Well, accents should be supported. Look my path in previous post.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix Not reproducible or not fixable
Projects
None yet
Development

No branches or pull requests

2 participants