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
Přihlášení členové mohou přispívat, sledovat aktualizace a další. Jste tu noví? Zaregistrujte si bezplatný účet.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.