我试图创建一个缓冲要素类(多边形)的工具,然后将缓冲输出层与点shapefile相交。当我运行该工具时,缓冲区分析运行并完成,但交叉分析不会。错误消息是
ExecuteError:无法执行。参数无效 ERROR 000732:(我的缓冲区输出图层和点形状文件)不存在或不受支持
无法执行(相交)。
我的所有图层都加载到我的arcmpap中,因此我不确定为什么会这样做。
import arcpy
in_Path = arcpy.GetParameterAsText(0) # first parameter in the interactive tool
out_Path = arcpy.GetParameterAsText(1) # second parameter in the interactive tool
bufferDistance = arcpy.GetParameterAsText(2)# third parameter in the interactive tool
result_buffer = arcpy.Buffer_analysis(in_Path, out_Path, bufferDistance,"FULL", "ROUND", "ALL", "") #the parameters to able compute the tool
# ^^ assign variable for the buffer analysis tool
in_CitiesShapefile = arcpy.GetParameterAsText(3)# fourth parameter in the interactive tool
out_CitiesWithinBuffer = arcpy.GetParameterAsText(4) # fifth parameter in the interactive tool
arcpy.Intersect_analysis([out_Path, in_CitiesShapefile], out_CitiesWithinBuffer,"ALL", "", "INPUT") #the parameters to able compute the tool
答案 0 :(得分:0)