Forum

Author Topic: Script to classify ground points and export LAS  (Read 4268 times)

RoryG

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Script to classify ground points and export LAS
« on: February 03, 2020, 08:02:22 PM »
Hi,

I am by no means a scripting expert and struggle with Python! I was wondering if anyone has a script that will classify the ground points in the dense clouds in each chunk, then export each as a LAS file with sequential numbering (1,2... 6). I have three projects with between 6000 and 7000 cameras, each with six processed chunks with the dense clouds. It's quite a laborious process classifying and exporting 18 clouds!

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15160
    • View Profile
Re: Script to classify ground points and export LAS
« Reply #1 on: February 03, 2020, 08:36:24 PM »
Hello RoryG,

Do you need it as a script or you can configure a batch processing for each project?
At first you can run the classification for all the chunks, and then configure the export using {chunklabel}_classified.las filename template for the output file. Providing that each chunk has a different label, the export files will have corresponding names.
« Last Edit: February 04, 2020, 01:41:48 PM by Alexey Pasumansky »
Best regards,
Alexey Pasumansky,
Agisoft LLC

RoryG

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Re: Script to classify ground points and export LAS
« Reply #2 on: February 03, 2020, 10:51:35 PM »
Thanks Alexey, I don't know why I forgot about batch processing as I've used it loads of time before!

RoryG

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Re: Script to classify ground points and export LAS
« Reply #3 on: February 04, 2020, 01:39:54 AM »
Hi Alexey, the classify batch worked perfectly, however using {chunk.label} as a template did not work and was overwritten for each chunk.

RoryG

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Re: Script to classify ground points and export LAS
« Reply #4 on: February 04, 2020, 12:33:10 PM »
Sorted - it's {chunklabel} instead of {chunk.label}. Thanks :)

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15160
    • View Profile
Re: Script to classify ground points and export LAS
« Reply #5 on: February 04, 2020, 01:41:39 PM »
Hello RoryG,

Yes, sorry it was my typo. I'll fix the original post.
Best regards,
Alexey Pasumansky,
Agisoft LLC