Error in Script 000714 creating polygon script

المشرف العام

Administrator
طاقم الإدارة
I have written a script with the aim of producing a rectangular buffer around a line. The aim is to create an array of points from the end points of the line and creates a polygon from them.

I have checked and the creation of the array of points to form the polygon is working. What is not is the script in arcmap. See below reduced version of my code:

import arcpyimport mathimport sysdef function1: #does something to produce array. def function2: #does something to produce array. if __name__ == '__main__': # Take in Arguments # Arguments are optional outFC_location = arcpy.GetParameterAsText(0) end1_Easting = float(arcpy.GetParameterAsText(1)) end1_Northing = float(arcpy.GetParameterAsText(2)) end2_Easting = float(arcpy.GetParameterAsText(3)) end2_Northing = float(arcpy.GetParameterAsText(4)) fcName = outFC_location.rpartition("\\")[2] #what's this? fcPath = outFC_location.rpartition("\\")[0] #what's this? outFC = arcpy.CreateFeatureclass_management(fcPath, fcName) #do a selection of things that result in producing an array mypolygon = arcpy.Polygon(polygon_array) cursor = arcpy.da.InsertCursor(outFC, ['SHAPE@']) cursor.insertRow([extended_runway_polygon])This is returning the error 000714: Error in Script. All I have determined is that the array is being produced correctly. Beyond this I do not know where the problem is.

What is the error in my code or my approach?



أكثر...
 
أعلى