Are you looking to get a shapefile/dwg for each individual TIFF's extent, or one shapefile/dwg for a mosaic of the TIFFs?
import arcpy from arcpy import env env.workspace = r"C:\data\raster\TIFF" arcpy.CheckOutExtension("3D") for raster in arcpy.ListRasters("*", "TIF"): arcpy.RasterDomain_3d(raster, raster.split(".")[0] + ".shp", "POLYGON")
import arcpy from arcpy import env env.workspace = r"C:\DATA\RASTER\TIFF\MosaicDataset.gdb" env.overwriteOutput = 1 arcpy.MakeMosaicLayer_management("Philadelphia", "MosaicLayer") rows = arcpy.SearchCursor("MosaicLayer/Footprint") for row in rows: OID = row.OBJECTID arcpy.SelectLayerByAttribute_management("MosaicLayer/Footprint", "NEW_SELECTION", "OBJECTID = " + str(OID)) arcpy.CopyFeatures_management("MosaicLayer/Footprint", r"C:\data\raster\tiff" + "\\" + row.Name + ".shp") del row, rows
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.