mfbonfigli / gocesiumtiler

A Cesium.js point cloud 3D tiles generator from LAS files written in Golang
Mozilla Public License 2.0
195 stars 40 forks source link

Error during conversion of las file #48

Closed Dhyey181101 closed 3 months ago

Dhyey181101 commented 4 months ago

I am trying to get 3d tiles for rendering these files in cesium

Screenshot 2024-07-03 at 2 56 47 PM

Seeing this issue while converting a las file I see a similar issue raised for compatibility https://github.com/mfbonfigli/gocesiumtiler/issues/16

Any help would be much appreciated.

Thank You.

mfbonfigli commented 4 months ago

Hello, can you upload or send me via email a copy of the las file?

Dhyey181101 commented 4 months ago

Hello, Here is the link for the file https://drive.google.com/file/d/13TgkbvlmmCdILp5kME9R3Md5Lpr4RS4C/view?usp=drive_link

Thank you

On Sat, Jul 6, 2024 at 8:07 AM M. Federico Bonfigli < @.***> wrote:

Hello, can you upload or send me via email a copy of the las file?

— Reply to this email directly, view it on GitHub https://github.com/mfbonfigli/gocesiumtiler/issues/48#issuecomment-2211764810, or unsubscribe https://github.com/notifications/unsubscribe-auth/AT2SALCATVCB5PKRJIWKNPLZK7T2DAVCNFSM6AAAAABKKHI5JCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJRG43DIOBRGA . You are receiving this because you authored the thread.Message ID: @.***>

mfbonfigli commented 4 months ago

Hello Dhyey, I took a look to your LAS file and my understanding is that the file is malformed.

In particular if you open it with a binary editor, the file states is a LAS 1.2, and the "point format id" byte (which is the byte n. 105) is 131 or 10000011 in binary format.

img

This number is however incorrect as per the LAS 1.2 specs it should only be one of 0, 1, 2 or 3.

pfid-values las12specs

It seems as if the first bit of the byte somehow flipped from 00000011 (which is 3 in decimal format, hence correct) to 10000011 (which is 131, incorrect). This could be a data corruption problem or a bug in the software that created this file.

I acknowledge that some softwares might be more tolerant, and I could also update the library to tolerate this by simply ignoring the first bit in the point format id byte, but I prefer not to build into the software these workarounds.

Dhyey181101 commented 3 months ago

Thank you so much for your help.