I have a mosaic dataset with new boundary. I would like to clip the footprint with the new boundary (deleting polygons outside the new boundary and update the geometry of others).
I found this example: ProConcepts Raster · Esri/arcgis-pro-sdk Wiki · GitHub that looks like exactly what I need.
Copy & paste this into my code does not work, the MosaicDataset is not in any library.
What is the best way to do it?
Did you get this sovled? I would suggest running the build footprints GP tool, either through the UI or through code to accomplish what you are doing. You should not need to manually edit footprints.
Please let me know if this helps.
What we did is to run a cursor on the footprint and intersect each polygon with the boundary polygon.
If the intersection is empty (footprint outside boundary ) we just set some attribute otherwise we replace the current footprint polygon geometry with the intersection.
After this is done we run RemoveRasters where the attribute is set.