Agisoft Metashape

Agisoft Metashape => Python and Java API => Topic started by: adam_s on November 08, 2019, 01:08:34 PM

Title: Duplicate DEM
Post by: adam_s on November 08, 2019, 01:08:34 PM
Hello,

How to duplicate DEM using python api? I want to make this section of metashape instruction automatically:

Quote
In case you want to save current DEM instance and edit its copy, right-click on
DEM and choose "Duplicate" option.

I've tried appending existing elevation model to the list of chunk elevations models, but it hasn't worked.

Code: [Select]
dem=chunk.elevation
chunk.elevations.append(dem)

Title: Re: Duplicate DEM
Post by: Alexey Pasumansky on November 08, 2019, 05:08:54 PM
Hello Adam.

Such elements in the chunk's contents like dense clouds, mesh models, tiled models, orthomosiacs and DEMs can be duplicated using .copy() method, for example:
Code: [Select]
chunk.elevation.copy()The code above creates a duplicate of the active DEM instance and makes it active.