I'm trying to add an attribute value to a new PointGeometry before I write it into the new file. How do I do that with
Let's say in this example I want to write the ID of the line feature into the new point feature:
points =  for row in arcpy.da.SearchCursor('lineFeature', ("ID", "SHAPE@")): length = int(row.length) for i in xrange(0, length, 10): point = row.positionAlongLine(i) # should write the ID here # something like # point.setValue('sourceID', row) points.append(point) arcpy.CopyFeatures_management(points, 'pointsFeature')
point.setValue('sourceID', row) point. doesn't work, it returns:
Traceback (most recent call last):
File "<string>", line 8, in <module>
AttributeError: 'PointGeometry' object has no attribute 'setValue'