Page 2 of 2

Re: PTS to LAS format conversion problem

Posted: Fri Feb 26, 2021 8:05 am
by PSpohn
I just tested the new -RENAME_SF option for command line mode and it works perfect! Thank you, daniel!

Code: Select all

C:\Programme\CloudCompare\CloudCompare.exe -SILENT -O -GLOBAL_SHIFT AUTO 01_Pointcloud.pts -C_EXPORT_FMT LAS -EXT laz -AUTO_SAVE OFF -RENAME_SF 0 Intensity -SF_OP 0 add 2048 -SAVE_CLOUDS FILE 01_Pointcloud.laz
But what I cannot recomment from a user point of view is to automatically adjust intensity values. I know this is an easy and a tempting thing to do. But I know at least two cases where such an automatation would brake someones workflow. For example if the user want to keep the intensity values as they are in a range from 0-4096. Or just think about it, that every point clould has its unique min/max values. To scale these all differently to 0-65535 is chaotic. Believe me, you creating more problems then you solve.
So in this case I go with daniel´s opinion to let the user decide how to fit intensity values in different pointcloud storage formats.

Re: PTS to LAS format conversion problem

Posted: Fri Feb 26, 2021 6:00 pm
by WargodHernandez
that's fine, I'm not a LAS expert by any means, I always meant it as an option that could be selected...
But maybe it makes more sense as a standalone feature like maybe call it RemapSFRange then if you do want to do something like that you could apply it to whatever SF you want for whatever reason you wanted.

Re: PTS to LAS format conversion problem

Posted: Tue Jul 20, 2021 5:19 pm
by williamclarks
PSpohn wrote: Tue Feb 16, 2021 3:58 pm Hello everyone

I have encoutered a little problem while I tried to change the point clouds formats in CC command line mode from PTS to LAS/LAZ.

The PTS containing the following information:

X,Y,Z,Intensity

The problem is that the intensity values are imported as scalar values into a scalar field (SF). And when I save this imported PTS pointcloud as LAS the scalar values in the SF are not saved as LAS intensity values. Instead they are saved as an additional SF to the LAS and the LAS intensities are filled with zeros. So something like this:

X,Y,Z, Intensity (all 0.0), SF0 (with intensity values)

I would need the SF to be saved in the LAS as intensity instead:

X,Y,Z, Intensity (with intensity values)

I need the LAS to be saved in this way to read the LAS intensities with another tool I have.

I have found out that renaming the SF manually to "intensity" will do the trick. But this is not possible to do in command line mode.

Any help?!

I need help, too. Exactly the same problem. Did the tips help you? How did you solve the problem?

Re: PTS to LAS format conversion problem

Posted: Wed Jul 21, 2021 8:29 am
by daniel
You could simply rename the first (and only?) scalar field with '-RENAME_SF' (to 'Intensity', so that the LAS output filter recognizes this SF).

Re: PTS to LAS format conversion problem

Posted: Mon Jun 03, 2024 7:53 am
by kaaiinn
daniel wrote: Thu Feb 25, 2021 6:19 pm Oh, so I did a mistake, it was '//' instead of '#'.

But you are right, having a command line method to rename a scalar field would probably be the simplest solution in the end.

@Chris: the issue with auto assigning a scalar field to 'Intensity' is that LAS files have some expectations regarding intensity values (unsigned short integer). But on the other side, if the user does it on its side, I can't remember if we check the values either or if PDAL will complain if the values are outside of the specifications.

Is there a quick and easy way to insert the header row? Wanting to insert //X Y Z S R G B into the first line of my command when converting a .pts file via CLI, however my file is about 30GB. Any tips?

Re: PTS to LAS format conversion problem

Posted: Mon Jun 03, 2024 8:10 am
by daniel
Not with CloudCompare... You'd better use a simpler tool for that (even though I don't know which one :D).

Re: PTS to LAS format conversion problem

Posted: Mon Jun 03, 2024 10:02 am
by kaaiinn
daniel wrote: Mon Jun 03, 2024 8:10 am Not with CloudCompare... You'd better use a simpler tool for that (even though I don't know which one :D).
I am just using a powershell script for now, she aint fast!