The origin-destination (OD) cost matrix finds and measures the least-cost paths along a network from multiple origins to multiple destinations. The OD cost matrix analysis outputs a Lines network analysis class, which stores information about the resulting paths from the origins to the destinations. In some instances, the Name field in the Lines class attribute table displays the attributes as 'Location 1 - Location 2', 'Location 1 - Location 3', and this pattern continues depending on the total number of the origins and destinations.
The following figure shows the Lines class attribute table. The origins and destinations are named as 'Location #' consecutively in the Name field representing the resulting paths created by the OD cost matrix.
From the attribute table, it is difficult to determine which exact origin or destination is associated with a particular 'Location #' especially when there are too many network analysis objects in the Origins and Destinations classes.
All Network Analyst analyses use a Name field to uniquely identify each network element in a sub-layer (such as Origins in an OD Cost Matrix). When loading network locations into any point network analysis sub-layer, if a Name field is not specified, the analysis assigns a default name to the point locations (Location 1, Location 2, Location 3, etc).
To make the locations more readable and understandable, unique identifiers (unique names) can be assigned from a custom field when loading the points into the sub-layer.
The instructions provided describe how to apply custom field information to the Name field in the Origins and Destinations sub-layers so that they pass to the Lines sub-layer when running an OD Cost Matrix analysis.
Note: These steps are specifically for an OD Cost Matrix analysis, but all Network Analyst layers (ex. Service Area, Route, etc) have a Name field, which can be mapped to a custom field when loading the locations.
The following figure shows the attribute table of the Lines class after running the OD cost matrix analysis. The Name field applies the custom information from the origins and destinations feature classes.