Losing all decimals on coordinates (integers only) when exporting a LAS file to a PLY file

If you are allergic to bug trackers, you can post here any remarks, issues and potential bugs you encounter
Post Reply
swiss_knight
Posts: 28
Joined: Sun Aug 30, 2015 12:11 pm

Losing all decimals on coordinates (integers only) when exporting a LAS file to a PLY file

Post by swiss_knight »

Hi,

when exporting a LAS point cloud file to a PLY file, I lose decimals, ending with only intergers on X, Y coordinates.
Z seems to still have two digits.

Is this normal ?
There is no particular options while saving the file.

Thanks.
daniel
Site Admin
Posts: 7708
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Losing all decimals on coordinates (integers only) when exporting a LAS file to a PLY file

Post by daniel »

Did you accept to apply the 'Shift on Load' strategy when loading the LAS file? (I guess it has big coordinates?). Are you sure the points still have digits after they have been loaded from the LAS file? (simply shift-click on a point to display its coordinates).
Daniel, CloudCompare admin
swiss_knight
Posts: 28
Joined: Sun Aug 30, 2015 12:11 pm

Re: Losing all decimals on coordinates (integers only) when exporting a LAS file to a PLY file

Post by swiss_knight »

Hello,

Yes I'm applying the shift. I have rather huge coordinates (~ 2 million along X and ~1 million along Y).
I manually entered "rounded" (i.e. with 3 decimal zeros, but they probably do not become integers ?) the X and Y shifts, and setting 0 for the Z values.

And when using the point picking tool, I have the X,X,Y "shifted" coordinates on the left. And the Xg,Yg,Zg "real" coordinates on the right.
All these values have a sufficient amount of decimals (6 digits). And they are not zeros at all.
They correspond to the original data.
daniel
Site Admin
Posts: 7708
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Losing all decimals on coordinates (integers only) when exporting a LAS file to a PLY file

Post by daniel »

Do you export the PLY file in ASCII or BINARY format?
Daniel, CloudCompare admin
swiss_knight
Posts: 28
Joined: Sun Aug 30, 2015 12:11 pm

Re: Losing all decimals on coordinates (integers only) when exporting a LAS file to a PLY file

Post by swiss_knight »

In PLY > ASCII.

I have tried the PLY > binary now; there is no problem with it.
But I needed the ASCII to import the points in a human readable format in a GIS software.

A workaround for the moment is to export it as ASCII text file (not PLY); there is the option to set the precision for the output.
And every digits are present in the exported file.

:)
daniel
Site Admin
Posts: 7708
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Losing all decimals on coordinates (integers only) when exporting a LAS file to a PLY file

Post by daniel »

Indeed, RPly (the third-party library that we use to export PLY files) don't let us define the output precision for ASCII files... I guess we should hack it to allow this.
Daniel, CloudCompare admin
ospeleo
Posts: 5
Joined: Thu Jun 23, 2016 2:06 pm

Re: Losing all decimals on coordinates (integers only) when exporting a LAS file to a PLY file

Post by ospeleo »

Same "problem" here.

I've been working on a cloud from a .las file with local data +/-50m
I set the global shift parameter to output directly in UTM.
however, in the .ply file (ascii), the exported data does not have all the meaningful figures:

Code: Select all

448500 5.40653e+06 60.4567 255 255 255 .......
448500 5.40653e+06 60.4489 255 255 255 ....... 
It doesn't work (for me) in binary neither.

The workaround would be to export the data in ply format in the local coordinate system, and find another way (via a GIS software?) to shift in the UTM coordinate system.
It would be a nice feature to be able to export large coordinates directly from CC.
daniel
Site Admin
Posts: 7708
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Losing all decimals on coordinates (integers only) when exporting a LAS file to a PLY file

Post by daniel »

Do you mean you can't use Binary PLY files or the global shift mechanism doesn't work in your case?
Daniel, CloudCompare admin
ospeleo
Posts: 5
Joined: Thu Jun 23, 2016 2:06 pm

Re: Losing all decimals on coordinates (integers only) when exporting a LAS file to a PLY file

Post by ospeleo »

daniel wrote:Do you mean you can't use Binary PLY files or the global shift mechanism doesn't work in your case?
my mistake. Clouds with global shifting to big coordinates are correctly exported to binary ply files (but not ascii ply).

The problem was the importation of the binary ply to another software. If I re-open it in CC, the file is correct.
Post Reply