one more (and hopefully last) question - why is it not possible to put a parameter to the MakeRasterLayer_management out_rasterlayer field:for example:rasterPath = arcpy.Describe(files).catalogPath rasterName = "test" arcpy.MakeRasterLayer_management(rasterPath, rasterName)i get this same Execution error 000582)[000582 : Error occurred during execution.]
rasterPath = arcpy.Describe(files).catalogPath rasterName = "test" arcpy.MakeRasterLayer_management(rasterPath, rasterName)
import os arcpy.env.workspace = targetPath for files in arcpy.ListRasters(): rasterPath = arcpy.Describe(files).catalogPath arcpy.MakeRasterLayer_management(rasterPath , "lyrRaster") arcpy.SaveToLayerFile_management("lyrRaster", os.path.splitext(rasterPath)[0] + ".lyr")
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.