Add Locations (Network Analyst) |
|
Release 9.3
Last modified December 23, 2008 |
![]() ![]() ![]() Print all topics in : "Tools" |
Adds network locations to a network analysis layer
Usage tips
Add Locations can be run repeatedly to append locations to the same sublayer. For example, if Stops for a Route Layer come from two feature classes, Add Locations can be called twice by using the APPEND option.
Learn about adding network analysis objects to network analysis classes.
The following environment setting affects this tool: workspace.
Command line syntax
An overview of the Command Line window
AddLocations_na <in_network_analysis_layer> <sub_layer> <in_table> <field_mappings> <search_tolerance> {sort_field} {source {snap type};source {snap type}...} {MATCH_TO_CLOSEST|PRIORITY} {APPEND|CLEAR} <NO_SNAP | SNAP> {snap_offset}
Parameter | Explanation | Data Type |
<in_network_analysis_layer> |
Network analysis layer to which network locations will be added. |
Network Analyst Layer |
<sub_layer> |
Adds network locations to the selected sublayer of the input network analysis layer. |
String |
<in_table> |
The feature class or layer that is the source for the new network locations. |
Table View |
<field_mappings> |
Sets the values for the properties of the network locations. Properties can be set to a constant or mapped to a field on the input feature class. |
Network Analyst Field Map |
<search_tolerance> |
The search tolerance for locating the input features on the network. The parameter includes a value and units for the tolerance. |
Linear Unit |
{sort_field} |
A field in which to sort the locations as they are added to the network analysis layer. |
Field |
{source {snap type};source {snap type}...} |
Allows you to specify which sources in your network dataset will be searched when finding locations, as well as specifying what portions of geometry will be used. |
String |
{MATCH_TO_CLOSEST|PRIORITY} |
Specifies whether or not to match new network locations to the closest element of any class in the network analysis layer.
|
Boolean |
{APPEND|CLEAR} |
Specifies whether or not to append new network locations to existing locations.
|
Boolean |
<NO_SNAP | SNAP> |
Specifies whether or not the new network locations should snap to positions on the network source features where they are located.
|
Boolean |
{snap_offset} |
When snapping a point to the network, you can apply an offset distance. An offset distance of zero means the point will be coincident with the network feature (typically a line). To offset the point from the network feature, enter an offset distance. The offset is in relation to the original point location. That is, if the original point was on the left side, its new location will be offset to the left. If it was originally on the right side, its new location will be offset to the right. |
Long |
AddLocations MyRouteLayer Stops d:\mydata\mystops.shp # "500 Meters"
Scripting syntax
About getting started with writing geoprocessing scripts
AddLocations_na (in_network_analysis_layer, sub_layer, in_table, field_mappings, search_tolerance, sort_field, search_criteria, match_type, append, snap_to_position_along_network, snap_offset)
Parameter | Explanation | Data Type |
in_network_analysis_layer (Required) |
Network analysis layer to which network locations will be added. |
Network Analyst Layer |
sub_layer (Required) |
Adds network locations to the selected sublayer of the input network analysis layer. |
String |
in_table (Required) |
The feature class or layer that is the source for the new network locations. |
Table View |
field_mappings (Required) |
Sets the values for the properties of the network locations. Properties can be set to a constant or mapped to a field on the input feature class. |
Network Analyst Field Map |
search_tolerance (Required) |
The search tolerance for locating the input features on the network. The parameter includes a value and units for the tolerance. |
Linear Unit |
sort_field (Optional) |
A field in which to sort the locations as they are added to the network analysis layer. |
Field |
search_criteria (Optional) |
Allows you to specify which sources in your network dataset will be searched when finding locations, as well as specifying what portions of geometry will be used. |
String |
match_type (Optional) |
Specifies whether or not to match new network locations to the closest element of any class in the network analysis layer.
|
Boolean |
append (Optional) |
Specifies whether or not to append new network locations to existing locations.
|
Boolean |
snap_to_position_along_network (Required) |
Specifies whether or not the new network locations should snap to positions on the network source features where they are located.
|
Boolean |
snap_offset (Optional) |
When snapping a point to the network, you can apply an offset distance. An offset distance of zero means the point will be coincident with the network feature (typically a line). To offset the point from the network feature, enter an offset distance. The offset is in relation to the original point location. That is, if the original point was on the left side, its new location will be offset to the left. If it was originally on the right side, its new location will be offset to the right. |
Long |
import arcgisscripting gp = arcgisscripting.create() #Set the Name from a field called Address and the default curb approach to be 'right side of vehicle' Field_map = "Name Address #;CurbApproach # 1" gp.AddLocations_na(MyRouteLayer, "Stops", "d:\\mydata\\mystops.shp", Field_map, "500 Meters")