Looked around and found other Cursor questions, but nothing dealing with updating 'SHAPE@LENGTH'. I am running ArcGIS 10.2.1 and have a multipoint shapefile that I am grouping into polygons based on a shared attribute. However, sometimes only one point has the attribute and so a very tiny polygon is drawn, as described by the minimum bounding geometry documentation (http://resources.arcgis.com/en/help/main/10.2/index.html#//00170000003q000000).
I wanted to loop through the new polygon shapefile and use Update Cursor to access the tiny polygons' Geometry ('SHAPE@LENGTH') and bump it up to a visible level. I am unfortunately not understanding something because the changes to the length are not saved. I figured it would be harder than just reassigning the area value, but so far I can't understand what is going wrong:
import os import arcpy # Point data directory polyFiles = 'C:\Users\...polyFiles' # Polygon file made from the points boxes = os.path.join(polyFiles, 'OE_AK_poly.shp') # If length is less than 1000m bump it up so it's visible on the map with arcpy.da.UpdateCursor(boxes, ["SHAPE@LENGTH"]) as cursor: for row in cursor: if row < 1000: row = 1000 cursor.updateRow(row)