I am trying to enumerate each row of a points shapefile and get a certain field's value (elevation) and the xy coordinates.
But I see I can only use:
- arcpy.SearchCursor to get the field; OR
- arcpy.da.SearchCursor(fc, "SHAPE@XY") for the xy coordinates
Can I do both at once?
Best Answer
Yes - the code below uses the SHAPE@XY token and a field called elevation to do it on a test feature class: