Summary
When preparing a network analysis for solving, and there may be street attributes that must be assigned to points that lie along the streets, a workflow is discussed for applying street attributes to the points.
Procedure
Stops, Orders, or other point sublayers of a network analysis group layer have fields that identify the network edge to which a point is assigned during execution of the Add Locations tool. These fields are called Network Location Fields, and are populated automatically by the tool. These fields include SourceID, SourceOID, PosAlong, SideOfEdge, and CurbApproach. The workflow described below is applicable only if a point is associated with a network edge, not with a network junction.
- Before running Add Locations to assign points to network edges, add and populate a custom field in the edge feature class to provide information to the point features that will be assigned to those network edges. For instance, if a point needs information on whether its assigned street is rural or urban, create a field in the edge feature class and assign a value to that field corresponding to its status as rural or urban.
- Run the Add Locations tool to assign points to positions along network edges. The Network Location Fields will be populated, and in this workflow the fields of interest are SourceID and SourceOID.
- Set a definition query on the point layer to enable only point features with SourceID corresponding to a particular edge layer.
- Join that edge layer to the point layer on the SourceOID field in the point layer and the ObjectID field in the edge layer, keeping only matching features.
- If any features are matched, run Calculate Field to populate the desired field in the point layer (such as CurbApproach, for instance) with a valid value that depends upon the custom field that was populated in Step 1. Afterward, remove the join and remove the definition query.
- If there is more than one edge centerline layer, repeat steps 3 through 5 for each applicable edge layer.
Continue with any other steps normally done to prepare the analysis sublayers for solving, then solve. Confirm the path of the route is generated as expected for the custom value(s) populated in the point sublayer. This workflow could potentially be converted to a script or model.