Hey,
I'm trying to add new rows into empty polygon feature.
this is the code:
try:
cur = arcpy.da.InsertCursor(outshp, ["Id" , 'Floor_area'])
file = open(csvfile)
reader = csv.reader(file)
line = next(reader)
cnt = 0
for line in reader:
new_row = [line[0]]
points = []
for i in line[1:]:
p = i.split(',')
point = arcpy.Point(p[0], p[1])
points.append(point)
arr = arcpy.Array(points)
polygn = arcpy.Polygon(arr)
new_row.append(polygn)
cur.insertRow(new_row)
cnt += 1
del cur
except:
traceback.print_exc()
del cur
sadly, I'm getting this error:
Traceback (most recent call last):
File "<ipython-input-8-44580ffd528c>", line 21, in <module>
cur.insertRow(new_row)
TypeError: value #1 - unsupported type: Polygon
Can you understand why?
Thanks