Forum

Author Topic: Export KMZ using Python  (Read 3195 times)

tanaval

  • Newbie
  • *
  • Posts: 2
    • View Profile
Export KMZ using Python
« on: May 08, 2024, 06:29:02 AM »
Hello!

I am a beginner in terms of python scripting specially with Agisoft API.
I have made a python script that could iterate process in a single folder containing all drone raw image folders and export it to "Orthomosaic.TIF".
But my problem I don't know how to export Orthomosaic.KMZ.

Can Anyone help me? Here is my python script which I use.
https://github.com/kernel23/NTA_AgisoftScript/blob/856d9b6907a32fe1560584df5d10394cbb41862a/Image_Process_One_Directory_FAST.py


tanaval

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Export KMZ using Python
« Reply #1 on: May 08, 2024, 09:49:52 AM »
Already figured out how to do it. Thanks


kmz_path = os.path.join(output_KMZ, dir_name + '_ortho.kmz')
chunk.exportRaster(kmz_path, format = Metashape.RasterFormatKMZ,  description = 'Generated through automated python script')