The arcpy.MakeRasterLayer_management tool returns the following error, "ERROR 000670: output <value> is same as input <value>."
上次发布: August 19, 2020ArcGIS for Desktop
漏洞 ID 编号
BUG-000095702
已提交
April 12, 2016
上次修改时间
June 5, 2024
适用范围
ArcGIS for Desktop
找到的版本
10.3.1
操作系统
Windows OS
操作系统版本
7.0 64 Bit
状态
Will Not Be Addressed
开发团队已考虑过该问题或请求,并决定不会解决该问题。 问题的“其他信息”部分可能包含进一步说明。
附加信息
We apologize that we were unable to address this issue within the current product support cycle. If the issue continues to affect your work in a supported release, please contact Technical Support.
解决办法
Specify a different name for the new raster layer. The layer can then be renamed, and the table of contents (TOC) can be updated using the following code:arcpy.MakeRasterLayer_management(in_raster="raster", out_rasterlayer="rasttmp") mxd = arcpy.mapping.MapDocument("CURRENT") df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0] for lyr in arcpy.mapping.ListLayers(mxd, "*", df): if (<a href="http://lyr.name" target="_blank">lyr.name</a> == "rasttmp"): <a href="http://lyr.name" target="_blank">lyr.name</a> = "raster" arcpy.RefreshTOC()This is a relatively inconvenient method to have a raster layer by the same name as the input.