To gain access to all feature's geometries in a feature class, just do the following:
import arcpy from arcpy import env fc = r"c:\temp\data.shp" geoms = arcpy.CopyFeatures_management(fc, arcpy.Geometry()) for g in geoms: print g.extent
This sample allows anyone to directly access the geometries of the input feature class without having to use the Cursor objects.
The same idea can be applied to other functions to the analysis function as well:
import arcpy from arcpy import env fc = r"c:\temp\data.shp" geom = arcpy.Buffer_analysis(fc, arcpy.Geometry(), "100 Feet", "FULL", "ROUND") print geom.extent
Here the buffer tool outputs a single geometry to the geom object and the extent is displayed.
Where this becomes really powerful is when you need to perform geometry operations on your data, and want to put the results back into that row.
import arcpy from arcpy import env fc = r"c:\temp\data.shp" with arcpy.da.UpdateCursor(fc, ["SHAPE@"]) as urows: for urow in urows: geom = arcpy.Buffer_analysis(urow, arcpy.Geometry(), "100 Feet", "FULL", "ROUND") row = geom urows.updateRow(urow) del urow del geom
Assuming that the input is a polygon, this snippet shows how geometries can be used as inputs and outputs thus allowing for easy insertion back into the original row.
Hope this helps!