1

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 Sorting feature class to calculate sequential ID field using ArcGIS Field Calculator? 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?

8
  • 1
    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? Commented Jun 21, 2012 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. Commented Jun 22, 2012 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. Commented Jun 22, 2012 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. Commented Jun 22, 2012 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. Commented Jun 22, 2012 at 6:08

1 Answer 1

1

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.

1
  • I actually had to do this the other day. Here is the gist containing the Python script. Commented Jul 14, 2015 at 18:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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