I have solved OD Cost Matrix analysis and I'm trying to access the results using da.SearchCursor with SQL sorting. The problem is that the result is not sorted at all.
lines = arcpy.da.SearchCursor('OD_potential\Lines',['DestinationID','Total_'+impedance],None,None,False,(None,'ORDER BY DestinationID ASC')) This approach works with every other layer.
Previously I used old Cursor and it worked fine, but it was much slower.
lines = arcpy.SearchCursor('OD_potential/Lines','','','DestinationID; Total_'+impedance,'DestinationID A') I know there is a workaround using arcpy.Sort_management before the Cursor but then the runtime is same as using the old Cursor.
Any suggestions?
أكثر...
lines = arcpy.da.SearchCursor('OD_potential\Lines',['DestinationID','Total_'+impedance],None,None,False,(None,'ORDER BY DestinationID ASC')) This approach works with every other layer.
Previously I used old Cursor and it worked fine, but it was much slower.
lines = arcpy.SearchCursor('OD_potential/Lines','','','DestinationID; Total_'+impedance,'DestinationID A') I know there is a workaround using arcpy.Sort_management before the Cursor but then the runtime is same as using the old Cursor.
Any suggestions?
أكثر...