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
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.