Forum

Author Topic: chunk.importShapes results in crash  (Read 5306 times)

ferdywallinx

  • Newbie
  • *
  • Posts: 28
    • View Profile
chunk.importShapes results in crash
« on: October 11, 2016, 04:42:16 PM »
When i try to load a shapefile or KML through the following code:

app = PhotoScan.Application()
doc = PhotoScan.app.document
chunk=doc.chunks[0]  #this is a chunk with an orthomosaic, sparse point cloud, mesh and cameras
chunk.importShapes(path="pathtoshapefile.shp",replace=False,boundary=PhotoScan.Shape.OuterBoundary)

then the system crashes. Since I saw nothing like this issue on the forum i would like to know if anyone succesfully loaded a shapefile through python. Loading the shapefile works when i do it manually.
« Last Edit: October 11, 2016, 06:05:35 PM by ferdywallinx »

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15168
    • View Profile
Re: chunk.importShapes results in crash
« Reply #1 on: October 11, 2016, 10:58:28 PM »
Hello ferdywallinx,

Have you submitted the crash report? And can the issue be reproduced using the import operation for the same shape file via GUI?
Best regards,
Alexey Pasumansky,
Agisoft LLC

ferdywallinx

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: chunk.importShapes results in crash
« Reply #2 on: October 12, 2016, 10:07:30 AM »
Hi Alexey,

yes I have submitted some crash reports. The issue does not occur when loading a shapefile via a GUI. We found the workaround in the end which was already having a chunk with a manually loaded shapefile and then we can overwrite the shapefile through python API without crashing.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15168
    • View Profile
Re: chunk.importShapes results in crash
« Reply #3 on: October 13, 2016, 12:39:49 AM »
Hello ferdywallinx,

Thank you for additional information. This issue will be fixed in the version 1.3.
Best regards,
Alexey Pasumansky,
Agisoft LLC