import arcpy, os output_path = r'C:\Forum\Raster attribute\output' fc = r'C:\Forum\Raster attribute\test.gdb\rasatt01' fld_raster = 'Raster' fld_name = 'Name' flds = (fld_raster, fld_name) with arcpy.da.SearchCursor(fc, flds) as cursor: for row in cursor: filename = "{0}.tif".format(row[1]) row[0].save(os.path.join(output_path, filename))
import arcpy, os output_path = r'C:\Forum\Raster attribute\output' fc = r'C:\Forum\Raster attribute\test.gdb\rasatt01' fld_raster = 'Raster' fld_name = 'Name' cursor = arcpy.SearchCursor(fc) for row in cursor: filename = "{0}.tif".format(row.getValue(fld_name)) row.getValue(fld_raster).save(os.path.join(output_path, filename)) del cursor, row
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.