Scalar field issue

If you are allergic to bug trackers, you can post here any remarks, issues and potential bugs you encounter
Post Reply
Alexander Velizhev
Posts: 2
Joined: Fri May 20, 2016 12:04 pm

Scalar field issue

Post by Alexander Velizhev »

Hello!

Please find below a description of a bug with loading/saving data:
Step 1. Load a point cloud from a text file (format 'x y z scalar')
Step 2. Save a point cloud to a text file

The problem is a difference between initial and saved scalar field values (see a picture).
ScalarFieldBug.PNG
ScalarFieldBug.PNG (114.65 KiB) Viewed 2871 times
It happens when a scalar value is too large (e.g. 17138633).
The difference between initial and saved values is always 1 and it happens only with odd numbers, they are converted to closest smaller even number (e.g. 17138633 -> 17138632)
daniel
Site Admin
Posts: 7710
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Scalar field issue

Post by daniel »

In fact it's a known limitation of CC. As we work with 32 bits floating point values internally (to reduce the memory usage) we have a limited precision when dealing with large numbers.

And while this is correctly handled for coordinates or even for the known 'GPS time' field of LAS files, we don't have a backup strategy for the generic case (e.g. ASCII files).

I guess we should add a clear warning about that at least.
Daniel, CloudCompare admin
Alexander Velizhev
Posts: 2
Joined: Fri May 20, 2016 12:04 pm

Re: Scalar field issue

Post by Alexander Velizhev »

Thank you for the reply!
Post Reply