Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to sort my feature class in a model based on coordinates stored in its attribute table. The sorting must be done on Y_coord descending, then X_coord ascending. The answer to How to sort a feature class and then calculate a sequential ID field? looks like what I need, except I only have an ArcEditor Licence, and free versions of Xtools Pro and ET Geowizards. My model performs several other processes as well, so I need the sorting to be included in it. How can I perform the sort with the above limitations?

However, looking at the options in the Sort tool, I've realised that what I actually want to do is sort my features spatially, starting from the upper left, but to sort based on the Shape field requires an ArcInfo licence. The sort tool from ET Geowizards does not allow sorting on this field either. Are there other tools which could do this?

share|improve this question
It looks like all the tools proposed in that answer are working with all license levels. I don't see any problems for ArcEditor License... Or I've missed something? – Alex Markov Jun 21 '12 at 14:45
@AlexMarkov they work just fine when run manually from ArcMap, but when I try adding the Sort Shapes tool from the ET Toolbox into my model, it says "Tool not licensed". The XTools Pro toolbox does not contain the Sort Features/Records tool which is available under Table Operations on the ArcMap toolbar. – Cindy Williams-Jayakumar Jun 22 '12 at 5:07
You are using ET GeoWizards tools instead of ArcGIS native. Try to add Sort tool from Data Management \ General toolset and Calculate Field from 'Data Management \ Fields`. These one's are actually stated in that answer. – Alex Markov Jun 22 '12 at 5:55
According to the answer to this question, the Sort tool requires an ArcInfo licence, so I that's why I did not consider it. I see now though that it does allow for sorting on one field only, so I guess I'll have to add two sort processes to my model. – Cindy Williams-Jayakumar Jun 22 '12 at 6:00
But according to help it is licensed at all levels and I've just checked - it is running under my ArcView license. – Alex Markov Jun 22 '12 at 6:08
up vote 1 down vote accepted

I tried using Sort in 10.1, sorting on the Shape field starting from the upper left. It did work as expected, but because the features I want to sort are irregularly shaped, the sorting does not occur in the order I want it to, i.e. from left to right then down. This is because the y coordinate of the upper left corner of a feature on the right may be slightly above that of the leftmost feature, so the rightmost feature is placed first, even though I would want the leftmost feature first.

I suppose after the initial use of the Sort tool, some Python scripting would be needed to further sort the results.

share|improve this answer
I actually had to do this the other day. Here is the gist containing the Python script. – Cindy Williams-Jayakumar Jul 14 '15 at 18:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.