Forum

Author Topic: Exported LAS file error, File Signature not b'LASF'  (Read 1628 times)

Jernej

  • Newbie
  • *
  • Posts: 22
    • View Profile
Exported LAS file error, File Signature not b'LASF'
« on: February 22, 2021, 08:02:26 PM »
Hello

I am trying to read an exported LAS file in python with PYLAS but I get an error saying: "Error: File Signature (b'<?xm') is not b'LASF'"

I am using this code to export the dense cloud as LAS file:
Code: [Select]
chunk.exportPoints(path=projectPath + tempFileName,
                       source_data=Metashape.DenseCloudData,
                       save_normals=True,
                       save_colors=True,
                       save_classes=True,
                       save_confidence=True,
                       format=Metashape.PointsFormatLAS
                       )
and this bit to read the file:
Code: [Select]
las = pylas.read(projectPath+projectFile)
I only get this error from files exported in Metashape ( my current version is v1.7.1 build 11797). I have tried manual export with the default settings but to no avail. If I read a file I downloaded from the internet for testing, it works without problems.

What could be the problem here?
Thank you for your help.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14843
    • View Profile
Re: Exported LAS file error, File Signature not b'LASF'
« Reply #1 on: February 23, 2021, 02:37:16 PM »
Hello Jernej,

Are you able to open the LAS files exported from Metashape in any other applications, like Cloud Compare or Global Mapper?
Best regards,
Alexey Pasumansky,
Agisoft LLC

Jernej

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: Exported LAS file error, File Signature not b'LASF'
« Reply #2 on: February 23, 2021, 04:00:07 PM »
Hello Alexey

Thank you for the response. The reason for the error was a typo in my code. I was trying to read .psx file instead of a .las file