[FIXED ]command line CSF filter only ONE export allowed

If you are allergic to bug trackers, you can post here any remarks, issues and potential bugs you encounter
Post Reply
PablerasBCN
Posts: 296
Joined: Sat Jan 20, 2018 1:57 pm

[FIXED ]command line CSF filter only ONE export allowed

Post by PablerasBCN »

Hi.

When in commandline running CSF filtering, if syntax outputs both ground and non ground, it will only output one file because it will get overwritten due to naming:
"-CSF -SCENES RELIEF -PROC_SLOPE -CLOTH_RESOLUTION 0.2 -CLASS_THRESHOLD 0.7 -EXPORT_GROUND -EXPORT_OFFGROUND"

"[CSF]
Set scene to relief
Slope processing turned on
Custom cloth resulution set: 0.2
Custom class threshold set: 0.7
Ground will be exported
Off-ground will be exported
[CSF] 99.97% of points classified as ground points
[SAVING]
Extra field 'Illuminance (PCV)' renamed 'Illuminance__(PCV)' to comply to LAS specifications
[I/O] File './08OE2648_PCV_FILTERED_[0_3.las' saved successfully
[SAVING]
Extra field 'Illuminance (PCV)' renamed 'Illuminance__(PCV)' to comply to LAS specifications
[I/O] File './08OE2648_PCV_FILTERED_[0_3.las' saved successfully
Processed finished in 220.88 s."


You can see that despite both are output, due to both having same naming get overwritten by last, the offground, in this case.

So please add -GROUN -OFFGROUND caption in the output file to avoid this, now I can avoid this duplicating the .bat one for the ground other for the offground.

Also, the output file is at same folder as the .bat, where in other commands like PCV the output folder is where the origin file is. You could standarize output dir with like a global variable. But this is not a big issue.
Last edited by PablerasBCN on Thu Feb 09, 2023 1:41 pm, edited 1 time in total.
daniel
Site Admin
Posts: 7710
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: command line CSF filter only ONE export allowed

Post by daniel »

Hum, something else is happening here, as normally the clouds should be suffixed with '_ground_points' and '_offground_points'.

But here, it seems the name is truncated, even before the end of the 'filtered' suffix.

What's the rest of the command line? I'm especially interested in the original cloud name and the various options.
Daniel, CloudCompare admin
PablerasBCN
Posts: 296
Joined: Sat Jan 20, 2018 1:57 pm

Re: command line CSF filter only ONE export allowed

Post by PablerasBCN »

Hi,

complete command of the .bat

for %%f in (E:\LIDAR_JAPAN\MMS8\MMS\_00_ORIGINAL_PCV\*.las) DO "C:\Program Files\CloudCompare\cloudcompare.exe" -SILENT -O -GLOBAL_SHIFT AUTO %%f -AUTO_SAVE OFF -C_EXPORT_FMT LAS -NO_TIMESTAMP -SET_ACTIVE_SF 9 -FILTER_SF 0 3.1 -CSF -SCENES RELIEF -PROC_SLOPE -CLOTH_RESOLUTION 0.2 -CLASS_THRESHOLD 0.7 -EXPORT_GROUND -EXPORT_OFFGROUND

Original cloud name would be like "08OE2648_PCV", on thing I noticed tho, is that the namig after is "08OE2648_PCV_FILTERED_[0_3" wher I think should be something like "08OE2648_PCV_FILTERED_[0_3.1]_whatever else. I'll try now with even numbers to see if that is the case, will re post.
PablerasBCN
Posts: 296
Joined: Sat Jan 20, 2018 1:57 pm

Re: command line CSF filter only ONE export allowed

Post by PablerasBCN »

Hello

You where right, its a naming issue,

with this command line where instead o 0 3.1 the filter rante is 0 3

for %%f in (E:\LIDAR_JAPAN\MMS8\MMS\_00_ORIGINAL_PCV\*.las) DO "C:\Program Files\CloudCompare\cloudcompare.exe" -SILENT -O -GLOBAL_SHIFT AUTO %%f -AUTO_SAVE OFF -C_EXPORT_FMT LAS -NO_TIMESTAMP -SET_ACTIVE_SF 9 -FILTER_SF 0 3 -CSF -SCENES RELIEF -PROC_SLOPE -CLOTH_RESOLUTION 0.2 -CLASS_THRESHOLD 0.7 -EXPORT_GROUND -EXPORT_OFFGROUND

"console print:"

[CSF]
Set scene to relief
Slope processing turned on
Custom cloth resulution set: 0.2
Custom class threshold set: 0.7
Ground will be exported
Off-ground will be exported
[CSF] 99.81% of points classified as ground points
[SAVING]
Extra field 'Illuminance (PCV)' renamed 'Illuminance__(PCV)' to comply to LAS specifications
[I/O] File './08OE2649_FILTERED_[0_3]_ground_points.las' saved successfully
[SAVING]
Extra field 'Illuminance (PCV)' renamed 'Illuminance__(PCV)' to comply to LAS specifications
[I/O] File './08OE2649_FILTERED_[0_3]_offground_points.las' saved successfully
Processed finished in 214.51 s.
daniel
Site Admin
Posts: 7710
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: command line CSF filter only ONE export allowed

Post by daniel »

So in the end, the bug is specifically in the CSF plugin command line. I've fixed it in the latest 2.13.alpha version.
Daniel, CloudCompare admin
PablerasBCN
Posts: 296
Joined: Sat Jan 20, 2018 1:57 pm

Re: command line CSF filter only ONE export allowed

Post by PablerasBCN »

I confirm this is fixed, than you so much.
PablerasBCN
Posts: 296
Joined: Sat Jan 20, 2018 1:57 pm

Re: command line CSF filter only ONE export allowed

Post by PablerasBCN »

Hello,

I found a variant of the issue that was causing the original post.

Image

As you see, when manually saving, the text is truncated. Not massive deal, but you may whant to fix this before leaving beta stage.
daniel
Site Admin
Posts: 7710
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: command line CSF filter only ONE export allowed

Post by daniel »

Yes definitely, thanks for the feedback.
Daniel, CloudCompare admin
daniel
Site Admin
Posts: 7710
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: command line CSF filter only ONE export allowed

Post by daniel »

And that should be fixed in the latest 2.13.alpha version (from today)
Daniel, CloudCompare admin
PablerasBCN
Posts: 296
Joined: Sat Jan 20, 2018 1:57 pm

[FIXED ]Re: command line CSF filter only ONE export allowed

Post by PablerasBCN »

I confirm this is fixed.
Post Reply