Tuesday, 15 December 2015

arcgis desktop - Sort feature class in Modelbuilder and populate new ids


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?



Answer



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.


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...