Agisoft Metashape
Agisoft Metashape => Python and Java API => Topic started by: Will on July 29, 2021, 12:39:32 PM
-
Hello All,
I wonder if someone can help me to script this procedure :
1) Import a point cloud (.las) from a lidar.
2) Classify ground points.
3) Export this new point cloud classified in same format (.las)
I will appreciate any help :-)
Have a nice day
William
-
Hello Will,
I think you should look at following 3 methods to build your script:
- Metashape.app.document.chunk.importPoints(path=’‘, format=Metashape.PointsFormatLAS, calculate_normals=True[, crs ][, shift ][,progress]) # importing LAS file
- Metashape.app.document.chunk.dense_cloud.classifyGroundPoints(max_angle=15.0, max_distance=1.0, cell_size=50.0[, source ][, progress]) # classifying imported dense cloud
- Metashape.app.document.chunk.exportPoints(path=’‘, source_data=DenseCloudData, binary=True, save_normals=True,save_colors=True, save_classes=True, save_confidence=True,
raster_transform=RasterTransformNone, colors_rgb_8bit=True, comment=’‘,save_comment=True, format=Metashape.PointsFormatLAS, image_format=ImageFormatJPEG[, crs ][, shift ][, region ], clip_to_boundary=True,block_width=1000, block_height=1000, split_in_blocks=False[, classes ],save_images=False[, viewpoint ], subdivide_task=True[, progress ]) # exporting to LAS file
Then consult pages 34, 39, 51 of API reference guide https://www.agisoft.com/pdf/metashape_python_api_1_7_3.pdf for details on parameters to use for each method...
-
Hello Paul,
you helped me again!! thank you.. :-)
Yes, forgot to the API refernce guide.
Thank you again and best regards
William