HI Alexey,
Thanks for your answer!
EDIT : I just found a solution, looks like it's working if I save the file in .psx instead of .psz
The script is as simple as this :
import Metashape
laser_scans_path = "S:/temp/laserscans-withmarkers.e57"
output_path = "S:/temp/import_lidar_test_001.psz"
doc = Metashape.Document()
chunk = doc.addChunk()
chunk.importPointCloud(
path=laser_scans_path,
format=Metashape.PointCloudFormatE57,
is_laser_scan=True
)
doc.save(path=output_path)
It is run within a Python 3.9 shell environment where Metashape-2.1.1 was installed. So /path/to/Python39/python.exe import_laser_scans.py.
I also tried to run the script using metashape.exe but the results were the same.
"C:/Program Files/Agisoft/Metashape Pro/metashape.exe" -r import_laser_scans.py
Couple things I tried :
- Looked into the coordinate system by forcing it to the following, but everything looked good there.
crs = Metashape.CoordinateSystem('LOCAL_CS["Local Coordinates (m)",LOCAL_DATUM["Local Datum",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]]]')
- Looked into some parameters, like scanner_at_origin but it didn't change anything.
The 6 laser scans are still being imported, just the position of their cameras is wrong (except, always for the first one of the file). As you can see on the joined image, the alignment is good but the cameras are underground.
I hope we can resolve this, thanks again!
Max