mreutegg / laszip4j

The LASzip library ported to Java
GNU Lesser General Public License v2.1
36 stars 16 forks source link

RGB14_v3 items are decoded incorrectly #142

Closed stijn-vranckx closed 3 months ago

stijn-vranckx commented 4 months ago

The color values are incorrect. See https://github.com/mreutegg/laszip4j/pull/141 for a possible fix and a file to reproduce the issue.

mreutegg commented 3 months ago

Thank you for reporting this issue and a file to reproduce.

As you hinted already in #141, the problem seems to be caused by context being passed by value to LASreadItem.read() and LASreadItemCompressed.init().

143 introduces a MutableInteger and uses it as type for the context parameters. With these changes the laz file available via #141 translates into a same las file as with LASTools.

@stijn-vranckx, can you please give it a try as well? I'd also like to add the laz file referenced in #141 as a test resource. What is the license for that file?

stijn-vranckx commented 3 months ago

@mreutegg For the license:

This pointcloud was captured by Hexagon airborne sensors and processed using Hexagon's ERDAS IMAGINE software. The small LAZ chip exported can be used for software test coverage and can be considered under CC-BY since the dataset is so small.

So I think the fiel can be added as a test resource. I gave it a try and it is also working on my site.

mreutegg commented 3 months ago

Thank you for testing #143. I added the file as a test resource and there is now a test using it.

The fix will be available in laszip4j 0.19