QGIS Point Cloud – Loading LAZ Point Cloud in QGIS Error: Invalid Data Source

lazpoint cloudqgis

I have problems opening a point cloud laz file in QGIS 3.34.0 Prizren on Win 10, PDAL version 2.5.5, Python version 3.9.5. I have older "good" laz-files that I have no trouble opening in QGIS (simply drag and drop), but with newer, "bad" files, I get the error message:

Invalid Data Source :
[my_path]/2682500_1250000.laz
is not a valid or recognized data source, error: "readers.las: Global
encoding WKT flag not set for point format 6 – 10."

For testing purpose, I can share a "good" and a "bad" file: https://drive.switch.ch/index.php/s/ylDsytDAvaB4G5r

I also tried loading via datasource manager, with the same result. I am aware of these solutions: https://gis.stackexchange.com/a/428091/88814

However, I was not able to adapt and run the code accordingly. I used this code in the Python console:

filename = "C:/Users/[path]/laz/bad_file.laz"
f = open(filename, "rb+")
f.seek(6)
f.write(bytes([17, 0, 0, 0]));
f.close()

When I run it, nothing happens. How can I load this file correctly into QGIS?

Running the code above in the Python console does not result in any action:
enter image description here


Edit: I tried the solution proposed below using CloudCompare step by step, with no success, I still get the same error message. The file shared by user @Pointdump who proposed the solution opens fine in QGIS, however. So there must be some setting I do wrong? When I save the loaded point cloud from CloudCompare, I get an export dialog. I accept all default options – maybe I have to do some changes? See screenshot:

enter image description here

Best Answer

I also couldn't load "bad" into QGIS 3.22.16. I drag-n-dropped into and then re-saved "bad" in CloudCompare, compressed to LAZ in Las2Las(this step probably unneccessary), and then it loads into QGIS. Note: Accept defaults in the "Coordinates are too big" dialogue box. When CloudCompare re-saves it will return those original coordinates.

Step 1: Drag-n-drop "bad_file.laz" into CloudCompare. Accept defaults.

Step 2: Select "bad_file-Cloud".

Step 3: File Menu >> Save

Step 4: Accept default file name "bad_file-Cloud.las".

Step 5: Click Save. Accept default of Original Resolution.

enter image description here

enter image description here

enter image description here

Related Question