Hello all,
I have a table which has a field with coordinates in the format (x1,y1),(x2,y2),(x3,y3),(x4,y4),(x5,y5) which I want to convert into polygons. At first, I tried it manually by typing into the python window:
coordinates = [(x1,y1),(x2,y2),(x3,y3),(x4,y4),(x5,y5)]
with arcpy.da.InsertCursor(output_fc,["SHAPE@"]) as cursor:
cursor.insertRow([coordinates])This worked fine but is for obvious reasons a lot of work to do separately for every single polygon. So I tried to get it done in one go:
iCur = arcpy.da.InsertCursor(output_fc,["SHAPE@"])
with arcpy.da.SearchCursor(search_fc,"COL_A") as sCur:
for row in sCur:
iCur.insertRow([row[0]])This results in "TypeError: cannot alter multipart geometry type".
I don't understand why it thinks this is supposed to be a multipart geometry. My thinking was by iterating through the sCur with the for loop, it would take only one row at a time (which is confirm when I print(row)). This works as an input manually, why does it not work within the cursor and loop?