Forum

Author Topic: Python export contours  (Read 4644 times)

jbak9141

  • Newbie
  • *
  • Posts: 18
    • View Profile
Python export contours
« on: September 15, 2017, 09:12:28 AM »
Hi all,

I noticed the exportContours() method no longer exists in the PhotoScan API, is there a way to export contours through the python API anymore?



Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15228
    • View Profile
Re: Python export contours
« Reply #1 on: September 15, 2017, 01:07:43 PM »
Hello jbak9141,

In the latest version generated contours are put to the separate shape layer, named "Contours" and can be exported similar to shapes.
Best regards,
Alexey Pasumansky,
Agisoft LLC

jbak9141

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: Python export contours
« Reply #2 on: September 26, 2017, 12:10:24 PM »
Thank you very much for your response Alexey,

Are you still able to export contours as a DXF like you could with the old exportContours() method?

Also, is it possible to export all shape types in a group in the same file? I'm running into some issues with the export shapes function and only seem to be able to export either Polygons or Polylines in the shapefile where I want to include all shape types from the group in the same file.

Cheers,

James

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15228
    • View Profile
Re: Python export contours
« Reply #3 on: September 26, 2017, 10:40:31 PM »
Hello James,

Shape-file format (SHP) doesn't support instances of the different class in the same file, but if you are exporting the shapes to DXF, it should allow to keep both polylines and polygons.
Best regards,
Alexey Pasumansky,
Agisoft LLC

jbak9141

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: Python export contours
« Reply #4 on: October 03, 2017, 06:31:58 AM »
Hi Alexey,

Thank you for confirming, how do I export a DXF with both polygon/polylines contours in the same file using the Python API? I seem to only be able to specify a single shape type?

Having them split by default limits the usefulness of the function as both closed and open contours are needed for our workflow.

Cheers,

J