Agisoft Metashape
Agisoft Metashape => General => Topic started by: ManishSahu on March 18, 2018, 12:25:49 PM
-
Can anyone tell me what is the use of polygon option in Model tab? Can I use it to export clipped Orthomosaic or DEM?
-
Hello ManishSahu,
You can draw polygon shape in Model or Ortho view mode.
If you wish to export the DEM/Orthomosaic only inside the area defined by the polygon (or polygons) you need to switch to the Ortho view mode, select the desired shape, right click on it and choose Set Boundary -> Outer Boundary option. Boundaries would be automatically applied to DEM/Orthomosaic export.
-
Thanks. I want to do exactly same things. Exporting Ortho and DEM wrt polygon. I will try it out.
-
I have tried this method. Work perfectly as I wanted. Thanks
-
Can you tell me if i can export clipped version using python script?
-
Hello ManishSahu,
The shapes set as boundaries should be automatically applied on export operations, even they are run from the script.
If you have imported the shape to be used as boundary, then apply the following method to it:
shape.boundary_type = PhotoScan.Shape.BoundaryType.OuterBoundary
-
Respected Alexey Pasumansky,
I have successfully completed exporting with respect to shapefile. Thanks for helping. I have one more query. Now I have a shapefile which consists of multiple polygon (refer to screenshot). I want to export separately for each polygon using python script. How to achieve this?
-
Hello ManishSahu,
I can suggest something like the following:
for shape in chunk.shapes:
if shape.type != PhotoScan.Shape.Type.Polygon:
continue
shape.boundary_type = PhotoScan.Shape.BoundaryType.OuterBoundary
path = = "ortho_" + shape.label + ".tif" #if there are unique shape.labels, otherwise you can use str(shape.key)
chunk.exportOrthomosaic(path, ...)
shape.boundary_type = PhotoScan.Shape.BoundaryType.NoBoundary
-
Thanks. Worked very well.
-
Hello ManishSahu,
You can draw polygon shape in Model or Ortho view mode.
If you wish to export the DEM/Orthomosaic only inside the area defined by the polygon (or polygons) you need to switch to the Ortho view mode, select the desired shape, right click on it and choose Set Boundary -> Outer Boundary option. Boundaries would be automatically applied to DEM/Orthomosaic export.
Is this option still available in Metashape 1.6.2?
I can't find a way to trim DEM/Orthomosaic :(
-
All sorted! My fault, it works exactly as it was described :)
-
Yes, boundary type selection currently is available only from the Ortho view mode.