HOW TO

Reorder the records of complex line segments sequentially

Last Published: April 25, 2020

Summary

In some cases, it might be necessary to reorder the records in the table of a feature class in a sequence according to the features' geographic progression. The Sort (Data Management) tool provides the functionality to sort the records of features based on one or multiple fields. However, the Sort tool has limitations in the spatial sort methods (UL, UR, LL, LR, and PEANO), and gives incorrect results for more complex features.

The instructions provided describe how to reorder the records of complex line segments in a sequence based on the geographic progression of the features.

Procedure

  1. In a file geodatabase, create a feature dataset and store the line feature class in the created feature dataset. Refer to the following document on how to create the feature dataset: Creating a feature dataset.
  2. Create a geometric network of the line feature class. Notice there are two new feature classes (Street_Net and Street_Net_Junctions) automatically created in the feature dataset after the geometric network is built.
    User-added image

    Add the created geometric network feature classes to the map.
Refer to the following document on how to create a geometric network from a feature class: Building a geometric network from existing simple feature classes.
  1. Create a route from the geometric network using the Create Routes tool. Navigate to Linear Referencing Tools > Create Routes.
    1. Select the geometric network feature class created in Step 2 as the Input Line Features.
    2. For the Route Identifier Field, select a field that has the same attribute or record for every feature in the drop-down list.
    Note:
    If there is no field containing the same attribute for all features, select the Enabled field. In the geometric network feature class, a field named Enabled is created in the attribute table, and the attribute of all features for the field are set to True.
    1. Set a name and location for the Output Route Feature Class.
    2. Click OK, leaving other settings to default. A new route feature class is created. The output is a single line feature.
  2. Run the Locate Features Along Routes tool. Navigate to Linear Referencing Tools > Locate Features Along Routes.
    1. Select the junction points feature class created in Step 2 as the Input Features.
    2. Select the route feature class created in Step 3 as the Input Route Features.
    3. Select the same field as in Step 3(b) as the Route Identifier Field.
    4. Type 1 in the Search Radius parameter.
    5. Set a name and location for the Output Event Table.
    6. Leave the default setting of the Measure Field to MEAS. This field is used to reorder the ObjectID fields in Step 7(c).
      User-added image
    7. Click OK. The output created is a table.
  3. Join the created table in Step 4 to the junction points feature class created in Step 2, to append the fields in the table to the fields in the attribute table of the junction points feature class. Right-click the junction points feature class in the Table Of Contents > Joins and Relates > Join.
    1. Select Join attributes from a table.
    2. Select the ObjectID field from the Choose the field in this layer that the join will be based on drop-down list.
    3. Select the table created in Step 4 to join to the junction points feature class.
    4. Select the ObjectID field from the Choose the field in the table to base the join on drop-down list.
    5. Click OK. The fields in the table are appended to the attribute table of the junction points feature class.
    6. Export the junction points feature class to make the join permanent. Refer to the following document on how to export features: Exporting features. A new point feature class is created.
  4. Run the Spatial Join tool. Navigate to Analysis Tools > Overlay > Spatial Join.
    1. Select the original line feature class as the Target Features.
    2. Select the exported point feature class in Step 5(e) as the Join Features.
    3. Set a name and location for the Output Feature Class.
    4. Select JOIN_ONE_TO_ONE as the Join Operation.
    5. Select INTERSECT as the Match Option.
      User-added image
    6. Click OK. A new feature class of the spatial join operation is created.
  5. Run the Sort tool. Navigate to Data Management Tools > General > Sort.
    1. Select the feature class created in Step 6 as the Input Dataset.
    2. Set a name and location for the Output Dataset.
    3. Select the MEAS field in the Field(s) drop-down list to reorder the ObjectID fields based on the measured distance from right to left along the line.
    4. Click OK. The records of the complex line segments are reordered in a sequence based on the geographic progression.

Article ID:000014009

Software:
  • ArcMap

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Related Information

Discover more on this topic