Open russelldj opened 2 months ago
Great catch, I agree this should be a priority. The Metashape GUI displays the existence of multiple DEMs in a project (not just the last generated) -- so it is clear that multiple can be stored. This indeed will hinge on us finding a way to "activate" the DEM that we want to be used for ortho generation. (The GUI-based ortho generation menu does not have an option for this). Perhaps this could be a good early task for @asidhu0 . I just posted on the Agisoft forum requesting guidance.
Some takeaways from our discussion.
elevation.label
should be set to the type of surface that was used to create itautomate-metashape
error should be raised. If present, it should build the ortho.
I noticed that the DEM/DSM and orthomosaic computation are tightly coupled in build_dem_orthomosaic. My understanding is this is because metashape does not allow granular control over which geometry source is used, only whether it is elevation or mesh. So the only way to control this is to have the intended surface be the last one generated.
The way the code is structured now, orthomosaic creation will be silently skipped if you disable the DEM stage, except if it is just the
mesh
based ortho. I encountered this issue because my process died in the middle of the orthomosaic stage and I wanted to restart just that step.This is entirely speculative, but I wonder if we could check for the requested elevation data (DSM/DTM) and then try to "activate" it before running the ortho step. This would decouple the process. If something like this is not possible, I would update the documentation to clearly state that the desired elevation source must be computed specifically in that run and cannot be loaded from a previous project.