AnsweredAssumed Answered

da.SearchCursor ORDER BY SHAPE@AREA

Question asked by jamesfreddyc on Feb 7, 2017
Latest reply on Feb 7, 2017 by jamesfreddyc

I'm not having any success sorting an arcpy.da.SearchCursor by the SHAPE Area values.  No errors but it doesn't sort descending from my testing.

 

Anyone able to confirm this or offer a suggestion?

 

with arcpy.da.SearchCursor(clip_fc,['SHAPE@AREA','POLYGON_NM'],sql_clause=(None,'ORDER BY SHAPE.STArea() DESC')) as clipcur:
    for cliprow in clipcur:
        areaval = cliprow[0]

Outcomes