Snapping network locations with Build Query
With the snapping settings of a network analysis layer, you can choose the source feature classes that are searched when finding network locations. You can also define a query to restrict the search to a subset of the features. This is useful, for example, when you want to locate only on highways, but not on local roads.
- Open the Layer Properties dialog box for the network analysis layer.
Click the Network Locations tab.
Right-click the source feature you want to filter in the Snap To table under Name and click Build Query.
The Query Builder dialog box opens. It functions like the Select by Attributes dialog box.
- Enter a WHERE clause in the text box at the bottom of the Query Builder dialog box.
- Click OK.
The Query Builder dialog box closes.
- Click OK.
Now network locations can only locate on the features returned by the query.
Any network locations that are added or moved in this network analysis layer will respect the snapping settings. If you want network locations that were already part of the network analysis layer to respect the new settings, you can recalculate network location fields.
Although you can build a query to not locate on restricted source features, it is simpler to check Exclude restricted portions of the network, which is an option below the Snap To buttons on the Network Locations tab.