Forum

Author Topic: Shape.vertices attribute removed  (Read 1593 times)

Raj Calisa

  • Newbie
  • *
  • Posts: 15
    • View Profile
Shape.vertices attribute removed
« 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.

Paulo

  • Hero Member
  • *****
  • Posts: 1320
    • View Profile
Re: Shape.vertices attribute removed
« Reply #1 on: July 04, 2022, 08:13:44 AM »
Hello Raj,

since 1.8 the following attributes were removed from Shape class:
Quote
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]....
Best Regards,
Paul Pelletier,
Surveyor