Agisoft Metashape
Agisoft Metashape => Python and Java API => Topic started by: picare on November 26, 2020, 11:39:32 AM
-
Hi,
I am unable to remove orthophotos from a chunk whith python, whereas they are not visible in the chunk treeview:
chunk.orthomosaics
Out[69]: 2020-11-26 09:35:55 [<Orthomosaic 'Sol, '>, <Orthomosaic 'Cylindre, '>]
chunk.orthomosaics.clear()
chunk.orthomosaics
Out[71]: 2020-11-26 09:36:08 [<Orthomosaic 'Sol, '>, <Orthomosaic 'Cylindre, '>]
chunk.orthomosaics[0].clear()
chunk.orthomosaics[1].clear()
chunk.orthomosaics
Out[74]: 2020-11-26 09:36:43 [<Orthomosaic 'Sol, '>, <Orthomosaic 'Cylindre, '>]
Any ideal to remove these orthomosaics?
-
Hello picare,
To remove the orthomosaic you should use the following code:
chunk.remove(chunk.orthomosaics[0])
this example removes the first orthomosaic in the chunk.
To remove all orthomosaics from the chunk:
chunk.remove(chunk.orthomosaics)
-
Perfect, that's working now. Thanks!