Forum

Author Topic: Batch clipping and exporting using given kml boundaries  (Read 1015 times)

aerophilicravi

  • Newbie
  • *
  • Posts: 6
    • View Profile
Batch clipping and exporting using given kml boundaries
« on: June 23, 2022, 03:35:57 PM »
Hello,

I have a large orthomosiac generated on Agisoft. I also have multiple overlapping village boundaries as shown in the screenshot in the attachment.

Orthomosiac needs to be cropped as per this village boundary with 50 meters buffer from each boundary.

My current methodology is to export a single Orthomosiac and then crop it using Global mapper or QGIS. This is taking twice the time if not less.
Is there a script or a batch processing methodology by which we can export the data directly from Agisoft itself.

Paulo

  • Hero Member
  • *****
  • Posts: 1076
    • View Profile
Re: Batch clipping and exporting using given kml boundaries
« Reply #1 on: June 23, 2022, 04:22:24 PM »
Hello aerophilicravi,

the easiest way would be following:

- create the village shapes with 50 meter buffers in Global Mapper  or QGis;
- import the shapes into Metashape;
- create a script that loops thru all the village shapes, for each shape, set it as outerboundary, export Orthomosaic with clip to boundary.

Should be quire straightforward,

PS. if you do not want to create the buffer polygons outside of MS, this could be done inside  using shapely Polygon module...
« Last Edit: June 23, 2022, 08:01:39 PM by Paulo »
Best Regards,

Paul Pelletier,
Surveyor

aerophilicravi

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Batch clipping and exporting using given kml boundaries
« Reply #2 on: June 24, 2022, 09:44:18 AM »
Thank you for your reply.
This is exactly what I want.
But unfortunately, I am not very good with Python scripting. Can I get help there?