Running ArcGIS 10.2 here and a complete beginner with Python. I'm trying to figure out a workflow to test for closed polylines using the field calculator. Essentially what I'd like to do is to populate a specific field with "closed" or "open". This is what I've come across and if I understand it correctly, it loops through each row and checks if the first x coordinate matches the last x coordinate, if there is a match then it prints the OID.
How do I convert this to a field calculator expression?
Do I need to use an update cursor rather than search to populate my new field?
fc = "Boundary" rows = arcpy.SearchCursor(fc) for row in rows: geom = row.shape if geom.firstPoint.X == geom.lastPoint.X: print row.OBJECTID del row, row