Agisoft Metashape
Agisoft Metashape => Python and Java API => Topic started by: Raj Calisa on July 04, 2022, 07:46:30 AM
-
Hi all,
When I upgraded to Metashape 1.8.x, I noticed that my python code had errors. In particular, the vertices attribute of a shape object is not supported any more.
What is the alternative?
Regards,
Raj.
-
Hello Raj,
since 1.8 the following attributes were removed from Shape class:
Removed has_z, type, vertex_ids and vertices attributes from Shape class
So you should look at Geometry class for the correct attributes in API reference. For example a shape's vertices would be accessed thru shape,geometry.coordinates in case of point or linestring. For Polygon, the outer boundary vertices are accessed thru shape,geometry.coordinates[0]....