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

Integer Point Cloud Custom Attributes (LAS extra bytes) detected as floating point #54365

Closed
2 tasks done
ntw-au opened this issue Aug 25, 2023 · 2 comments · Fixed by #57717
Closed
2 tasks done

Integer Point Cloud Custom Attributes (LAS extra bytes) detected as floating point #54365

ntw-au opened this issue Aug 25, 2023 · 2 comments · Fixed by #57717
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Point Clouds Symbology Related to vector layer symbology or renderers Upstream Needs changes in an upstream library (like Qt, Proj, GDAL, ...)

Comments

@ntw-au
Copy link

ntw-au commented Aug 25, 2023

What is the bug or the crash?

A LAZ point cloud has Int64 and UInt64 custom attributes (extra bytes), but QGIS interprets the values as floating point, which prevents them from being used as Classification symbology, and instead must be symbolised using Attribute by Ramp.

In some file versions exhibiting this behaviour the attribute is interpreted as an integer and appears in the Symbology > Classification menu but the Classify button does nothing when clicked and the list of labels remains empty.

Steps to reproduce the issue

Example file exhibiting this behaviour: example.zip. (Note that this is a sanitised clip from a larger file and so statistics may not match the file contents.)

  • Start QGIS with a blank project
  • Drag and drop the LAZ file into the QGIS window
  • Right-click the layer and select Properties
  • Select Information tab
  • Observe Attributes table: attributes are type Double
  • Select Symbology tab
  • Select Classification in first dropdown
  • Click Attribute dropdown
  • Observe that Attr0 and Attr1 do not appear
  • Select Attribute by Ramp in first dropdown
  • Click Attribute dropdown
  • Observe that Attr0 and Attr1 do appear
  • Observe that Attr0 and Attr1 both have a data type icon 1.2 for floating point rather than 123 for integer

For comparison purposes, check the input LAS file with LAStools lasinfo, pdal info or laspy and they all report that the data type is 64-bit signed integer. However, doing the same on the .copc.laz file that QGIS generates indicates that the data type has changed to double, so it seems that the change in data type has likely happened somewhere in the COPC conversion process.

Versions

QGIS 3.32.2 via OSGeo4W

QGIS version
3.32.2-Lima
QGIS code revision
c0b8833964
Qt version
5.15.3
Python version
3.9.5
GDAL/OGR version
3.7.1
PROJ version
9.2.1
EPSG Registry database version
v10.088 (2023-05-13)
GEOS version
3.12.0-CAPI-1.18.0
SQLite version
3.41.1
PDAL version
2.5.5
PostgreSQL client version
15.2
SpatiaLite version
5.1.0
QWT version
6.1.6
QScintilla2 version
2.13.1
OS version
Windows 10 Version 2009




Active Python plugins
GroupStats
2.2.7
nma
0.1
quick_map_services
0.19.33
RasterAttributeTable
1.2
rasterstats
0.4.3
SRTM-Downloader
3.2.0
db_manager
0.1.20
MetaSearch
0.3.6
processing
2.12.99

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

Additional context

@ntw-au ntw-au added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Aug 25, 2023
@ntw-au
Copy link
Author

ntw-au commented Aug 28, 2023

Further investigations have steps to reproduce the Symbology > Classification > Classify button not working:

  • Manually convert the file to COPC, e.g. pdal translate -i example.laz -o example_manualcopc.copc.laz --writers.copc.forward=all -w copc
  • Drag and drop example_manualcopc.copc.laz into QGIS
  • Right-click the layer and select Properties
  • Confirm Information > Attributes shows Attr1 and Attr0 are of type Long Integer
  • Symbology > Classification
  • Select Attr0 or Attr1 in the Attribute dropdown
  • Click Classify

Expected: the list is populated with the unique values present in the file for those attributes

Actual: nothing happens

@uclaros
Copy link
Contributor

uclaros commented Feb 2, 2024

This seems like an upstream issue. I opened a ticket in untwine repo

@uclaros uclaros added the Upstream Needs changes in an upstream library (like Qt, Proj, GDAL, ...) label Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Point Clouds Symbology Related to vector layer symbology or renderers Upstream Needs changes in an upstream library (like Qt, Proj, GDAL, ...)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants