qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.05k stars 2.92k forks source link

QGIS drops extra byte fields from laz (char and unsigned char) #56945

Open aritchie-usgs opened 3 months ago

aritchie-usgs commented 3 months ago

What is the bug or the crash?

When .laz files exported from Agisoft Metashape (2.1) with confidence values and normals are opened in QGIS, QGIS drops these values when it builds the copc. Cloudcompare properly loads them and allows visualization/manipulation.

I have attached a sample file exported from Metashape. These are the fields that disappear from the .laz upon import to QGIS:

Extra Byte Descriptions
  data type: 1 (unsigned char), name "confidence", description: "confidence values", scale: 1 (not set), offset: 0 (not set)
  data type: 2 (char), name "normal x", description: "X surface normal", scale: 0.00787402, offset: 0 (not set)
  data type: 2 (char), name "normal y", description: "Y surface normal", scale: 0.00787402, offset: 0 (not set)
  data type: 2 (char), name "normal z", description: "Z surface normal", scale: 0.00787402, offset: 0 (not set)

lowest_dense_Metashape_clip.zip

Steps to reproduce the issue

unzip pointcloud load into cloudcompare and observe that confidence and xyz normals are selectable as scalar fields load into QGIS and observe that these values are gone. You can also run lasinfo on the source file and the copc that QGIS produces and see that the data are missing (and the copc is 25% smaller).

Versions

QGIS version 3.36.0-Maidenhead QGIS code revision 09951dc0 Qt version 5.15.3 Python version 3.9.18 GDAL/OGR version 3.8.4 PROJ version 9.3.1 EPSG Registry database version v10.098 (2023-11-24) GEOS version 3.12.1-CAPI-1.18.1 SQLite version 3.41.1 PDAL version 2.6.0 PostgreSQL client version 16.1 SpatiaLite version 5.1.0 QWT version 6.1.6 QScintilla2 version 2.13.4 OS version Windows 10 Version 2009

Active Python plugins mapswipetool_plugin 1.2 processing_saga_nextgen 1.0.0 profiletool 4.2.6 quick_map_services 0.19.33 db_manager 0.1.20 grassprovider 2.12.99 MetaSearch 0.3.6 processing 2.12.99

Supported QGIS version

New profile

Additional context

Also tried the dev version, running OSGeo4W build of QGIS.

uclaros commented 4 days ago

This is an upstream issue. The supplied laz file is laz v 1.2 For extra bytes in laz < 1.3 to be properly read, PDAL needs to use the use_eb_vlr option of readers.las, which is not used by untwine. Until this is added to untwine, you can convert your file to laz 1.4