Available with Network Analyst license.
In this tutorial, you will create a customized network dataset from data of San Diego streets and public attractions. You will start by creating a basic network dataset using the Create Network Dataset tool, then you will go through each property page to set up additional travel attributes such as, network sources, costs, restrictions, descriptors, travel modes, and directions.
The final network dataset created using this tutorial can be used to generate routes and driving directions for tourists looking to visit public attractions around San Diego.
A completed network dataset is included in the tutorial data as an example.
Get the data
The data for this tutorial is available for download.
- Go to the data download page.
- Click the Download button, and save the file locally.
- Unzip the downloaded file.
Create a map
- Open ArcGIS Pro.
- Create a new project based on the Map.aptx template.
A new project with a map appears.
Examine the source feature classes
Next, add the Streets and Walking_Pathways feature classes to the map.
- In the Catalog pane, which is on the side of the application by default, right-click Folders and choose Add Folder Connection .
The Add Folder Connection dialog box appears.
- Browse to the folder where you placed the tutorial data, double-click Network Analyst, and click Tutorial to select the folder.
- Click OK.
A connection to the Tutorial folder is created.
- In the Catalog pane, expand Folders > Tutorial > CreateNetworkDataset > SanDiego.gdb > Transportation.
- Drag Streets and Walking_Pathways onto the map.
Both feature classes are added to the Contents pane as well as to the map.
- In the Contents pane, right-click the Streets layer and choose Attribute Table.
- Examine the different fields and the values in them. Many of the fields will be used by the network dataset in some capacity.
The fields such as FT_Minutes, TF_Minutes, KPH, and Meters can be used to set up cost attributes that tell the network dataset the cost for traversing each edge. These fields are typically double or float type fields.
The F_ZLEV and T_ZLEV fields will be used for defining different levels of streets. This will help to properly establish structures such as overpasses and underpasses, where you cannot turn directly from one street to another due to a difference in elevation. These fields will be covered later on, when we are creating the network dataset and choosing an elevation model.
The FUNC_CLASS field is an integer field that assigns a category to each road. This field will be used for setting up a hierarchy attribute on the network dataset. Again, we’ll come back to this field and to hierarchy in a future part of this tutorial.
There are also fields such as PAVED, AR_PEDEST, AR_BUS, AR_AUTO, DIR_TRAVEL, TF_HeightLimit_Meters, and FT_HeightLimit_Meters. These fields will be used for setting up restrictions to prevent travel on certain roads in certain situations. Most of the fields have a value of Y or N in them. The DIR_TRAVEL field has values such as FT and TF in it, which will be used for setting up a one-way restriction. The FT_HeightLimit_Meters and TF_HeightLimit_Meters fields have mostly null values, with a few features filled in with a number. These two fields will be used to set up a special type of restriction called a parameterized restriction. Once the height restriction is set up, we’ll be able to specify a vehicle height of the tour bus in the analysis settings, and the network dataset can restrict some roads if the tour bus cannot drive on them due to its height.
- Examine the different fields and the values in them. Many of the fields will be used by the network dataset in some capacity.
- Close the attribute table when you're done examining it.
Create the network dataset
Create a basic network dataset using the Create Network Dataset geoprocessing tool.
- On the Analysis tab, in the Geoprocessing group, click Tools to open the Geoprocessing pane.
- Click in the search bar in the Geoprocessing pane and type Create Network Dataset.
- Click the first result to open the Create Network Dataset geoprocessing tool.
- For the Target Feature Dataset parameter, click the Browse button.
- Browse to SanDiego.gdb > Transportation, then click OK.
The Transportation feature dataset will be populated in the Target Feature Dataset parameter.
- Type NewSanDiego_ND in the Network Dataset Name parameter.
- For the Source Feature Classes parameter, check only the box for Streets
This will include only the Streets as part of the network dataset and not the Walking_Pathways or Signposts. You’ll add more features and functionality to the network dataset in the successive parts of the tutorial.
- Leave the default value Elevation_Fields for the Elevation Model parameter.
- Click Run at the bottom fo the pane
Once the tool has completed, the new network dataset named NewSanDiego_ND will be added to the map.
- Right-click the NewSanDiego_ND layer in the map and choose Remove to remove the network dataset layer from the map.
Network dataset properties cannot be edited while the network dataset layer is in the map. You must remove the layer from the map to proceed with the rest of the tutorial.
Add network sources and setting up connectivity policies
The network dataset was created initially with only the Streets feature class as a network source. Now you will add the Walking_Pathways feature class to the network dataset and set up the proper group and vertical connectivity policies for both network sources.
Once a network dataset has been created, all editing is done through the network dataset property pages.
- In the Catalog pane, right-click the NewSanDiego_ND network dataset and choose Properties to open the Network Dataset Properties dialog box.
- Click Source Settings > Sources.
The page displays all the source feature classes that currently participate in your network dataset.
- Click the Add/Remove Sources button in the upper right corner of the dialog box.
There will be one edge source and one junction source already present. The junction source is the default junction feature class that gets created and is managed by the network dataset.
The Add/Remove Sources dialog box appears.
- On the Add/Remove Sources dialog box, check the box next to Walking_Pathways and click OK.
Other polyline and point feature classes that are in the feature dataset will be listed on the Add/Remove Sources dialog box as well. A network dataset can have many edge and junction sources that can play different roles. For now, you will only check Walking_Pathways.
After clicking OK, Walking_Pathways will appear as a network dataset source.
- Click the Vertical Connectivity tab
Note:
You cannot have different elevation models for different sources. You cannot use z-coordinates for Walking_Pathways and elevation fields for Streets. All network dataset sources must use the same elevation model. To learn more about using z-coordinates or elevation fields with the network dataset, see Understand connectivity
. - For Streets (From Node) and Walking_Pathways (From Node), change the property from the drop-down list from None to F_ZLEV.
- For Streets (To Node) and Walking_Pathways (To Node), change the property from the drop-down list. from None to T_ZLEV.
The concepts of From and To nodes are derived from the digitized direction of the line feature. The From node is at the start of the line and the To node is at the end of the line. Similarly, the Along direction refers to traveling with the digitized direction of the line while the Against direction refers to traveling in the opposite of the digitized direction of the line.
- Click the Group Connectivity tab.
- Click the drop-down list. for Policy for Streets and note the options but do not change anything.
- Click OK on the Network Dataset Properties dialog box to commit the changes made and close the dialog box.
Add costs
Network analysis often involves the minimization of a cost (also known as impedance) during the calculation of a path (also known as finding the best route). In this section, you will be adding cost attributes to the network dataset. A cost attribute is used to model an impedance on the network dataset. These attributes are apportionable along an edge; that is, they are divided proportionately along the length of an edge.
Learn more about cost attributes
- In the Catalog pane, right-click the NewSanDiego_ND network dataset and choose Properties to open the Network Dataset Properties dialog box.
- Click the Travel Attributes page then the Costs tab.
The Create Network Dataset tool automatically creates one cost attribute, Length, which is based on the geometry field from the network sources.
- Click the Length attribute in the Distance section of the cost.
- Click the Menu button and choose Rename.
- Type Miles in the Name text box in the Properties section and press Enter on your keyboard to accept the name change.
- Change the Units to Miles.
Note that the value for the Streets (Along) row is the Shape field. Passing the Shape field into the evaluator passes the spatial reference, unit and geometry for the edge into the evaluator. Using the Shape field allows the evaluator to use the spatial reference when calculating the length of the edge. In contrast, the Shape_Length field only passes in a number and unit, possibly leading to a less accurate length for the edge, depending on the coordinate system of the data.
When the evaluator uses a regular number field for the cost, if you want to change the units for the evaluator, you need to write an expression on the Evaluator Settings dialog box to convert the number coming from the field to the new unit. For example, to convert miles to feet, you would use the following expression:
[Miles_Field]*5280
When using the Shape and Shape Length fields in the evaluator, you only need to change the units of the cost, and the evaluator will do the conversion in the background.
- In the Evaluators section, in the Edges group, for the Walking_Pathways (Along) row, change the Type from Same as Default to Field Script.
- Double-click the Value column of Walking_Pathways (Along) to make the Field Script Settings button available, then click the Field Script Settings button .
The Evaluator Settings dialog box will appear.
- Type [Shape] in the Result box and click OK.
An evaluator tells the network how to calculate the impedance, or cost, for each edge. It can be a constant, based on a field, based on another attribute, or calculated from a script. Each of these is a different type of evaluator.
- Click the Menu button and choose New.
- Type Minutes for the name of the new cost.
- In the Evaluators section, in the Edges group, for the Streets (Along) row, change the Type from Same as Default to Field Script.
An X icon will appear next to the Streets (Along) and Streets (Against) rows, but that will go away after you choose a field on which to base the evaluator.
- Double-click the Value column of Streets (Along) to make the Field Script Settings button available, then click the Field Script Settings button.
You may have one field that represents the cost for traveling either direction on an edge. For example, a Minutes field, which has been calculated by dividing the length of the line by the speed limit, would work for both the along and against directions. If the same field can be used for both directions of travel, you can use the field script evaluator for the Streets (Along) row. Then, instead of setting the field script evaluator up for the Streets (Against) direction, change the evaluator Type to Same As Along.
For this data, there are different fields to represent the along and against directions, so you'll be setting up both directions.
- Type [FT_Minutes] in the Result box and click OK.
- Repeat steps 12 and 13 for the Streets (Against) row.
- Type [TF_Minutes] in the Result box and click OK.
- Repeat steps 12 through 16 for the Walking_Pathways (Along) and Walking_Pathways (Against) rows.
Note:
There are many types of evaluators, which can be used in Costs, Restrictions and Descriptors. Field Script evaluators are the most commonly used, because they use a single field or simple expression based on a field, to determine the cost to traverse the edge.
Learn more about the types of evaluators used by the network
- Still in the Evaluators section, in the Turns group, change the Type of the <Default> row to Turn Category.
- Double-click the Value column of <Default> to make the Turn Category Settings button available, then click the Turn Category Settings button.
The Turn Category Evaluator dialog box will appear.
- Change the seconds for Left Turn and Reverse Turn to 5.
Any analysis using the Minutes cost attribute will add a 5-second delay when a left turn or a reverse turn is encountered.
- Click OK to accept the changes and close the Turn Category Evaluator dialog box.
Note:
There will be a warning on the Minutes cost that the Turn Category Evaluator cannot use road class to distinguish turns because there is no hierarchy attribute. This is just a warning and can be ignored. You will be addressing it later in the tutorial when a hierarchy attribute is added.
- Click OK on the Network Dataset Properties dialog box to commit the changes made and close the dialog box.
The network dataset now has a length cost and a time cost. The next thing you will do is add restrictions, such as Driving an Automobile, Walking, and Vehicle Height Limit.
Add restrictions and descriptors
In this section, you'll add restrictions that model walking, driving a car, driving a bus, and having a height limit for vehicles. You will also add a descriptor for vehicle height that will be used with the vehicle height restriction.
During an analysis, restrictions can determine whether traversing roads with certain characteristics is prohibited entirely, avoided, or even preferred. For example, restrictions can be used to prevent pedestrians from walking on highways or to prevent tall trucks from traveling on roads with insufficient overhead clearance.
Descriptors are attributes that describe characteristics of the network or its elements. Unlike costs, descriptors are not apportioned. This means that the value does not depend on the length of the edge element. Use descriptors to bring attributes for use in hierarchy and restrictions that are not meant to be apportioned and used in a cost into the network dataset. A descriptor will be used in this tutorial to bring the vehicle height from the TF_HeightLimit_Meters and FT_HeigtLimint_Meters fields on the Streets feature class for use in the Height Restriction restriction.
Learn more about restriction attributes
Learn more about descriptor attributes
First, you'll create basic restrictions for modeling driving an automobile, driving a bus, and walking.
- In the Catalog pane, right-click the NewSanDiego_ND network dataset and choose Properties to open the Network Dataset Properties dialog box.
- Click the Travel Attributes page and click the Restrictions tab.
- Click the Menu button in the upper right corner of the Restrictions tab and choose New.
- Type Driving an Automobile for the name of the new restriction.
- Leave the Usage Type as Prohibited.
- In the Evaluators section, in the Edges group, for the Streets (Along) row, change the Type from Same As Default to Field Script.
An X icon will appear next to the Streets (Along) and Streets (Against) rows, but that will go away after you choose a field on which to base the evaluator.
- Double-click in the Restricted column of the Streets (Along) row to make the Field Script Settings button available, then click the Field Script Settings button.
The Evaluator Settings dialog box will appear.
- Type [AR_AUTO]="N" in the Result box and click OK.
This field denotes whether a car can legally travel on the road. A value of Y indicates that automobiles can travel on that road, while a value of N indicates that automobiles cannot travel on that road.
Restrictions are always a Boolean type. When you define field script, element script, or function for a restriction, you tell the restriction which values returned by the expression, script, or function count as True, which would affect that edge. Any other value will be interpreted as False, leaving the edge unaffected. In this case, when the restriction affects the edge, it will prohibit it from being traversed.
- For Walking_Pathways (Along), change the Type to Constant and the Prohibited to True.
- Leave the Walking_Pathways (Against) as Same as Along.
Walking_Pathways should never allow motorized vehicles on them, so you can set a constant value to make them always restricted when this restriction is active.
- Add a new restriction to prohibit buses from traversing certain roads by repeating steps 4 through 10, naming the restriction Driving a Bus and using the AR_BUS field.
- Add a new restriction named Walking.
- For Streets (Along), change the evaluator Type to Field Script.
- Double-click in the Restricted column of the Streets (Along) row to make the Field Script Settings button available, then click the Field Script Settings button .
- On the Evaluator Settings dialog box, in the Results box, type [AR_PEDEST] = "N" .
This will restrict roads that are interstates, or other high-traffic roads, which are off-limits to pedestrians, when the Walking restriction is active.
- Leave the default evaluator settings for the Walking_Pathways edge.
- Create a restriction named Avoid Unpaved Roads.
- Change the Usage Type from Prohibited to Avoid.
- For Streets (Along), change the evaluator Type to Field Script.
- In the Evaluator Settings, in the Result box, type [PAVED] = "N".
This way, any edge that has a value of N in the PAVED field will be moderately avoided.
- Add a new restriction named Oneway.
- For Streets (Along), change the evaluator Type to Field Script.
- Double-click in the Restricted column of Streets (Along) to make the Field Script Settings button available, then click the Field Script Settings button .
One-way streets are typically restricted in one direction of travel on a street. So in this case, you want different values for different directions of travel along an edge. You’ll sett up similar, but slightly different, field expressions for each direction of travel on Streets.
- Type restricted in the Result box and the following expression in the Code Block box:
restricted = false Select Case UCase([DIR_TRAVEL]) Case "N", "TF", "T": restricted = True End Select
This VBScript expression will look for values of N, TF, or T, and restrict that edge if it has one of those values. It is written to be case insensitive.
The TF and T typically stand for To-From and To, respectively. These values indicate which direction of travel is restricted on the edge. According to the expression, travel in the To-From, or against, direction is prohibited while travel in the From-To, or along, direction is allowed
- Click OK on the Evaluator Settings dialog box to accept the changes.
- For Streets (Against), change the evaluator Type to Field Script.
- Now open the Evaluator Settings dialog box for the Streets (Against) row.
- Type restricted in the Result box and the following expression in the Code Block box:
restricted = false Select Case UCase([DIR_TRAVEL]) Case "N", "FT", "F": restricted = True End Select
This expression is the same as the last one, except that instead of TF and T, it has FT and F. This expression would restrict the opposite set of streets to the other expression, which is what is needed for the other half of the one-way restriction.
- Click OK on the Evaluator Settings dialog box to accept the changes.
- Click the Descriptors tab.
- Click the Menu button and click New.
- Type Height Limit (Feet) for the name.
- For the Streets (Along) row, change the evaluator type to Field Script.
- Open the Evaluator Settings dialog box for the Streets (Along) row.
- Type the following expression in the Result box:
[FT_HeightLimit_Meters]/0.3048
This will take the value from the FT_HeightLimit_Meters field and convert it from meters to feet.
- For the Streets (Against) row, change the evaluator type to Field Script.
- Open the Evaluator Settings dialog box for the Streets (Against) row.
- Type the following expression in the Result box:
[TF_HeightLimit_Meters]/0.3048
- Click OK to accept the expression.
- Click the Restrictions tab at the top.
- Add a new restriction attribute named Height Restriction.
- Expand the Parameters section if needed.
- In the Parameters section, click in the grid to add a new row.
- Change the name of the new parameter to Vehicle Height (Feet).
Sometimes network analysis depends on a variable condition. In those cases, you can use a parameter. A parameter behaves like a placeholder variable. It will use the default value unless that value is overwritten by something else. The parameter will be exposed in the Travel Mode settings in the analysis layer, where you can change the height of the vehicle for that analysis.
Adding parameters to a restriction, cost, or descriptor makes the restriction, cost, or descriptor a parameterized attribute. Parameterized attributes can model many things, including height, weight, vehicle axle count restrictions, or scaled travel costs.
- Change the Type for the Streets (Along) row to Function, then open the Evaluator Settings dialog box.
For a function evaluator, you create a simple mathematical function. For numeric type attributes such as a cost or descriptor, multiplication, division, subtraction, and addition can be the operation performed. Boolean attributes, such as a restriction, use comparison operands, such as greater than or less than.
- Set the Attribute Name to Height Limit (Feet), which is the descriptor you created previously.
- Set the Parameter Name to Vehicle Height (Feet), which is the parameter you just added to this restriction.
- For the operator, choose less than or equal to (<=).
The expression will read Height Limit (Feet) <= Vehicle Height (Feet).
So if the Height Limit (Feet) on the edge is less than or equal to the Vehicle Height (Feet) input in the analysis layer, the edge will be restricted.
- Click OK to accept the function.
- Leave the default value for the Walking_Pathways row.
On the walking paths, there is no height restriction and vehicles are not allowed on them anyway, so you do not need to set up this restriction for the walking paths.
- Click OK on the Network Dataset Properties dialog box to commit the changes made and close the dialog box.
Add a hierarchy attribute
Hierarchy is the order or rank assigned to network elements. Typically, there are 3-5 classes of roads, though more can be used. In a three-level hierarchy, the classes are primary, secondary, and local. Examples of local roads include small residential streets. Secondary roads might include the major roads through a town or a state route, and primary roads would include interstates and highways.
Learn more about hierarchy attributes
- In the Catalog pane, right-click the NewSanDiego_ND network dataset and choose Properties to open the Network Dataset Properties dialog box.
- Click the Travel Attributes page and click the Hierarchy tab.
- Check the Add Hierarchy Attribute box.
The hierarchy settings for the Ranges and Evaluators will appear.
- Change the upper range for Primary Roads to 2.
- Change the upper range for Secondary Roads to 4.
Note:
These are the ranges for this data, however, your data may be classified differently.
- For the Streets (Along) row, change the evaluator type to Field Script, then open the Evaluator Settings dialog box.
- In the Result box, type the following expression:
Cint([FUNC_CLASS])
The hierarchy attribute requires an integer input greater than 0. Because the FUNC_CLASS field is a text field, you need to use a simple method to convert the field value to an integer.
- Click OK to accept the expression.
- Repeat steps 6 through 8 for the Walking_Pathways (Along) row.
- Click OK on the Network Dataset Properties dialog box to commit the changes made and close the dialog box.
Add travel modes
A travel mode is essentially a template consisting of a long list of travel settings that define the physical characteristics of a vehicle or pedestrian. These characteristics are considered when performing network analysis to define how the vehicle or pedestrian travels and where it can go. Having a predefined travel mode allows you to quickly apply predetermined settings to your network analysis without having to manually choose each setting.
Travel modes can model general modes such as driving a car or walking, or they can model specific modes, such as driving a tractor trailer that cannot exceed a speed limit or driving an ambulance that can ignore certain traffic laws.
Travel modes are stored in the network dataset and can be modified in the analysis layer as needed.
You'll create five travel modes for three modes of travel: driving a car, driving a tour bus, and walking. For driving a car and driving a tour bus, you'll create distance-based and time-based travel modes. For walking, you'll only create a distance-based travel mode.
- In the Catalog pane, right-click the NewSanDiego_ND network dataset and choose Properties to open the Network Dataset Properties dialog box.
- Click the Travel Attributes page and the Travel Mode tab.
- Click the Menu button in the upper right corner of the dialog box and select New.
- Name the travel mode Automobile Time.
- Type something for the Description that indicates to you that this travel mode represents a time-based travel mode for driving a car.
- Leave the Type as Driving.
- In the Cost section, make sure the Impedance is set to Minutes.
- The Distance Cost should be Miles.
- In the Restrictions section, check the boxes for the following restrictions, as shown in the image below:
When setting the travel modes, only check one of the transportation methods (Driving an Automobile, Driving a Bus, or Walking). These restrictions indicate where it is legal for that mode of transportation to traverse. Checking more than one would improperly restrict or allow some edges.
You are not checking the Height Restriction attribute because typically cars do not have a problem with height restrictions on roads.
- In the U-Turns section, change the setting to Dead-Ends and Intersections.
- Expand the Advanced section if it is collapsed.
- In the Advanced section, check the box next to Use Hierarchy.
Hierarchy generally reduces the time it takes to solve an analysis on a large network. It also simulates how people prefer to drive because it, like people, prefers larger roads, such as interstates and highways, which are more predictable and simpler than local roads.
- From the Menu button , select Copy.
- Change the name of the new travel mode to Automobile Distance.
- Change the Impedance to Miles.
- In the Advanced section, uncheck the box next to Use Hierarchy.
Hierarchy makes the most sense to use with a time-based cost attribute. If the impedance is not based on time, using hierarchy in the solve may not produce realistic results.
- Create a travel mode named Tour Bus Time.
- Change the Impedance to Minutes.
- In the Restriction section, click Avoid Unpaved Roads.
- Change the Value for the Parameter Restriction Usage to Avoid (High).
The tour buses do not handle unpaved roads well. Given that, unpaved roads should only be used if necessary. Setting the Restriction Usage for this travel mode to Avoid (High) will ensure that.
- Make sure the check box for Avoid Unpaved Roads is checked.
- Click Height Restriction.
- Change the value of the Vehicle Height (Feet) parameter to 11.
Whatever value is populated here will be the default value used for assessing vehicle height against the height limit on the road. Eleven feet is a good default value for the vehicle height because most single-level tour buses average between 10 and 11 feet tall.
- In the U-Turns section, change the policy to None.
- In the Advanced section, check the box next to Use Hierarchy.
- Copy this travel mode and rename the new one Tour Bus Distance.
- Leave all properties the same except change the Impedance to Miles and uncheck the box to Use Hierarchy.
- Add a new travel mode called Walking Distance.
- Change the Type of the travel mode to Walking.
- Change the Impedance to Miles.
- Check only the Walking restriction.
Pedestrians don't have to worry about one-way roads, height restrictions, or unpaved roads, so those restrictions do not need to be turned on.
- Leave the U-Turn policy as All.
- Leave the Use Hierarchy check box unchecked.
The Walking restriction prevents pedestrian travel on many primary roads, such as interstates and highways, which hierarchy would prefer.
- Click OK on the Network Dataset Properties dialog box to commit the changes made and close the dialog box.
Update a cost attribute
Now that there is a hierarchy attribute on the network dataset, the Turn Category Evaluator will have more available categories for defining turn delays. You will return to the Minutes cost to update the Turn Category Evaluator with new delay times.
Learn more about the Turn Category Evaluator
- In the Catalog pane, right-click the NewSanDiego_ND network dataset and choose Properties to open the Network Dataset Properties dialog box.
- Click the Travel Attributes page, then click the Costs tab.
- Select the Minutes cost.
- Scroll down in the Minutes cost to see the Turns section.
- Double-click the Value column of <Default> to make the Turn Category Settings button available.
Notice that the Value now says that there are 20 turn categories, rather than the 5 it showed when you set up the Turn Category Evaluator.
- Click the Turn Category Settings button to open the Turn Category Evaluator dialog box.
The Turn Azimuth Range section remains the same, however, there is now a section called Road Classes. This section allows you to change which hierarchy values are counted as primary, secondary, or local roads for the Turn Category Evaluator.
By default, it will use the ranges defined in the hierarchy attribute. Unless you have a specific reason to change the ranges, leave the default ranges.
The Turn Category Travel Times section shows more categories of turns now that the roads can be classified by hierarchy.
- In the Left Turn group, change the Seconds value for the Local: Local :Any from 5 to 7.
The columns indicate the class of the road on which the turn starts, the class of the road on which it ends, and if any road is crossed (such as at a normal intersection), what the class of that road is. For example, if you needed to cross a major street to continue on a local alley, you would need to wait several seconds for traffic to clear. By default, this kind of maneuver gets a delay of 15 seconds. But if you only needed to cross another small road to continue on the alley, you wouldn’t need to wait as long. This maneuver has a delay of 2 seconds.
- Click OK to accept the changes and close the Turn Category Evaluator dialog box.
- Click OK on the Network Dataset Properties dialog box to commit the changes made and close the dialog box.
Set up directions
Directions are turn-by-turn instructions on how to navigate a route. The minimum requirements for a network dataset to support directions are as follows:
- A length attribute with length units
- At least one edge source
- At least one text field on the edge source
Basic directions can be set up with the bare minimum, but some features of directions may require more than that.
Learn more about setting directions
- In the Catalog pane, right-click the NewSanDiego_ND network dataset and choose Properties to open the Network Dataset Properties dialog box.
- Click the Directions page.
- Check the box next to Support Directions.
The Directions page and Field Mappings tab will be marked as having an invalid state (the red dashed underlining). Don’t worry about that for now. You will correct the problems when you get to the Field Mappings tab.
- Click the General tab.
- Leave all the default settings for the Attribute Mappings section.
Properties in the Attribute Mapping section will be attributes on the network dataset.
The Default Length Attribute is used to calculate the length of each segment of the route for which the directions are reported. The units of the chosen cost attribute will be used for the units in the directions.
The Default Time Attribute is used to calculate the time taken to traverse each segment during the reporting of directions.
The Feature Category and Maneuver Class properties are used for more fine-grained refinement of the directions. You can read more about these properties in the documentation.
- In the Auxiliary Data Sources section, set the following properties:
- Signpost Features: Signposts
- Signpost Join Table: Signposts_Streets
Properties in the Auxiliary Data Sources will be other feature classes in the same feature dataset as the network dataset or geodatabase tables.
The Signpost Features and Signpost Join Table attributes provide the type of directional information found on highway road signs, such as exit numbers, connecting roads, and major destinations that can be reached along the connecting roads. The properties are paired, and both must be specified if you want the directions to use signpost information.
Like the Feature Category and Maneuver Class attributes, the Road Forks table is used for more fine-grained directions on specific types of turns.
- Leave the default settings for Localized Names.
Network dataset sources may provide street names and signposts text in multiple languages. For example, some European countries have a few official languages, and street names may be in two or more languages in some areas. This setting determines whether directions should report street names in all available languages or only in the Directions language.
There are some data requirements that need to be done before choosing Preferred output directions language.
- Click the Field Mappings tab.
Street name fields can be set up for each edge source in the network. These are the names that are used to report directions.
- Increment the number of Alternate Names for the Streets (Edge) source.
A single edge source can have many names. For example, two highways may share the same stretch of road for several miles. The edges representing that stretch of road will have two names. To represent this situation in directions, you can use alternate names on edge sources.
- Decrement the number of Alternate Names for the Streets (Edge) source.
The tutorial data does not use alternate names, so you do not need to set them up.
- Populate the properties of the Primary Name for the Streets (Edge) and Walking_Pathways (Edge) sources shown in the image below:
Note:
Only the Base Name is required. All the other fields are optional.
Directions supports reporting street names in multiple languages. The Language field indicates in what language the names are. The primary name may be in one language while the alternate name is in another.
- Leave the default values for the Auxiliary Properties sections for Streets (Edge) and Walking_Pathways (Edge).
The Administrative Area field lists what administrative area the edge is in. Any change in administrative area is reported in the directions. For example, “Enter California” when crossing the state line.
The Level (From), Level (To), Floor Name (From), and Floor Name (To) function similarly to the Administrative Area but are useful when routing indoors. They report changes in level number and floor name, respectively.
- Click the Landmarks tab.
You’ll see two groups: Spatial Landmarks and Reference Landmarks. Spatial landmarks are feature classes, while reference landmarks are tables. Spatial landmarks rely on a spatial search at the time of the solve to determine when a landmark should be referenced. Reference landmarks have their location on the network built into the row, so that only a table search is required to use the landmark in the directions. By nature, a spatial search is slower than a regular table search, so reference landmarks perform faster than spatial landmarks.
Because spatial landmarks use a simple spatial search to determine their location, they are easy to set up. You need a point feature class with at least one text field, which will serve as the label for the landmarks. Other fields may be used to define other characteristics, such as a level, often used in indoor routing, or a custom search tolerance for each point feature.
Reference landmarks, on the other hand, require more work to set up. They need a specific schema and must be manually configured with a network location and other required fields.
You’ll be setting up both spatial and reference landmarks.
- Click the Add/Remove Spatial Landmarks... button.
The Add/Remove Spatial Landmarks dialog box will appear and there will be two groups in it. Confirmation guidance landmarks notify the driver that they are on the right way. For example, “Go by Eastlake Park on your left”. Turn guidance landmarks help the driver maneuver through a junction. For example, “Turn left before the Tall White Cylindrical Building on 1st Ave”.
Landmark feature classes must be in the same feature dataset as the network dataset. A single landmark feature class can be registered as both confirmation and turn guidance landmarks.
- Expand the tree view for MajorAttractions under the Confirmation Guidance group.
Landmark feature classes are registered as either confirmation guidance or turn guidance landmarks per edge source. In most cases, you’ll want to register a landmark feature class for all edge sources as either confirmation guidance or turn guidance landmarks, or for both.
- Check the box next to the top level MajorAttractions in both the Confirmation and Turn Guidance sections.
The MajorAttractions feature class represents major attractions in the city of San Diego. These attractions may be next to Streets or Walking_Pathways features. They also may be used for turn and confirmation guidance. So you’ll register the MajorAttractions feature class for all edge sources for both groups of landmarks.
Note that once you check the top level box, all the sublevel check boxes are also checked.
- Click OK to accept the registration of the spatial landmarks.
The grid under the Spatial Landmarks header will be filled in with the landmark registrations.
- Click the Field Mappings button.
The Spatial Landmarks Field Mappings dialog box will appear
By default, the Name field was selected for the Label Field for the landmarks and the Level Field was left at <None>.
- Click the drop-down lists for Label Field and Level Field and note the choices.
The Label Field drop-down list shows all text fields in the MajorAttractions feature class; the Level Field drop-down list shows all integer fields.
Making a change on this dialog box will set the field mappings for all guidance types and edge sources.
- For now, do not change any of the fields and click Cancel to close the Spatial Landmarks Field Mappings dialog box.
- Click the Add/Remove Reference Landmarks button.
The Add/Remove Reference Landmarks dialog box appears.
- Check the box next to Reference_Landmarks.
Only tables that have the required schema for reference landmarks will appear as candidates in this dialog box.
- Click OK to accept the registration of the reference landmarks.
The completed Landmarks tab should resemble the image below:
- Click OK on the Network Dataset Properties dialog box to commit the changes made and close the dialog box.
Build the network dataset
Now that you've made all the changes to the network dataset settings, you need to build the network. Building the network creates and updates the network edges, ensuring it has the most current information from the source features.
Learn more about when to build the network dataset
- On the Analysis ribbon, in the Geoprocessing group, click Tools to open the Geoprocessing pane.
- Click in the search bar in the Geoprocessing pane and type Build Network.
- Click the first result to open the Build Network tool.
- For the Input Network Dataset parameter, click the Browse button and browse to the NewSandiego_ND network dataset and click OK.
- Click the Run button at the bottom.