Forum

Author Topic: exporting shape attributes  (Read 1949 times)

Abe Whaanga

  • Newbie
  • *
  • Posts: 15
    • View Profile
exporting shape attributes
« on: April 15, 2020, 08:48:52 AM »
Is there a way to script exporting of shape attributes to a .txt or .csv file?  Including the coordinates of the shape vertices?

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14816
    • View Profile
Re: exporting shape attributes
« Reply #1 on: April 15, 2020, 01:45:26 PM »
Hello Abe Whaanga,

You can access the list of shape vertices (where each vertex is represented as Metashape.Vector) via shape.vertices call. And the attributes table can be access as a dictionary via shape.attributes.
Alternatively you can use Metashape.ShapesFormatCSV in the .exportShapes function.
Best regards,
Alexey Pasumansky,
Agisoft LLC

Abe Whaanga

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: exporting shape attributes
« Reply #2 on: April 19, 2020, 12:24:39 PM »
Thank you Alexey, shapes.vertices and shapes.attributes works great.  Though I couldn't get Metashape.shapes.FormatCSV to work with the exportShapes function.