Monday 21 October 2019

Sorting shapefile records on attribute to update new rank field using ArcPy?


Basically, I am trying to sort the records within the shapefile based on an attribute(eg: pop) and then add a new field that indicates ranking based on the sort. eg: the record with the highest pop would get a rank value of 1, the next would get a value 2.


I can easily sort and add the field in arcgis but the calculating field so that it is ranked based on the order is something i don't know how it works and hence i am thinking may be a python script would be better.




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...