Clip footprint with boundary

384
2
08-26-2019 02:16 AM
ModyBuchbinder
Esri Regular Contributor

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?

Thanks

0 Kudos
2 Replies
Prashant_MukeshMangtani
Esri Contributor

Mody,

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.

-Prashant

0 Kudos
ModyBuchbinder
Esri Regular Contributor

Hi Prashant

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.

It works...

Thanks 

0 Kudos