FAQ: Is it possible to sort features based on their spatial location in ArcGIS Pro?
Is it possible to sort features based on their spatial location in ArcGIS Pro?
Yes, it is possible to sort features based on their spatial location in ArcGIS Pro. Features are typically sorted by which object is first created. For example, the following point features are sorted and labeled according to their Object ID.
Features can be sorted based on the spatial distribution pattern by using the Spatial Sort Method parameter in the Sort tool. To sort the features using the Spatial Sort Method parameter, select Shape in the Sort Field parameter. However, sorting by the Shape field is only available with a Desktop Advanced license. For more information on how the Sort tool works, refer to the following documentation: How Sort (management) works.
For users with a Desktop Basic or Standard license, features can be sorted based on spatial location by adding coordinates information to the feature attribute table.
- Use the Add Geometry Attribute tool to add XY coordinates of the point features to the attribute table.
- In the Geoprocessing pane, click Toolboxes > Data Management Tools > Features > Add Geometry Attributes.
- Select the input feature from the Input Features drop-down list.
- Select Point x-, y-, z-, and m-coordinates for Geometry Properties.
Note: For line and polygon features, select Line start, midpoint, and end coordinates.
- Specify the appropriate coordinate system.
- Click Run. The field POINT_X and POINT_Y are added to the feature's attribute table.
- Use the Sort tool to sort the features based on one or multiple coordinates.
- In the Geoprocessing pane, navigate to Toolboxes > Data Management Tools > General > Sort.
- Select the feature from the Input Dataset drop-down list.
- Select the desired field created in Step 1 from the Sort Field drop-down list.
Note: In this article, POINT_X is selected as the sort field.
- Select the desired sort method from the Sort Method drop-down list.
- Click Run. The features are sorted based on spatial location.