Arcgis toolbox导入python script运行出错,实在找不出脚本哪里有问题。求助

import arcpy
arcpy.env.workspace = arcpy.GetParameterAsText(0)
inFeatures1 = arcpy.GetParameterAsText(1)
inFeatures2 = arcpy.GetParameterAsText(2)
outFeatureClass1 = arcpy.GetParameterAsText(4)  
outFeatureClass2 = arcpy.GetParameterAsText(5)
dissolveFields = arcpy.GetParameterAsText(3)
arcpy.Dissolve_management(inFeatures1, outFeatureClass1, dissolveFields)
arcpy.Dissolve_management(inFeatures2, outFeatureClass2, dissolveFields)
intersectOutput = arcpy.GetParameterAsText(6)
arcpy.Intersect_analysis ([outFeatureClass1,outFeatureClass2], intersectOutput, “ALL”, “”, “”)
fieldPrecision = 18
fieldScale = 6
arcpy.AddField_management(intersectOutput, “New_Area”, “FLOAT”, fieldPrecision, fieldScale)
expression = “!SHAPE.area!”

arcpy.CalculateField_management(intersectOutput, “New_Area”, expression, “PYTHON”)

脚本如上,主要是用到arcpy里的dissolve和intersect功能,disslove是能正确执行的,但是intersect那部分执行不了,得不到结果图层。
请问脚本里intersect处有什么问题吗?

转载自:https://blog.csdn.net/lll1928/article/details/80110562

You may also like...